Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Bi-Level_EVA
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Daniel Strach
Bi-Level_EVA
Commits
d25f52ec
Commit
d25f52ec
authored
Mar 27, 2023
by
Jonas Brucksch
Browse files
Options
Downloads
Patches
Plain Diff
index on main:
ee912431
Merge branch 'main' of git-ce.rwth-aachen.de:ineed-dc/ineed-dc-framework
parent
ee912431
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
runme.py
+47
-2
47 additions, 2 deletions
runme.py
with
47 additions
and
2 deletions
runme.py
+
47
−
2
View file @
d25f52ec
...
@@ -9,8 +9,8 @@ class SimulationScope(Enum):
...
@@ -9,8 +9,8 @@ class SimulationScope(Enum):
DISTRICT
=
2
DISTRICT
=
2
simulation_scope
=
SimulationScope
.
DISTRICT
simulation_scope
=
SimulationScope
.
DISTRICT
t_start
=
pd
.
Timestamp
(
"
2019-0
5-10
00:00:00
"
)
# start time of simulation
t_start
=
pd
.
Timestamp
(
"
2019-0
1-01
00:00:00
"
)
# start time of simulation
t_horizon
=
24
0
# number of time steps to be simulated
t_horizon
=
10
0
# number of time steps to be simulated
t_step
=
1
# length of a time step in hours
t_step
=
1
# length of a time step in hours
input_profile_dict
=
{
'
irradiance_1
'
:
[
'
irradiance
'
,
'
input_files/data/irradiance/Lindenberg2006BSRN_Irradiance_60sec.csv
'
],
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
...
@@ -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
'
],
'
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
'
]}
'
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
)
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.
# '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
# '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
'
,
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
'
,
'
topology_path
'
:
'
input_files/models/prosumer_models/SCN2_CAT1_PV11
'
,
'
profiles
'
: {
'
pv_roof
'
: [
'
irradiance_1
'
,
'
temperature_1
'
],
'
profiles
'
: {
'
pv_roof
'
: [
'
irradiance_1
'
,
'
temperature_1
'
],
...
@@ -45,6 +89,7 @@ prosumer_dict = {'SCN2_CAT1_PV11_3000_6000':{'config_path': 'input_files/models/
...
@@ -45,6 +89,7 @@ prosumer_dict = {'SCN2_CAT1_PV11_3000_6000':{'config_path': 'input_files/models/
'
profiles
'
: {
'
elec_cns
'
:
'
demand_electric_2
'
,
'
profiles
'
: {
'
elec_cns
'
:
'
demand_electric_2
'
,
'
therm_cns
'
:
'
demand_heat_2
'
,
'
therm_cns
'
:
'
demand_heat_2
'
,
'
dhw_dmd
'
:
'
demand_hot_water_2
'
}}}
'
dhw_dmd
'
:
'
demand_hot_water_2
'
}}}
"""
prosumer_main
=
main_prosumer
.
ProsumerMain
(
prosumer_dict
,
input_profiles
,
t_horizon
,
t_step
)
prosumer_main
=
main_prosumer
.
ProsumerMain
(
prosumer_dict
,
input_profiles
,
t_horizon
,
t_step
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment