> Languages and APIs > ILOG Concert Technology for Java Users > Solving the Model

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.

Table 2.2 Solution Status
Return Status 
Active Model 
Error 
It has not been possible to process the active model, or an error occurred during the optimization. 
Unknown  
It has not been possible to process the active model far enough to prove anything about it. A common reason may be that a time limit was reached. 
Feasible 
A feasible solution for the model has been proven to exist. 
Bounded 
It has been proven that the active model has a finite bound in the direction of optimization. However, this does not imply the existence of a feasible solution. 
Optimal 
The active model has been solved to optimality. The optimal solution can be queried. 
Infeasible 
The active model has been proven to possess no feasible solution. 
Unbounded 
The active model has been proven to be unbounded. The notion of unboundedness adopted by IloCplex is technically that of dual infeasibility; this does not include the notion that the model has been proven to be feasible. Instead, what has been proven is that if there is a feasible solution with objective value z*, there exists a feasible solution with objective value z*-1 for a minimization problem, or z*+1 for a maximization problem. 
InfeasibleOrUnbounded 
The active model has been proven to be infeasible or unbounded. 

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.