def __init__(self, uuid, name :str): super(Model, self).__init__(uuid,name) self.inputs['times'] = Input(name='Times', unit='s', info='utc time array') self.inputs['values'] = Input(name='Values', unit='any', info='value array') self.outputs['data_histfore'] = Output(name='Historical and forecast data', unit='div', info='{time_hist, time_forecast, value_hist, value_forecast}') self.outputs['y_scaling'] = Output(name='Scaling of y axis', unit='', info='Scaling of y axis') self.outputs['y_label'] = Output(name='y label', unit='', info='Label of y axis') self.properties["filter"] = Property(default='', data_type=str, name='Filter', unit='-', info='comma separated dict keys and array indexes', example='"speed", 2') self.properties["num_hist"] = Property(default=0, data_type=int, name='Number historical data', unit='-', info='Number of historical data to be saved (0=unlimited)', example='100') self.properties["scaling"] = Property(default=1, data_type=float, name='Scaling factor', unit='-', info='Scaling factor for y axis', example='1e-9') self.properties["y_labeling"] = Property(default='Property', data_type=str, name='y label', unit='-', info='Label for y axis', example='Demand [GW]') self.data_hist_forecast = {"historic": {}, "forecast": {}} self.data_hist_forecast["historic"]["time"] = [] self.data_hist_forecast["historic"]["value"] = [] self.data_hist_forecast["forecast"]["time"] = [] self.data_hist_forecast["forecast"]["value"] = [] self.y_scaling = None self.y_labeling = None
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['KW'] = Input(name='KW info', unit='-', info="KW information (u.a. id, lat, lon)") self.inputs['date'] = Input(name='Futures', unit='s', info="Time vector of futures in utc timestamp [s]") self.inputs['Demand_loc'] = Input(name='Demand locations', unit='id, lat, long', info="Demand locations (one location per country)") # define outputs self.outputs['KW_weather'] = Output(name='Weather data of KWs', unit='dict{id, windspeed, radiation, windmesshoehe}', info='weather data of KWs') self.outputs['Demand_weather'] = Output(name='Weather data for demand', unit='dict{id, lat, long, temperature}', info='weather data for demand calculation') self.outputs['Futures_weather'] = Output(name='Weather data', unit='s, °C, m/s, W/m^2', info='weather data for 25 points (time, temperature, wind speed, radiation)') self.outputs['Map_weather'] = Output(name='Weather data for map', unit='s, °C, m/s, W/m^2', info='weather data interpolated on grid (time, temperature, wind speed, radiation)') # define properties self.properties['T_offset'] = Property(default=0., data_type=float, name='temperature offset', unit='%', info="offset of temperature in %", example='100: doubles the value') self.properties['u_offset'] = Property(default=0., data_type=float, name='wind speed offset', unit='%', info="offset of wind speed in %", example='100: doubles the value') self.properties['P_offset'] = Property(default=0., data_type=float, name='radiation offset', unit='%', info="offset of radiation in %", example='100: doubles the value') self.properties['ref_year'] = Property(default=2007, data_type=int, name='reference year', unit='-', info="reference year for modeled weather (2007-2016; provided data for 2006-2017)", example='2007') # define persistent variables self.data_hist = None self.ref_year = None
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.inputs['in1'] = Input('Number', unit='num') self.inputs['in2'] = Input('Number', unit='num') self.inputs['in3'] = Input('Number', unit='num') self.outputs['sum'] = Output('Sum', unit='num')
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.inputs['dividend'] = Input('Dividend', unit='num') self.inputs['divisor'] = Input('Divisor', unit='num') self.outputs['quotient'] = Output('Quotient', unit='num') self.outputs['floor_quotient'] = Output('Floor Quotient', unit='num') self.outputs['floor_modulus'] = Output('Floor Modulus', unit='num')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['weather'] = Input('WeatherData', unit='Wind speed[m/s], Wind measurement height[m]', info='dict') self.inputs['kwDaten'] = Input('PowerPlantsData',unit='Hub-height[m], Ground roughness length[m]', info='dict') # define outputs self.outputs['load'] = Output('Load', info='load of all wind turbines, value[0-1]')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['weather'] = Input('WeatherData', unit='Global radiations[W/m^2]', info='dict') self.inputs['kwDaten'] = Input('PowerPlantsData', info='dict, power plant id required') # define outputs self.outputs['load'] = Output('Load', info='load of all photovoltaic power plants, value[0-1]')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['mode'] = Input(name='modus', unit='-', info="modus (is live of not") self.inputs['KW'] = Input(name='KW info', unit='-', info="KW informations (u.a. id, lat, lon)") self.inputs['date'] = Input( name='Futures', unit='s', info="Time vector of futures in utc timestamp [s]") # define outputs self.outputs['KW_weather'] = Output(name='weather data of KWs', unit='date, °C, m/s, W/m^2', info='weather data of KWs') self.outputs['Futures_weather'] = Output( name='weather data', unit='date, °C, m/s, W/m^2', info='(future) weather data (temperature, wind speed, radiation)') # define properties self.properties['T_offset'] = Property( default=0., data_type=float, name='temperature offset', unit='%', info="offset of temperature in %") self.properties['u_offset'] = Property( default=0., data_type=float, name='wind speed offset', unit='%', info="offset of wind speed in %") self.properties['P_offset'] = Property(default=0., data_type=float, name='radiation offset', unit='%', info="offset of radiation in %") self.properties['ref_year'] = Property( default=2007, data_type=int, name='reference year', unit='-', info="reference year for modeled weather") # define persistent variables self.data_hist = None self.data_hist_year = None self.ref_year = None
def __init__(self, uuid, name :str): super(Model, self).__init__(uuid,name) self.inputs['times'] = Input(name='Times', unit='s', info='utc time array') self.inputs['values'] = Input(name='Values', unit='any', info='value array') self.outputs['times_out'] = Output(name='Times', unit='times]', info='utc time arry') self.outputs['values_out'] = Output(name='Filtered values', unit='values', info='filtered value array') self.properties["filter"] = Property(default='', data_type=str, name='Filter', unit='-', info='comma separated dict keys and array indexes', example='"speed", 2')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['futures'] = Input( 'Futures', unit='s', info='utc time array in seconds since epoch') self.inputs['kwDaten'] = Input('PowerPlantsData', info='dict, power plant id required ') # define outputs self.outputs['load'] = Output( 'Load', info='load of all running-water power plants, value[0-1]')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['CombinedLoad'] = Input( 'CombinedLoad', info='combined load of all types of power plants, value[0-1]') self.inputs['KWDaten'] = Input('PowerPlantsData', unit='W', info='dict, power will be extracted') # define outputs self.outputs['scaled_power'] = Output('Power', unit='W')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['AuslastungallerKWs'] = Input( 'CombinedLoad', info='combined load of all types of power plants, value[0-1]') self.inputs['KWDaten'] = Input('PowerPlantsData', unit='capex[€/W], spez_opex[1/s]', info='dict') # define outputs self.outputs['opex'] = Output('OPEX', unit='[€/J]')
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.inputs['to_store'] = Input('To Store') self.outputs['stored'] = Output('Stored') self.stored = 0
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['dist_net'] = Input(name='Distribution networks', unit='{-, {Grad, Grad}}', info='distribution networks') # define outputs self.outputs['dist_cost'] = Output(name='Distribution cost', unit='€/J', info='distribution cost') # define properties cost_constant_def = 36000 cost_constant_def = json.dumps(cost_constant_def) self.properties['cost_const'] = Property( default=cost_constant_def, data_type=str, name='constant dist cost', unit='€/km*MWh', info='constant distribution costs', example='36000') # persistent variables self.cost_constant = None
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.elapsed = 0 self.inputs['time'] = Input(name='Time', unit='s', info='utc time in seconds since epoch') self.outputs['times'] = Output( name='Futures', unit='s', info='utc time array in seconds since epoch') self.properties["interval"] = Property( default=1, data_type=float, name='Interval time', unit='s', info='Time between each time stamps') self.properties["future_steps"] = Property( default=1, data_type=int, name='Number of intervals', unit='-', info='Number of time stamps')
def __init__(self, model_id, name: str): # instantiate supermodel super(Model, self).__init__(model_id, name) # define inputs self.inputs['KWData'] = Input(name='Power Plant', unit='-', info='European Power Plant') self.inputs['Locations'] = Input(name='Locations', unit='-', info='Locations with geographical coordinates') # define outputs self.outputs['DistanceFactor'] = Output(name='DistanceFactor', unit='[€/km*MWh]', info='Distance factor') # define properties self.properties['NetworkCost'] = Property(default=148E9, data_type=float, name='Network cost', unit='€', info="Network cost * annual amount of energy", example='148*10^9 € (Mittelspannung, Churwalden 2017)') # define persistent variables self.NetworkCost = None
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.inputs['time'] = Input({ 'name': 'time', 'unit': 'float', 'dimensions': [] })
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['Futures'] = Input(name='Futures', unit='s', info="Futures") self.inputs['Staos'] = Input(name='Distribution networks', unit='-', info="Distribution networks") self.inputs['Market_price'] = Input(name='Market price', unit='€/J', info="Market price") self.inputs['KW_data'] = Input(name='KW data', unit='-', info="KW data") self.inputs['Tiers_prices'] = Input(name='Tiers prices', unit='€/J', info="Tiers prices") # define outputs #self.outputs['KW_weather'] = Output(name='Weather data of KWs', unit='dict{id, windspeed, radiation, windmesshoehe}', info='weather data of KWs') # define properties self.properties['date_start'] = Property('Simulation Start (UTC)', default="2018-01-01 00:00", data_type=str, unit='YYYY-MM-DD hh:mm') self.properties['date_delta_time'] = Property( 'Simulation time increase', default=1, data_type=float, unit='s', info= 'Amount of seconds the simulation time increases with each iteration' ) self.properties['date_end'] = Property('Simulation Stop (UTC)', default="2999-01-01 00:00", data_type=str, unit='YYYY-MM-DD hh:mm') # Define persistent variables self.date_start = None self.date_delta = None self.date_end = None
def __init__(self, model_id, name: str): # instantiate supermodel super(Model, self).__init__(model_id, name) # define inputs self.inputs['Standorte'] = Input('SPGLocations', info='dict containing location names and coordinates [lat/lon] of SPGs') self.inputs['KWDaten'] = Input('PowerPlantsData', info='dict containing power plant information, including coordinates') # define outputs self.outputs['Distanzkosten'] = Output('DistanceCost', unit='[€/m*J]') # define properties self.properties['dis_factor'] = Property('DistanceFactor', default=0.021, data_type=float, unit='[€/km*MWh]') self.DistanzFaktor = None
def __init__(self, uuid, name :str): super(Model, self).__init__(uuid,name) self.inputs['number'] = Input('Number', unit='-', info="The number that gets multiplied", example='2') self.properties['multiplier'] = Property('Multiplier', default=1, data_type=float, unit='float', info='The multiplier', example='2') self.outputs['product'] = Output('Product', unit='-', info="The resulting product", example='2')
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.inputs['fut'] = Input( name='Futures', unit='s', info='utc time array in seconds since epoch', example='[1530792535, 1530792540, 1530792545]') self.inputs['demand'] = Input( name='European demand', unit='W', info='European power demand for each time step') self.inputs['power'] = Input( name='Power', unit='W', info='Power for each power plant and time step') self.inputs['power_plants'] = Input(name='Power Plants', unit='-', info='Power Plants') self.inputs['distance_costs'] = Input( name='Distance costs', unit='€/J', info='Distance costs for each power plant and distribution network' ) self.outputs['market_prices'] = Output( name='Market prices', unit='€/J', info='Market prices for each distribution network and time step') self.outputs['power_plants2'] = Output( name='Power Plants', unit='-', info='Power Plants with additional information') self.outputs['sorted_pp_id'] = Output( name='Sorted power plant ids', unit='-', info='sorted power plant ids for each distribution network') self.outputs['fut2'] = Output( name='Futurs', unit='s', info='utc time array in seconds since epoch') self.outputs['demands2'] = Output( name='Demands', unit='W', info='European power demand for each time step')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['dist_net'] = Input(name='distribution networks', unit='-', info='distribution networks') self.inputs['futures'] = Input(name='futures networks', unit='s', info='futures') # define outputs self.outputs['dist_cost'] = Output(name='distribution cost', unit='undet', info='distribution cost') # define properties cost_constant_def = [100] cost_constant_def = json.dumps(cost_constant_def) self.properties['cost_const'] = Property(default=cost_constant_def, data_type=str, name='constant dist cost', unit='-', info='constant distribution costs', example='[100, 110, 120]') # persistent variables self.cost_constant = None
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['stock_ex_price'] = Input(name='Stock exchange price', unit='€/J', info="stock exchange price") self.inputs['distnet_costs'] = Input(name='Distribution network cost', unit='{-, €/J}', info="distribution network cost") self.inputs['service_cost'] = Input(name='Service cost', unit='€/J', info="service cost") self.inputs['taxes'] = Input(name='Taxes', unit='€/J', info="taxes") self.inputs['futures'] = Input(name='Futures', unit='s', info="Futures") # define outputs self.outputs['el_rate'] = Output(name='Electricity rate', unit='€/J', info='electricity rate') self.outputs['times'] = Output(name='Times', unit='s', info='Times') self.outputs['y_scaling'] = Output(name='Scaling of y axis', unit='', info='Scaling of y axis') self.outputs['y_unit'] = Output(name='Unit of y axis', unit='', info='Unit of y axis') self.outputs['y_label'] = Output(name='y label', unit='', info='Label of y axis') # define properties ET_def = {"location": ["Baden"], "border": [[-1.0, -0.5, -0.2, 0.0, 0.2, 0.5, 1.0]], "weight": [[-0.3, -0.6, -0.8, 1.1, 1.3, 1.5]]} NT_def = {"location": ["Baden"], "border": [[-1.0, -0.8, -0.5, 0.0, 0.4, 0.8, 1.0]], "weight": [[-0.5, -0.6, -0.8, 1.2, 1.5, 1.8]]} ET_def = json.dumps(ET_def) NT_def = json.dumps(NT_def) self.properties['weight_ET'] = Property(default=ET_def, data_type=str, name='energy tiers', unit='-', info='borders and weights of energy tiers', example=ET_def) self.properties['weight_NT'] = Property(default=NT_def, data_type=str, name='net tiers', unit='-', info='borders and weights of net tiers', example=NT_def) self.properties["scaling"] = Property(default=1, data_type=float, name='Scaling factor', unit='-', info='Scaling factor for y axis', example='3.6e9') self.properties["y_unit"] = Property(default='€/MWh', data_type=str, name='unit of y label', unit='-', info='Unit of label for y axis', example='[€/MWh]') self.properties["y_labeling"] = Property(default='Price', data_type=str, name='y label', unit='-', info='Label for y axis', example='Price [€/MWh]') # define persistent variables self.weight_ET = None self.weight_NT = None self.y_scaling = None self.y_unit = None self.y_labeling = None
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.inputs['in'] = Input(name='Numbers', unit='any', info='number or number array') self.outputs['sin'] = Output(name='Sin', unit='any', info='number or number array')
def __init__(self, model_id, name: str): # instantiate supermodel super(Model, self).__init__(model_id, name) # define inputs self.inputs['KWDaten'] = Input('PowerPlantsData', unit='[€/J]', info='complete power plant information') # define outputs self.outputs['Grenzkosten'] = Output('MarginalCost', unit='[€/J]')
def __init__(self, uuid, name: str): super(Model, self).__init__(uuid, name) self.inputs['input'] = Input('Input') self.outputs['output'] = Output('Output') self.properties['sleep_amount'] = Property('Sleep Amount', default=1, data_type=float, unit='s')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['WTAuslastung'] = Input( 'LoadWindTurbine', info='load of all wind turbines, value[0-1]') self.inputs['PVAuslastung'] = Input( 'LoadPhotovoltaic', info='load of all photovoltaic power plants, value[0-1]') self.inputs['LaufwasserKWAuslastung'] = Input( 'LoadRunningWaterPowerPlant', info='load of all running-water power plants, value[0-1]') self.inputs['SpeicherwasserKWAuslastung'] = Input( 'LoadStoragePowerPlant', info='load of all storage power plants, value[0-1]') self.inputs['KWDaten'] = Input('PowerPlantsData', info='dict, power plant id required') self.inputs['futures'] = Input( 'Futures', unit='s', info='utc time array in seconds since epoch') # define outputs self.outputs['GemeinsameAuslastung'] = Output( 'CombinedLoad', info='combined load of all types of power plants, value[0-1]')
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['futures'] = Input('Futures', unit='s', info='utc time array in seconds since epoch') self.inputs['kwDaten'] = Input('PowerPlantsData', info='dict, power plant id required') # define outputs self.outputs['load'] = Output('Load', info='load of all running-water power plants, value[0-1]') self.ref_year = 2016 ref_dates = [[self.ref_year, 1, 1], [self.ref_year, 1, 8], [self.ref_year, 1, 12], [self.ref_year, 1, 17], [self.ref_year, 1, 26], [self.ref_year, 2, 1], [self.ref_year, 2, 8], [self.ref_year, 2, 10], [self.ref_year, 2, 12], [self.ref_year, 2, 14], [self.ref_year, 2, 20], [self.ref_year, 2, 26], [self.ref_year, 3, 1], [self.ref_year, 3, 6], [self.ref_year, 3, 14], [self.ref_year, 3, 28], [self.ref_year, 4, 7], [self.ref_year, 4, 11], [self.ref_year, 4, 19], [self.ref_year, 4, 22], [self.ref_year, 4, 24], [self.ref_year, 4, 30], [self.ref_year, 5, 2], [self.ref_year, 5, 8], [self.ref_year, 5, 11], [self.ref_year, 5, 13], [self.ref_year, 5, 22], [self.ref_year, 6, 1], [self.ref_year, 7, 7], [self.ref_year, 7, 10], [self.ref_year, 7, 13], [self.ref_year, 7, 20], [self.ref_year, 7, 30], [self.ref_year, 8, 4], [self.ref_year, 8, 5], [self.ref_year, 8, 7], [self.ref_year, 8, 16], [self.ref_year, 8, 19], [self.ref_year, 9, 4], [self.ref_year, 9, 6], [self.ref_year, 9, 18], [self.ref_year, 9, 19], [self.ref_year, 10, 14], [self.ref_year, 10, 24], [self.ref_year, 10, 26], [self.ref_year, 11, 4], [self.ref_year, 11, 6], [self.ref_year, 11, 9], [self.ref_year, 11, 11], [self.ref_year, 11, 16], [self.ref_year, 11, 19], [self.ref_year, 12, 1], [self.ref_year, 12, 11], [self.ref_year, 12, 18], [self.ref_year, 12, 1], [self.ref_year + 1, 1, 1]] self.ref_dates = np.array([datetime2utc_time(dt(d[0], d[1], d[2])) for d in ref_dates]) self.ref_loads = np.array([0.300, 0.512, 1.0, 0.5447, 0.432, 1, 0.748, 0.834, 0.742, 0.8473, 0.6227, 0.7887, 0.674, 0.8247, 0.541, 0.431, 0.646, 0.5747, 1.0, 0.8, 0.9687, 0.778, 0.925, 0.6827, 0.682, 1.0, 0.994, 1.0, 1.0, 0.882, 1.0, 1.0, 0.827, 0.774, 1.0, 1.0, 0.742, 0.805, 0.550, 0.77, 0.524, 0.552, 0.328, 0.336, 0.542, 0.372, 0.534, 0.49, 0.762, 0.534, 0.704, 0.425, 0.340, 0.316, 0.284, 0.300])
def __init__(self, id, name: str): # instantiate supermodel super(Model, self).__init__(id, name) # define inputs self.inputs['Futures'] = Input(name='Futures', unit='s', info="Futures") #self.inputs['Weather'] = Input(name='Weather', unit='-', info="Weather") self.inputs['Demand'] = Input(name='Demand', unit='W', info="Demand") self.inputs['Power'] = Input(name='Power', unit='W', info="Power loads of KW's") # define outputs #self.outputs['KW_weather'] = Output(name='Weather data of KWs', unit='dict{id, windspeed, radiation, windmesshoehe}', info='weather data of KWs') # define properties self.properties['date_start'] = Property('Simulation Start (UTC)', default="2018-01-01 00:00", data_type=str, unit='YYYY-MM-DD hh:mm') self.properties['date_delta_time'] = Property('Simulation time increase', default=1, data_type=float, unit='s', info='Amount of seconds the simulation time increases with each iteration') self.properties['date_end'] = Property('Simulation Stop (UTC)', default="2999-01-01 00:00", data_type=str, unit='YYYY-MM-DD hh:mm') # Define persistent variables self.date_start = None self.date_delta = None self.date_end = None
def __init__(self, model_id, name: str): # instantiate supermodel super(Model, self).__init__(model_id, name) # define inputs self.inputs['t'] = Input('Zeit') # define outputs self.outputs['kw_park'] = Output('Kraftwerkspark') # define persistent variables self.db = None self.kwp = None
def __init__(self, model_id, name: str): # instantiate supermodel super(Model, self).__init__(model_id, name) # define inputs self.inputs['v'] = Input('wind speed') self.inputs['dir'] = Input('wind direction') # define outputs self.outputs['p_el'] = Output('electrical power') self.outputs['f_rot'] = Output('rotor frequency') # define properties self.properties['h_hub'] = Property('hub height', default=10, data_type=float) self.properties['d'] = Property('diameter', default=10, data_type=float) # define persistent variables self.pers_variable_0 = 5