gcubed.projections.model_updater
This module contains the ModelUpdater
class.
It is used when doing relinearisations, to update a model with an extended database and a new first projection year.
Updates a model to do projections starting from a future year, beginning with the projections generated by a previously defined model.
@classmethod
def
get_updated_model( cls, projections: gcubed.projections.projections.Projections, new_first_projection_year: int) -> gcubed.model.Model:
Perform the update on the provided model
Arguments
projections
: the base projections (either a baseline projections or a simulation layer)
that will be used as the source of the information from which the updated model will be produced.
new_first_projection_year
: The (YYYY) new first projection year for the updated model.
Returns
The updated model.
Exceptions
Raises an exception if the new base year is not greater than the base year for the projections.