Learn R Programming

lpSolveAPI (version 5.5.0.12-3)

set.basis: Set Basis

Description

Set the initial basis in an lpSolve linear program model object.

Usage

set.basis(lprec, basis, nonbasic = FALSE, default = FALSE)

Arguments

lprec
an lpSolve linear program model object.
basis
a numeric vector of unique values from the set {1, ..., (m+n)} (where m is the number of constraints and n is the number of decision variables) specifying the initial basis. The values may be positive or negative whe
nonbasic
a logical value. If TRUE the nonbasic variables must be included in basis as well.
default
a logical value. If TRUE the default (all slack variable) basis is used. In this case, the value of basis and nonbasic are ignored.

Value

  • a logical value indicating whether the basis was successfully set. If FALSE then the specified basis was invalid.

References

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