Creates a object that will hold your optimization model. You can use the methods of this object to define your optimization problem.

Model()

Examples

m <- Model() m$var(x >= 0) m$var(y >= 0) m$constraint(x + y <= 2) m$sense <- "max"
#> Found more than one class "RAMLModel" in cache; using the first, from namespace 'raml'
#> Also defined by ‘.GlobalEnv’
m$objective(2*x + y)
#> Error in e2 * e1: invalid object (non-function) used as method
m$solve()
#> Error in .solve(.__variables, .__constraints, .__obj, sense, ...): trying to get slot "coefs" from an object of a basic class ("NULL") with no slots
#> Found more than one class "ramlVariable" in cache; using the first, from namespace 'raml'
#> Also defined by ‘.GlobalEnv’
#> [1] NA