View source: R/set.constr.type.R
set.constr.type | R Documentation |
Set constraint types in an lpSolve linear program model object.
set.constr.type(lprec, types, constraints = 1:m)
lprec |
an lpSolve linear program model object. |
types |
either a numeric vector or a character vector containing elements from the set |
constraints |
a numeric vector of unique values from the set {1, ..., m} (where m is the number of constraints in |
a NULL
value is invisibly returned.
Kjell Konis kjell.konis@me.com
https://lpsolve.sourceforge.net/5.5/index.htm
resize.lp
lps.model <- make.lp(4, 2)
x <- c(6,2,4,9)
set.column(lps.model, 2, x)
y <- c(3,1,5)
ind <- c(1,2,4)
set.column(lps.model, 1, y, ind)
set.constr.type(lps.model, rep("<=", 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.