model.advanced_controls
An Advanced Controls object contains all the parameters for a given Scenario.
There is a 1:1 relationship between Advanced Controls objects and Scenario objects: each scenario has its Advanced
Controls object in its ac
field. You can think of a Scenario as: a Solution (the model and code) +
the Advanced Controls (all the customized settings).
The Advanced Controls class has a field for every parameter that is used by any Solution, but not all Solutions use all parameters. (As a simple example, RSS type Solutions do not use parameters related to Land usage.) You can see which parameters a specific Solution uses by looking at the saved advanced controls objects in the 'ac' subdirectory of the solution definition.
Advanced Controls objects are frozen (immutable). To "change" a parameter value, you need to construct a new AdvancedControls/Scenario combination.
An enumeration.
An immutable dictionary-like object of parameter values for a specific scenario.
Return a dictionary data structure that is the serializable form of this object. This is used both for saving to files and for creating new instances.
Returns Boolean to check if variable costs exist (LAND models don't have any). All variable costs must be not None for this to return True.
Look up a VMA value, using the value from the Advanced Controls, if any.
AdvancedControls attributes linked to VMAs can optionally be Series of regional values rather than single floats. Some calculations in the model require all main regions (not special countries) to have values (i.e. not NaN); this function can be used to substitute any missing main regional values with the 'World' value, which is calculated as a weighted average of the available regional data by the VMA class. Note that in most cases it is better practice to input values for all main regions into the VMA table if regional data is to be considered for the solution.
Args
- data: A Series object with REGIONS as index or float
Returns: the processed Series object or passes through float
Load scenarios from JSON files in directory.
Create an AdvancedControls object from a dictionary of values, as retrieved from a scenario json file.
Create a filename from a scenario (or any other) title