Checks whether an interval variable with the specified name is currently set to be present.

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

Syntax

C#
public virtual bool IsPresent(
	string intervalVarName
)
Visual Basic
Public Overridable Function IsPresent ( _
	intervalVarName As String _
) As Boolean

Parameters

intervalVarName
Type: System..::..String

Remarks

This method returns true if the interval variable with the specified name is currently set to be present. It is a shortcut for cp.IsPresent(cp.GetIIntervalVar(intervalVarName)).

An instance of IloException is thrown if:

  • an interval variable with the specified name does not exist,
  • or the presence status of the interval variable is not fixed yet,
  • or there are duplicate names in the current model.

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