FRAMES NO FRAMES

IlcSum

public IlcIntExp IlcSum(const IlcIntSetVar setVar, const IlcIntToIntFunction F)
public IlcIntExp IlcSum(const IlcIntSetVar setVar, const IlcIntToIntExpFunction F)
public IlcIntExp IlcSum(const IlcAnySetVar setVar, const IlcAnyToIntFunction F)
public IlcIntExp IlcSum(const IlcAnySetVar setVar, const IlcAnyToIntExpFunction F)
Definition file: ilsolver/setcst.h
Include file: <ilsolver/ilosolver.h>

These functions create and return a new constrained expression equal to the sum of the values returned by the function F applied to the elements assigned to the constrained set variable setVar.

The value returned by the function F can be an integer value (IlcInt) or a constrained integer expression (an instance of IlcIntExp).

The minimum value of the expression is a sum of two sums, one based on the function F applied to required elements of setVar, and the other based on the function F applied to the possible elements of setVar. The minimum is calculated in this way:

Likewise, the maximum value of the returned expression is a sum of two sums, one based on F applied to the possible elements of setVar and the other sum based on F applied to required elements of setVar.

The bounds of the expression also depend on the cardinality variable of setVar.

See Also:


IlcSum

public IlcFloatExp IlcSum(const IlcIntSetVar aSet, const IlcIntToFloatExpFunction F)
Definition file: ilsolver/setcst.h
Include file: <ilsolver/ilosolver.h>

This function creates and returns a floating-point expression constrained to be the sum of the floating-point expressions returned by the function F over its domain, aSet.

See Also:


IlcSum

public IlcIntExp IlcSum(const IlcIntSetVar setVar)
Definition file: ilsolver/setcst.h
Include file: <ilsolver/ilosolver.h>

This function creates and returns a new constrained expression equal to the sum of the elements that are assigned to the constrained set variable setVar. The set may contain positive or negative integers.

The minimum value of the expression is the sum of the required elements of the variable setVar.

The maximum value of the expression is the sum of the possible elements of the variable setVar.

The bounds of the expression also depend on the cardinality variable of setVar.

See Also:


IlcSum

public IlcFloatExp IlcSum(const IlcFloatVarArray vars)
public IlcIntExp IlcSum(const IlcIntVarArray array)
public IlcInt IlcSum(const IlcIntArray array)
public IlcFloat IlcSum(const IlcFloatArray array)
Definition file: ilsolver/linfloat.h
Include file: <ilsolver/ilosolver.h>

This function creates a new constrained expression equal to the sum of the constrained expressions in array, an array of constrained values or variables that may be integer or floating-point.

When its argument is an instance of IlcIntArray or IlcFloatArray, it simply creates and returns the sum of the elements.

When its argument is an array of constrained integer variables, then its domain is an interval. Its minimum is the sum of the minimums of the elements of array. Its maximum is the sum of the maximums of the elements of array.

See Also: