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
e8be8bea
Commit
e8be8bea
authored
1 year ago
by
Christoph von Oy
Browse files
Options
Downloads
Patches
Plain Diff
First implementation
parent
4c348c8a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Model_Library
+1
-1
1 addition, 1 deletion
Model_Library
Tooling
+1
-1
1 addition, 1 deletion
Tooling
runme.py
+6
-6
6 additions, 6 deletions
runme.py
with
8 additions
and
8 deletions
Model_Library
@
6e57b6db
Compare
ba6678d2
...
6e57b6db
Subproject commit
ba6678d2f4b50bc525d62221dd99440d03993efe
Subproject commit
6e57b6dbd8ccd5adfc5346ab689e005568c793cb
This diff is collapsed.
Click to expand it.
Tooling
@
3e220d97
Compare
f82ba6f7
...
3e220d97
Subproject commit
f82ba6f7d9f1316a3cd36b8af27c99953803d17d
Subproject commit
3e220d972c875cff3025a6c19f0ea29a5c9b080c
This diff is collapsed.
Click to expand it.
runme.py
+
6
−
6
View file @
e8be8bea
...
@@ -24,6 +24,7 @@ THE SOFTWARE.
...
@@ -24,6 +24,7 @@ THE SOFTWARE.
import
pandas
as
pd
import
pandas
as
pd
import
Tooling.input_profile_processor.input_profile_processor
import
Tooling.input_profile_processor.input_profile_processor
from
Tooling.dynamics.Dynamic
import
TrivialDynamic
import
Model_Library.Prosumer.main
as
main_prosumer
import
Model_Library.Prosumer.main
as
main_prosumer
import
Model_Library.District.main
as
main_district
import
Model_Library.District.main
as
main_district
from
enum
import
Enum
from
enum
import
Enum
...
@@ -35,8 +36,7 @@ class SimulationScope(Enum):
...
@@ -35,8 +36,7 @@ class SimulationScope(Enum):
simulation_scope
=
SimulationScope
.
DISTRICT
simulation_scope
=
SimulationScope
.
DISTRICT
t_start
=
pd
.
Timestamp
(
"
2019-05-10 00:00:00
"
)
# start time of simulation
t_start
=
pd
.
Timestamp
(
"
2019-05-10 00:00:00
"
)
# start time of simulation
t_horizon
=
240
# number of time steps to be simulated
dynamic
=
TrivialDynamic
([
1
for
i
in
range
(
240
)])
t_step
=
1
# length of a time step in hours
input_profile_dict
=
{
'
irradiance_1
'
:
{
'
type
'
:
'
irradiance
'
,
'
file
'
:
'
input_files/data/irradiance/Lindenberg2006BSRN_Irradiance_60sec.csv
'
},
input_profile_dict
=
{
'
irradiance_1
'
:
{
'
type
'
:
'
irradiance
'
,
'
file
'
:
'
input_files/data/irradiance/Lindenberg2006BSRN_Irradiance_60sec.csv
'
},
'
temperature_1
'
:
{
'
type
'
:
'
air_temperature
'
,
'
file
'
:
'
input_files/data/temperature/temperature.csv
'
},
'
temperature_1
'
:
{
'
type
'
:
'
air_temperature
'
,
'
file
'
:
'
input_files/data/temperature/temperature.csv
'
},
...
@@ -55,7 +55,7 @@ input_profile_dict = {'irradiance_1': {'type': 'irradiance', 'file': 'input_file
...
@@ -55,7 +55,7 @@ input_profile_dict = {'irradiance_1': {'type': 'irradiance', 'file': 'input_file
'
demand_hot_water_3
'
:
{
'
type
'
:
'
hot_water_demand
'
,
'
generate
'
:
{
'
yearly_demand
'
:
0
,
'
temperature
'
:
'
temperature_3
'
}},
'
demand_hot_water_3
'
:
{
'
type
'
:
'
hot_water_demand
'
,
'
generate
'
:
{
'
yearly_demand
'
:
0
,
'
temperature
'
:
'
temperature_3
'
}},
'
elec_price_1
'
:
{
'
type
'
:
'
elec_price
'
,
'
file
'
:
'
input_files/data/prices/day-ahead/hourly_price.csv
'
}}
'
elec_price_1
'
:
{
'
type
'
:
'
elec_price
'
,
'
file
'
:
'
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
)
input_profiles
=
Tooling
.
input_profile_processor
.
input_profile_processor
.
process_input_profiles
(
input_profile_dict
,
t_start
,
dynamic
)
prosumer_paths
=
{
'
SCN2_CAT1_PV11_3000_6000
'
:
'
input_files/models/prosumer_models/SCN2_CAT1_PV11/prosumer.json
'
,
prosumer_paths
=
{
'
SCN2_CAT1_PV11_3000_6000
'
:
'
input_files/models/prosumer_models/SCN2_CAT1_PV11/prosumer.json
'
,
'
SCN0_CAT1_3000_6000
'
:
'
input_files/models/prosumer_models/SCN0_CAT1/prosumer.json
'
}
'
SCN0_CAT1_3000_6000
'
:
'
input_files/models/prosumer_models/SCN0_CAT1/prosumer.json
'
}
...
@@ -75,7 +75,7 @@ for prosumer_name, component_profiles in prosumer_profiles.items():
...
@@ -75,7 +75,7 @@ for prosumer_name, component_profiles in prosumer_profiles.items():
for
component_name
,
profiles
in
component_profiles
.
items
():
for
component_name
,
profiles
in
component_profiles
.
items
():
prosumer_dict
[
prosumer_name
][
'
components
'
][
component_name
].
update
(
profiles
)
prosumer_dict
[
prosumer_name
][
'
components
'
][
component_name
].
update
(
profiles
)
prosumer_main
=
main_prosumer
.
ProsumerMain
(
prosumer_dict
,
input_profiles
,
t_horizon
,
t_step
)
prosumer_main
=
main_prosumer
.
ProsumerMain
(
prosumer_dict
,
input_profiles
,
dynamic
)
prosumer_sizing_strategy
=
'
annuity
'
prosumer_sizing_strategy
=
'
annuity
'
prosumer_main
.
optimize_sizing
(
prosumer_sizing_strategy
)
prosumer_main
.
optimize_sizing
(
prosumer_sizing_strategy
)
...
@@ -98,7 +98,7 @@ for district_asset_name, component_profiles in district_asset_profiles.items():
...
@@ -98,7 +98,7 @@ for district_asset_name, component_profiles in district_asset_profiles.items():
for
component_name
,
profiles
in
component_profiles
.
items
():
for
component_name
,
profiles
in
component_profiles
.
items
():
district_asset_dict
[
district_asset_name
][
'
components
'
][
component_name
].
update
(
profiles
)
district_asset_dict
[
district_asset_name
][
'
components
'
][
component_name
].
update
(
profiles
)
district_assets
=
main_prosumer
.
DistrictAssetMain
(
district_asset_dict
,
input_profiles
,
t_horizon
,
t_step
).
district_assets
district_assets
=
main_prosumer
.
DistrictAssetMain
(
district_asset_dict
,
input_profiles
,
dynamic
).
district_assets
district_paths
=
{
'
community
'
:
'
input_files/models/district_models/example_community/district.json
'
}
district_paths
=
{
'
community
'
:
'
input_files/models/district_models/example_community/district.json
'
}
district_profiles
=
{
'
community
'
:
{
'
wholesale_price
'
:
'
elec_price_1
'
,
'
injection_price
'
:
'
elec_price_1
'
}}
district_profiles
=
{
'
community
'
:
{
'
wholesale_price
'
:
'
elec_price_1
'
,
'
injection_price
'
:
'
elec_price_1
'
}}
...
@@ -110,7 +110,7 @@ for district_name, district_path in district_paths.items():
...
@@ -110,7 +110,7 @@ for district_name, district_path in district_paths.items():
for
district_name
,
profiles
in
district_profiles
.
items
():
for
district_name
,
profiles
in
district_profiles
.
items
():
district_dict
[
district_name
].
update
(
profiles
)
district_dict
[
district_name
].
update
(
profiles
)
district_main
=
main_district
.
DistrictMain
(
district_dict
,
prosumers
,
district_assets
,
input_profiles
,
t_horizon
,
t_step
)
district_main
=
main_district
.
DistrictMain
(
district_dict
,
prosumers
,
district_assets
,
input_profiles
,
dynamic
)
district_sizing_strategy
=
'
max_operational_profit
'
district_sizing_strategy
=
'
max_operational_profit
'
district_main
.
optimize_sizing
(
district_sizing_strategy
)
district_main
.
optimize_sizing
(
district_sizing_strategy
)
...
...
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