Skip to contents

Converts 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.

Usage

# S3 method for class 'scenario'
as_multimod(x, ...)

Arguments

x

An interpolated energyRt scenario.

...

Passed to multimod_from_energyRt(): gms, prefer, inMemory, verbose.

Value

A multimod model.

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)
} # }