get.basis: Get Basis

Description Usage Arguments Value Author(s) References Examples

Description

Retrieve the basis from a solved lpSolve linear program model object.

Usage

1
get.basis(lprec, nonbasic = FALSE)

Arguments

lprec

an lpSolve linear program model object.

nonbasic

a logical value. If TRUE, the nonbasic variables are returned as well.

Value

an integer vector containing the indices of the basic (and nonbasic if requested) variables. If an error occurs (for instance when calling get.basis on a model that has not yet been solved) a NULL value is returned.

Author(s)

Kjell Konis kjell.konis@me.com

References

http://lpsolve.sourceforge.net/5.5/index.htm

Examples

1
2
3
lps.model <- make.lp(3, 3)
## build and solve model ##
get.basis(lps.model)

Example output


lpSolveAPI documentation built on May 2, 2019, 6:50 p.m.