Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
simstadtpy
Commits
4e529a78
Commit
4e529a78
authored
May 16, 2026
by
Eric Duminil
Browse files
Try to add EnergyGrid
parent
b0dd5194
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_simulations.py
View file @
4e529a78
...
@@ -74,7 +74,32 @@ def test_load_profile():
...
@@ -74,7 +74,32 @@ def test_load_profile():
kpis
=
to_dict
(
results
.
kpis
)
kpis
=
to_dict
(
results
.
kpis
)
rich
.
print
(
kpis
)
rich
.
print
(
kpis
)
for
line
in
results
.
csv_path
.
read_text
().
splitlines
()[:
15
]:
rich
.
print
(
line
)
assert
"Number of buildings"
in
kpis
assert
"Number of buildings"
in
kpis
assert
"Total load"
in
kpis
assert
"Total load"
in
kpis
assert
"Average load"
in
kpis
assert
"Average load"
in
kpis
assert
kpis
[
"Number of buildings"
].
value
>
0
assert
kpis
[
"Number of buildings"
].
value
>
0
@
pytest
.
mark
.
integration
def
test_energy_grid
():
results
=
run_workflow_with_citygml
(
TEST_TEMPLATES
/
"05_EnergyGridSimulation"
,
TEST_GML
,
project_path
=
TEST_PROJECT
,
description
=
"EnergyGrid – MiniBuchwald"
,
)
kpis
=
to_dict
(
results
.
kpis
)
assert
"PV potential yield"
in
kpis
assert
"Roof area for PV"
in
kpis
assert
kpis
[
"PV potential yield"
].
value
>
0
assert
kpis
[
"PV potential nominal power"
].
value
>
0
assert
kpis
[
"PV potential nominal power"
].
unit
==
"kWp"
assert
kpis
[
"Irradiance in module plane"
].
unit
==
"W / m²"
assert
kpis
[
"Irradiance in module plane"
].
value
==
pytest
.
approx
(
150
,
abs
=
20
)
assert
kpis
[
"PV specific yield"
].
unit
==
"kWh / (kWp · a)"
assert
kpis
[
"PV specific yield"
].
value
==
pytest
.
approx
(
1100
,
abs
=
100
)
assert
kpis
[
"Roof area for PV"
].
value
>
100
assert
kpis
[
"Roof area for PV"
].
unit
==
"m²"
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment