Skip to contents

Builds an interpolated scenario from a model via the mapping pipeline: collects sets from the model objects, builds the membership / calendar / lifespan / value / constraint / cost mappings, extracts and interpolates the numeric parameters over the milestone years, and (optionally) folds, prunes and validates the result. The returned scenario is ready for solve_model() / solve_scenario().

Usage

interpolate_model(
  object,
  name = NULL,
  ...,
  base = NULL,
  base_year_scenario = base,
  base_year_capacity = c("fixed", "free"),
  base_year_relax = character(),
  segment = NULL,
  desc = NULL,
  ondisk = FALSE,
  overwrite = FALSE,
  fold = FALSE,
  sparse = TRUE,
  prune = TRUE,
  storage_cycle = NULL,
  bridge_storage_gaps = options::opt("bridge_storage_gaps"),
  validate = TRUE,
  code = NULL,
  kvl = FALSE,
  boundary_prices = NULL,
  split_weight = NULL,
  keep = NULL,
  drop = NULL,
  .prefilter = FALSE,
  parent_levels = options::opt("parent_levels"),
  fx_equ = options::opt("fx_equ"),
  on_missing_input = options::opt("on_missing_input"),
  check = FALSE,
  verbose = isVerbose(),
  .reuse = NULL
)

# S4 method for class 'model'
interpolate(object, ...)

Arguments

object

as mod, for the method dispatched on a scenario.

name

character scenario name. If NULL, a default scen_<model> is used (with a warning).

...

additional energyRt objects folded into the model BEFORE the pipeline runs: settings, config, calendar, horizon, a whole repository, or individual model "bricks" (technology, commodity, storage, ...). This is how a scenario overrides or extends the model (e.g. pass a sampled calendar to interpolate on a reduced time resolution).

base

optional interpolated scenario to build on. The objects in ... must be new to the model: constraints, costs, taxes and subsidies, new processes and commodities, or a calendar / geoscale that samples the base's. The result is the base plus what they add: the base's tables are reused, nothing is written into its store, and the result equals a full interpolation of the model with the base's additions and the new ones. The base's fold, sparse and prune settings apply. Otherwise (another model, a replaced object, settings or horizon objects) a message says why and the model is interpolated in full. object may be the base itself.

New processes, commodities and other model objects are built on the base too: the per-object tables of the objects the base already holds are reused, the new objects' tables are computed, and every map is rebuilt.

base_year_scenario

where the base year's own solution comes from, when the horizon marks one (see newHorizon()). Defaults to base, so a projection built on a base takes that base's base-year solution for free. May also be a solved scenario, the list solve_base_year() returns, a scenario name, or "<scenario>/<run>".

Which SEGMENT of the horizon becomes the LP is segment's job. Left unset, the segment is inferred from this argument exactly as it always was: a source means this LP is the projection, none means the whole horizon in one LP. What crosses is only what that solve DECIDED — its new capacity, written as sunk stock at its true vintage. The model's own @stock is left alone. With no source the projection still excludes the base year, and starts from the model's declared @stock; a message says so.

base_year_capacity

when the base year is solved WITH the projection – that is, when no base_year_scenario is given – "fixed" (default) pins its TOTAL capacity at the declared stock. The base year has already happened: its fleet is data, and an LP left free to build or retire in it is re-optimising the past. "free" lifts the pin. Ignored when a base year is supplied, since that solve has already decided its own capacity.

base_year_relax

process names left free to invest despite base_year_capacity = "fixed". Where an observed fleet cannot serve an observed load, letting a named process correct the stock beats an infeasible solve; each name is a stated assumption and is reported.

segment

which part of a marked horizon becomes the LP, when the horizon marks a base year (see newHorizon()):

  • "full" – every milestone in one LP. The base year is dispatched here at its own period weight, with capacity pinned by base_year_capacity.

  • "base_year" – the base year ALONE, as its own one-year problem. Capacity and retirement are pinned at the declared stock unless base_year_capacity = "free": the year has already happened, so the LP may neither build in it nor retire from it. Carry the result to a projection with base_year_scenario =.

  • "projection" – the milestones AFTER the base year. What the base year decided crosses as sunk stock when base_year_scenario names it.

