Giter Club home page Giter Club logo

osi's Introduction

Osi

A COIN-OR Project

Latest Release

This file is auto-generated from config.yml using the generate_readme script. To make changes, please edit config.yml or the generation script.

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. That is, programs written to the OSI standard may be linked to any solver with an OSI interface and should produce correct results. The OSI has been significantly extended compared to its first incarnation. Currently, the OSI supports linear programming solvers and has rudimentary support for integer programming. Among others the following operations are supported:

  • creating the LP formulation;
  • directly modifying the formulation by adding rows/columns;
  • modifying the formulation by adding cutting planes provided by CGL;
  • solving the formulation (and resolving after modifications);
  • extracting solution information;
  • invoking the underlying solver's branch-and-bound component.

The following is a list of derived Osi classes:

Solver Derived Class Note
Cbc OsiCbc unmaintained
Clp OsiClp
CPLEX OsiCpx
DyLP OsiDylp
GLPK OsiGlpk Glpk
Gurobi OsiGrb
HiGHS OsiHiGHS under development
MOSEK OsiMsk
SoPlex OsiSpx SoPlex < 4.0
SYMPHONY OsiSym
Vol OsiVol
XPRESS-MP OsiXpr

Each solver interface is in a separate directory of Osi or distributed with the solver itself.

Within COIN-OR, Osi is used by Cgl, Cbc, and Bcp, among others.

The main project managers are Lou Hafer (@LouHafer) and Matt Saltzmann (@mjsaltzman).

An incomplete list of recent changes to Osi are found in the CHANGELOG

Osi is written in C++ and is released as open source under the Eclipse Public License 2.0.

It is distributed under the auspices of the COIN-OR Foundation

The Osi development site is https://github.com/coin-or/Osi.

CITE

DOI

CURRENT BUILD STATUS

Build Status

Build status

DOWNLOAD

Docker image

There is a Docker image that provides Osi, as well as other projects in the COIN-OR Optimization Suite here

Binaries

For newer releases, binaries will be made available as assets attached to releases in Github here. Older binaries are archived as part of Cbc here.

  • Linux: On Debian/Ubuntu, Osi is available in the package coinor-osi and can be installed with apt. On Fedora, Osi is available in the package coin-or-Osi.
  • Windows: The easiest way to get Osi on Windows is to download an archive as described above.
  • Mac OS X: The easiest way to get Cbc on Mac OS X is through Homebrew.
    • brew tap coin-or-tools/coinor
    • brew install coin-or-tools/coinor/osi

Due to license incompatibilities, pre-compiled binaries lack some functionality. If binaries are not available for your platform for the latest version and you would like to request them to be built and posted, feel free to let us know on the mailing list.

Source

Source code can be obtained either by

  • Downloading a snapshot of the source code for the latest release version of Osi from the releases page.
  • Cloning this repository from Github or
  • Using the coinbrew script to get the project and all dependencies (recommended, see below).

Below is a quick start guide for building on common platforms. More detailed build instructions are here.

BUILDING from source

The quick start assumes you are in a bash shell.

Using coinbrew

To build CoinUtils from source, obtain the coinbrew script, do

wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
chmod u+x coinbrew
./coinbrew fetch Osi@master
./coinbrew build Osi

For more detailed instructions on coinbrew, see https://coin-or.github.io/coinbrew. The coinbrew script will fetch the additional projects specified in the Dependencies section of config.yml.

Without coinbrew (Expert users)

  • Download the source code, e.g., by cloning the git repo https://github.com/coin-or/Osi
  • Download and install the source code for the dependencies listed in config.yml
  • Build the code as follows (make sure to set PKG_CONFIG_PTH to install directory for dependencies).
./configure -C
make
make test
make install

Doxygen Documentation

If you have Doxygen available, you can build a HTML documentation by typing

make doxygen-docs

in the build directory. If Osi was built via coinbrew, then the build directory will be ./build/Osi/master by default. The doxygen documentation main file is found at <build-dir>/doxydoc/html/index.html.

If you don't have doxygen installed locally, you can use also find the documentation here.

Project Links


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)"
  1. 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

osi's People

Contributors

johnjforrest avatar svigerske avatar louhafer avatar tkralphs avatar jpfasano avatar mjsaltzman avatar h-g-s avatar bradyhunsaker avatar tobiasachterberg avatar jjhforrest avatar ambros-gleixner avatar bojensen avatar jhmgoossens avatar h-i-gassmann avatar rlougee avatar josyoun avatar kingaj12 avatar bjarnimax avatar spoorendonk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.