View source: R/get.constr.type.R
get.constr.type | R Documentation |
Retrieve constraint types from an lpSolve linear program model object.
get.constr.type(lprec, constraints = 1:m, as.char = TRUE)
lprec |
an lpSolve linear program model object. |
constraints |
a numeric vector of unique values from the set |
as.char |
a logical value. If |
either a character vector or an integer vector containing the types of the constraints specified in constraints
. The possibilities are: 0 = "free"
, 1 = "<="
, 2 = ">="
and 3 = "="
.
Kjell Konis kjell.konis@me.com
https://lpsolve.sourceforge.net/5.5/index.htm
lps.model <- make.lp(0, 3)
xt <- c(6,2,4)
add.constraint(lps.model, xt, "<=", 15)
xt <- c(1,1,6)
add.constraint(lps.model, xt, ">=", 15)
xt <- c(4,5,4)
add.constraint(lps.model, xt, "=", 40)
get.constr.type(lps.model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.