NULL (the default) infers the segment from base_year_scenario: a source means "projection", none means "full", so a projection built on a base keeps working untouched. An explicit value that contradicts the source is refused rather than silently preferred.

The horizon keeps every milestone in all three cases and records which part it solves, so a scenario can still say what the whole horizon was; only the LP narrows.

desc

character scenario description.

ondisk

logical; store each parameter's data in the on-disk parameter store rather than the in-memory @data slot. FALSE (default) keeps data in memory, which the solver writers read directly; TRUE suits very large models (data is materialised back to memory at solve time).

overwrite

logical; overwrite an existing on-disk scenario of the same name.

fold

logical or character; whole-column "fold" of trimmable dimensions to NA wildcards to shrink the data. TRUE folds region + timeslice + year; FALSE (default) folds nothing; a character vector selects dims among region, timeslice, year, comm, tech, stg, trade. The wildcards are substituted by an artificial set member in the written model files only; the scenario object keeps them and getData() expands them.

A dimension folds only where the value is uniform across its WHOLE set, so folding never changes the solution — it changes how the same numbers are stored. year matters most in weather-heavy models: one weather series repeated across milestone years is usually the largest parameter, and region/timeslice alone do not touch it. Measured on a 4-region d365_h24 model over 7 milestones, adding year took pWeather from 245,259 to 35,037 rows (-85.7%) with a bit-identical objective on GLPK and Pyomo/HiGHS. A model whose weather genuinely differs by year simply does not fold.

sparse

logical; the storage knob, and the user-facing switch between drop_default_values() and expand_default_values(). TRUE drops value == defVal rows; FALSE materialises the default over each parameter's full domain (the form GAMS needs) and then trims rows no map indexes. Folding applies to either.

prune

logical; apply the per-parameter misc$prune$value filter via drop_default_values() - rows whose interpolated value equals that parameter's flagged value are dropped (lossless: an absent tuple reads as the default, which equals the dropped value). One parameter is flagged today (pWeather). Superseded by sparse's value = form; retained for compatibility.

storage_cycle

NULL, or the name of a timeframe of the calendar, or "year" / "timeframe"; where every storage closes its cycle, overriding each object's own storage@cycle for this build. NULL (default) honours the objects. "year" gives every storage the year-wide cycle, "timeframe" closes every cycle at its parent timeframe boundary, and a timeframe name closes it within each member of that timeframe. The objects themselves are not changed; the override is recorded in scen@misc$storage.

bridge_storage_gaps

logical; may a storage level be carried across a gap a SAMPLED calendar leaves in the year? A sample's successor relation chains its blocks in order, so without this the level moves a season's energy through one block's worth of level capacity. FALSE (default) closes each contiguous block of kept timeslices onto itself, so nothing crosses a gap; TRUE chains the blocks as if they were adjacent in time. A full calendar has no gaps and is unaffected either way, and ramping bridges gaps regardless – a ramp limit across one is restrictive rather than permissive, and nearly non-binding.

validate

logical; run validate_scenario_parameters() after interpolation (schema, duplicate keys, map/parameter coverage, missing governing constraints, calendar chronology).

code

optional named list overriding solver source-code blocks (GLPK, GAMS, JuMP, PYOMOConcrete, ...), each either a script-file path or a character vector of lines. Lets a model-script version be supplied at interpolation time without rebuilding sysdata (handy to A/B templates).

kvl

logical or NULL; build the Kirchhoff voltage-law cycle constraints for meshed trade networks. NULL (default) engages them when the network has cycles and reactances to use.

boundary_prices

optional data.frame pricing import/export stubs for trade routes dropped by a SPATIAL SAMPLE (a geoscales::filter_geoscale() subset passed via ...); see subset_model_regions() for the columns. Ignored (with a warning) when no sampled geoscale is supplied.

split_weight, keep, drop

passed to subset_model_regions() when a spatial sample divides a region group a value is declared at: the weight the value is apportioned by, or the keys held whole / left out. Without them such a sample is refused, as it is for the verb. Recorded in @misc$spatial, so a rebuilt copy is cut the same way.

.prefilter

