macrostat.models.IOPC.ScenariosIOPC#
- class macrostat.models.IOPC.ScenariosIOPC(scenario_info: dict | None = None, parameters: ParametersIOPC | None = None, *args, **kwargs)[source]#
Bases:
ScenariosScenarios class for Marco Veronese Passarella’s 3IO-PC model
- __init__(scenario_info: dict | None = None, parameters: ParametersIOPC | None = None, *args, **kwargs)[source]#
Initialize the scenarios of Marco Veronese Passarella’s 3IO-PC model
Methods
__init__([scenario_info, parameters])Initialize the scenarios of Marco Veronese Passarella's 3IO-PC model
add_scenario(timeseries[, name, colour])Add a scenario to the model.
from_excel(excel_path, parameters)Initialize the scenarios from an Excel file.
from_json(json_path, parameters)Initialize the scenarios from a JSON file.
get_default_scenario()Return the default scenario variable in vectorized form.
Return the default scenario values.
get_scenario_index(scenario)Get the index of a scenario by name.
to_excel(excel_path)Save the scenarios to an Excel file.
to_json(json_path)Save the scenarios to a JSON file.
to_nn_parameters([scenario])Convert the scenarios to a PyTorch ParameterDict.
vectorize_scenarios(timeseries)User-defined vectorization operations on the scenario timeseries.
verify_scenario_info()Verify that the scenario info is consistent: 1.
Attributes
- version = 'IOPC'#