ilog.concert
Interface IloSOS2

All Superinterfaces:
IloAddable, IloConstraint, IloIntExpr, IloNumExpr

public interface IloSOS2
extends IloConstraint

A special ordered set of type 2.

A special ordered set of type 2 (SOS2) specifies an ordered set of variables. Only two of these variables may take a nonzero 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 in the set is determined by weighted values assigned to each variable in the set.

IloSOS2 objects are created with the method IloMPModeler.SOS2().

See Also:
IloMPModeler.addSOS2(ilog.concert.IloNumVar[], double[])

Method Summary
 ilog.concert.IloNumVar[] getNumVars()
          Returns the array of variables in the invoking SOS2 object.
 double[] getValues()
          Returns the array of weight values in the invoking SOS2 object.
 
Methods inherited from interface ilog.concert.IloAddable
getName, setName
 

Method Detail

getNumVars

public ilog.concert.IloNumVar[] getNumVars()
                                    throws IloException
Returns the array of variables in the invoking SOS2 object.

Returns:
The array of variables in the invoking SOS2 object.
IloException

getValues

public double[] getValues()
                   throws IloException
Returns the array of weight values in the invoking SOS2 object.

Returns:
The array of weight values in the invoking SOS2 object.
IloException