Runs a set of post-interpolation consistency checks over the numeric / bounds / map parameters of a scenario and reports any issues. Checks:
NA index columns: no NA in a parameter's
dimSetsid columns. Whenfold = TRUE, NA is permitted only in the trimmable dimensions (region / timeslice / vintage, which fold encodes as wildcards); whenfold = FALSE, no NA is permitted in any id column.Schema: data columns match the declared
dimSets(plusvalue, andtypefor bounds).Duplicate keys: no duplicate id tuples.
Map vs parameter (correctness): every tuple of a value map is covered by its source parameter; a missing value would otherwise be silently replaced by the solver default.
Parameter vs map (efficiency): value parameter rows lie within the union of their maps (no orphan / out-of-domain rows). After trimming this must hold exactly.
Free meals: every object with flow variables has its governing constraints. A storage without its balance chain, or a trade corridor without its flow-capacity link, would supply the balance unbounded and solve to OPTIMAL with a meaningless objective – structural. Missing charge/discharge or availability bounds are advisory, since an open (
Inf) side deliberately produces no equation.Calendar chronology: the timeslice successor chain (the storage balance and ramping order) is derived from the calendar's timetable row order; a row order that contradicts the timetable's own timeframe columns is structural.
Usage
validate_scenario_parameters(
scen,
fold = TRUE,
action = c("warn", "stop", "silent")
)Details
Structural findings always stop; action governs the advisory ones.
interpolate_model() runs this automatically (validate = TRUE, action
"warn"); call it directly to re-check a scenario or to collect the
findings table.
