add.SOS {lpSolveAPI} | R Documentation |
Add A Special Ordered Set Constraint
Description
Add a Special Ordered Set (SOS) constraint to an lpSolve linear program model object.
Usage
add.SOS(lprec, name, type, priority, columns, weights)
Arguments
lprec |
an lpSolve linear program model object. |
name |
a character string specifying a name for the SOS constraint. |
type |
a positive integer specifying the type of the SOS constraint. |
priority |
an integer specifying the priority of the SOS constraint. |
columns |
a numeric vector of unique values from the set |
weights |
a numeric vector the same length as |
Value
If the operation was successful: a single integer value containing the list index of the new special ordered set. A return value of 0
indicates an error.
Author(s)
Kjell Konis kjell.konis@me.com
References
https://lpsolve.sourceforge.net/5.5/index.htm