set.objfn {lpSolveAPI} | R Documentation |
Set Objective Function
Description
Set the objective function in an lpSolve linear program model object.
Usage
set.objfn(lprec, obj, indices)
Arguments
lprec |
an lpSolve linear program model object. |
obj |
a numeric vector of length |
indices |
optional for sparse |
Value
a NULL
value is invisibly returned.
Author(s)
Kjell Konis kjell.konis@me.com
References
https://lpsolve.sourceforge.net/5.5/index.htm
See Also
Examples
lps.model <- make.lp(2, 4)
set.objfn(lps.model, c(1,2,3,4))
set.objfn(lps.model, c(5,7,6), indices = c(1,2,4))