• Stars
    star
    105
  • Rank 328,196 (Top 7 %)
  • Language
    Shell
  • Created about 9 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A harness for building the bundled suite of interoperable optimization tools available in the COIN-OR repository.

COIN-OR OPTIMIZATION SUITE

Important notice: The master branch of the Optimization Suite does not currently include all projects because we are mid-way through the migration to new build system and only projects that have been migrated are included. This is being actively worked on, but it will be some time before all projects are migrated. In the meantime, the stable/1.9 branch builds out of the box using coinbrew.

An expanded version of this README that is updated with more details is available at

https://coin-or.github.io/user_introduction.html

The COIN-OR Optimization Suite is a collection of interoperable open source solvers from the respository of open source software maintained by the COIN-OR Foundation. It consists of the following projects.

  • CoinUtils (COIN-OR utility library)
  • Osi (Open Solver Interface)
  • Clp (COIN-OR LP Solver)
  • FlopCpp (C++-based algebraic modeling language)
  • DyLP (LP solver based on dynamic simplex method)
  • Vol (approximate LP solver based on Volume Algorithm)
  • Cgl (Cut generation library)
  • SYMPHONY (MILP solver framework)
  • Cbc (COIN-OR branch-and-cut MILP solver)
  • Smi (Stochastic modeling interface)
  • CoinMP (Unified C API for Cbc and Clp)
  • Bcp (Branch, cut, and price framework)
  • Ipopt (Interior point algorithm for non-linear optimization)
  • CHiPPS (COIN-OR High Performance Parallel Search framework)
    • Alps (Abstract Library for Parallel Search)
    • BiCePS (Branch, Constrain, and Price Software)
    • Blis (BiCePS Linear Integer Solver)
  • Dip (Decomposition-based MILP solver framework)
  • CppAD (Automatic differentiation in C++)
  • Bonmin (Solver for Convex MINLP)
  • Couenne (Solver for non-convex MINLP)
  • OS (Optimization Services)
  • MibS (Mixed Integer Bilevel Solver)

INSTALL

Pre-built Binaries

Binaries for most platforms are available for download from Bintray. Binaries can also be installed on specific platforms, as follows. AMPL also kindly provides executables of some solvers for download at

http://ampl.com/products/solvers/open-source/.

We are working on some other better ways of getting binaries, such as conda packages, and will keep this README updated as things progress.

Installers

Windows

There is a Windows GUI installer available here for installing libraries compatible with Visual Studio (you will need to install the free Intel compiler redistributable libraries). This may get updated someday, but in the meantime, you can get binaries from BinTray.

OS X

There are Homebrew recipes for some projects available here. Just do

brew tap coin-or-tools/coinor
brew install Xyz

It is also easy to build binaries from source with coinbrew.

Linux

For Linux, there are now Debian and Fedora packages for most projects in the suite and we are investigating the possiblity of providing Linuxbrew packages.

  • Click here for list of Debian packages.
  • Click here for a list of Fedora packages. It is also easy to build binaries from source with coinbrew.

Docker Image

The Docker image available at

https://hub.docker.com/repository/docker/coinor/coin-or-optimization-suite

is another excellent way to use the COIN-OR Optimization Suite, although it is currently out of date. For details on how to obtain and use this image, see the project's Github page here.

Other Installation Methods

Other ways of obtaining COIN include downloading it through a number of modeling language front-ends. For example, COIN-OR can be used through

Building from Source

Why download and build COIN yourself? There are many options for building COIN codes and the distributed binaries are built with just one set of options. We cannot distribute binaries linked to libraries licensed under the GPL, so you must build yourself if you want GMPL, command completion, command history, Haskell libraries, etc. Other advanced options that require specific hardware/software may also not be supported in distributed binaries (parallel builds, MPI) Once you understand how to get and build source, it is much faster to get bug fixes.

Building on Linux

Most Linux distributions come with all the required tools installed. To obtain the source code, the first step is to get the installer that will then fetch the source for ProjName and all its dependencies. You do not need to clone the repository first, just do the following! Open a terminal and execute

git clone https://www.github.com/coin-or/coinbrew

