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

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

Syntax

C#
public virtual IIntVar GetIIntVar(
	string name
)

Parameters

name
Type: System..::..String

Remarks

This method finds the integer 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 instance of IloException is thrown when an integer variable with the given name does not exist.

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