OptimJ FAQ |
|
Technical questions about OptimJ™ are answered by the Ateji development team in the Technical Support forum or by email at support@ateji.com.
How efficient is OptimJ ?OptimJ does all its work at compile-time and produces a code that directly calls the appropriate API methods of the underlying solver. This code is pretty much the same as what you would write by hand and has the same efficiency. Contrast this with the usual approach of adding an intermediate library level, for reasons such as API abstraction or translation of complex constructs. In this case, the work is done at run-time and implies a noticeable speed and memory overhead. What kind of models are expressible with OptimJ ?The OptimJ language does not put any restriction on the form of constraints. Any Java expression, with the addition of aggregate operators such as sum and product, can be used in a constraint or in the objective function. An example is the ballistic body equation which is expressed in terms of But obviously if you want to actually solve a model, you need a solver that is able to understand it. A linear solver will fail on the ballistic body equation. You can thus think of OptimJ model compilation as a two-stage process:
Can an OptimJ model be reused for another solver ?Yes, this is only a matter of changing a single keyword. Obviously the other solver must also be able to understand the model. Is OptimJ a code generator ?The short answer is no. OptimJ is a full-fledged compiler that analyzes the whole source code. The term 'code generator' typically refers to text-based transformations that have little knowledge of the actual language being used (think of the C preprocessor, which actually doesn't care about the C language constructs). Such code generators typically also are one-way only and lose high-level constructs during generation. This is why we prefer to avoid the term 'code generator'. However, since any compiler is also a (very sophisticated) code generator, you won't be totally wrong if you prefer using this term. Can I deploy models written with OptimJ ?Yes. OptimJ is licenced as a development tool: you will need a licence for compiling OptimJ programs, but the resulting code is yours and you can deploy it wherever you want. No licence is needed for running OptimJ code. Note however that using a commercial solver in conjunction with OptimJ usually requires a runtime licence for the solver. Which tools are compatible with OptimJ ?Rather than directly generating byte-code, the OptimJ compiler back-end purposedly produces standard Java™ source code behind the scenes. This makes OptimJ compatible with all tools or Eclipse™ plugins that take Java source code or byte code as input, such as:
Tools that output or modify Java source code, such as XML-based middleware code generators, are not directly compatible with OptimJ source code. But these parts, typically concerned with application integration aspects (database integration), are best handled outside the optimization model and can be encapsulated in standard Java classes, which are direcly compatible with an OptimJ application. Is the generated code maintainable ?Yes. We have put a great deal of effort into making sure that the Java source code generated by the OptimJ compiler is readable and maintainable. You normally won't ever need to look at this code, and you probably won't ever notice that it actually exists. But you can look at it if you want to understand what is going on behind the scenes, and it will be as readable as your original OptimJ model. All syntactic artifacts such as comments and indentation are preserved. Should you ever choose to stop using OptimJ, you can continue maintaining your project on the basis of this generated code, at the expense of having to manage all the low-level details of the underlying solver API by yourself. Is there a C++ version of OptimJ ?No. OptimJ builds on the Java language, the Eclipse IDE, and all the Java ecosystem such as librairies and productivity tools. The C++ language traditionally has been in common use in the optimization community, but chances are that the optimization team in any large organization is now the only one still using it. Java is today the language of choice taught at school, and about 50% of the world's IT environments are Java-based, promoted by software giants such as IBM™ and SAP™. The reasons we choose to base OptimJ on the Java ecosystem are very pragmatic, they're called developper productivity, availability of tools and IT integration. But isn't Java slow ?No. The Java platform has been plagued at its debut with a reputation for being slow, but this isn't the case anymore. Clever JIT compilers are able to perform much better code optimization that an individual programmer would do. Optimization modeling is about manipulation of symbolic data, an area in which Java particularly excels. Optimization solvers are packaged as binary libraries, and will perform exactly the same whether called from Java or any other language. |
Customer Quotes
We're going to deploy OptimJ capabilities for our ongoing Java-based projects to close a gap between optimization engines and Java applications.
With OptimJ you get the expressiveness of OPL™ with the integrability and flexibility of Ilog Concert™ -- the best of both worlds.
Integrating optimization projects in a Java environment becomes a breeze using the Eclipse IDE, shortening project development times up to 50%.
OptimJ made it easy to use results from different solvers and combine exact methods with metaheuristics coded in Java, for solving complex industrial problems.
I used OptimJ to implement a model for production planning in a polystyrene factory.
We've succesfully applied OptimJ to improve an existing software application developed in one of our past numerical optimization projects.
Using OptimJ enabled a rapid development and integration of optimization models in Java-based applications.