EXPERIMENTAL, default FALSE. Restrict each model object's data to the timeslices and regions the SCENARIO declares before interpolating it, rather than interpolating everything and discarding the excess afterwards.

On the sampled-calendar recipe – a full-year model with a subset calendar handed to this function – the default order expands all 8,760 timeslices in ob2mi and then keeps 96. The parameter filters that follow are cheap (0.05s on a 5-node model); the cost is the interpolation they cannot undo.

Off by default because it is not obviously safe: anything deriving a relation from the full declared grid rather than from the calendar would see a narrower input. Compare objectives before relying on it.

parent_levels

logical or character; give a variable rows at every timeslice / region level COARSER than the one it occupies, each defined by a roll-up of its finer rows, so a constraint can be written at a level the variable does not natively carry (summand@timeframe / @geoframe). FALSE (default) builds none; TRUE builds them for every SUPPORTED variable; a character vector selects among those. Naming an unsupported variable is an error listing what is supported – a parent row with no equation to define it would be a free variable.

vOutTot / vInpTot carry their parent rows unconditionally and are not affected: eqOutTot / eqInpTot are written against them.

Defaults to the energyRt.parent_levels option, so a whole run or test suite can be switched in one place.

fx_equ

logical; write a bound whose two sides coincide (.fx, or .lo == .up, with the same weather factors) as one equality row (eq<Family>Fx) instead of a pair of inequalities (eq<Family>Lo + eq<Family>Up). Applies to every bound family: technology availability (af, afs, afc), shares, capacity, new capacity and retirement of technologies, storages and trade, storage availability, charge, discharge, duration and part ratios, supply availability and reserve, trade flows and availability, import and export rows. The solution is the same; the model has fewer rows before presolve (-25% on an hourly full-year VRE model). FALSE writes the pairs. Defaults to getOption("energyRt.fx_equ", TRUE).

on_missing_input

"stop" or "warn": what to do when a process with existing capacity (stock, or a lower / fixed capacity bound) is declared in a region where one of its input commodities has no source. "stop" names the cells; "warn" drops them, as is always done for processes that could only be built new. Defaults to the energyRt.on_missing_input option.

check

run check_feasibility() on the interpolated scenario and STOP when it finds a contradiction, rather than returning a scenario that can only solve to INFEASIBLE. Off by default: the check costs a pass over the parameter tables, and a model known to be sound does not need it.

verbose

logical; print per-step progress. This also governs the variant-expansion report – how many process objects were expanded and how many constraints were generated for them. The generated constraints themselves are retrievable with getObject(scen, class = "constraint"); each carries a readable desc and, in misc$.variant_source, the object it was derived from.

.reuse

internal: an interpolated scenario whose per-object tables are reused for the objects it holds (set by base).

Value

an interpolated scenario object.

See also

solve_model(), solve_scenario(), the interpolate S4 method.

Other interpolation: recast_model_calendar(), subset_model_regions()

Examples

# \donttest{
topia_elc <- topia$modules$electricity
mod <- newModel("TOPIA", data = topia_elc$repo,
                calendar = topia$modules$calendars$d365_h24_1dps,
                region = topia_elc$regions,
                horizon = topia$modules$horizons$BY2025_50_by10,
                discount = 0.05)
mod <- setGeoscale(mod, topia_elc$geoscale)

