OR/MS Today - April 2001

Software Review

Software Review OPL Studio 3.1

Powerful, flexible product offers array of problem-solving methods

By Christopher Skiscim

The availability of powerful desktop computing has given rise to many industrial-strength software systems for symbolic and computational mathematics. ILOG, OPL Studio 3.1 for Windows, follows suit with a rich array of methods for solving large optimization and constraint-based problems. It distinguishes itself from similar problem-solving packages by providing a rich set of commands and a scripting language for mathematical programming and constraint-based programming that can be embedded in stand-alone applications.

OPL Studio is aimed at different sets of users. An analyst can use the GUI and OPL language to formulate and solve a variety of mathematical programming problems with the CPLEX 7.0 solver. For business applications, a stand-alone application can be created and distributed with embedded solver engines. A unique feature of OPL Studio is the use of constraint programming, a heterogeneous field of research ranging from theoretical topics in mathematical logic to practical applications such as job-shop scheduling. It is a branch of computer programming wholly distinct from mathematical programming

While we're all familiar with the techniques of mathematical programming, constraint programming is probably not as well known. Constraint programming extended the logic-programming paradigm to constraint logic programming in the 1980s. Such languages were extensions of programming languages such as Prolog and Prolog-II.

Constraint programming consists of a two-tiered architecture composed of a constraint component and a programming component. The constraint component describes what the solutions are without specifying how to find them. The programming component describes how to search for solutions. All of this enables a wide variety of combinatorial problems to be formulated and solved; many of them not easily expressible in traditional mathematical programming terms. For instance, a graph-coloring problem for Western Europe can be written quite intuitively as:

    enum Country {Belgium, Denmark, France, Germany, Netherlands, Luxembourg};
    enum Colors {red, blue, yellow, gray};
    var Colors color [Country];

    solve {
      color[France]      <> color[Belgium];
      color[France]      <> color[Luxembourg];
      color[France]      <> color[Germany];
      color[Luxembourg]      <> color[Germany];
      color[Luxembourg]      <> color[Belgium];
      color[Belgium]      <> color[Netherlands];
      color[Belgium]      <> color[Germany];
      color[Germany]      <> color[Netherlands];
      color[Germany]      <> color[Denmark];

An integer programming formulation or specialized heuristic would be quite a bit more opaque. Such is the power of the OPL Language.

OPL Studio 3.1 Features

I evaluated OPL Studio 3.1 for Windows although support is available for many Unix platforms such as Linux. The Windows version is built around Microsoft's Component Object Model (COM), thus it immediately supports Visual Basic and the Windows version of Java (native Java support is coming). Like most users, I ignored the installation and licensing instructions (the License Manager "Quick Start" was about 40 pages) and installed the software on my Pentium-II powered laptop (64MB of memory). After one or two false starts with the licensing, I was up and running and trying the extensive set of sample scripts and models included in the distribution.

I found the OPL Scripting Language very comfortable, as it borrows many of the language elements of C++. It is a strongly-typed language that has many of the familiar C/C++ features, such as structs and enum. It appears as an object-oriented language, but there is no inheritance or polymorphism. I/O is modeled after C++ streams and is very convenient to anyone familiar with those facilities. All the usual program control language features are available, making it possible to develop quite sophisticated applications in short order.

As with many powerful languages, the OPL Language is large and somewhat complex. This is not a drawback. I was able to develop some interesting models and scripts with a small subset of the language. To take full advantage of the power of OPL requires a bit of study, but the documentation is good with extensive examples. Each of the examples in the documentation is contained in the distribution as either scripts or models.

The user interface illustrated in Figure 1 provides a parsing editor for the model and scripting language, making it very easy to distinguish among language elements, variables, etc. C++ files can be viewed within the editor, but that is the extent of the support for source code. A particularly nice feature is the debugging facility for the scripts. Those of us who have struggled through debugging command-line scripts will be overjoyed to find what amounts to a symbolic debugger for the OPL Scripting Language. It is modeled after the Microsoft Visual C++ debugger, so Windows programmers will find this feature easy to use.

Figure 1

Figure 1: User Interface for OPL Studio 3.1 for Windows.

The scripts and the models can be translated into C++ code using a single pull-down from the toolbar. The generated code uses the try/catch feature of C++. The programmers must write their own error handling (you would want to anyway), but the basic code is essentially ready to compile. There are two sets of C++ APIs that can be used. COM APIs are available as well as generic C++ APIs. Both are reasonably well-documented and relatively easy to use. It is possible to develop applications outside of OPL Studio, but the scripting language makes the job of building a full-fledged C++ application quite easy. Release notes contain the details of compile switches and linking (read them). Full support for accessing commercial databases is provided through ODBC drivers. Linking results to a spreadsheet (Excel) is available.

One specialized feature of the product that deserves attention is the Scheduler. Since scheduling applications are quite common in industry, ILOG has developed a separate package tailored to solving such problems. The OPL language supports keywords such as Activity, scheduleHorizon and many more scheduling-specific constructs. For those interested in developing detailed models of say, job-shop scheduling, OPL makes the task more convenient. In addition to its solving power, the user interface provides automatic generation of activity charts as shown in Figure 2.

Figure 2

Figure 2: The User Interface provides automatic generation of activity charts.

Finally, the CPLEX solver, now in version 7.0, provides a state-of-the-art mathematical programming solver. The OPL\ Language provides a user with an intuitive language for expressing mathematical programming models with full separation between the model and the underlying data. Having used AMPL, I found the transition to the OPL language very easy, and in many cases more powerful due to the additional language features. Full support for AMPL is also available with the solver; subject to licensing.

Licensing and Other Annoyances

OPL Studio is distributed with a node-locked license. This means that the license is tied to an individual CPU. Additional licenses can be purchased; a license manager keeps track of concurrent usage. For academic researchers, this seems onerous. Typically, I like to develop and debug a model or application on a home machine and move the application to a more powerful machine for computational work. The node-locked nature of the licensing makes it impossible to move between machines without shelling out additional cash. I was told that additional floating licenses could be made available depending on the nature of the relationship between the sales rep and the buyer. This would clearly be on a case-by-case basis. Cross-platform licensing seems to be available, but there is no direct price quotation for such an option.

Purchasing follows a Chinese-menu approach. The buyer can choose among several different bundles of product depending on their needs. An academic researcher can expect to spend from about $1,000 to $8,000 depending on the chosen bundle and number of licenses. The ILOG Web site (www.ilog.com) has all the details. Commercial licenses presumably follow the same approach, but I strongly suspect the price is quite a bit higher. ILOG declined to provide me with a commercial price schedule for purposes of this review, citing the highly complicated nature of options, bundling, etc. Contact an ILOG sales representative.

While the product is feature-rich, it lacks the ability to directly print any output from the user interface. There is no print option on the file pulldown. Instead, there is a Dump Active Model and Results option that sends the model and output to a text file that the user then prints. Likewise, the nice scheduling charts cannot be printed. Unfortunately, cut and paste is disabled for the graphical output. I discovered this when I attempted to cut one of the charts. My attempt rendered the OPL-generated chart pocked with small squares resulting from a "select-all" on the graphics objects that could not be cleared. It would be nice to allow cut and paste of these objects.

The product advertises support for Microsoft's Visual C++ Version 5.0 and Version 6.0 IDEs. Unfortunately, there are no project or workspace files for Version 6.0 in the distribution. Although Version 6.0 will convert the Version 5.0 files, the path names for include files, libraries as well as naming conventions differ, and so it was a bit of a struggle to get a clean, executable file under Version 6.0. ILOG should post Version 6.0 files on their Web site for those of us who have since upgraded. In addition, some of the example scripts are buggy.

One interesting feature of the product is the ability to generate an encrypted version of a model to protect one's intellectual property. I queried ILOG about the algorithm used for encryption and was told that the developer refused to divulge the details but that it was "unbreakable." Security by obscurity has long been the downfall of many secretly developed, previously "unbreakable" encryption algorithms (e.g., CSS, SDMI and GSM A5/1). I would recommend ILOG employ a well-known algorithm such as Blowfish whose security has withstood cryptanalysis (visit www.counterpane.com). Based on my experiments with their encryption, it appears to be an electronic codebook (ECB) cipher with a static key (probably XORing the text with the static bit string). ECBs are notoriously insecure. The intentions are good, but the execution could be vastly improved.


Taken as a whole, this is a powerful and flexible product. ILOG has hit a home run with OPL Studio 3.1. It does so many things right, that one quickly forgets the minor annoyances. I highly recommend OPL Studio 3.1 for academic research and industry applications.

Product Information
OPL Studio is distributed by:
1080 Linda Vista Drive
Mountain View, Calif., 94043

Phone: 800-FOR-ILOG or 775-831-7744
URL: www.ilog.com
E-mail: info@ilog.com

Contact the vendor for pricing information.

Vendor Comments
Editor's note: It is the policy of OR/MS Today to allow developers of reviewed software an opportunity to clarify and/or comment on the review article. Following are comments from Gregory Glockner, product manager, ILOG OPL Studio.

As this goes to print, ILOG is introducing version 3.5 of ILOG OPL Studio, which includes the following new features:
  • Web connectors —
    Deploy an OPL model on a Web server using simple ASP or JSP tags

  • Java interface —
    Call OPL models from any Java program

  • Embeddable scripts —
    Run an OPLScript from C++, Java, or COM

  • Sample projects for MSVC 6.

  • Simplified licensing

You may download a free trial version of ILOG OPL Studio at http://oplstudio.ilog.com.

Christopher Skiscim is the Senior Scientist at Megisto Systems, Inc., a network infrastructure provider in the Mobile IP market space. His present work concentrates on applications of cryptography for the Internet and quality of service in wireless networks. He received a Master of Science from the University of Maryland. His most recent work will appear in the Journal of Global Optimization. The views and opinions expressed in this review are those of the author and not necessarily those of his employer.

  • Table of Contents

  • OR/MS Today Home Page

    OR/MS Today copyright 2001 by the Institute for Operations Research and the Management Sciences. All rights reserved.

    Lionheart Publishing, Inc.
    506 Roswell Street, Suite 220, Marietta, GA 30060, USA
    Phone: 770-431-0867 | Fax: 770-432-6969
    E-mail: lpi@lionhrtpub.com
    URL: http://www.lionhrtpub.com

    Web Site Copyright 2001 by Lionheart Publishing, Inc. All rights reserved.