Exemplo n.º 1
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "modelType":
        modelName,
        "feederName1":
        "ieee37nodeFaultTester",
        "useDist":
        "True",
        "useVolt":
        "True",
        "useSVM":
        "False",
        "voltageFileName":
        "volt1.csv",
        "voltageData":
        open(
            pJoin(__neoMetaModel__._omfDir, "scratch", "smartSwitching",
                  "volt1.csv"), "r").read(),
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    try:
        shutil.copyfile(
            pJoin(__neoMetaModel__._omfDir, "static", "publicFeeders",
                  defaultInputs["feederName1"] + '.omd'),
            pJoin(modelDir, defaultInputs["feederName1"] + '.omd'))
    except:
        return False
    return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 2
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"modelType": modelName,
		"feederName1": "ieee37nodeFaultTester",
		"lineTypeForFaults": 'underground_line',
		"recloserLocation": "node730-709",
		'failureDistribution': 'EXPONENTIAL',
		'failureDistParam1': '3.858e-7',
		'failureDistParam2':'0.0',
		'restorationDistribution': 'PARETO',
		'restorationDistParam1': '1.0',
		'restorationDistParam2': '1.0002778',
		'maxFaultLength': '240',
		'kwh_cost': '1',
		'restoration_cost': '1',
		'average_hardware_cost': '1',
		'simTime': '2000-01-01 0:00:00',
		'faultType': 'TLG',
		'sustainedOutageThreshold': '60'
	}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	try:
		shutil.copyfile(pJoin(__neoMetaModel__._omfDir, "static", "publicFeeders", defaultInputs["feederName1"]+'.omd'), pJoin(modelDir, defaultInputs["feederName1"]+'.omd'))
	except:
		return False
	return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 3
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "modelType":
        modelName,
        "feederName1":
        "Olin Barre Fault",
        "numberOfCustomers":
        "192",
        "sustainedOutageThreshold":
        "300",
        "outageFileName":
        "outagesNew3.csv",
        "outageData":
        open(
            pJoin(__neoMetaModel__._omfDir, "scratch", "smartSwitching",
                  "outagesNew3.csv"), "r").read(),
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    try:
        shutil.copyfile(
            pJoin(__neoMetaModel__._omfDir, "static", "publicFeeders",
                  defaultInputs["feederName1"] + '.omd'),
            pJoin(modelDir, defaultInputs["feederName1"] + '.omd'))
    except:
        return False
    return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 4
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "user":
        "******",
        "load_type":
        "1",
        "number_devices":
        "2000",
        "power":
        "5.6",
        "capacitance":
        "2",
        "resistance":
        "2",
        "cop":
        "2.5",
        "setpoint":
        "22.5",
        "deadband":
        "0.625",
        "demandChargeCost":
        "25",
        "electricityCost":
        "0.06",
        "projectionLength":
        "15",
        "discountRate":
        "2",
        "unitDeviceCost":
        "150",
        "unitUpkeepCost":
        "5",
        "demandCurve":
        open(
            pJoin(__neoMetaModel__._omfDir, "static", "testFiles",
                  "FrankScadaValidVBAT.csv")).read(),
        "tempCurve":
        open(
            pJoin(__neoMetaModel__._omfDir, "static", "testFiles",
                  "weatherNoaaTemp.csv")).read(),
        "fileName":
        "FrankScadaValidVBAT.csv",
        "tempFileName":
        "weatherNoaaTemp.csv",
        'histFileName':
        'Texas_17yr_TempAndLoad.csv',
        "modelType":
        modelName,
        ## FORECAST ##
        'dispatch_type':
        'prediction',  # 'optimal'
        'confidence':
        '90',
        "histCurve":
        open(
            pJoin(__neoMetaModel__._omfDir, "static", "testFiles",
                  "Texas_17yr_TempAndLoad.csv"), 'rU').read(),
    }
    return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 5
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"load_type": "1",
		"number_devices": "2000",
		"transformerThreshold": "20",
		"confidence": "95",
		"power": "5.6",
		"capacitance": "2",
		"resistance": "2",
		"cop": "2.5",
		"setpoint": "22.5",
		"deadband": "0.625",
		"demandChargeCost":"25",
		"electricityCost":"0.06",
		"projectionLength":"15",
		"discountRate":"2",
		"unitDeviceCost":"150",
		"unitUpkeepCost":"5",
		"historicalData": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","Texas_17yr_TempAndLoad.csv")).read(),
		"filename": "Texas_17yr_TempAndLoad.csv",
		"modelType": modelName
	}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 6
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"load_type": "1",
		"number_devices": "2000",
		"power": "5.6",
		"capacitance": "2",
		"resistance": "2",
		"cop": "2.5",
		"setpoint": "22.5",
		"deadband": "0.625",
		"demandChargeCost":"25",
		"electricityCost":"0.06",
		"projectionLength":"15",
		"discountRate":"2",
		"unitDeviceCost":"150",
		"unitUpkeepCost":"5",
		"demandCurve": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","FrankScadaValidVBAT.csv")).read(),
		"tempCurve": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","weatherNoaaTemp.csv")).read(),
		"fileName": "FrankScadaValidVBAT.csv",
		"tempFileName": "weatherNoaaTemp.csv",
		'histFileName': 'Texas_17yr_TempAndLoad.csv',
		"modelType": modelName,
		## FORECAST ##
		'dispatch_type': 'prediction', # 'optimal'
		'confidence': '90',
		"histCurve": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","Texas_17yr_TempAndLoad.csv"), 'rU').read(),
		}
	return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 7
