R: Resize LP

resize.lp {lpSolveAPI} | R Documentation

## Resize LP

### Description

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

### Usage

    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 kjell.konis@me.com

### References

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

### Examples

    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)

[Package lpSolveAPI version 5.5.2.0-17.7 Index]