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 n (where n is the number of decision variables in lprec) containing the coefficients of the objective function. Alternatively, if indices is also provided, a numeric vector of the same leng
indices
optional for sparse obj. A numeric vector the same length as obj of unique values from the set {1, ..., n} where n is the number of decision variables in lprec; obj[i] is entered into column indice
Value
a logical value indicating whether setting the objective function was successful is invisibly returned.