
Build a multimod model from an interpolated scenario
Source:R/multimod-import.R
as_multimod.scenario.RdConverts an energyRt scenario into a multimod model: the equations come
from energyRt's own GAMS model code (shipped as .modelCode$GAMS), the data
from the scenario's @modInp, and any newConstraint() / newCosts()
objects from the GAMS string IR interpolation compiled onto
@modInp@user_constraints.
Arguments
- x
An interpolated energyRt scenario.
- ...
Passed to
multimod_from_energyRt():gms,prefer,inMemory,verbose.
Details
The model can then be rendered to any backend multimod supports, or
assembled straight into a matrix and solved - see multimod::model_to_lp()
and multimod::solve_highs().
Examples
if (FALSE) { # \dontrun{
scen <- interpolate_model(mod, name = "BASE")
m <- multimod::as_multimod(scen)
lp <- multimod::model_to_lp(m)
} # }