diff --git a/runme.py b/runme.py index 9f92ff7b955bb457e939dd3506cae04fe98b5d62..a72da3a7811e49fcf807ab376f1c5772dd932da7 100644 --- a/runme.py +++ b/runme.py @@ -9,8 +9,8 @@ class SimulationScope(Enum): DISTRICT = 2 simulation_scope = SimulationScope.DISTRICT -t_start = pd.Timestamp("2019-05-10 00:00:00") # start time of simulation -t_horizon = 240 # number of time steps to be simulated +t_start = pd.Timestamp("2019-01-01 00:00:00") # start time of simulation +t_horizon = 100 # number of time steps to be simulated t_step = 1 # length of a time step in hours input_profile_dict = {'irradiance_1': ['irradiance', 'input_files/data/irradiance/Lindenberg2006BSRN_Irradiance_60sec.csv'], @@ -30,10 +30,54 @@ input_profile_dict = {'irradiance_1': ['irradiance', 'input_files/data/irradianc 'demand_hot_water_3': ['hot_water_demand', 'generate', 0, 'temperature_3'], 'elec_price_1': ['elec_price', 'input_files/data/prices/day-ahead/hourly_price.csv']} +inputpath_dataframe=r'C:\git\ineed-dc-framework\input_files\models\prosumer_models\building_types_aachen\prosumer_type_configs' +b=pd.read_csv(inputpath_dataframe) + +for i in b.index: + input_profile_dict['demand_electric_'+ str(i)] = ['elec_demand', 'generate', b.loc[i,'Electricity_demand']] + input_profile_dict['demand_heat_'+ str(i)] = ['therm_demand', 'generate', b.loc[i,'Thermal_demand'], 'temperature_1'] + input_profile_dict['demand_hot_water_'+ str(i)] = ['hot_water_demand', 'generate', b.loc[i,'HotWater_demand'], 'temperature_1'] + input_profiles = Tooling.input_profile_processor.input_profile_processor.process_input_profiles(input_profile_dict, t_start, t_horizon, t_step) # 'config_path': path to global configurations like prices, injection prices, emission costs, etc. # 'topology_path': path to directory that contains the matrices that define the prosumer topology +prosumer_dict = {} + +for i in b.index: + if 'PV' in b.loc[i,'ID_building'] and 'HP' in b.loc[i, 'ID_building']: + prosumer_dict[b.loc[i,'ID_building']]= {'config_path': 'input_files/models/prosumer_models/building_types_aachen/' + + str(b.loc[i,'ID_building']) + '/config.csv', + 'topology_path': 'input_files/models/prosumer_models/building_types_aachen/' + + str(b.loc[i,'ID_building']), + 'profiles':{'elec_cns': 'demand_electric_'+ str(i), + 'therm_cns': 'demand_heat_'+ str(i), + 'dhw_dmd': 'demand_hot_water_'+ str(i), + 'pv_roof': ['irradiance_1', 'temperature_1'], + 'heat_pump': 'temperature_1'}} + elif 'PV' in b.loc[i,'ID_building']: + prosumer_dict[b.loc[i, 'ID_building']] = { + 'config_path': 'input_files/models/prosumer_models/building_types_aachen/' + + str(b.loc[i, 'ID_building']) + '/config.csv', + 'topology_path': 'input_files/models/prosumer_models/building_types_aachen/' + + str(b.loc[i, 'ID_building']), + 'profiles': {'elec_cns': 'demand_electric_'+ str(i), + 'therm_cns': 'demand_heat_'+ str(i), + 'dhw_dmd': 'demand_hot_water_'+ str(i), + 'pv_roof': ['irradiance_1', 'temperature_1']}} + else: + prosumer_dict[b.loc[i, 'ID_building']] = { + 'config_path': 'input_files/models/prosumer_models/building_types_aachen/' + + str(b.loc[i, 'ID_building']) + '/config.csv', + 'topology_path': 'input_files/models/prosumer_models/building_types_aachen/' + + str(b.loc[i, 'ID_building']), + 'profiles': {'elec_cns': 'demand_electric_' + str(i), + 'therm_cns': 'demand_heat_' + str(i), + 'dhw_dmd': 'demand_hot_water_' + str(i)}} + +num=0 + +""" prosumer_dict = {'SCN2_CAT1_PV11_3000_6000':{'config_path': 'input_files/models/prosumer_models/SCN2_CAT1_PV11/config.csv', 'topology_path': 'input_files/models/prosumer_models/SCN2_CAT1_PV11', 'profiles': {'pv_roof': ['irradiance_1', 'temperature_1'], @@ -45,6 +89,7 @@ prosumer_dict = {'SCN2_CAT1_PV11_3000_6000':{'config_path': 'input_files/models/ 'profiles': {'elec_cns': 'demand_electric_2', 'therm_cns': 'demand_heat_2', 'dhw_dmd': 'demand_hot_water_2'}}} +""" prosumer_main = main_prosumer.ProsumerMain(prosumer_dict, input_profiles, t_horizon, t_step)