NO FRAMES

Class IloSOS1

Definition file: ilconcert/ilolinear.h

This handle class represents special ordered sets of type 1 (SOS1). A special ordered set of type 1 specifies a set of variables, and only one among them may take a non zero value. You may assign a weight to each variable in an SOS1. This weight indicates an order among the variables. If you do not specify any weights to indicate order among the variables, then Concert Technology considers the order in which you gave the variables to the constructor of this set and the order in which you added variables later.

When you extract a model (an instance of IloModel) for an instance of IloCplex (documented in the ILOG CPLEX Reference Manual), it will use the order for branching on variables.

For more details about SOS1, see the ILOG CPLEX Reference and User's Manuals.

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

See Also:

Constructor Summary
public IloSOS1()
public IloSOS1(IloSOS1::ImplClass *)
public IloSOS1(const IloEnv, const char *)
public IloSOS1(const IloEnv, const IloNumVarArray, const char *)
public IloSOS1(const IloEnv, const IloNumVarArray, const IloNumArray, const char *)
Method Summary
public IloSOS1::ImplClass *getImpl()
public voidgetNumVars(IloNumVarArray)
public voidgetValues(IloNumArray)
Inherited Methods from IloConstraint
getImpl
Inherited Methods from IloIntExprArg
getImpl
Inherited Methods from IloNumExprArg
getImpl
Inherited Methods from IloExtractable
end, getEnv, getId, getImpl, getName, getObject, setName, setObject
Constructor Detail

IloSOS1

public IloSOS1()
This constructor creates an empty handle. You must initialize it before you use it.

IloSOS1

public IloSOS1(IloSOS1::ImplClass * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloSOS1

public IloSOS1(const IloEnv env, const char * name)

This constructor creates a special ordered set of type 1 (SOS1). You must add the variables to this set for them to be taken into account.


IloSOS1

public IloSOS1(const IloEnv env, const IloNumVarArray vars, const char * name)

This constructor creates a special ordered set of type 1 (SOS1). The set includes each of the variables specified in the array vars.


IloSOS1

public IloSOS1(const IloEnv env, const IloNumVarArray vars, const IloNumArray vals, const char * name)

This constructor creates a special ordered set of type 1 (SOS1). The set includes the variables specified in the array vars. The corresponding value in vals indicates the weight of each variable in vars.


Method Detail

getImpl

public IloSOS1::ImplClass * getImpl()
This member function returns a pointer to the implementation object of the invoking handle.

getNumVars

public void getNumVars(IloNumVarArray variables)

This member function accesses the variables in a special ordered set of type 1 (SOS1) and puts those variables into its parameter variables.


getValues

public void getValues(IloNumArray values)

This member function accesses the weights of the variables in a special ordered set of type 1 (SOS1) and puts those weights into its parameter values.