Skip to content
Snippets Groups Projects
Commit 58c6afe6 authored by Fabio Sala's avatar Fabio Sala
Browse files

change the code to run the prosumer in one specific quarter

parent 7c2d65f5
Branches
No related tags found
No related merge requests found
......@@ -15,12 +15,14 @@ def process_each_prosumer(prosumer_name, prosumer_specification, input_profiles,
prosumer.show_results()
print("Finished prosumer " + prosumer_name)
return prosumer.prosumer
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 = 8760 # 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'],
'temperature_1': ['air_temperature', 'input_files/data/temperature/temperature.csv'],
'demand_electric_1': ['elec_demand', 'generate', 3000],
......@@ -36,12 +38,11 @@ input_profile_dict = {'irradiance_1': ['irradiance', 'input_files/data/irradianc
'demand_electric_3': ['elec_demand', 'generate', 0],
'demand_heat_3': ['therm_demand', 'generate', 0, 'temperature_3'],
'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']}
input_profiles = Tooling.input_profile_processor.input_profile_processor.process_input_profiles(input_profile_dict, t_start, t_horizon, t_step)
'elec_price_1': ['elec_price', 'input_files/data/prices/day-ahead/hourly_price.csv']}'''
# 'topology_path': path to directory that contains the matrices that define the prosumer topology
# 'config_path': path to global configurations like prices, injection prices, emission costs, etc.
'''
prosumer_dict = {'SCN2_CAT1_PV11_3000_6000':{'topology_path': 'input_files/models/prosumer_models/SCN2_CAT1_PV11',
'config_path': 'input_files/models/prosumer_models/SCN2_CAT1_PV11/config.csv',
'profiles': {'irradiance': 'irradiance_1',
......@@ -55,8 +56,26 @@ prosumer_dict = {'SCN2_CAT1_PV11_3000_6000':{'topology_path': 'input_files/model
'air_temperature': 'temperature_2',
'elec_demand': 'demand_electric_2',
'therm_demand': 'demand_heat_2',
'hot_water_demand': 'demand_hot_water_2'}}}
'hot_water_demand': 'demand_hot_water_2'}}}'''
prosumer_dict = {}
inputpath_dataframe='C:/GIT/ineed-dc-framework/Tooling/quarter_data_extraction/DataFrame/OUTPUT/OUTPUT_S3B/Quarter_Prosumers/running_info.csv'
b=pd.read_csv(inputpath_dataframe)
input_profile_dict = {'irradiance': ['irradiance', 'input_files/data/irradiance/irr_ren_ninja_avg_Germany.csv'],
'temperature': ['air_temperature', 'input_files/data/temperature/temperature_ren_ninja_avrg_germany.csv'],
'elec_price_1': ['elec_price', 'input_files/data/prices/day-ahead/hourly_price.csv']}
for i in b.index:
input_profile_dict['demand_electric_'+ str(i)] = ['elec_demand', 'generate', b.loc[i,'referance_el_demand'], b.loc[i,'profile_el']]
input_profile_dict['demand_heat_'+ str(i)] = ['therm_demand', 'generate', b.loc[i,'referance_heat_demand'],b.loc[i,'profile_th'], b.loc[i,'Building_type'], 'temperature']
input_profile_dict['demand_hot_water_'+ str(i)] = ['hot_water_demand', 'generate', b.loc[i,'referance_hot_water'], b.loc[i,'profile_th'], b.loc[i,'Building_type'], 'temperature']
prosumer_dict[b.loc[i,'ID_Building']]= {'topology_path': 'Tooling/quarter_data_extraction/DataFrame/OUTPUT/OUTPUT_S3B/Quarter_Prosumers/'+str(b.loc[i,'ID_Building']),
'config_path': 'Tooling/quarter_data_extraction/DataFrame/OUTPUT/OUTPUT_S3B/Quarter_Prosumers/'+str(b.loc[i,'ID_Building'])+'/config.csv',
'profiles':{'irradiance': 'irradiance',
'air_temperature': 'temperature',
'elec_demand': 'demand_electric_'+ str(i),
'therm_demand':'demand_heat_'+ str(i),
'hot_water_demand': 'demand_hot_water_'+ str(i)}}
input_profiles = Tooling.input_profile_processor.input_profile_processor.process_input_profiles(input_profile_dict, t_start, t_horizon, t_step)
prosumer_strategy = ['annuity']
parallel_processing = False
......@@ -72,6 +91,7 @@ else:
for prosumer_name in list(prosumer_dict.keys()):
prosumers[prosumer_name] = process_each_prosumer(prosumer_name, prosumer_dict[prosumer_name], input_profiles, t_start, t_horizon, t_step, prosumer_strategy)
'''
community_assets_dict = {'ca_bat': {'topology_path': 'input_files/models/district_models/example_CA',
'config_path': 'input_files/models/district_models/example_CA/config.csv',
'profiles': {'irradiance': 'irradiance_3',
......@@ -79,6 +99,7 @@ community_assets_dict = {'ca_bat': {'topology_path': 'input_files/models/distric
'elec_demand': 'demand_electric_3',
'therm_demand': 'demand_heat_3',
'hot_water_demand': 'demand_hot_water_3'}}}
community_assets_dict = {}
community_assets_strategy = 'sizing_max_operational_profit'
......@@ -90,3 +111,4 @@ community_dict = {'community': {'config_path': 'input_files/models/district_mode
community_strategy = ['max_operational_profit']
community_main = main_district.MainDistrict(community_dict, prosumers, community_assets, input_profiles, t_start, t_horizon, t_step, community_assets_strategy, community_strategy)
'''
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment