Technical Articles
Productivity Enhancements and Full Support for
CPLEX 11: OPL 5.5
Ferenc Katai, OPL Product Manager, ILOG, S.A.
I have been asked both by prospects evaluating OPL and customers contemplating upgrading to OPL 5.5, to describe the latest release of OPL. In short, as an algebraic optimization modeling tool, OPL has always prided itself on productivity features for modelers, and this release continues to deliver on that fundamental promise. Meanwhile, the latest release of ILOG CPLEX was launched with much fanfare. The synchronization of the OPL and ILOG CPLEX releases means that all the improvements in ILOG CPLEX 11 in turn, are available from OPL 5.5. Indeed, another exciting release for OPL users, highlighted by the following features which I shall illustrate via their intended use case scenarios.
One or Many?
Of course “many” is better, especially when there is no additional cost! In practice, being able to consider alternative solutions or scenarios is much better than being restricted to a single, “optimal” one. This, in fact, is how most business decisions are often made – in light of the trade-offs between various alternatives.
Usually there are two aspects of a model development that either the developer or the user of the result might consider important.
- The developed model should describe the real life problem as accurately as possible
- The results after solving the model should represent a generally agreed upon optimal solution
The first aspect seems easy enough to accomplish at the model specification level. That is, just ask the user, and he will tell you what his problem is and that’s it. Not so fast! Even if the enterprise is well equipped with the latest software and hardware, the organization is still run by humans who continually accumulate knowledge and modify best practices. Unfortunately these changes aren’t automatically reflected in an organization’s IT systems. In fact, new organizational knowledge and best practices are often times the basis for new features. Even if the user is willing to accommodate the limitations of her software, at some point the software and the business processes they were designed to support will become misaligned. This misalignment often starts even during development. And we’ve arrived at the second aspect. The quality or acceptability of a plan or schedule is always (subjectively) measured against something that the planner considers important. It can be time, money, quantity of reused (expensive) solvent, or just about anything that is measurable. However when moving from a manual planning process to an automatic or semi-automatic one, there are many aspects of either the planning process itself or the ways in which different humans “value” the quality of a plan or schedule, that just will not make its way into the specification. Thus generating more then one solution, besides the “optimal” one can be an effective way to uncover:
- If the model is really describing what the real life problem represents
- If the objective is really measuring what the planner wants to measure
In my experience meeting with customers it has happened several times that actually the modeling process was a discovery of the business process itself. The solution pool feature then can be used not just in a finished model, but also facilitate the discovery of the business process during model development.
Generating more than one solution is based on setting criteria and filters either as setting files or in the OPL model code itself. The solution pool feature can be set in the .ops (OPL setting) file, as shown in Picture 1 and 2. After generating the multiple solutions, they can be compared either by values of the objective functions or by the values of the decision variables, as depicted in Picture 3.
Picture 1. Setting the solution pool feature
Picture 2. Setting the criteria and filters of the solution pool
Picture 3. Comparing solutions
Automatic Performance Tuning
OPL comes bundled with the ILOG CPLEX mathematical programming engine, which can be tuned in many ways to improve performance. Experts of math programming or ILOG CPLEX itself have the knowledge to comprehend those settings and try to set them according to their computational needs and objectives. Acquiring a strong OR background takes years of study and experience with solving different models. OPL, through ILOG CPLEX functionality, enables any user to avoid that burden with an automatic performance tuning utility.
There are two distinct cases supported (see Picture 5):
- The user has many models with fairly similar data sets
- The user has one model with many data sets
In either case, the user does not want to have dramatically different performance. For all the configurations the goal of the tuning can be to:
- Use the mean average performance measure (e.g. for interactive applications where worst-case response time should be minimized)
- Use the minmax performance measure (e.g. for batch runs, when total running time matters most)
The automatic tuning option is available not only from the IDE (Integrated Development Environment) but also through the command-line OPLRun, OPL interfaces and OPL scripts. The Pictures 4-7 show the steps necessary to set up performance tuning.
Picture 4. Choosing the automatic performance tuning from the menu
Picture 5. Setting the “field” for the tuning
Picture 6. Monitor the progress of the performance tuning
Picture 7. Checking the result of the automatic performance tuning
Light run
There are several instances where users may wish to sidestep the overhead of the IDE:
- To achieve final incremental improvements in performance
- To launch a model from the IDE while simultaneously developing in the IDE
- To utilize a 64bit machine’s power
To accommodate these requirements during model development, ILOG OPL 5.5. introduces the use of OPLRun from the IDE. In Picture 8, we show how to launch OPLRun from the IDE.
Picture 8. Launching OPLRun from the IDE
Major features, minor release
All the new features of ILOG CPLEX 11.0 are available from ILOG OPL 5.5, which means that besides the major improvements like solution pools and automatic tuning, ILOG OPL 5.5 users can benefit from the dramatic improvements in MIP performance. Meanwhile, there are many improvements that have been made to the OPL IDE, including:
- Ordered, sorted and reverse-sorted sets are available
- Improved key use on tuple sets
- Simplified creation of piece-wise linear function
- Better error messaging through labeled assert
- All OPL functions are available in scripting
- Improved memory management
- Improved project packaging