Skip to main content

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.

Structsยง

HighsOptions
Defines the TOML table holding the sub-tables to define HiGHS options
ModelParameters
Model parameters as defined in the model.toml file.

Constantsยง

ALLOW_DANGEROUS_OPTION_NAME
The key in model.toml which enables potentially dangerous model options.
DEFAULT_REMAINING_DEMAND_ABSOLUTE_TOLERANCE ๐Ÿ”’
The default value for the remaining_demand_absolute_tolerance parameter
MODEL_PARAMETERS_FILE_NAME ๐Ÿ”’

Staticsยง

DANGEROUS_OPTIONS_ENABLED ๐Ÿ”’
Global flag indicating whether potentially dangerous model options have been enabled.

Functionsยง

check_capacity_margin ๐Ÿ”’
Check that the capacity_margin parameter is valid
check_highs_options ๐Ÿ”’
Check the custom HiGHS options are 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_remaining_demand_absolute_tolerance ๐Ÿ”’
check_value_of_lost_load ๐Ÿ”’
Check that the value_of_lost_load parameter is valid
dangerous_model_options_enabled
Whether potentially dangerous model options were enabled by the loaded config.
set_dangerous_model_options_flag ๐Ÿ”’
Set the global flag indicating whether potentially dangerous model options are enabled.