# build the solver-facing sets and parameters; nothing is solved yet
scen <- interpolate_model(mod, name = "BASE")
#> 
#> ── interpolate_model: BASE ─────────────────────────────────────────────────────
#> storage: in-memory
#> sparse: TRUE
#> prune: TRUE
#> fold: none
#> validate: TRUE
#> base year 2025: solved WITH the projection; total capacity pinned at stock for 27 process(es). Pass `base_year_scenario =` to solve it separately instead.
#> ℹ checking declarations
#> Warning: 8664 timeslice(s) named by 4 object(s) are outside the sampled calendar "d365_h24_1dps"; their rows are dropped.
#> Cost declared at a coarse geoscale level:
#>   TBD_COA_Z4_Z3@invcost: Z3, Z4
#>   TBD_COA_Z4_Z5@invcost: Z4, Z5
#>   TBD_GAS_Z2_Z3@invcost: Z2, Z3
#> The cost is charged ONCE at that cell rather than at each child region, and is discounted at the children's rate. That is usually what a national cost datum means -- said here because it is a different number from naming the children individually.
#> ✔ checking declarations (0.2s)
#> ℹ expanding vintage/cluster variants
#> Expanded 8 process objects into 33 variants (vintage/cluster).
#> ✔ expanding vintage/cluster variants (0.2s)
#> ℹ materializing commodity clusters
#> Materialized 3 commodity cluster(s): LANDW_CLHI, LANDW_CLLO, LANDW_CLMD
#> ✔ materializing commodity clusters (0.1s)
#> ℹ materializing weather clusters
#> Materialized 5 weather cluster(s): WSOL_CLFL, WSOL_CLTH, WWIN_CLHI, WWIN_CLMD, WWIN_CLLO
#> ✔ materializing weather clusters (0.1s)
#> ℹ materializing weather transforms
#> ✔ materializing weather transforms (0.4s)
#> ℹ collecting sets: object names
#> ✔ collecting sets: object names (0.1s)
#> ℹ collecting sets: process classes
#> ✔ collecting sets: process classes (0.0s)
#> ℹ collecting sets: timeframes
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ collecting sets: timeframes (0.1s)
#> ℹ collecting sets: process inputs/outputs
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ collecting sets: process inputs/outputs (0.1s)
#> ℹ collecting sets: membership comm sets
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ collecting sets: membership comm sets (0.1s)
#> ℹ collecting sets: process regions
#> ✔ collecting sets: process regions (0.1s)
#> ℹ building maps: membership + closure
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ building maps: membership + closure (0.5s)
#> ℹ collecting sets: invest/stock windows
#> ✔ collecting sets: invest/stock windows (0.2s)
#> ℹ settings parameters (discount, period length, timeslice share)
#> ✔ settings parameters (discount, period length, timeslice share) (0.2s)
#> ℹ building maps: calendar + lifespan
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ building maps: calendar + lifespan (0.5s)
#> ℹ ob2mi: interpolating 83 model objects
#> ✔ ob2mi: interpolating 83 model objects (1.5s)
#> ℹ interpolating parameters over milestone years
#> ✔ interpolating parameters over milestone years (4.1s)
#> ℹ calendar-filter: restricting parameters to declared timeslices
#> ✔ calendar-filter: restricting parameters to declared timeslices (0.1s)
#> ℹ computing equivalent annual costs (EAC)
#> ✔ computing equivalent annual costs (EAC) (0.1s)
#> ℹ building maps: value
#> ✔ building maps: value (0.3s)
#> ℹ building maps: filter
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ building maps: filter (1.4s)
#> ℹ building maps: constraint
#> ✔ building maps: constraint (0.5s)
#> ℹ prune: dropping flagged default-valued rows
#> ✔ prune: dropping flagged default-valued rows (0.4s)
#> ℹ building maps: cost aggregation
#> ✔ building maps: cost aggregation (0.1s)
#> ℹ validating parameters
#> validate_scenario_parameters: 1 issue(s) (0 structural, 1 advisory)
#> Warning: validate_scenario_parameters: 1 issue(s):
#>   [unsized_part] mStorageInpCap: charger capacity is declared but nothing sizes it, so an af bound on it constrains nothing -- give it inp.invcost, inp.cap.up, inp2stg or inp2out -- at 98 cell(s) of 4 object(s): STG_ELC_VIN2025, STG_ELC_VIN2035, STG_ELC_VIN2045, STG_H2
#> ✔ validating parameters (0.4s)
#> ℹ computing model-size summary
#> ✔ computing model-size summary (0.2s)
#> ────────────────────────────────────────────────────────────────────────────────
#> dimensions: 18 regions, 13 commodities, 64 processes, 4 years, 101 timeslices
#> model_size: BASE
#>   parameters : 203 value, 360 maps, 16 sets
#>   param rows : 131,833
#>   estimate   : ~261,806 variables, ~284,820 constraints (from gating maps)
#>   top parameters by rows:
#>     pTechCinp2use      23,424
#>     pStorageInpEff     18,432
#>     pStorageOutEff     18,432
#>     pWeather           14,348
#>     pTradeIrVarom      10,772
#>     pTradeIrEff        10,772
#>     pTechUse2cact      9,600
#>     pDemand            4,608
#>     pTechGinp2use      4,608
#>     pTechCinp2ginp     4,608
#>     pExportRowPrice    1,920
#>     pExportRow         1,920
#>     pTimesliceAgg      1,188
#>     pTechFixom         704
#>     pTechInvcost       704
#> Map rules: mWeatherTimeslice, mExpTimeslice, mImpTimeslice, mTechTimeslice, mSupTimeslice, mTradeTimeslice, mCommTimeslice, mvTechAct, mvTechOut, meqTechAfLo, meqTechAfUp, meqTechActSng kept as rules, tables dropped
scen
#> Name:  BASE 
#> Model:
#> Name:  TOPIA 