Next, to check out source code for and build all the necessary projects (including dependencies), execute the script in the coinbrew subdirectory. To execute the script, do

cd coinbrew
chmod u+x coinbrew
./coinbrew

(Note: The chmod command is only needed if the execute permission is not automatically set by git on cloning). Once you run the script, you will be prompted interactively to select a project to fetch and build. The rest should happen automagically. Alternatively, the following command-line incantation will execute the procedure non-interactively.

./coinbrew fetch --no-prompt ProjName@stable/x.y
./coinbrew build --no-prompt ProjName --prefix=/path/to/install/dir

Note that the prefix specified above is the directory where the packages will be installed. If the specified prefix is writable, then all packages will be automatically installed immediately after building. If no prefix is specified, the package will be installed in the directory dist/. Options that would have been passed to the configure script under the old build system can simply be added to the command-line. For example, to build with debugging symbols, do

./coinbrew build --no-prompt ProjName --prefix=/path/to/install/dir --enable-debug

To get help with additional options available in running the script, do

./coinbrew --help

After installation, you will also need to add /path/to/install/dir/bin to your PATH variable in your .bashrc and also add /path/to/install/dir/lib to your LD_LIBRARY_PATH if you want to link to COIN libraries.

Building on Windows (MSys2/CYGWIN and MinGW/MSVC)

By far, the easiest way to build on Windows is with the GNU autotools and the GCC compilers. The first step is to install either

If you don't already have CYGWIN installed and don't want to fool around with WSL (which is a great option if you already know your way around Unix), it is recommended to use MSys2, since it provides a minimal toolset that is easy to install. To get MSys2, either download the installer here or download and unzip MSys2 base from here (this is an out-of-date version, there may be a better place to get an archive version).

Following any of the above steps, you should have the bash command (with Msys2, be sure to run msys2_shell.bat or manually add msys64\usr\bin, msys64\mingw32\bin, and msys64\mingw64\bin to your Windows path).

Once you have bash installed and in your PATH, open a Windows terminal and type

bash
pacman -S make wget tar patch dos2unix diffutils git svn
git clone https://www.github.com/coin-or/coinbrew

Next, to check out source code for and build all the necessary projects (including dependencies), execute the script in the COIN-OR-OptimizationSuite subdirectory. To execute the script, do

cd coinbrew
chmod u+x coinbrew
./coinbrew

(Note: The chmod command is only needed if the execute permission is not automatically set by git on cloning). Once you run the script, you will be prompted interactively to select a project to fetch and build. The rest should happen automagically. Alternatively, the following command-line incantation will execute the procedure non-interactively.

./coinbrew fetch --no-prompt ProjName@stable/x.y
./coinbrew build --no-prompt ProjName --prefix=C:\path\to\install\dir

Note that the prefix specified above is the directory where the packages will be installed. If the specified prefix is writable, then all packages will be automatically installed immediately after building. If no prefix is specified, the package will be installed in the directory dist/. Options that would have been passed to the configure script under the old build system can simply be added to the command-line. For example, to build with debugging symbols, do

./coinbrew build --no-prompt ProjName --prefix=C:\path\to\install\dir --enable-debug

To get help with additional options available in running the script, do

./coinbrew --help

To use the resulting binaries and/or libraries, you will need to add the full path of the directory build\bin to your Windows executable search PATH, or, alternatively, copy the conents of the build directory to C:\Program Files (x86)\ProjName and add the directory C:\Program Files (x86)\ProjName\bin to your Windows executable search PATH. You may also consider adding C:\Program Files (x86)\ProjName\lib to the LIB path and C:\Program Files (x86)\ProjName\include to the INCLUDE path.

It is possible to use almost the exact same commands to build with the Visual Studio compilers. Before doing any of the above commands in the Windows terminal, first run the vcvarsall.bat script for your version of Visual Studio. Note that you will also need a compatible Fortran compiler if you want to build any projects requiring Fortran (ifort is recommended, but not free). Then follow all the steps above, but replace the build command with

./coinbrew build --no-prompt ProjName --prefix=C:\path\to\install\dir --enable-msvc

Building on Windows (Visual Studio IDE)

