get.kind | R Documentation |
Retrieve the kind of a decision variable from an lpSolve linear program model object.
get.kind(lprec, columns = 1:n)
lprec |
an lpSolve linear program model object. |
columns |
a numeric vector of unique values from the set |
Decision variables have both a type and a kind. The type is either real
or integer
and indicates the type of values the decision variable may take. The kind is one of {standard, semi-continuous, SOS}
. Semi-continuous decision variables can take allowed values between their upper and lower bound as well as zero. Please see the link in the references for a discussion of special ordered set (SOS) constraints.
a character vector containing the kind of each decision variable specified in columns
.
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, "<=", 150)
xt <- c(1,1,6)
add.constraint(lps.model, xt, ">=", 0)
xt <- c(4,5,4)
add.constraint(lps.model, xt, "=", 40)
set.objfn(lps.model, c(-3,-4,-3))
get.kind(lps.model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.