Introduction to the COIN-OR Optimization Suite and Open Source Modeling Tools


This is a short course that introduces the COIN-OR Optimization Suite and some basic concepts in algebraic modeling. It was first presented as a tutorial at the 43rd Meeting of the Operations Research Society of South Africa in Parys, South Africa. An expanded version was presented at the INFORMS Computing Society Conference in Richmond, Virginia in January, 2015. The first three lectures were presented at COIN fORgery, a workshop at the Institute for Mathematics, In October 2018. The course is now in seven parts.

  • The first part introduces COIN-OR and includes an overview of all the COIN-OR projects.
  • The second part discusses aspects of project management, the “COIN-OR Way” and especially emphasizes the move to modern tools, such as git.
  • The third part describes how to build and install the projects in the Optimization Suite on all platforms, as well as discussing COIN-ORs tools for unit testing, continuous integration, and automated building and deployment of binaries.
  • The fourth part introduces the COIN-OR Optimization Suite
    and provides a basic introduction to doing development with those projects integrated into the Optimization Suite.
  • The fifth part introduces Python and gives an overview of the Python-based tools available in COIN-OR.
  • The sixth part is an introduction to some of the modeling tools that can be used to interface with the COIN-OR tools. The applications are primarily from financial optimization, but they are chosen to introduce a number of fundamental concepts that arise in algebraic modeling. The models are developed in several different modeling languages in order to compare and contrast the features of each. Some of the material on algebraic modeling is distilled from a course I taught in financial optimization.
  • Finally, the seventh part contains further examples of more advanced techniques, such as non-linear, discrete, and stochastic models.

Lecture Slides


Tools

To follow along at home, you can install the following tools, which are almost all open source and freely available.

  • COIN-OR Solvers
  • Python is the base for several of the modeling languages used.
    • There are many ways to get Python.
    • You will almost surely want some of the standard scientific packages such as NumPy.
      • On OS X, Homebrew is the easiest way to obtain Python and related packages.
      • On Linux, most things are probably pre-installed or use your package manager.
      • On Windows, you can install something like PythonXY.
  • Modeling Languages
    • PuLP can be obtained with easy_install pulp .
    • DipPy can be obtained with easy_install coinor.dippy on Windows (for building in Linux/OS X, see slides).
    • Pyomo can be installed with easy_install pyomo .
    • AMPL offers a free size-limited version here.
  • Other Python Packages
    • CyLP can be installed with easy_install cylp on WIndows (for building on Linux/OS X, see slides).
    • yaposib can be built and installed with instruction in slides (you need to install boost Python first, though, which is a pain).
    • GiMPy can be installed with easy_install coinor.gimpy .
      • To allow GiMPy to display graphs, you should also get GraphViz.
      • For live display, you should have either PyGame or xdot (for xdot, you need PyGTK, which can be a bit of a pain).
    • GrUMPy can be installed with easy_install coinor.grumpy (for Polyhedron2D you need to build and install pypolyhedron).
    • CuPPy can be installed with easy_install coinor.cuppy (you also need to install CyLP).
  • Other Recommended Software
    • The excellent and open source Solver Studio Plug-in for Excel is used in a number of the examples.
    • The Eclipse Development Environment is a general-purpose open source IDE with a very nice open source plug-in for Python development.
    • The PyDev Eclipse Plug-in is for editing and debugging of Python scripts.
    • For building on Windows, it is recommended to install MSys
      • Get the MinGW installer from here.
      • Do mingw-get install msys.
      • Add C:\MinGW\msys\1.0\bin to your PATH.
      • If you are planning to build with Visual Studio compilers, make sure those are installed.
      • If you are planning to build with gcc, then additionally do mingw-get install gcc g++ gfortran and add C:\MinGW\bin to you PATH.

Models

The file containing Solver Studio Examples shows how to model most of the below problems in Excel.

Bond Selection Problem

Capacitated Facility Location

Portfolio Dedication Problem

Short Term Financing

If you find something here useful, buy me a beer!