Module parameters

Module parameters 

Source
Expand description

Read and validate model parameters from model.toml.

This module defines the ModelParameters struct and helpers for loading and validating the model.toml configuration used by the model. Validation functions ensure sensible numeric ranges and invariants for runtime use.

Macrosยง

define_param_default ๐Ÿ”’
define_unit_param_default ๐Ÿ”’

Structsยง

ModelParameters
Model parameters as defined in the model.toml file.

Constantsยง

ALLOW_BROKEN_OPTION_NAME
The key in model.toml which enables known-broken model options.
MODEL_PARAMETERS_FILE_NAME ๐Ÿ”’

Staticsยง

BROKEN_OPTIONS_ALLOWED ๐Ÿ”’
Global flag indicating whether broken model options have been enabled.

Functionsยง

broken_model_options_allowed
Return whether broken model options were enabled by the loaded config.
check_capacity_margin ๐Ÿ”’
Check that the capacity_margin parameter is valid
check_max_ironing_out_iterations ๐Ÿ”’
Check that the max_ironing_out_iterations parameter is valid
check_milestone_years ๐Ÿ”’
Check that the milestone_years parameter is valid
check_price_tolerance ๐Ÿ”’
Check the price_tolerance parameter is valid
check_value_of_lost_load ๐Ÿ”’
Check that the value_of_lost_load parameter is valid
default_candidate_asset_capacity ๐Ÿ”’
default_capacity_limit_factor ๐Ÿ”’
default_capacity_margin ๐Ÿ”’
default_max_ironing_out_iterations ๐Ÿ”’
default_mothball_years ๐Ÿ”’
default_price_tolerance ๐Ÿ”’
default_value_of_lost_load ๐Ÿ”’
set_broken_model_options_flag ๐Ÿ”’
Set the global flag indicating whether broken model options are allowed.