ILOG CPLEX 11.0 User's Manual > Languages and APIs > ILOG Concert Technology for Java Users > Solving the Model |
Solving the Model |
INDEX PREVIOUS NEXT |
Once you have created an optimization problem in your active model, the IloCplex
object is ready to solve it. This is done, for a model represented by cplex
by calling:
cplex.solve();
The solve method returns a Boolean indicating whether or not a feasible solution was found and can be queried. However, when true
is returned, the solution that was found may not be the optimal one; for example the optimization may have terminated prematurely because it ran into an iteration limit.
Additional information about a possible solution available in the IloCplex
object can be queried with the method getStatus
returning an IloCplex.Status
object. Possible statuses are summarized in Table 2.2.
For example, an Optimal
status indicates that an optimal solution has been found and can be queried, whereas an Infeasible
status indicates that the active model has been proven to be infeasible. See the online ILOG CPLEX Java Reference Manual for more information about these statuses.
More detailed information about the status of the optimizer can be queried with method getCplexStatus
returning an object corresponding to ILOG CPLEX status codes. Again the online ILOG CPLEX Java Reference Manual contains further information about this.
Copyright © 1987-2007 ILOG S.A. All rights reserved. Legal terms. | PREVIOUS NEXT |