gcubed.runners.simulation_runner
This module contains the SimulationRunner
class - used to run
simulation experiments that build on an existing baseline projection.
It supports the types of experiments that could be done using the Ox implementation of G-Cubed.
Overview
Runs a simulation experiment, building simulation layers on top of a single set of baseline projections.
- The baseline projections are loaded. This means that the one set of baseline projections can be res-used across multiple simulation runners.
- The experiment design is loaded, setting out each of the events being simulated as a separate simulation layer.
- The simulation layers are loaded and applied to the model to generate projection updates.
Projections based on any of the simulation layers can be compared to projections from the baseline or from other simulation layers associated with the experiment.
Note that the model has already been solved in the baseline projections. There is no scope to do any adjustments to linearisations etc.
You can run new simulation experiments with this simulation runner after it has been created, by simply updating the experiment_design_file. That resets the runner to its initial state, ready for a new run.
Constructor
When the constructor is called, the runner loads the configuration and the model, ready for running. Call the run method when you are ready to start model linearisation etc. after having set properties for the runner to determine its behaviour, for example, how linearisation is done in relation to the neutral real interest rate.
The relinearisation of the model is done for each event year associated with a simulation layer and for each year nominated for relinearisation.
Arguments
baseline_projections
: The baseline projections to be used as the basis for the simulation.
experiment_design_file
: The location of the
experiment design CSV file, as a relative path directory
to the experiment design file from the simulations directory
within the model directory (the model directory contains
the configuration file).
Exceptions
Raises exceptions if the baseline projections are not specified correctly.
Raises exceptions if the experiment design file is not specified correctly.
True
if the baseline linearisation is around neutral real interest rates
and False
if they are around database values.
Defaults to True
.
True
if the baseline linearisation is around the neutral real interest rate
and False
if it is around database values.
True
if relinearisations are around the neutral real interest rate
and False
if they are around previous projection values
in the relinearisation year.
True
if the runner is to relinearise the model in all event years
as well as the years specified and False
if the runner is to relinearise the model only
in the years specified.
Defaults to False
.
If necessary, modify this setting once the running is instantiated but before the experiment is run.
Returns the original baseline projections that the simulation layer build on.
Overview
Do the actual work of running the model and performing the experiment.
Call this method after setting up the runner.
Once the experiment has run, you can retrieve projections from the simulation layer(s) of interest and the baseline for comparison and analysis purposes.
Inherited Members
- gcubed.runners.advanced_runner.AdvancedRunner
- working_directory
- model_directory
- configuration_file
- model
- relinearisation_years
- event_years
- all_projections
- baseline_projections
- most_recently_generated_projections
- final_projections
- simulation_layer_definitions
- linearise_around_strict_model_solution
- start_relinearisation_projections_from_the_neutral_real_interest_rate
- completed_successfully
- reset
- save_projections