set.bounds | R Documentation |
Set bounds on the decision variables in an lpSolve linear program model object.
set.bounds(lprec, lower = NULL, upper = NULL, columns = 1:n)
lprec |
an lpSolve linear program model object. |
lower |
a numeric vector of lower bounds to be set on the decision variables specified in |
upper |
a numeric vector of upper bounds to be set on the decision variables specified in |
columns |
a numeric vector of 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.bounds(lps.model, lower = rep(-1.0, 4))
set.bounds(lps.model, upper = 1:4)
set.bounds(lps.model, lower = rep(0.0, 4), upper = rep(1.0, 4))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.