atomica.scenarios.BudgetScenario¶
- class atomica.scenarios.BudgetScenario(name=None, active=True, parsetname=None, progsetname=None, alloc=None, start_year=2019)[source]¶
Bases:
Scenario
NamedItem constructor
A name must be a string
- Parameters:
name
Attributes
Specify parset name when run via
Project.run_scenarios
Specify progset name when run via
Project.run_scenarios
Flag whether the scenario should be run via
Project.run_scenarios
Methods
copy
Get scenario instructions
Get scenario parset
Get scenario progset
Run scenario
- active¶
Flag whether the scenario should be run via
Project.run_scenarios
- get_instructions(progset, project)[source]¶
Get scenario instructions
If the derived scenario class produces program instructions, return them here.
- Parameters:
progset (
ProgramSet
) – InputProgramSet
- Return type:
- Returns:
ProgramInstructions
instance, or None if no instructions (in which case, programs will not be used)
- get_parset(parset, project)¶
Get scenario parset
If the derived scenario class modifies the parset, return the modified version
- Parameters:
parset – Input
ParameterSet
- Return type:
- Returns:
Modified parset for use in the simulation
- get_progset(progset, project)¶
Get scenario progset
If the derived scenario class modifies the progset, return the modified version
- Parameters:
progset (
ProgramSet
) – InputProgramSet
- Return type:
- Returns:
Modified progset for use in the simulation
- parsetname¶
Specify parset name when run via
Project.run_scenarios
- progsetname¶
Specify progset name when run via
Project.run_scenarios
- run(project, parset=None, progset=None, store_results=True)¶
Run scenario
- Parameters:
project – A
Project
instanceparset (
ParameterSet
) – Optionally aParameterSet
instance, otherwise will useself.parsetname
progset (
ProgramSet
) – Optionally aProgramSet
instance, otherwise will useself.progsetname
store_results (
bool
) – If True, the results will be copied into the project
- Return type:
- Returns:
A
Result
object