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.
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:
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:
- svn co https://projects.coin-or.org/svn/Osi/stable/0.106 coin-Osi
- cd coin-Osi
- ./configure -C
- make test
- 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.
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:
- Install lazylpsolverlibs (follow the instructions of the lazylpsolverlibs wiki)
- 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)"
- 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:
If pkg-config reports errors during the configure step, try modifying the PKG_CONFIG_PATH variable. Most likely, you need to do:
If you have Doxygen available, you can build the html documentation by typing
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).
- The most recent tutorial on OSI can be accessed from the page on presentations from the 2004 CORS/INFORMS Joint Meeting in Banff.
- The COIN-OR Open Solver Interface: Technology Overview: An overview of the COIN-OR OSI and design issues for a next-generation version given at CORS/INFORMS 2004 by Matthew Saltzman.
- Tutorials page at the Lehigh Industrial and Systems Engineering Department.