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
6e40942d
Commit
6e40942d
authored
Sep 17, 2026
by
Eric Duminil
Browse files
Allow meteonorm_filename to be None
parent
394cea67
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/simstadt/workflows.py
View file @
6e40942d
...
@@ -13,8 +13,11 @@ from .utils import remove_random_id, set_random_seed
...
@@ -13,8 +13,11 @@ from .utils import remove_random_id, set_random_seed
BUNDLED_TEMPLATES
=
Path
(
__file__
).
parent
/
"templates"
BUNDLED_TEMPLATES
=
Path
(
__file__
).
parent
/
"templates"
def
_set_weather_file
(
meteonorm_filename
:
str
)
->
dict
[
str
,
str
]:
def
_set_weather_file
(
meteonorm_filename
:
str
|
None
)
->
dict
[
str
,
str
]:
"""Build the params.xml replacement for the weather file."""
"""Build the params.xml replacement for the weather file."""
if
meteonorm_filename
is
None
:
# No meteonorm file has been specified, fall back to PVGIS
return
{
"<string>TMY3_HOURLY_FILE</string>"
:
"<string>PVGIS_DATABASE</string>"
}
return
{
return
{
"<string>METEONORM_FILE</string>"
:
f
"<string>
{
Path
(
meteonorm_filename
).
name
}
</string>"
"<string>METEONORM_FILE</string>"
:
f
"<string>
{
Path
(
meteonorm_filename
).
name
}
</string>"
}
}
...
@@ -33,7 +36,7 @@ def _set_refurbishment(geg_ratio: float) -> dict[str, str]:
...
@@ -33,7 +36,7 @@ def _set_refurbishment(geg_ratio: float) -> dict[str, str]:
def
photovoltaic_simulation
(
def
photovoltaic_simulation
(
citygml_path
:
Path
|
str
,
citygml_path
:
Path
|
str
,
meteonorm_filename
:
str
,
meteonorm_filename
:
str
|
None
=
None
,
roof_percentage
:
float
=
100.0
,
roof_percentage
:
float
=
100.0
,
pv_share_flat
:
float
=
40
,
pv_share_flat
:
float
=
40
,
pv_share_tilted
:
float
=
50
,
pv_share_tilted
:
float
=
50
,
...
@@ -79,7 +82,7 @@ def photovoltaic_simulation(
...
@@ -79,7 +82,7 @@ def photovoltaic_simulation(
def
heatdemand_simulation
(
def
heatdemand_simulation
(
citygml_path
:
Path
|
str
,
citygml_path
:
Path
|
str
,
meteonorm_filename
:
str
,
meteonorm_filename
:
str
|
None
=
None
,
with_shadows
:
bool
=
True
,
with_shadows
:
bool
=
True
,
calculation_mode
:
str
=
"HEATING"
,
calculation_mode
:
str
=
"HEATING"
,
refurbishment_ratio
:
float
=
0.0
,
refurbishment_ratio
:
float
=
0.0
,
...
...
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