mythos.energy.configuration
Configuration class for energy models.
Attributes
Classes
Base class for configuration classes. |
Module Contents
- mythos.energy.configuration.ERR_MISSING_REQUIRED_PARAMS = 'Required properties {props} are not initialized.'
- mythos.energy.configuration.ERR_OPT_DEPENDENT_PARAMS = 'Only {req_params} permitted for optimization, but found {given_params}'
- mythos.energy.configuration.WARN_INIT_PARAMS_NOT_IMPLEMENTED = 'init_params not implemented'
- mythos.energy.configuration.WARN_DEPENDENT_PARAMS_NOT_INITIALIZED = 'Dependent parameters not initialized'
- class mythos.energy.configuration.BaseConfiguration[source]
Base class for configuration classes.
This class should not be used directly.
- Parameters:
- init_params() BaseConfiguration[source]
Initializes the dependent parameters in configuration.
Should be implemented in the subclass if dependent parameters are present.
- classmethod from_dict(params: dict[str, float], params_to_optimize: tuple[str] = ()) BaseConfiguration[source]
Creates a configuration from a dictionary.
- to_dictionary(*, include_dependent: bool, exclude_non_optimizable: bool) dict[str, mythos.utils.types.ARR_OR_SCALAR][source]
Converts the configuration to a dictionary.
- __merge__baseconfig(other: BaseConfiguration) BaseConfiguration
Merges two BaseConfiguration objects.
- __merge__dict(other: dict[str, Any]) BaseConfiguration
Merges a dictionary with the configuration.
- __or__(other: BaseConfiguration | dict[str, mythos.utils.types.ARR_OR_SCALAR]) BaseConfiguration[source]
Convenience method to merge a configuration or a dictionary with the current configuration.
Returns a new configuration object.