Finds an interval variable in the current model by its name.

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

Syntax

C#
public virtual IIntervalVar GetIIntervalVar(
	string name
)

Parameters

name
Type: System..::..String

Remarks

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

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 the interval variable with the given name does not exist.

The first call of GetIIntervalVar 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