Skip to contents

Render a multimod object as a GMPL code string.

Usage

as_gmpl(x, ...)

# S3 method for class 'call'
as_gmpl(x, ...)

# S3 method for class 'func'
as_gmpl(x, ...)

Arguments

x

A multimod object.

...

Additional arguments (not used).

Value

A character string with valid GMPL syntax.

Examples

toy <- example_models$toy
as_gmpl(toy$equations$eqDemand, model = toy)
#> [1] "s.t. eqDemand{r in mR}: sum{t in tech} vGen[t,r] >= pDemand[r];"