0
def new(modelDir):
    """ Create a new instance of this model. Returns true on success, false on failure. """
    defaultInputs = {
        "user":
        "******",
        "subMeterData":
        open(
            pJoin(
                __neoMetaModel__._omfDir,
                "static",
                "testFiles",
                "rec_sub_meter.csv",
            )).read(),
        "subMeterFileName":
        "rec_sub_meter.csv",
        "amiMeterData":
        open(
            pJoin(__neoMetaModel__._omfDir, "static", "testFiles",
                  "combined.csv")).read(),
        "amiMeterDataName":
        "combined.csv",
        "checkMeter":
        'Meter_17.csv',
        "modelType":
        modelName
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    return creationCode
Exemplo n.º 8
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"load_type": "1",
		"number_devices": "2000",
		"transformerThreshold": "20",
		"confidence": "95",
		"power": "5.6",
		"capacitance": "2",
		"resistance": "2",
		"cop": "2.5",
		"setpoint": "22.5",
		"deadband": "0.625",
		"demandChargeCost":"25",
		"electricityCost":"0.06",
		"projectionLength":"15",
		"discountRate":"2",
		"unitDeviceCost":"150",
		"unitUpkeepCost":"5",
		"historicalData": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","Texas_17yr_TempAndLoad.csv")).read(),
		"filename": "Texas_17yr_TempAndLoad.csv",
		"modelType": modelName
	}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 9
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"load_type": "1",
		"number_devices": "2000",
		"power": "5.6",
		"capacitance": "2",
		"resistance": "2",
		"cop": "2.5",
		"setpoint": "22.5",
		"deadband": "0.625",
		"demandChargeCost":"25",
		"electricityCost":"0.06",
		"projectionLength":"15",
		"discountRate":"2",
		"unitDeviceCost":"150",
		"unitUpkeepCost":"5",
		"demandCurve": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","FrankScadaValidVBAT.csv")).read(),
		"tempCurve": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","weatherNoaaTemp.csv")).read(),
		"fileName": "FrankScadaValidVBAT.csv",
		"tempFileName": "weatherNoaaTemp.csv",
		"modelType":modelName}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 10
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"modelType": modelName,
		"user": "******",
		"goal": "deferral",
		"confidence": "80",
		"demandChargeCost":"25",
		"electricityCost":"0.06",
		"projectionLength":"15",
		"discountRate":"2",
		"historicalData": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","Texas_17yr_TempAndLoad.csv"), 'rU').read(),
		"filename": "Texas_17yr_TempAndLoad.csv",
		"transformerThreshold": "20",
		"batteryEfficiency": "92",
		"inverterEfficiency": "97.5",
		"cellCapacity": "7",
		"dischargeRate": "5",
		"chargeRate": "5",
		"cellCost": "7140",
		"cellQuantity": "25",
		"projYears": "15",
		"chargePriceThreshold": "0.07",
		"dischargePriceThreshold":"0.15",
		"dodFactor":"100",
		"batteryCycleLife": "5000"
	}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 11
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	ind = {
		"user": "******",
		"load_type": "1",
		"number_devices": "2000",
		"power": "5.6",
		"capacitance": "2",
		"resistance": "2",
		"cop": "2.5",
		"setpoint": "22.5",
		"deadband": "0.625",
		"demandChargeCost":"25",
		"electricityCost":"0.06",
		"projectionLength":"15",
		"discountRate":"2",
		"unitDeviceCost":"150",
		"unitUpkeepCost":"5",
		#"demandCurve": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","FrankScadaValidVBAT.csv")).read(),
		#"tempCurve": open(pJoin(__neoMetaModel__._omfDir,"static","testFiles","weatherNoaaTemp.csv")).read(),
		#"fileName": "FrankScadaValidVBAT.csv",
		#"tempFileName": "weatherNoaaTemp.csv",
		#"modelType": modelName
	}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 12
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"modelType": modelName,
		"circString":"$ 1 0.000005 10.20027730826997 50 5 43\nr 176 64 384 64 0 10\ns 384 64 448 64 0 1 false\nw 176 64 176 336 0\nc 384 336 176 336 0 0.000014999999999999999 2.2688085065409958\nl 384 64 384 336 0 1 0.035738623044691664\nv 448 336 448 64 0 0 40 5 0 0 0.5\nr 384 336 448 336 0 100\no 4 64 0 2083 20 0.05 0 -1 0",
		"user":"******"
	}
	return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 13
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"modelType": modelName,
		"circString":"$ 1 0.000005 10.20027730826997 50 5 43\nr 176 64 384 64 0 10\ns 384 64 448 64 0 1 false\nw 176 64 176 336 0\nc 384 336 176 336 0 0.000014999999999999999 2.2688085065409958\nl 384 64 384 336 0 1 0.035738623044691664\nv 448 336 448 64 0 0 40 5 0 0 0.5\nr 384 336 448 336 0 100\no 4 64 0 2083 20 0.05 0 -1 0",
		"user":"******"
	}
	return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 14
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user" : "admin",
		"modelType": modelName,
		"input1": "abc1 Easy as...",
		"input2": "123 Or Simple as...",
		"created":str(datetime.datetime.now())
	}
	return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 15
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user" : "admin",
		"modelType": modelName,
		"input1": "abc1 Easy as...",
		"input2": "123 Or Simple as...",
		"created":str(datetime.datetime.now())
	}
	return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 16
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "modelType":
        modelName,
        "user":
        "******",
        "goal":
        "deferral",
        "confidence":
        "80",
        "demandChargeCost":
        "25",
        "electricityCost":
        "0.06",
        "projectionLength":
        "15",
        "discountRate":
        "2",
        "historicalData":
        open(
            pJoin(__neoMetaModel__._omfDir, "static", "testFiles",
                  "Texas_17yr_TempAndLoad.csv"), 'rU').read(),
        "filename":
        "Texas_17yr_TempAndLoad.csv",
        "transformerThreshold":
        "20",
        "batteryEfficiency":
        "92",
        "inverterEfficiency":
        "97.5",
        "cellCapacity":
        "7",
        "dischargeRate":
        "5",
        "chargeRate":
        "5",
        "cellCost":
        "7140",
        "cellQuantity":
        "25",
        "projYears":
        "15",
        "chargePriceThreshold":
        "0.07",
        "dischargePriceThreshold":
        "0.15",
        "dodFactor":
        "100",
        "batteryCycleLife":
        "5000"
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    return creationCode
Exemplo n.º 17
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"source":"USCRN",#"source":"METAR",
		"year":"2017",
		"station":"IAD",
		"weatherParameter":"T_CALC",#"weatherParameter":"tmpc",
		"state_city":"KY_Versailles_3_NNW",
		"modelType":modelName}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 18
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"source":"ASOS", #"source":"USCRN",#
		"year":"2017",
		"stationASOS":"CHO",
		"stationUSCRN":"AK_Barrow_4_ENE",
		"weatherParameterUSCRN":"T_CALC",
		"weatherParameterASOS":"tmpc",
		"modelType":modelName}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 19
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		#"source":"ASOS", 
		"source": "USCRN",
		"year": "2013",
		"stationASOS": "LWD",
		"stationUSCRN": "KY_Versailles_3_NNW",
		"weatherParameterUSCRN": "SOLARAD",
		"weatherParameterASOS": "tmpc",
		"modelType": modelName}
	return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 20
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "user": "******",
        #"source":"ASOS",
        "source": "USCRN",
        "year": "2013",
        "stationASOS": "LWD",
        "stationUSCRN": "KY_Versailles_3_NNW",
        "weatherParameterUSCRN": "SOLARAD",
        "weatherParameterASOS": "tmpc",
        "modelType": modelName
    }
    return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 21
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "modelType":
        modelName,
        "feederName1":
        "ieee37nodeFaultTester",
        "recloserLocation":
        "node730-709",
        'kwh_cost':
        '1',
        'restoration_cost':
        '1',
        'average_hardware_cost':
        '1',
        'simTime':
        '2000-01-01 0:00:00',
        'faultType':
        'TLG',
        'sustainedOutageThreshold':
        '60',
        "outageFileName":
        "outagesNew4.csv",
        "outageData":
        open(
            pJoin(__neoMetaModel__._omfDir, "scratch", "smartSwitching",
                  "outagesNew4.csv"), "r").read(),
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    try:
        shutil.copyfile(
            pJoin(__neoMetaModel__._omfDir, "static", "publicFeeders",
                  defaultInputs["feederName1"] + '.omd'),
            pJoin(modelDir, defaultInputs["feederName1"] + '.omd'))
    except:
        return False
    return __neoMetaModel__.new(modelDir, defaultInputs)