# `fold = TRUE` substitutes constant parameters into the equations, which
# shrinks what the backend has to read
model_size(interpolate_model(mod, name = "FOLDED", fold = TRUE))
#> 
#> ── interpolate_model: FOLDED ───────────────────────────────────────────────────
#> storage: in-memory
#> sparse: TRUE
#> prune: TRUE
#> fold: region, timeslice, year
#> validate: TRUE
#> base year 2025: solved WITH the projection; total capacity pinned at stock for 27 process(es). Pass `base_year_scenario =` to solve it separately instead.
#> ℹ checking declarations
#> Warning: 8664 timeslice(s) named by 4 object(s) are outside the sampled calendar "d365_h24_1dps"; their rows are dropped.
#> Cost declared at a coarse geoscale level:
#>   TBD_COA_Z4_Z3@invcost: Z3, Z4
#>   TBD_COA_Z4_Z5@invcost: Z4, Z5
#>   TBD_GAS_Z2_Z3@invcost: Z2, Z3
#> The cost is charged ONCE at that cell rather than at each child region, and is discounted at the children's rate. That is usually what a national cost datum means -- said here because it is a different number from naming the children individually.
#> ✔ checking declarations (0.2s)
#> ℹ expanding vintage/cluster variants
#> Expanded 8 process objects into 33 variants (vintage/cluster).
#> ✔ expanding vintage/cluster variants (0.2s)
#> ℹ materializing commodity clusters
#> Materialized 3 commodity cluster(s): LANDW_CLHI, LANDW_CLLO, LANDW_CLMD
#> ✔ materializing commodity clusters (0.0s)
#> ℹ materializing weather clusters
#> Materialized 5 weather cluster(s): WSOL_CLFL, WSOL_CLTH, WWIN_CLHI, WWIN_CLMD, WWIN_CLLO
#> ✔ materializing weather clusters (0.1s)
#> ℹ materializing weather transforms
#> ✔ materializing weather transforms (0.4s)
#> ℹ collecting sets: object names
#> ✔ collecting sets: object names (0.1s)
#> ℹ collecting sets: process classes
#> ✔ collecting sets: process classes (0.0s)
#> ℹ collecting sets: timeframes
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ collecting sets: timeframes (0.1s)
#> ℹ collecting sets: process inputs/outputs
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ collecting sets: process inputs/outputs (0.0s)
#> ℹ collecting sets: membership comm sets
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ collecting sets: membership comm sets (0.0s)
#> ℹ collecting sets: process regions
#> ✔ collecting sets: process regions (0.0s)
#> ℹ building maps: membership + closure
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ building maps: membership + closure (0.4s)
#> ℹ collecting sets: invest/stock windows
#> ✔ collecting sets: invest/stock windows (0.2s)
#> ℹ settings parameters (discount, period length, timeslice share)
#> ✔ settings parameters (discount, period length, timeslice share) (0.2s)
#> ℹ building maps: calendar + lifespan
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ building maps: calendar + lifespan (0.4s)
#> ℹ ob2mi: interpolating 83 model objects
#> ✔ ob2mi: interpolating 83 model objects (1.3s)
#> ℹ interpolating parameters over milestone years
#> ✔ interpolating parameters over milestone years (3.7s)
#> ℹ calendar-filter: restricting parameters to declared timeslices
#> ✔ calendar-filter: restricting parameters to declared timeslices (0.1s)
#> ℹ computing equivalent annual costs (EAC)
#> ✔ computing equivalent annual costs (EAC) (0.1s)
#> ℹ building maps: value
#> ✔ building maps: value (0.3s)
#> ℹ building maps: filter
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> Processes with no input commodity (output is bounded, not fuelled): ESOL_VIN2015_CLFL, ESOL_VIN2015_CLTH, ESOL_VIN2030_CLFL, ESOL_VIN2030_CLTH, ESOL_VIN2045_CLFL, ESOL_VIN2045_CLTH, EWIN_VIN2015_CLHI, EWIN_VIN2015_CLLO, EWIN_VIN2015_CLMD, EWIN_VIN2030_CLHI, EWIN_VIN2030_CLLO, EWIN_VIN2030_CLMD, EWIN_VIN2045_CLHI, EWIN_VIN2045_CLLO, EWIN_VIN2045_CLMD
#> ✔ building maps: filter (1.4s)
#> ℹ building maps: constraint
#> ✔ building maps: constraint (0.5s)
#> ℹ prune: dropping flagged default-valued rows
#> ✔ prune: dropping flagged default-valued rows (0.0s)
#> ℹ fold: folding region, timeslice, year
#> ✔ fold: folding region, timeslice, year (1.6s)
#> ℹ building maps: cost aggregation
#> ✔ building maps: cost aggregation (0.1s)
#> ℹ validating parameters
#> validate_scenario_parameters: 1 issue(s) (0 structural, 1 advisory)
#> Warning: validate_scenario_parameters: 1 issue(s):
#>   [unsized_part] mStorageInpCap: charger capacity is declared but nothing sizes it, so an af bound on it constrains nothing -- give it inp.invcost, inp.cap.up, inp2stg or inp2out -- at 98 cell(s) of 4 object(s): STG_ELC_VIN2025, STG_ELC_VIN2035, STG_ELC_VIN2045, STG_H2
#> ✔ validating parameters (0.4s)
#> ℹ computing model-size summary
#> ✔ computing model-size summary (0.1s)
#> ────────────────────────────────────────────────────────────────────────────────
#> dimensions: 18 regions, 13 commodities, 64 processes, 4 years, 101 timeslices
#> model_size: FOLDED
#>   parameters : 203 value, 360 maps, 16 sets
#>   param rows : 7,004  (fold step: 24,001 -> 7,004, saved 16,997 = 71%)
#>   folded dims: region=27  timeslice=15  year=18
#>   estimate   : ~261,806 variables, ~284,820 constraints (from gating maps)
#>   top parameters by rows:
#>     pWeather           3,587
#>     pDemand            1,152
#>     pSupAva            332
#>     pTimesliceAgg      297
#>     pTechStock         179
#>     pSupCost           172
#>     pTechStockSurv     147
#>     pTimesliceShare    101
#>     pTimesliceWeight   101
#>     pTechFixom         92
#>     pTechInvcost       92
#>     pTechNewCap        92
#>     pTechCap2AInp      60
#>     pDiscountFactor    51
#>     pTechEac           33
#> Map rules: mWeatherTimeslice, mExpTimeslice, mImpTimeslice, mTechTimeslice, mSupTimeslice, mTradeTimeslice, mCommTimeslice, mvTechAct, mvTechOut, meqTechAfLo, meqTechAfUp, meqTechActSng kept as rules, tables dropped
#> model_size: FOLDED
#>   parameters : 203 value, 360 maps, 16 sets
#>   param rows : 7,004  (fold step: 24,001 -> 7,004, saved 16,997 = 71%)
#>   folded dims: region=27  timeslice=15  year=18
#>   estimate   : ~261,806 variables, ~284,820 constraints (from gating maps)
#>   top parameters by rows:
#>     pWeather           3,587
#>     pDemand            1,152
#>     pSupAva            332
#>     pTimesliceAgg      297
#>     pTechStock         179
#>     pSupCost           172
#>     pTechStockSurv     147
#>     pTimesliceShare    101
#>     pTimesliceWeight   101
#>     pTechFixom         92
#>     pTechInvcost       92
#>     pTechNewCap        92
#>     pTechCap2AInp      60
#>     pDiscountFactor    51
#>     pTechEac           33
# }