After obtaining source for the projects you want to build with coinbrew, find the solution file in the directory MSVisualStudio. Note that some projects that require a Fortran compiler cannot be built this way.

Building on OS X

OS X is a Unix-based OS and ships with many of the basic components needed to build COIN-OR, but it's missing some things. For examples, the latest versions of OS X come with the clang compiler but no Fortran compiler. You may also be missing the wget utility and subversion and git clients (needed for obtaining source code). The easiest way to get these missing utilitites is to install Homebrew (see http://brew.sh). After installation, open a terminal and do

brew install gcc wget svn git

To obtain the source code, the first step is to get the installer that will then fetch the source for ProjName and all its dependencies. You do not need to clone ProjName first, just do the following! Open a terminal and execute

git clone https://www.github.com/coin-or/coinbrew

Next, to check out source code for and build all the necessary projects (including dependencies), execute the script in the coinbrew subdirectory. To execute the script, do

cd coinbrew
chmod u+x coinbrew
./coinbrew

(Note: The chmod command is only needed if the execute permission is not automatically set by git on cloning). Once you run the script, you will be prompted interactively to select a project to fetch and build. The rest should happen automagically. Alternatively, the following command-line incantation will execute the procedure non-interactively.

./coinbrew fetch --no-prompt ProjName@stable/x.y
./coinbrew build --no-prompt ProjName --prefix=/path/to/install/dir

Note that the prefix specified above is the directory where the packages will be installed. If the specified prefix is writable, then all packages will be automatically installed immediately after building. If no prefix is specified, the package will be installed in the directory dist/. Options that would have been passed to the configure script under the old build system can simply be added to the command-line. For example, to build with debugging symbols, do

./coinbrew build --no-prompt ProjName --prefix=/path/to/install/dir --enable-debug

To get help with additional options available in running the script, do

./coinbrew --help

After installation, you will also need to add /path/to/install/dir/bin to your PATH variable in your .bashrc and also add /path/to/install/dir/lib to your DYLD_LIBRARY_PATH if you want to link to COIN libraries.

Additional Useful Information

Organization of the repositories

All projects are now (or will soon be) managed using git. Within the repository, the development branch is master, while branches named stable/x.y contain long-running stable versions and tags names releases/x.y.z indicate point releases.

The source tree for the root of project Xxx currently looks something like this

ProjName/
doxydoc/
INSTALL.md
README.md
AUTHORS
Dependencies 
configure 
Makefile.am
... 

The ProjName subdirectory for project ProjName looks something like this.

src/
examples/
MSVisualStudio/
test/
AUTHORS
README 
LICENSE 
INSTALL 
configure 
Makefile.am 
... 

The files in this subdirectory are for building the library of the project itself, with no dependencies, with the exception of the MSVisualStudio directory, which contains solution files that include dependencies.

About version numbers

COIN numbers versions by a standard semantic versioning scheme: each version has a major, minor, and patch/release number. All version within a major.minor series are compatible. All versions within a major series are backwards compatible. The versions with the stable/ subdirectory have two digits, e.g., 1.1, whereas the releases have three digits, e.g., 2.1.0. The first two digits of the release version number indicates the stable series of which the release is a snapshot. The third digit is the release number in that series.

ThirdParty Projects

