Skip to content
Snippets Groups Projects
Commit a8825b08 authored by Christoph von Oy's avatar Christoph von Oy
Browse files

Removed timing

parent 9eece399
No related branches found
No related tags found
No related merge requests found
Subproject commit 62dc4f5784caab6ad6bfe3f0103ef2255d5884eb
Subproject commit 8af05262b5464968dc477c7c40635c0e8b89860d
Subproject commit 116d2d2d1424f958b23ec3fe6a185bae2e08d8f2
Subproject commit 7921f09968b9c5f2e50229fcd1e61f975bafb9b1
"""
This script inspects the input files and modifies them such that they adhere to the new input file specification used by the framework after merge of merge request !TODO Refactoring Part 2.
This script inspects the input files and modifies them such that they adhere to the new input file specification used by the framework after merge of merge request !16 Refactoring Part 2.
"""
import os.path
......
import time
import pandas as pd
import Tooling.input_profile_processor.input_profile_processor
import Model_Library.Prosumer.main as main
......@@ -31,10 +30,7 @@ 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']}
before = time.time()
input_profiles = Tooling.input_profile_processor.input_profile_processor.process_input_profiles(input_profile_dict, t_start, t_horizon, t_step)
after = time.time()
print("runme:\t\t\tProfile Processing [s]: \t" + str(after - before))
# '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
......@@ -50,21 +46,12 @@ prosumer_dict = {'SCN2_CAT1_PV11_3000_6000':{'config_path': 'input_files/models/
'therm_cns': 'demand_heat_2',
'dhw_dmd': 'demand_hot_water_2'}}}
before = time.time()
prosumer_main = main.Main(prosumer_dict, input_profiles, t_horizon, t_step)
after = time.time()
print("runme:\t\t\tProsumer Construction [s]: \t" + str(after - before))
before = time.time()
prosumer_sizing_strategy = 'annuity'
prosumer_main.optimize_sizing(prosumer_sizing_strategy)
after = time.time()
print("runme:\t\t\tProsumer Size Optimization [s]: " + str(after - before))
before = time.time()
prosumer_main.save_results()
after = time.time()
print("runme:\t\t\tProsumer Results Saving [s]: \t" + str(after - before))
prosumers = prosumer_main.prosumers
......@@ -75,32 +62,17 @@ community_assets_dict = {'ca_bat': {'config_path': 'input_files/models/district_
'topology_path': 'input_files/models/district_models/example_CA',
'profiles': {'elec_cns_ca_bat': 'demand_electric_3'}}}
before = time.time()
community_assets = main.Main_CA(community_assets_dict, input_profiles, t_horizon, t_step).community_assets
after = time.time()
print("runme:\t\t\tCommunity Assets Constr. [s]: \t" + str(after - before))
community_dict = {'community': {'config_path': 'input_files/models/district_models/example_community/config.csv',
'profiles': {'elec_price': 'elec_price_1'}}}
before = time.time()
community_main = main_district.MainDistrict(community_dict, prosumers, community_assets, input_profiles, t_horizon, t_step)
after = time.time()
print("runme:\t\t\tCommunity Construction [s]: \t" + str(after - before))
before = time.time()
community_sizing_strategy = 'sizing_max_operational_profit'
community_main.optimize_sizing(community_sizing_strategy)
after = time.time()
print("runme:\t\t\tCommunity Size Opt. [s]: \t" + str(after - before))
before = time.time()
community_operation_strategy = 'max_operational_profit'
community_main.optimize_operation(t_horizon, community_operation_strategy)
after = time.time()
print("runme:\t\t\tCommunity Operation Opt. [s]: \t" + str(after - before))
before = time.time()
community_main.save_results()
after = time.time()
print("runme:\t\t\tCommunity Results Saving [s]: \t" + str(after - before))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment