Skip to main content
PREV CLASS NEXT CLASS FRAMES NO FRAMES

 

Class IloNumVar

IloNumExpr
   |
   +--IloNumVar

Description:

Using an IloNumVar 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 x;
in the modeling part.
Example:
dvar float x in 0..20;

maximize x;

subject to {
}

execute {
  writeln(x.name);
  writeln(x.LB," ",x.UB," ",x.solutionValue);
  writeln(x.reducedCost);
}
After execution, the Scripting log shows:
x
0 20 20
1
Iterating properties:
Default behavior.
Index resolution:
Default behavior.
OPL type:
dvar int
dvar int+
dvar float
dvar float+
dvar boolean

Property Summary
Field Attributes Field Name and Description
all (read only)
preprocessing (write)
Branching direction for the decision variable (CPLEX models only).
all
preprocessing (write)
LB
Accesses the lower bound set for the decision variable.
all (read only)
preprocessing (write)
Accesses the priority level of the decision variable (CPLEX models only).
postprocessing
The reduced cost for the decision variable (CPLEX models only).
all
preprocessing (write)
UB
Accesses the upper bound set for the decision variable.
Properties inherited from class IloNumExpr
name, solutionValue
Property Detail
direction
{string} direction
Branching direction for the decision variable (CPLEX models only). One of "BranchDown", "BranchGlobal", "BranchUp".
Available for:
all (read only)
preprocessing (write)

LB
{float} LB
Accesses the lower bound set for the decision variable.
Available for:
all
preprocessing (write)

priority
{float} priority
Accesses the priority level of the decision variable (CPLEX models only).
Available for:
all (read only)
preprocessing (write)

reducedCost
{float} reducedCost
The reduced cost for the decision variable (CPLEX models only).
Available for:
postprocessing

UB
{float} UB
Accesses the upper bound set for the decision variable.
Available for:
all
preprocessing (write)

©Copyright IBM Corp. 1987-2011.