UrbanHeatPro
Subpackages
Submodules
Package Contents
Functions
|
Get the value for a given configuration parameter and use the default configuration value if the configuration |
|
Get value from nested dictionary given a list of nested keys and return default for missing keys. |
Run the UrbanHeatPro model. |
- UrbanHeatPro.access_config_or_default(config: dict, default_config: dict, nested_key) Any[source]
Get the value for a given configuration parameter and use the default configuration value if the configuration parameter is not in the configuration there.
- UrbanHeatPro.nested_get(input_dict: dict, nested_key: list, not_there='NotThere') Any[source]
Get value from nested dictionary given a list of nested keys and return default for missing keys.
- Parameters:
- Returns:
Value for the given list of keys. If a key is not available, then returns the default value.
- Return type:
Any
- UrbanHeatPro.run_uhp(selected_region: str = None, simulation_name: str = None, buildings_use_filter='', settings_file='../settings/uhp_settings_example.yaml', result_dir=None)
Read the configuration file and run the UrbanHeatPro model.
Use this function to run the UrbanHeatPro model from another python package,module or script. This function expects the default configuration file at
../settings/uhp_default_settings.yaml. The configuration file can be changed using thesettings_fileparameter. To make changes to the configuration of the model, change the values in the configuration file with the path specified insettings_file.- Parameters:
selected_region (str) – Name or identifier of the region to be simulated, defaults to None
simulation_name (str) – Name of the simulation, defaults to None. If None, the name of the region is used.
buildings_use_filter – Optional usetype identifier for the buildings file, defaults to ‘’
settings_file – Path to the settings file, defaults to
'../settings/uhp_settings_example.yaml'result_dir – Path to the result directory, defaults to None. If None, the
../results/directory is used.