wiki:WikiStart

Welcome to the Osi home page

Note that these project web pages are based on Wiki, which allows users to modify the content to correct typos, add information, or share their experience and tips with other users. You are welcome to contribute to these project web pages. To edit these pages or submit a ticket you must first register and login.

Introduction

Osi (Open Solver Interface) provides an abstract base class to a generic linear programming (LP) solver, along with derived classes for specific solvers. Many applications may be able to use the Osi to insulate themselves from a specific LP solver. The following is a list of derived Osi classes:

SolverDerived Class
CbcOsiCbc (unmaintained)
ClpOsiClp
CPLEXOsiCpx
DyLPOsiDylp
GLPKOsiGlpk
GurobiOsiGrb
MOSEKOsiMsk
SoPlexOsiSpx
SYMPHONYOsiSym
VolOsiVol
XPRESS-MPOsiXpr

Background/Download

Osi is written in C++ and is released as open source code under the Eclipse Public License (EPL). It is available from the COIN-OR initiative.

The newest Osi stable version is Osi-latest-stable.png. The current release is Osi-latest-release.png.

You can obtain the Osi source code either via subversion or as a tarball. Tarballs are obtained from the tarball directory. You'll see files with names of the form Osi_X.Y.Z.tgz, where X.Y.Z specifies a point release number (e.g., 0.96.1). Download the tarball with the highest release number unless you have a specific reason to select an earlier release. Unpack the tarball and follow the installation instructions. Tarballs are convenient if you do not intend to do code development and are not interested in using subversion.

The recommended method to download Osi is to use subversion because it makes it easier to obtain updates. The following commands may be used to obtain and build Osi from the source code using subversion:

  1. svn co https://projects.coin-or.org/svn/Osi/stable/0.106 coin-Osi
  2. cd coin-Osi
  3. ./configure -C
  4. make
  5. make test
  6. make install

Step 1 issues the subversion command to obtain the source code. If prompted, use anonymous as the user id and your email address as the password.

Step 3 runs a configure script that customises the package for your environment. Among other things, it generates a header file with configuration settings and creates Makefiles customised for your environment.

Step 4 builds the Osi library and executable program.

Step 5 builds and runs the Osi unit test program.

Step 6 Installs libraries, executables and header files in directories coin-Osi/lib, coin-Osi/bin and coin-Osi/include.

The BuildTools project has additional details on downloading, building, and installing.


Included Projects

If you download the Osi package, you get these additional projects.


Dynamically loading commercial solver libraries

At build time

It is possible to create an osi build that supports cplex, gurobi and xpress even if you don't have (yet) any of these solvers on your machine using lazylpsolverlibs. To do so, follow these steps:

  1. Install lazylpsolverlibs (follow the instructions of the lazylpsolverlibs wiki)
  2. Use the following command line to configure Osi:
    ./configure --with-cplex-incdir="$(pkg-config --variable=includedir lazycplex)/lazylpsolverlibs/ilcplex" \
                --with-cplex-lib="$(pkg-config --libs lazycplex)" \
                --with-gurobi-incdir="$(pkg-config --variable=includedir lazygurobi)/lazylpsolverlibs" \
                --with-gurobi-lib="$(pkg-config --libs lazygurobi)" \
                --with-xpress-incdir="$(pkg-config --variable=includedir lazyxprs)/lazylpsolverlibs" \
                --with-xpress-lib="$(pkg-config --libs lazyxprs)"
    
  3. Then follow the normal installation process (make, make install)

At run time

Your build should now support cplex, gurobi and xpress, which means that if you install one of these solvers, osi will be able to use it. At run time, you just need to point one of the environment variables LAZYLPSOLVERLIBS_GUROBI_LIB, LAZYLPSOLVERLIBS_CPLEX_LIB or LAZYLPSOLVERLIBS_XPRS_LIB to the full path of the corresponding solver library. For example:

export LAZYLPSOLVERLIBS_CPLEX_LIB=/usr/ilog/cplex121/bin/x86_debian4.0_4.1/libcplex121.so

Troubleshooting

If pkg-config reports errors during the configure step, try modifying the PKG_CONFIG_PATH variable. Most likely, you need to do:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

Documentation

FAQ (Frequently Asked Questions)

Doxygen Documentation

If you have Doxygen available, you can build the html documentation by typing

make doxydoc

in the directory coin-Osi. Then open the file coin-Osi/doxydoc/html/index.html with a browser. Note that this creates the documentation for the Osi package. If you prefer to generate the documentation only for a subset of these projects, you can edit the file coin-Osi/doxydoc/doxygen.conf to exclude directories (using the EXCLUDE variable, for example).

If Doxygen is not available, you can download the documentation tarball from the tarball directory or use this link.


Presentations/Tutorials


Last modified 4 years ago Last modified on Apr 22, 2013 10:07:52 AM