Returns the current value of an integer variable with the specified name.

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

Syntax

C#
public virtual int GetValue(
	string intVarName
)

Parameters

intVarName
Type: System..::..String

Remarks

This method returns the current value of an integer variable with the given name. It is a shortcut for cp.GetValue(cp.GetIIntVar(intVarName)).

An instance of IloException is thrown if:

  • an integer variable with the specified name does not exist,
  • or the 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