View source: R/delete.constraint.R
delete.constraint | R Documentation |
Delete a constraint from an lpSolve linear program model object.
delete.constraint(lprec, constraints)
lprec |
an lpSolve linear program model object. |
constraints |
a numeric vector of unique values from the set |
a NULL
value is invisibly returned.
Kjell Konis kjell.konis@me.com
https://lpsolve.sourceforge.net/5.5/index.htm
lps.model <- make.lp(0, 4)
set.objfn(lps.model, rep(1, 4))
xt <- c(6,2,4,9)
add.constraint(lps.model, xt, "<=", 50)
yt <- c(3,1,5)
ind <- c(1,2,4)
add.constraint(lps.model, yt, 2, 75, ind)
delete.constraint(lps.model, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.