| ILOG CPLEX 11.0 Getting Started > Tutorials > Concert Technology Tutorial for C++ Users > The Anatomy of an ILOG Concert Technology C++ Application > Querying Results |
Querying Results |
INDEX
PREVIOUS
NEXT
|
After successfully solving the optimization problem, you probably are interested in accessing the solution. The following methods can be used to query the solution value for a variable or a set of variables:
IloNum IloCplex::getValue(IloNumVar var) const;
void IloCplex::getValues(IloNumArray val,
For example:
stores the solution value for the modeling variable x1 in val1. Other methods are available for querying other solution information. For example, the objective function value of the solution can be accessed using:
IloNum objval = cplex.getObjValue();
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |