OPLSCRIPT(ID:7074/opl004)

Scripting for OPL studio 


Scripting runtime language to manipulate models written in OPL vie the OPLStudio

Pascal Van Hentenryck, UCL Belgium, 2000


People:
Related languages
OPL => OPLSCRIPT   Augmentation of

References:
  • Van Hentenryck, P. "OPL Script: Composing and Controlling Models" view details
          in Proceedings of the 1999 Workshop of the ERCIM Working Group on Constraints, Paphos, Cyprus, 1999 view details
  • P. Van Hentenryck and L. Michel. "OPL Script: Composing and Controlling Models." view details
          in New Trends in Constraints , Lecture Notes in Artificial Intelligence (LNAI 1865), Springer Verlag, 2000 view details
  • Van Hentenryck, Pascal "A Preview of OPL" PACLP'2000 view details Abstract: OPL is a modeling language for mathematical programming and combinatorial optimization problems. It is the first modeling language to combine  high-level algebraic and set notations from modeling languages with a rich  constraint language and the ability to specify search procedures and strategies that is the essence of constraint programming. In addition, OPL models can be controlled and composed using OPLSCRIPT, a script language that  simplifies the development of applications that solve sequences of models,  several instances of the same model, or a combination of both as in columngeneration applications. This paper illustrates some of the functionalities of  OPL using sport-scheduling, and job-shop scheduling applications. It also  illustrates how OPL models can be composed using OPLSCRIPT on a simple  configuration example. Extract: Introduction
    Introduction
    Combinatorial optimization problems are ubiquitous in many practical applications, including scheduling, resource allocation, planning, and configuration problems. These problems are computationally difficult (i.e., they are NP-hard) and  require considerable expertise in optimization, software engineering, and the application domain.
    The last two decades have witnessed substantial development in tools to simplify the design and implementation of combinatorial optimization problems. Their  goal is to decrease development time substantially while preserving most of the  efficiency of specialized programs. Most tools can be classified in two categories:  mathematical modeling languages and constraint programming languages. Mathematical modeling languages such as AMPL [4] and GAMS [1] provides very  high-level algebraic and set notations to express concisely mathematical problems  that can then be solved using state-of-the-art solvers. These modeling languages  do not require specific programming skills and can be used by a wide audience.  Constraint programming languages such as CHIP [3], PROLOG III and its successors [2], OZ [12], and ILOG SOLVER [11] have orthogonal strenghts. Their  constraint languages, and their underlying solvers, go beyond traditional linear  and nonlinear constraints and support logical, high-order, and global constraints.  They also make it possible to program search procedures to specify how to explore the search space. However, these languages are mostly aimed at computer  scientists and often have weaker abstractions for algebraic and set manipulation.  The work described in this paper originated as an attempt to unify modeling  and constraint programming languages and their underlying implementation technologies. It led to the development of the optimization programming language  OPL [13], its associated script language OPLSCRIPT [15], and its development environment OPL STUDIO.
    OPL is a modeling language sharing high-level algebraic and set notations with traditional modeling languages. It also contains some novel functionalities to exploit sparsity in large-scale applications, such as the ability to index arrays with  arbitrary data structures. OPL shares with constraint programming languages their  rich constraint languages, their support for scheduling and resource allocation  problems, and the ability to specify search procedures and strategies. OPL also  makes it easy to combine different solver technologies for the same application.  OPLSCRIPT is a script language for composing and controlling OPL models. Its  motivation comes from the many applications that require solving several instances of the same problem (e.g., sensibility analysis), sequences of models, or  a combination of both as in column-generation applications. OPLSCRIPT supports a  variety of abstractions to simplify these applications, such as OPL models as firstclass objects, extensible data structures, and linear programming bases to name  only a few.
    OPL STUDIO is the development environment of OPL and OPLSCRIPT. Beyond support for the traditional ''edit, execute, and debug'' cycle, it provides automatic  visualizations of the results (e.g., Gantt charts for scheduling applications), visual  tools for debugging and monitoring OPL models (e.g., visualizations of the search  space), and C++ code generation, or C++ or COM components, to integrate an  OPL model in a larger application. The code generation produces a class for each  model object and makes it possible to add/remove constraints dynamically and to  overwrite the search procedure.  The purpose of this paper is to illustrate some of the functionalities of OPL and  OPLSCRIPT through a number of applications, including a transportation problem,  sport and job-shop scheduling applications, and a configuration problems. Extract: Conclusion
    Conclusion
    The purpose of this paper was to review, through four applications, a number of features of OPL to give a preliminary understanding of the expressiveness of  the language. These features include very high-level algebraic notations and data  structures, a rich constraint programming language supporting logical, higher-level, and global constraints, support for scheduling and resource allocation problems, and search procedures and strategies. The paper also introduced briefly  OPLSCRIPT, a script language to control and compose OPL models. The four applications presented in this paper should give a preliminary, although very incomplete,  understanding of how OPL can decrease development time significantly.
          in New Trends in Constraints , Lecture Notes in Artificial Intelligence (LNAI 1865), Springer Verlag, 2000 view details