add.SOS: Add A Special Ordered Set Constraint

Description Usage Arguments Value Author(s) References

View source: R/add.SOS.q

Description

Add a Special Ordered Set (SOS) constraint to an lpSolve linear program model object.

Usage

1
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 {1, ..., n} (where n is the number of decision variables in lprec) indicating which decision variables belong to the special ordered set.

weights

a numeric vector the same length as columns specifying the variable weights.

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 [email protected]

References

http://lpsolve.sourceforge.net/5.5/index.htm


lpSolveAPI documentation built on May 30, 2017, 7:12 a.m.