ilog.concert
Interface IloSOS2
- public interface IloSOS2
- extends IloConstraint
Special ordered set of type 2.
A special ordered set of type 2 (SOS2
) specifies an ordered set
of variables.
Only two of them may take a non-zero value in a feasible solution, and the
two variables must be adjacent with respect to the order of the variables.
The order of the variables is determined by weight values assigned to each
variable in the set.
IloSOS2
objects are created with methods
IloMPModeler.SOS2()
.
- See Also:
IloMPModeler.addSOS2(ilog.concert.IloNumVar[], double[])
Method Summary |
IloNumVar[] |
getNumVars()
Returns the array of variables in the invoking SOS2 . |
double[] |
getValues()
Returns the array of weight values in the invoking SOS2 . |
getNumVars
public IloNumVar[] getNumVars()
throws IloException
- Returns the array of variables in the invoking
SOS2
.
- Returns:
- The array of variables in the invoking
SOS2
.
getValues
public double[] getValues()
throws IloException
- Returns the array of weight values in the invoking
SOS2
.
- Returns:
- The array of weight values in the invoking
SOS2
.