resize.lp: Resize LP

Description Usage Arguments Details Value Author(s) References Examples

View source: R/resize.lp.q

Description

Resize the data structures in an lpSolve linear program model object.

Usage

1
resize.lp(lprec, nrow, ncol)

Arguments

lprec

an lpSolve linear program model object.

nrow

a single nonnegative integer value specifying the new number of rows for the lpSolve linear program model object.

ncol

a single nonnegative integer value specifying the new number of rows for the lpSolve linear program model object.

Details

If the new size of the model is smaller than the size of the current model, the excess rows and/or columns are deleted. If the new size is larger, no change will be immediately apparent. However, the internal structures of lprec will have been adjusted to accommodate the larger model. Efficiency of model building can be improved by calling this function before adding additional columns (for example).

Value

a NULL value is invisibly returned.

Author(s)

Kjell Konis [email protected]

References

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

Examples

1
2
3
4
5
6
7
8
9
lps.model <- make.lp(4, 0)
resize.lp(lps.model, 4, 2)

x <- c(6,2,4,9)
add.column(lps.model, x)

y <- c(3,1,5)
ind <- c(1,2,4)
add.column(lps.model, y, ind)

lpSolveAPI documentation built on May 30, 2017, 7:12 a.m.