Skip to contents

An S4 class to represent model/scenario planning horizon with intervals (year-steps)

Slots

name

character. Name of the horizon object. Used to distinguish between different horizons in the model or scenario, including the automatic creation of the folder name for the model/scenario scripts.

desc

character. Description of the horizon object, for own references.

period

integer. A planning period defined as a sequence of years (arranged, without gaps) of the model planning (e.g. optimization) window. Data with years before or after the planning period can present in the model-objects and will be taken into account during interpolation of the model parameters.

intervals

data.frame. Data frame with the start, middle, and end year of every modelled interval, plus an optional display label. start, mid and end are integer years; mid is the milestone and the model's key for the period. label is a character display name, unique across intervals, filled from mid when not given, and rendered fiscally (FY2025-26) when the calendar carries a non-January year_start. The label is presentation only and never reaches the solver – see year_label().

An optional calendar column names the calendar that milestone is solved on, taken from config@misc$calendars; NA, or no column at all, means the model calendar, which is every horizon written before per-year calendars existed. Write it with setCalendar(mod, cal, years = ...), which also checks that the calendar is a sample of the model's.

An optional weight column is the YEAR half of the objective weight: how much that milestone's costs count in eqObjective. It multiplies the region half (config@objweight) into pObjWeight[region, year]. NA, or no column at all, means 1. Its purpose is a milestone whose cost estimate deserves less trust – typically one solved on a SAMPLE of the model calendar between two fully resolved milestones, where the year still carries full-year cost at full period weight and would otherwise dominate the sum. Strictly positive; the weight scales the whole cost cell, so no trade-off inside the year changes. Write it with setObjectiveWeights(mod, years = ...).

base_year

integer. Optional single milestone year that is GIVEN rather than decided. The marked year is interpolated as any other year but is not passed to the solver – its own solution comes from a separate solve (solve_base_year()) and what it decided can be carried into the projection as sunk stock. Milestones BEFORE it are historical and enter no LP at all. Both still anchor interpolation, which reads the anchor years present in the data rather than the milestone list. Empty when every milestone is optimised. See solve_base_year().

misc

list. Any additional data or information to store in the object.