Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IloNumExpr

IloNumExpr

Description:

Using an IloNumExpr object implicitly provides access to its solutionValue property. The postprocessing expression

  x*100
is equivalent to
  x.solutionValue * 100
where x has been declared as
  dvar float x0;
  dexpr float x = x0+1;
in the modeling part.

Example:
dvar float x0 in 0..20;
 dexpr float x = x0+1;

maximize x;

subject to {
 }

execute {
   writeln(x.name);
   writeln(x.solutionValue);
 }
After execution, the Scripting log shows:
x
21
Iterating properties:
Default behavior.
Index resolution:
Default behavior.
OPL type:
dexpr int
dexpr float

Property Summary
Field Attributes Field Name and Description
all (read only)
preprocessing (write)
The name of the decision expression.
postprocessing
Values of the decision expression in the current solution.
Property Detail
name
{string} name
The name of the decision expression.
Available for:
all (read only)
preprocessing (write)

solutionValue
{float} solutionValue
Values of the decision expression in the current solution. Note that using an IloNumExpr object implicitly provides access to its solutionValue property.
Available for:
postprocessing

©Copyright IBM Corp. 1987-2011.