Exemplo n.º 22
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"load_type": "4",
		"zipcode": "'default'",
		"number_devices": "100",
		"power": "5.6",
		"capacitance": "2",
		"resistance": "2",
		"cop": "2.5",
		"setpoint": "22.5",
		"deadband": "0.625",
		"modelType":modelName}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode
Exemplo n.º 23
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "user": "******",
        "load_type": "4",
        "zipcode": "'default'",
        "number_devices": "100",
        "power": "5.6",
        "capacitance": "2",
        "resistance": "2",
        "cop": "2.5",
        "setpoint": "22.5",
        "deadband": "0.625",
        "modelType": modelName
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    return creationCode
Exemplo n.º 24
0
def new(modelDir):
	''' Create a new instance of this model. Returns true on success, false on failure. '''
	defaultInputs = {
		"user": "******",
		"networkName1": "case9",
		"algorithm": "NR",
		"model": "AC",
		"tolerance": "0.00000001",
		"iteration": 10,
		"genLimits": 0,
		"modelType":modelName}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	try:
		shutil.copy(pJoin(__neoMetaModel__._omfDir,"static","SimpleNetwork.json"),pJoin(modelDir,"case9.omt"))
	except:
		return False
	return creationCode
Exemplo n.º 25
0
def new(modelDir):
    ''' Create a new instance of this model. Returns true on success, false on failure. '''
    defaultInputs = {
        "user": "******",
        "networkName1": "case9",
        "algorithm": "NR",
        "model": "AC",
        "tolerance": "0.00000001",
        "iteration": 10,
        "genLimits": 0,
        "modelType": modelName
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    try:
        shutil.copy(
            pJoin(__neoMetaModel__._omfDir, "static", "SimpleNetwork.json"),
            pJoin(modelDir, "case9.omt"))
    except:
        return False
    return creationCode
Exemplo n.º 26
0
def new(modelDir):
    """ Create a new instance of this model. Returns true on success, false on failure. """
    defaultInputs = {
        "user":
        "******",
        "demandTemp":
        open(
            pJoin(
                __neoMetaModel__._omfDir,
                "static",
                "testFiles",
                "ERCOT_south_shortened.csv",
            )).read(),
        "fileName":
        "ERCOT_south_shortened.csv",
        "nn":
        open(
            pJoin(__neoMetaModel__._omfDir, "static", "testFiles",
                  "d_Texas_17yr_TempAndLoad.csv")).read(),
        "nnFileName":
        "d_Texas_17yr_TempAndLoad.csv",
        "lowBound":
        0.95,
        "upBound":
        1.05,
        "rollingWindow":
        4,
        "alpha":
        0.95,
        "beta":
        0.05,
        "simStartDate":
        "2002-01-01",
        "modelType":
        modelName,
    }
    creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
    return creationCode
Exemplo n.º 27
0
def new(modelDir):
	""" Create a new instance of this model. Returns true on success, false on failure. """
	defaultInputs = {
		"user": "******",
		"demandTemp": open(
			pJoin(
				__neoMetaModel__._omfDir,
				"static",
				"testFiles",
				"ERCOT_south_shortened.csv",
			)
		).read(),
		"fileName": "ERCOT_south_shortened.csv",
		"lowBound": 0.95,
		"upBound": 1.05,
		"rollingWindow": 4,
		"alpha": 0.95,
		"beta": 0.05,
		"simStartDate": "2002-01-01",
		"modelType": modelName,
	}
	creationCode = __neoMetaModel__.new(modelDir, defaultInputs)
	return creationCode