Using the COIN-OR Server

Using the COIN-OR Server

Using the COIN-OR Server Your CoinEasy Team November 10, 2009 1 1 Overview This document is part of the CoinEasy project. See projects.coin-or.org/CoinEasy. In this document we describe the options available to users of COIN-OR who are interested in solving optimization problems but do now wish to compile source code and build any of the COIN-OR projects. In particular, we show how the user can send optimization problems to a COIN-OR server and get results back. The COIN-OR server, webdss.ise.ufl.edu, is 2x Intel(R) Xeon(TM) CPU 3.06GHz 512MiB L2 1024MiB L3, 2GiB DRAM, 4x73GiB scsi disk 2xGigE machine. It allows the user to access the following COIN-OR optimization solvers: • Bonmin { a solver for mixed-integer nonlinear optimization • Cbc { a solver for mixed-integer linear programs • Clp { a linear programming solver • Couenne { a solver for mixed-integer nonlinear optimization problems and is capable of global optiomization • DyLP { a linear programming solver • Ipopt { an interior point nonlinear optimization solver • SYMPHONY { mixed integer linear solver that can be executed in either parallel (dis- tributed or shared memory) or sequential modes • Vol { a linear programming solver All of these solvers on the COIN-OR server may be accessed through either the GAMS or AMPL modeling languages. In Section 2.1 we describe how to use the solvers using the GAMS modeling language. In Section 2.2 we describe how to call the solvers using the AMPL modeling language. In Section 3 we describe how to call the solvers using OSSolverService. The OSSolverService can be used independently of a modeling language. It can send optimization instances to the solvers in MPS, OSiL (a new XML based representation standard), AMPL nl, and GAM dat formats. A nice feature of the OSSolverService is that it can be used in asynchronous mode for large problems. This is described in Section 4.1. We show how to obtain a job id from the server, send a job to the server, check the server to see if the job is done, retrieve the job if it is done, and kill the job if it is taking too long. For sophisticated users we describe how to actually build applications that use the COIN-OR server in Section 4.2. Finally we describe how to download the necessary client software in Section 5. This software consists of executable programs for various platforms, the user is not required to compile code. 2 Calling the COIN-OR Server using a Modeling Language 2.1 GAMS In this section we explain how to use the GAMS modeling language to call the COIN-OR solver server. This section is based on the assumption that the user has installed either: 1. GAMS version 22.9, 23.0, 23.1, or 23.2. In the the distribution described in Section 5 there is a file gmsos .zip. Copy this file into your GAMS folder. Then run gamsinst and select OS as the default solver whenever it is listed as a solver. 2 2. GAMS version 23.3. No additional software is required. However, with this version you cannot select OS as the default solver. Rather, when building the GAMS model, place the following option command somewhere in the model before the Solve statement: Option ProblemType = CoinOS; where ProblemType can be LP, RMIP, MIP, DNLP, DNLP, NLP, RMINLP, QCP, RMIQCP, MIQCP As an alternative to putting the solver option in the GAMS model, it can be given at the command line. When running the model and solving model, write: gams ModelName ProblemType=CoinOS You can now solve a wide variety of problems either locally or remotely using COIN-OR solvers. In the discussion that follows we assume that folder where GAMS is installed is in the PATH command. We first discuss using GAMS to invoke the COIN-OR solvers that are distributed with GAMS. In this case the model generation and resulting optimization are all done on the local machine. Then we discuss using GAMS to call the remote COIN-OR solver service. 2.1.1 Using GAMS for a Local Solver The CoinOS (similarly OS ) solver that is packaged with GAMS is really a solver interface and is linked to the following COIN-OR solvers: Bonmin, Cbc, Clp, Couenne, Glpk, and Ipopt . Think of CoinOS as a meta slover. The distribution described in Section 5 contains a test problem, eastborne.gams, which is an integer linear program. To solve this problem for versions 22.9-23.2 type gams eastborne.gams and for version 23.3 type gams eastborne.gams MIP=CoinOS Executing the commands above result in the model being solved on the local machine using the COIN-OR solver Cbc. By default, or continuous linear models (LP and RMIP), CoinOS or OS chooses Clp. For continuous nonlinear models (NLP, DNLP, RMINLP, QCP, RMIQCP), CoinOS chooses Ipopt. For mixed-integer linear models (MIP), CoinOS chooses Cbc. For mixed-integer nonlinear models (MIQCP, MINLP), CoinOS chooses Bonmin. It is possible to control which solver is selected by CoinOS or OS. This is done by providing an options file to CoinOS or OS. For versions 22.9-23.2 the option fille should be named os.opt and this file is invoked at the command line by gams eastborne.gams optfile 1 It is possible to define multiple GAMS options files following the specific naming conventions as set out below: optfile=1 corresponds to os.opt optfile=2 corresponds to os.op2 ... optfile=99 corresponds to os.o99 3 For GAMS 23.3, since the solver is named CoinOS, the option file should be named coinos.opt and the command line call is gams eastborne.gams MIP=CoinOS optfile 1 and calling multiple GAMS options files uses the convention optfile=1 corresponds to coinos.opt optfile=2 corresponds to coinos.op2 ... optfile=99 corresponds to coinos.o99 We now explain the valid options that can go into the options files. The first option is the solver option. solver (string): Specifes the solver that is used to solve an instance. Valid values are coinclp, coincbc, coinglpk, coinipopt, coinbonmin, and coincouenne. If a solver name is specified that is not recognized, the default solver for the problem type will be used. For example, if the file coinos.opt contains a single line solver coinbonmin then the Bonmin solver will be used to solve the problem. Following are some of the other options that can be specified in a GAMS option file when using either OS or CoinOS. writeosil (string): If this option is used GAMS will write the optimization instance to file in OSiL XML format. writeosrl (string): If this option is used GAMS will write the result of the optimization to file in OSiL XML format. It is also possible to pass options to the COIN-OR solvers used by either CoinOS or OS. This is done by passing the name of an option file that conforms to the OSoL standard. The option readosol (string): Specifes the name of an option fille in OSoL format that is given to the solver or an OS server. The file solveroptions.osol is contained in the distribution described in Section 5. This file contains four solver options; two for Cbc, one for Ipopt, and one for SYMPHONY (which is available for remote server calls, but not locally). You can have any number of options. Note the format for specifying an option: <solverOption name="maxN" solver="cbc" value="5" /> the attribute name specifies that the option name is maxN which is the maximum number of nodes allowed in the branch-and-bound tree, the solver attribute specifies the name of the solver that the option should be applied to, and the value attribute specifies the value of the option. As a second example, consider the specification <solverOption name="max_iter" solver="ipopt" type="integer" value="2000"/> In this example we are specifying an iteration limit for Ipopt. Note the additional attribute type which has value integer. Ipopt requires specifying the data type (string, integer, or numeric) for its options. For a list of options that solvers take, inside the GAMS directory see the file 4 docs/solvers/coin.pdf IMPORTANT: unlike the OSAmplClient described in Section 2.2, OS nor CoinOS do not parse the solveroptions.osol file, they simply pass it onto the solver either locally or on the COIN-OR server. 2.1.2 Using GAMS to Invoke the COIN-OR Solver Service We now describe how to call the COIN-OR solver service. There are several reason why you might wish to use this service. • Have access to a faster machine. • Be able to submit jobs to run in asynchronous mode { submit your job, turn off laptop, and check later to see if the job ran. • Call several additional solvers (SYMPHONY and DyLP). In order to use the COIN-OR solver service it is necessary to specify the service URL. This is done using the service option. service (string): Specifes the URL of the COIN-OR solver service Use the following value for this option. service http://webdss.ise.ufl.edu:2646/OSServer/services/OSSolverService IMPORTANT: Using the solver option will have no effect on which solver the remote solver service uses. The remote solver service uses the same defaults as the local service. For linear models (LP and RMIP), CoinOS or OS chooses Clp. For continuous nonlinear models (NLP, DNLP, RMINLP, QCP, RMIQCP), CoinOS chooses Ipopt. For mixed-integer linear models (MIP), CoinOS chooses Cbc. For mixed-integer nonlinear models (MIQCP, MINLP), CoinOS chooses Bonmin. In order to control the solver used, it is necessary to specify the name of the solver inside the XML tag <solverToInvoke>.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    9 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us