ILOG Concert Technology for Java Users
In this chapter we explore the features ILOG CPLEX offers Java users to solve mathematical programming problems. An overview of the architecture is given, then techniques for creating models with ranged constraints and for creating objective functions are explained. These elements are then used to build and solve the Dietary Optimization example model, introduced in the last chapter.
A user-written application first creates an IloCplex
object. It then uses the Concert Technology modeling interface implemented by IloCplex
to create the variables, the constraints, and the objective function of the model to be solved. For example, every variable in a model is represented by an object that implements the Concert Technology variable interface IloNumVar
. The user code only accesses the variable through its Concert Technology interface. Similarly, all other modeling objects are only accessed through their respective Concert Technology interfaces from the user-written application, while the actual objects are maintained in the ILOG CPLEX database.
Figure 2.1 illustrates how an application uses Concert Technology, IloCplex
and the ILOG CPLEX database. The Java interfaces, represented by the dashed outline, do not actually consume memory. The ILOG CPLEX database includes the computing environment, its communication channels, and your problem objects.
For users familiar with object-oriented design patterns, this design is that of a factory, where IloCplex
is a factory for modeling objects. The advantage of such a design is that code which creates a model using the Concert Technology modeling interface can be used not only with IloCplex,
but also with any other factory class, for instance IloSolver
. This allows you to try different ILOG optimization technologies for solving your model.
![](images/Java_Design_Modela.gif)
Figure 2.1 A View of Concert Technology for Java Users