resize.lp | R Documentation |
Resize the data structures in an lpSolve linear program model object.
resize.lp(lprec, nrow, ncol)
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. |
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).
a NULL
value is invisibly returned.
Kjell Konis kjell.konis@me.com
https://lpsolve.sourceforge.net/5.5/index.htm
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.