There are a number of open-source projects that COIN projects can link to, but whose source we do not distribute. We provide convenient scripts for downloading these projects (shell scripts named ./get.ProjName and a build harness for build them. We also produce libraries and pkg-config files. If you need the capabilities of a particular third party library, simply run the get.ProjName script before configuring for your build and it will be automatically integrated. Beware of licensing in compatibilities if you plan to redistribute the resulting binaries. The following are the supported libraries.

  • AMPL Solver Library (required to use solvers with AMPL)
  • Blas (improves performance---usually available natively on Linux/OS X)
  • Lapack (same as Blas)
  • Glpk
  • Metis
  • MUMPS (required for Ipopt to build completely open source)
  • Soplex
  • SCIP
  • HSL (an alternative to MUMPS that is not open source)
  • FilterSQP

Parallel Builds

SYMPHONY, DIP, CHiPPS, and Cbc all include the ability to solve in parallel.

  • CHiPPS uses MPI and is targeted at massive parallelism (it would be possible to develop a hybrid algorithm, however). To build in parallel, specify the location of MPI with the --with-mpi-incdir and --with-mpi-lib arguments to coinbrew build, as follows:

    --enable-static \ 
    --disable-shared \
    --with-mpi-incdir=/usr/include/mpich2 \ 
    --with-mpi-lib="-L/usr/lib  -lmpich" \
    MPICC=mpicc \
    MPICXX=mpic++ \
    
  • SYMPHONY has both shared and distributed memory parallel modes, but we'll only discuss the shared memory capability here. It is enabled by default if the compiler supports OpenMP (gcc and Microsft's cl both do, but clang does not). To disable share memory parallel mode, use the --disable-openmp argument to coinbrew.

  • Cbc has shared memory parallelism, which can be enabled with the --enable-cbc-parallel to coinbrew

  • DIP currently has a shared memory parallel mode that works the same way as SYMPHONY's.

Other Configure-time Options}

There are many configure options for customizing the builds, which is the advantage of learning to build yourself.

  • Over-riding variables: CC, CXX, F77, CXX_ADDFLAGS
  • --prefix
  • --enable-debug
  • --enable-gnu-packages
  • -C Individual project also have their own options.
  • ProjName/configure --help will list the options for project ProjName.
  • The options for individual projects can be given to the root coinbrew script---they will be passed on to subprojects automatically.

Documentation

Some documentation on using the full optimization suite will someday be available at http://coin-or.github.io/. There is also a full tutorial on the Optimization Suite and much more at http://coral.ie.lehigh.edu/~ted/teaching/coin-or.

User's manuals and documentation for project ProjName can be obtained at either http://coin-or.github.io/ProjName or http://www.coin-or.org/ProjName. Doxygen source code documentation for some projects can also be obtained at http://coin-or.github.io/Doxygen

Support

Support is available primarily through mailing lists and bug reports at http://github.com/coin-orProjName/issues/new.

More Repositories

1

pulp

A python Linear Programming API
Python
2,058
star
2

Ipopt

COIN-OR Interior Point Optimizer IPOPT
C++
1,082
star
3

Cbc

COIN-OR Branch-and-Cut solver
C++
620
star
4

python-mip

Python-MIP: collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Python
520
star
5

CppAD

A C++ Algorithmic Differentiation Package: Home Page
C++
375
star
6

Clp

COIN-OR Linear Programming Solver
C++
321
star
7

qpOASES

Open-source C++ implementation of the recently proposed online active set strategy
C++
261
star
8

rbfopt

RBFOpt library for black-box optimization
Python
181
star
9

CyLP

A Python interface to CLP, CBC, and CGL to solve LPs and MIPs.
JetBrains MPS
175
star
10

Gravity

Mathematical Modeling for Optimization and Machine Learning
C++
149
star
11

SHOT

A solver for mixed-integer nonlinear optimization problems
C++
118
star
12

Bonmin

Basic Open-source Nonlinear Mixed INteger programming
C++
103
star
13

ADOL-C

A Package for Automatic Differentiation of Algorithms Written in C/C++
C++
94
star
14

Cbc.old

This is a mirror of the subversion repository on COIN-OR
C++
88
star
15

minotaur

Minotaur Toolkit for Mixed-Integer Nonlinear Optimization
C++
68
star
16

GrUMPy

A Python library for visualizing algorithms for solving mathematical optimization problems.
Shell
60
star
17

SYMPHONY

SYMPHONY is an open-source solver, callable library, and development framework for mixed-integer linear programs (MILPs) written in C with a number of unique features
C
59
star
18

Couenne

Convex Over and Under Envelopes for Nonlinear Estimation
C++
55
star
19

jorlib

Java Operations Research Library
Java
54
star
20

Csdp

This is the working repository for the CSDP project. CSDP is a solver for semidefinite programming problems. It is a COIN-OR project.
C
52
star
21

MibS

A solver for mixed integer bilevel programs
JetBrains MPS
50
star
22

Osi

Open Solver Interface
C++
48
star
23

