Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
fd4ac64
Create setup
HoeppJ Jul 15, 2025
730f470
Merge branch 'development' into 814-changeover-of-sim_settings-to-pyd…
chg-ext Jul 28, 2025
d2abb23
introduce pydantic
chg-ext Jul 28, 2025
187f833
manually add pydantic setting to sim_settings
chg-ext Jul 28, 2025
ef64286
activate/use pydantic setting
chg-ext Jul 28, 2025
8237057
change setting default implementation
chg-ext Jul 28, 2025
68b6ae0
pydantic settings are now working as expected; remove notes
chg-ext Aug 1, 2025
55e5bac
add NumberSettingPydantic
chg-ext Aug 1, 2025
b1fb7e4
add ChoiceSetting
chg-ext Aug 1, 2025
75dfed2
Merge branch 'development' into 814-changeover-of-sim_settings-to-pyd…
chg-ext Aug 21, 2025
3c2e93c
implement ChoiceSetting
chg-ext Aug 21, 2025
919c6e3
introduce PathSetting
chg-ext Aug 21, 2025
4293296
introduce GuidSetting; fix copy/paste function name
chg-ext Aug 22, 2025
c2fded5
remove spare check
chg-ext Aug 22, 2025
49692a8
fix ChoiceSettingPydantic
chg-ext Aug 25, 2025
203a088
start switching to pydantic settings; fix NumberSettingPydantic
chg-ext Aug 25, 2025
bc68810
switching to pydantic settings
chg-ext Aug 26, 2025
f64962b
switch to pydantic settings; remove old implementations; fix ChoiceSe…
chg-ext Aug 27, 2025
a775c1c
add implementation for mandatory fields
chg-ext Aug 28, 2025
484b29f
alter plugin settings to use value instead of default;
chg-ext Aug 28, 2025
0fbd686
fix settings unit tests
chg-ext Aug 28, 2025
e3c494e
fix more settings unit tests; fix project unit tests
chg-ext Aug 28, 2025
b82679a
fix utilities unit tests
chg-ext Aug 29, 2025
76da8d5
change reset to defaults implementation
chg-ext Aug 29, 2025
e2fb6ea
add dependency pydantic
chg-ext Sep 8, 2025
dd68fa9
add comments
chg-ext Sep 12, 2025
9ca5c6d
clean up
chg-ext Sep 15, 2025
cfcb01a
Merge branch 'development' into 814-changeover-of-sim_settings-to-pyd…
chg-ext Sep 23, 2025
b0c4947
Merge remote-tracking branch 'origin/development' into 814-changeover…
HoeppJ Oct 13, 2025
49c832e
Merge remote-tracking branch 'origin/development' into 814-changeover…
HoeppJ Oct 14, 2025
efa8324
Change sim settings 'default' name to 'value'
HoeppJ Oct 15, 2025
9b19407
change number setting to inlude int and float
HoeppJ Oct 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class AixLibSimSettings(PlantSimSettings):
"""

path_aixlib = PathSetting(
default=None,
value=None,
description='Path to the local AixLib`s repository. This needs to '
'point to the root level package.mo file. If not'
' provided, the version for regression testing will be '
Expand Down
14 changes: 7 additions & 7 deletions bim2sim/plugins/PluginComfort/bim2sim_comfort/sim_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@ def __init__(self):
super().__init__()

prj_use_conditions = PathSetting(
default=Path(__file__).parent / 'assets/UseConditionsComfort.json',
value=Path(__file__).parent / 'assets/UseConditionsComfort.json',
description="Path to a custom UseConditions.json for the specific "
"comfort application. These use conditions have "
"comfort-based use conditions as a default.",
for_frontend=True
)
use_dynamic_clothing = BooleanSetting(
default=False,
value=False,
description='Use dynamic clothing according to ASHRAE 55 standard.',
for_frontend=True
)
rename_plot_keys = BooleanSetting(
default=False,
value=False,
description='Rename room names for plot results',
for_frontend=True
)
rename_plot_keys_path = PathSetting(
default=Path(__file__).parent / 'assets/rename_plot_keys.json',
value=Path(__file__).parent / 'assets/rename_plot_keys.json',
description="Path for renaming the zone keys for plot results. Path "
"to a json file with pairs of current keys and new keys. ",
for_frontend=True
)
comfort_occupancy_weighting = BooleanSetting(
default=False, description='Weight the comfort rating by occupancy '
value=False, description='Weight the comfort rating by occupancy '
'schedules.'
)
plot_zone_usages = ChoiceSetting(
default=[],
# default=['office', 'meeting', 'canteen', 'sanitary', 'kitchen'],
value=[],
# value=['office', 'meeting', 'canteen', 'sanitary', 'kitchen'],
choices={'': 'Choose empty string to plot all zones.'},
description='Choose string patterns of zone usages for '
'evaluation of comfort results (multiple choice). Use '
Expand Down
68 changes: 34 additions & 34 deletions bim2sim/plugins/PluginEnergyPlus/bim2sim_energyplus/sim_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,40 @@ class EnergyPlusSimSettings(BuildingSimSettings):
and export settings.
"""
cfd_export = BooleanSetting(
default=False,
value=False,
description='Whether to use CFD export for this simulation or not.',
for_frontend=True
)
split_bounds = BooleanSetting(
default=False,
value=False,
description='Whether to convert up non-convex space boundaries or '
'not.',
for_frontend=True
)
add_shadings = BooleanSetting(
default=True,
value=True,
description='Whether to add shading surfaces if available or not.',
for_frontend=True
)
add_hash = BooleanSetting(
default=False,
value=False,
description='Whether to add a hash as a comment at the first line of'
'IDF file for IFC-to-IDF tracking or not.',
for_frontend=False
)
split_shadings = BooleanSetting(
default=False,
value=False,
description='Whether to convert up non-convex shading boundaries or '
'not.',
for_frontend=True
)
run_full_simulation = BooleanSetting(
default=False,
value=False,
description='Choose simulation period.',
for_frontend=True
)
ep_version = ChoiceSetting(
default='9-4-0',
value='9-4-0',
choices={
'9-2-0': 'EnergyPlus Version 9-2-0',
'9-4-0': 'EnergyPlus Version 9-4-0',
Expand All @@ -57,30 +57,30 @@ class EnergyPlusSimSettings(BuildingSimSettings):
any_string=True
)
ep_install_path = PathSetting(
default=Path('/usr/local/EnergyPlus-9-4-0/'),
value=Path('/usr/local/EnergyPlus-9-4-0/'),
description='Choose EnergyPlus Installation Path',
for_frontend=False,
)
system_sizing = BooleanSetting(
default=True,
value=True,
description='Whether to do system sizing calculations in EnergyPlus '
'or not.',
for_frontend=True
)
run_for_sizing_periods = BooleanSetting(
default=False,
value=False,
description='Whether to run the EnergyPlus simulation for sizing '
'periods or not.',
for_frontend=True
)
run_for_weather_period = BooleanSetting(
default=True,
value=True,
description='Whether to run the EnergyPlus simulation for weather '
'file period or not.',
for_frontend=True
)
system_weather_sizing = ChoiceSetting(
default='Typical',
value='Typical',
choices={'Typical': 'SummerTypical and WinterTypical for system '
'sizing.',
'Extreme': 'SummerExtreme and WinterExtreme for system '
Expand All @@ -91,25 +91,25 @@ class EnergyPlusSimSettings(BuildingSimSettings):
'file.'},
description='Choose whether to perform the system sizing for '
'DesignDays, extreme weather periods, typical weather '
'periods. Default=Typical (i.e., apply system sizing for '
'periods. value=Typical (i.e., apply system sizing for '
'typical summer/winter days). '
)
weather_file_for_sizing = PathSetting(
default=None,
value=None,
description='Path to the weather file that should be used for system '
'sizing in EnergyPlus',
for_frontend=True,
mandatory=False
)
enforce_system_sizing = BooleanSetting(
default=False,
value=False,
description='Choose True if you want to enforce HVAC Sizing to sizing '
'period settings (limit heating and cooling capacity) '
'instead of autosizing.',
for_frontend=True
)
solar_distribution = ChoiceSetting(
default='FullExterior',
value='FullExterior',
choices={
'FullExterior': 'Full exterior solar distribution',
'FullInteriorAndExterior': 'Full interior and exterior solar '
Expand All @@ -119,7 +119,7 @@ class EnergyPlusSimSettings(BuildingSimSettings):
for_frontend=True
)
add_window_shading = ChoiceSetting(
default=None,
value=None,
choices={
None: 'Do not add window shading',
'Interior': 'Add an interior shade in EnergyPlus',
Expand All @@ -129,7 +129,7 @@ class EnergyPlusSimSettings(BuildingSimSettings):
for_frontend=True,
)
output_format = ChoiceSetting(
default='CommaAndHTML',
value='CommaAndHTML',
choices={
'Comma': 'Output format Comma (.csv)',
'Tab': 'Output format Tab (.tab)',
Expand All @@ -145,7 +145,7 @@ class EnergyPlusSimSettings(BuildingSimSettings):
for_frontend=True
)
unit_conversion = ChoiceSetting(
default='JtoKWH',
value='JtoKWH',
choices={
'None': 'No unit conversions',
'JtoKWH': 'Convert Joule into kWh (1/3600000)',
Expand All @@ -158,7 +158,7 @@ class EnergyPlusSimSettings(BuildingSimSettings):
for_frontend=True
)
output_keys = ChoiceSetting(
default=['output_outdoor_conditions', 'output_zone_temperature',
value=['output_outdoor_conditions', 'output_zone_temperature',
'output_zone', 'output_infiltration', 'output_meters'],
choices={
'output_outdoor_conditions': 'Add outputs for outdoor conditions.',
Expand All @@ -176,40 +176,40 @@ class EnergyPlusSimSettings(BuildingSimSettings):
for_frontend=True
)
correct_space_boundaries = BooleanSetting(
default=True,
value=True,
description='Apply geometric correction to space boundaries.',
for_frontend=True
)
close_space_boundary_gaps = BooleanSetting(
default=True,
value=True,
description='Close gaps in the set of space boundaries by adding '
'additional 2b space boundaries.',
for_frontend=True
)
add_natural_ventilation = BooleanSetting(
default=True,
value=True,
description='Add natural ventilation to the building. Natural '
'ventilation is not available when cooling is activated.',
for_frontend=True
)
hvac_off_at_night = BooleanSetting(
default=False, description='Disable all HVAC systems at night from '
value=False, description='Disable all HVAC systems at night from '
'10pm to 6am.'
)
control_operative_temperature = BooleanSetting(
default=False, description='Use operative temperature instead of air '
value=False, description='Use operative temperature instead of air '
'temperature for zonal temperature control.'
)
ventilation_demand_control = ChoiceSetting(
default=None,
value=None,
choices={None: 'No demand control for mechanical ventilation.',
'OccupancySchedule': 'Demand control based on occupancy '
'schedule.'},
description='Choose if mechanical ventilation should be demand '
'controlled. Default is None. '
)
outdoor_air_economizer = ChoiceSetting(
default='NoEconomizer',
value='NoEconomizer',
choices={'NoEconomizer': 'No outdoor air economizer is applied.',
'DifferentialDryBulb': 'The outdoor air economizer is '
'applied based on the differential '
Expand All @@ -223,42 +223,42 @@ class EnergyPlusSimSettings(BuildingSimSettings):
'"NoEconomizer".'
)
heat_recovery_type = ChoiceSetting(
default='Enthalpy',
value='Enthalpy',
choices={'Enthalpy': 'Use Enthalpy Heat Recovery.',
'Sensible': 'Use Sensible Heat Recovery.',
'None': 'No Heat Recovery'},
description='Choose which type of heat recovery should be applied for '
'mechanical ventilation.'
)
heat_recovery_sensible = NumberSetting(
default=0.8, min_value=0, max_value=1,
value=0.8, min_value=0, max_value=1,
description='Choose the sensible heat recovery effectiveness. '
'Default: 0.8.'
)
heat_recovery_latent = NumberSetting(
default=0.7, min_value=0, max_value=1,
value=0.7, min_value=0, max_value=1,
description='Choose the latent heat recovery effectiveness. Only '
'applicable if heat_recovery_type="Enthalpy". Default: 0.7.'
)
outdoor_air_per_person = NumberSetting(
default=7,
value=7,
min_value=0, max_value=25,
description='Outdoor air per person in l/s. Defaults to 7 l/s '
'according to DIN EN 16798-1, Category II.'
)
outdoor_air_per_area = NumberSetting(
default=0.7, min_value=0, max_value=10,
value=0.7, min_value=0, max_value=10,
description='Outdoor air per floor area in l/s. Defaults to 0.7 l/(s '
'm2) according to DIN EN 16798-1, Category II for low '
'emission buildings.'
)
residential = BooleanSetting(
default=False, description='Choose True to use residential settings '
value=False, description='Choose True to use residential settings '
'for natural ventilation (DIN4108-2), '
'False for non-residential houses.'
)
natural_ventilation_approach = ChoiceSetting(
default="Simple",
value="Simple",
description='Choose calculation approach for natural ventilation.',
choices={
"Simple": "use simplified ventilation based on TEASER templates.",
Expand Down
Loading