
Combine per-vintage technology objects into one vintaged technology
Source:R/combine_vintages.R
combine_vintages.RdMerges a list of technology objects, one per build-year vintage
(e.g. FDAC_S_VIN2030, FDAC_S_VIN2040, ...), into a single
technology with a @vintage table and vintage-keyed
parameter rows — the "one object, many vintages" form introduced with
the vintage machinery.
Usage
combine_vintages(
techs,
vintages = NULL,
name = NULL,
desc = NULL,
close_windows = TRUE,
collapse_common = TRUE
)Arguments
- techs
A named list of
technologyobjects, one per vintage. Objects declaring clusters are not supported.- vintages
Optional character vector of vintage labels (same length as
techs). Default: parsed fromnames(techs)("..._VIN<label>"), falling back to each object's@vintage$start.- name, desc
Name/description of the combined technology. Defaults: the common
"..._VIN"prefix of the input names, and the first object's description.- close_windows
Close open-ended investment windows at the next vintage's start (default
TRUE).- collapse_common
Collapse rows identical across all vintages to a single all-vintages row (default
TRUE).
Details
Ports (
input/output/aux/group) are the union across vintages (a commodity present only in some vintages is fine: itsceffrows carry the vintage key).Structural attributes (
units,cap2act,timeframe,region,fullYear) are taken from the first object; differences warn.Every parameter row is tagged with its object's vintage; rows that are identical across ALL vintages collapse to one all-vintages row (disable with
collapse_common = FALSE).Investment windows: each vintage's
startis kept (defaulting to the vintage year); withclose_windows = TRUEa missingendis closed at the next vintage's start minus one (the last stays open).