set.mat {lpSolveAPI} | R Documentation |
Set the value of a single matrix element in an lpSolve linear program model object.
set.mat(lprec, i, j, value)
lprec |
an lpSolve linear program model object. |
i |
a single numeric value from the set {1, ..., m} (where m is the number of constraints in lprec ) specifying the row of the matrix. |
j |
a single numeric value from the set {1, ..., n} (where n is the number of decision variables in lprec ) specifying the column of the matrix. |
value |
a single numeric value. |
a logical value indicating whether setting the matrix element was successful is invisibly returned.
Kjell Konis kjell.konis@epfl.ch
http://lpsolve.sourceforge.net/5.5/index.htm
lps.model <- make.lp(4, 2) x <- c(6,2,4,9) set.column(lps.model, 2, x) y <- c(3,1,5) ind <- c(1,2,4) set.column(lps.model, 1, y, ind) set.constr.type(lps.model, rep("<=", 4)) set.mat(lps.model, 3, 2, 4.5)