Returns the current size of the interval variable with the specified name.

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

Syntax

C#
public virtual int GetSize(
	string intervalVarName
)
Visual Basic
Public Overridable Function GetSize ( _
	intervalVarName As String _
) As Integer

Parameters

intervalVarName
Type: System..::..String

Remarks

This method returns current size of the interval variable with the specified name. It is a shortcut for cp.GetSize(cp.GetIIntervalVar(intervalVarName)).

An instance of IloException is thrown if:

  • interval variable with the specified name does not exist,
  • or the interval variable is absent,
  • or its size 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