ILOG CPLEX 11.0 Getting Started > Tutorials > Concert Technology Tutorial for Java Users > The Anatomy of an ILOG Concert Technology Java Application > Solve the Model

So far you have seen some methods of IloCplex for creating models. All such methods are defined in the interfaces IloModeler and its extension IloMPModeler and IloCplexModeler. However, IloCplex not only implements these interfaces but also provides additional methods for solving a model and querying its results.

After you have created a model as explained in Create the Model, the IloCplex object cplex is ready to solve the problem, which consists of the model and all the modeling objects that have been added to it. Invoking the optimizer then is as simple as calling the method solve.

The method solve returns a Boolean value indicating whether the optimization succeeded in finding a solution. If no solution was found, false is returned. If true is returned, then ILOG CPLEX found a feasible solution, though it is not necessarily an optimal solution. More precise information about the outcome of the last call to the method solve can be obtained by calling IloCplex.getStatus.

The returned value tells you what ILOG CPLEX found out about the model: whether it found the optimal solution or only a feasible solution, whether it proved the model to be unbounded or infeasible, or whether nothing at all has been proved at this point. Even more detailed information about the termination of the optimizer call is available through the method IloCplex.getCplexStatus.