Finds a cumulative function expression in the current model by its name.

Namespace: ILOG.CP
Assembly: ILOG.CP (in ILOG.CP.dll)

Syntax

C#
public virtual ICumulFunctionExpr GetICumulFunctionExpr(
	string name
)
Visual Basic
Public Overridable Function GetICumulFunctionExpr ( _
	name As String _
) As ICumulFunctionExpr

Parameters

name
Type: System..::..String

Remarks

This method finds the cumulative function expression with the given name in the current model. It is useful especially when the model was loaded from a file using ImportModel(String).

If the model was read using ImportModel(String) then only the following certain types of cumulative expressions can be found using this method:

  • Atomic cumulative function expressions on interval variables created using pulse, stepAtStart and stepAtEnd.
  • Cumulative function expressions that were constrained using function alwaysIn or using operator <= or >=.

All non-empty names in the model must be unique, otherwise an instance of IloException is thrown. Similarly an instance of IloException is thrown when a cumulative function expression with the given name does not exist or does not fulfill the conditions above.

The first call of GetICumulFunctionExpr may be slower because a searchable data structure must be built first. Once it is built, the function is faster (time complexity O(n) where n is the length of the name).

Note that name aliases cannot be used in this method as described in the section "Statements > Aliasing" of the CP Optimizer File Format Reference Manual.

See Also