12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table 1.6 Algorithm Status and Information About the ModelReturn StatusFeasibleOptimalInfeasibleUnboundedExtracted Modelhas been proven to be feasible. A feasible solution can bequeried.has been solved to optimality. The optimal solution can bequeried.has been proven to be infeasible.has been proven to be unbounded. The notion ofunboundedness adopted by IloCplex does not include thatthe model has been proven to be feasible. Instead, what hasbeen proven is that if there is a feasible solution with objectivevalue x*, there exists a feasible solution with objective valuex*-1 for a minimization problem, or x*+1 for a maximizationproblem.InfeasibleOrUnbounded has been proven to be infeasible or unbounded.UnknownErrorhas not been able to be processed far enough to proveanything about the model. A common reason may be that atime limit was hit.has not been able to be processed or an error occurredduring the optimization.As can be seen, these statuses indicate information about the model that the <strong>ILOG</strong> <strong>CPLEX</strong>optimizer was able to prove during the last call to method solve. In addition, the<strong>ILOG</strong> <strong>CPLEX</strong> optimizer provides information about how it terminated. For example, it mayhave terminated with only a feasible but not optimal solution because it hit a limit or becausea user callback terminated the optimization. Further information is accessible by callingsolution query routines, such as method cplex.getCplexStatus, which returns amember of the nested enumeration type IloCplex::CplexStatus, or methodscplex.isPrimalFeasible or cplex.isDualFeasible.For more information about those status codes, see the <strong>ILOG</strong> <strong>CPLEX</strong> Reference <strong>Manual</strong>.Querying Solution DataIf cplex.solve returns IloTrue, a feasible solution has been found and solution valuesfor model variables are available to be queried. For example, the solution value for thenumeric variable var1 can be accessed as follows:IloNum x1 = cplex.getValue(var1);58 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!