CoinUtils

COIN-OR Utilities
C++
44
star
24

Rehearse

Algebraic modeling library in C++ for linear optimization solvers
M4
42
star
25

prtpy

Number partitioning in Python
Python
42
star
26

Clp.old

This a mirror of the subversion repository on COIN-OR.
C++
36
star
27

GiMPy

A graph library containing pure Python implementations of a variety of graph algorithms
Python
33
star
28

coinbrew

COIN-OR build and installation script
Shell
26
star
29

metslib

An Open Source Tabu Search Metaheuristic framework in C++
C++
25
star
30

Bcp

Branch-Cut-Price Framework
C++
24
star
31

Cgl

Cut Generator Library
C++
21
star
32

VRPH

VRPH is an open source library of heuristics for the capacitated Vehicle Routing Problem (VRP).
C++
19
star
33

SYMPHONY.old

This a mirror of the subversion repository on COIN-OR.
C
16
star
34

Dip

DIP is a decomposition-based solver framework for mixed integer linear programs.
C++
15
star
35

Osi.old

This a mirror of the subversion repository on COIN-OR.
C++
11
star
36

Sonnet

A wrapper for COIN-OR mixed integer linear programming via OSI to Microsoft .NET
C#
10
star
37

Dip.old

This a mirror of the subversion repository on COIN-OR.
C++
10
star
38

CoinMP

C-API library for CLP, CBC, and CGL
Shell
9
star
39

Cmpl

<Coliop|Coin> Mathematical Programming Language
C++
9
star
40

CHiPPS-ALPS

This is the Abstract Library for Parallel Search (ALPS), the abstract base layer of the COIN-OR High Performance Parallel Search framework.
C++
8
star
41

FlopCpp

An open source algebraic modelling language implemented as a C++ class library
Shell
8
star
42

oBB

Overlapping Branch and Bound Algorithm
C++
8
star
43

GAMSlinks

Links between GAMS (General Algebraic Modeling System) and solvers
C++
8
star
44

DisCO

Discrete Conic Optimization Solver
C++
7
star
45

filterSD

a library for nonlinear optimization written in Fortran
Fortran
7
star
46

CoinUtils.old

This a mirror of the subversion repository on COIN-OR.
C++
7
star
47

Paver

Python scripts to do comparisons on solver performance
Python
7
star
48

Vol

A C++ implementation of the volume algorithm for linear programming
Shell
7
star
49

Couenne.old

This a mirror of the subversion repository on COIN-OR. For bugtracking and wiki, see website.
C++
7
star
50

CHiPPS-BLIS

This is the BiCePS Linear Integer Solver (BLIS), a parallel solver for mixed integer linear programs that is implemented on top of the BiCePS layer of the CHiPPS framework.
C++
6
star
51

jMarkov

Java framework for Markov-chain (MC) modelling
Java
5
star
52

yaposib

Python binding to coin-osi
C++
5
star
53

Cgl.old

This a mirror of the subversion repository on COIN-OR.
C++
4
star
54

metslib-examples

Examples for METSLib
C++
4
star
55

ROSE

Reformulation-Optimization Software Engine
C++
3
star
56

Smi

An API for stochastic programming problems.
Shell
3
star
57

DyLP

Dynamic Simplex solver
C
2
star
58

CoinMP.old

Mirror of the CoinMP project from https://projects.coin-or.org/svn/CoinMP
Shell
2
star
59

coin-or.github.io

COIN-OR General Documentation
HTML
2
star
60

Osi2

Open Solver Interface Version 2
C++
1
star
61

MOCHA

Algorithms and heuristics to solve multicriteria matroid optimization problems
M4
1
star
62

Cgc

Cgc is a collection of network representations to facilitate the development and implementation of network algorithms.
C++
1
star
63

OS

Optimization Services
C++
1
star
64

PFunc

Generic task-parallel library for C/C++
C++
1
star
65

NLPAPI

NLPAPI is a set of subroutines and data structures for defining nonlinear programming problems. It includes an interface to call LANCELOT to solve the problem (you need to get your own copy of LANCELOT), and an interface to IPOPT.
C
1
star