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
caa5c2e4
Commit
caa5c2e4
authored
Apr 9, 2023
by
Jonas Brucksch
Browse files
Options
Downloads
Patches
Plain Diff
Change community creation to know the name
parent
aa554362
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Model_Library
+1
-1
1 addition, 1 deletion
Model_Library
runme.py
+15
-13
15 additions, 13 deletions
runme.py
with
16 additions
and
14 deletions
Model_Library
@
7a70da0e
Compare
61ae4e9c
...
7a70da0e
Subproject commit
61ae4e9cb13a58b7eb5a39aeeb41899c4d4e9cd9
Subproject commit
7a70da0eb8b13ea923ecfab640f8f587d58ec60b
This diff is collapsed.
Click to expand it.
runme.py
+
15
−
13
View file @
caa5c2e4
...
@@ -147,20 +147,26 @@ print('Number of PV: ' + str(count_pv))
...
@@ -147,20 +147,26 @@ print('Number of PV: ' + str(count_pv))
print
(
'
Number of AC:
'
+
str
(
count_ac
))
print
(
'
Number of AC:
'
+
str
(
count_ac
))
ps_count
=
1
ps_count
=
1
for
i
in
building_types
.
index
[:]:
for
name
in
original_names
:
condition
=
building_types
[
'
ID_building
'
]
==
name
filtered_df
=
building_types
.
loc
[
condition
]
i
=
filtered_df
.
index
.
tolist
()[
0
]
if
len
(
prosumer_dict
)
>
2
:
# break conditions for testing
if
len
(
prosumer_dict
)
>
1
:
continue
continue
if
building_types
.
iloc
[
i
][
'
ID_building
'
]
!=
'
A_21_PV28.0_STR
'
:
pass
# choose which scenario
if
building_types
.
iloc
[
i
][
'
ID_building
'
]
not
in
original_names
or
'
HP
'
in
building_types
.
iloc
[
i
][
'
ID_building
'
]:
if
building_types
.
iloc
[
i
][
'
ID_building
'
]
not
in
original_names
or
'
HP
'
in
building_types
.
iloc
[
i
][
'
ID_building
'
]:
continue
continue
else
:
else
:
prosumer_name
=
building_types
.
iloc
[
i
][
'
ID_building
'
]
+
'
_Q_
'
+
str
(
ps_count
)
prosumer_name
=
building_types
.
iloc
[
i
][
'
ID_building
'
]
+
'
_Q_
'
+
str
(
ps_count
)
ps_count
+=
1
ps_count
+=
1
if
building_types
.
iloc
[
i
][
'
ID_building
'
]
!=
'
A_21_PV28.0_STR
'
:
# only look at households
pass
if
'
A_
'
in
building_types
.
iloc
[
i
][
'
ID_building
'
]:
if
'
A_
'
in
building_types
.
iloc
[
i
][
'
ID_building
'
]:
# get the index of the reference profile for this building type
# get the index of the reference profile for this building type
index_ref_elec_demand
=
building_types
[
'
closest_index
'
][
i
]
index_ref_elec_demand
=
building_types
[
'
closest_index
'
][
i
]
...
@@ -198,20 +204,15 @@ for i in building_types.index[:]:
...
@@ -198,20 +204,15 @@ for i in building_types.index[:]:
'
topology_path
'
:
'
input_files/models/prosumer_models/
'
+
folder_building_configs
+
'
/
'
+
str
(
building_types
.
loc
[
i
,
'
ID_building
'
]),
'
topology_path
'
:
'
input_files/models/prosumer_models/
'
+
folder_building_configs
+
'
/
'
+
str
(
building_types
.
loc
[
i
,
'
ID_building
'
]),
'
profiles
'
:
{
'
elec_cns
'
:
'
elec_demand_prosumer_
'
+
str
(
building_types
.
loc
[
i
,
'
ID_building
'
])}}
'
profiles
'
:
{
'
elec_cns
'
:
'
elec_demand_prosumer_
'
+
str
(
building_types
.
loc
[
i
,
'
ID_building
'
])}}
num
=
0
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
)
prosumer_sizing_strategy
=
'
annuity
'
prosumer_sizing_strategy
=
'
annuity
'
prosumer_main
.
optimize_sizing
(
prosumer_sizing_strategy
)
prosumer_main
.
optimize_sizing
(
prosumer_sizing_strategy
)
prosumer_main
.
save_results
()
prosumers
=
prosumer_main
.
prosumers
prosumers
=
prosumer_main
.
prosumers
if
simulation_scope
==
SimulationScope
.
PROSUMER
:
if
simulation_scope
==
SimulationScope
.
PROSUMER
:
prosumer_main
.
save_results
()
exit
()
exit
()
district_assets_dict
=
{
'
da_bat
'
:
{
'
config_path
'
:
'
input_files/models/district_models/example_CA/config.csv
'
,
district_assets_dict
=
{
'
da_bat
'
:
{
'
config_path
'
:
'
input_files/models/district_models/example_CA/config.csv
'
,
...
@@ -221,10 +222,11 @@ district_assets_dict = {}
...
@@ -221,10 +222,11 @@ district_assets_dict = {}
district_assets
=
main_prosumer
.
DistrictAssetMain
(
district_assets_dict
,
input_profiles
,
t_horizon
,
t_step
).
district_assets
district_assets
=
main_prosumer
.
DistrictAssetMain
(
district_assets_dict
,
input_profiles
,
t_horizon
,
t_step
).
district_assets
district_dict
=
{
'
community
'
:
{
'
config_path
'
:
'
input_files/models/district_models/example_community/config.csv
'
,
comm_name
=
'
community_original
'
district_dict
=
{
comm_name
:
{
'
config_path
'
:
'
input_files/models/district_models/example_community/config.csv
'
,
'
profiles
'
:
{
'
elec_price
'
:
'
elec_price_1
'
}}}
'
profiles
'
:
{
'
elec_price
'
:
'
elec_price_1
'
}}}
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
,
t_horizon
,
t_step
,
comm_name
)
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