Skip to main content
FRAMES NO FRAMES

Class IloForAllRange

Definition file: ilconcert/ilolinear.h
Map of IloForAllRangeIloForAllRangeIloForAllRangeIloConstraintIloIntExprArgIloNumExprArgIloExtractable
A class to manipulate forall constraints.

This class allows you to manipulate the constraints generated using forall constructs in OPL.

Method Summary
public IloForAllRangeI *getImpl() const
public IloForAllRange()
public IloForAllRange(IloForAllRangeI * impl)
public IloForAllRange(const IloConstraint & ct)
public voidsetBounds(IloNum lb, IloNum ub)
public voidsetLB(IloNum lb)
public voidsetLinearCoef(const IloNumVar var, IloNum value)
public voidsetLinearCoefs(const IloNumVarArray vars, const IloNumArray values)
public voidsetUB(IloNum ub)
Inherited Methods from IloConstraint
getImpl, IloConstraint, IloConstraint
Inherited Methods from IloIntExprArg
getImpl, IloIntExprArg, IloIntExprArg
Inherited Methods from IloNumExprArg
getImpl, IloNumExprArg, IloNumExprArg
Inherited Methods from IloExtractable
asConstraint, asIntExpr, asModel, asNumExpr, asObjective, asVariable, end, getEnv, getId, getImpl, getName, getObject, IloExtractable, isConstraint, isIntExpr, isModel, isNumExpr, isObjective, isVariable, removeFromAll, setLocation, setName, setObject
Method Detail

IloForAllRange

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

IloForAllRange

public IloForAllRange(IloForAllRangeI * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloForAllRange

public IloForAllRange(const IloConstraint & ct)

This member function allows a safe cast of a constraint of type IloConstraint. The method checks the type of the constraint and throws an exception if the type is not correct.

Parameters:

ct
The constraint to be cast.

getImpl

public IloForAllRangeI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.

setBounds

public void setBounds(IloNum lb, IloNum ub)

This member function sets lb as the lower bound and ub as the upper bound of the invoking range, and it creates the appropriate instance of the undocumented class IloChange to notify algorithms about this change of an extractable object in the model.

Note
The member function setBounds notifies Concert Technology algorithms about this change of this invoking object.

Parameters:

lb
The lower bound of the range.
ub
The upper bound of the range.

setLB

public void setLB(IloNum lb)

This member function sets lb as the lower bound of the invoking range, and it creates the appropriate instance of the undocumented class IloChange to notify algorithms about this change of an extractable object in the model.

Note
The member function setLB notifies Concert Technology algorithms about this change of this invoking object.

Parameters:

lb
The lower bound of the range.

setLinearCoef

public void setLinearCoef(const IloNumVar var, IloNum value)

This member function sets value as the linear coefficient of the variable var in the invoking range, and it creates the appropriate instance of the undocumented class IloChange to notify algorithms about this change of an extractable object in the model.

Note
The member function setLinearCoef notifies Concert Technology algorithms about this change of this invoking object.

If you attempt to use setLinearCoef on a non linear expression, it will throw an exception on platforms that support C++ exceptions when exceptions are enabled.

Parameters:

var
The variable for which to set the coefficient.
value
The coefficient to set.

setLinearCoefs

public void setLinearCoefs(const IloNumVarArray vars, const IloNumArray values)

For each of the variables in vars, this member function sets the corresponding value of values (whether integer or floating-point) as its linear coefficient in the invoking range, and it creates the appropriate instance of the undocumented class IloChange to notify algorithms about this change of an extractable object in the model.

Note
The member function setLinearCoefs notifies Concert Technology algorithms about this change of this invoking object.

If you attempt to use setLinearCoef on a non linear expression, it will throw an exception on platforms that support C++ exceptions when exceptions are enabled.

Parameters:

vars
An array of variables for which to set the coefficient.
values
An array of the coefficients to set.

setUB

public void setUB(IloNum ub)

This member function sets ub as the upper bound of the invoking range, and it creates the appropriate instance of the undocumented class IloChange to notify algorithms about this change of an extractable object in the model.

Note
The member function setUB notifies Concert Technology algorithms about this change of this invoking object.

Parameters:

ub
The upper bound of the range.