Projects such as this one are maintained by a small group of volunteers under the auspices of the non-profit COIN-OR Foundation and we need your help! Please consider sponsoring our activities or volunteering to help!
This file is auto-generated from config.yml using the generate_readme script. To make changes, please edit config.yml or the generation scripts here and here.
The COIN-OR Cut Generation Library (Cgl) is a collection of cut generators that can be
used with other COIN-OR packages that make use of cuts, such as, among others, the linear solver
Clp or the mixed integer linear programming solvers
Cbc or BCP.
Cgl uses the abstract class OsiSolverInterface
(see Osi) to use or communicate with a solver.
It does not directly call a solver.
Each cut generator is in a separate directory with its own maintainer.
All generators are combined in one library when Cgl is compiled.
Available cut generators are:
Combinatorial cuts:
Flow cover cuts:
Gomory cuts and variants:
Lift-and-project cuts:
Mixed integer rounding cuts and variants:
Strengthening:
CoinUtils is an open-source collection of classes and helper functions that are generally useful to multiple COIN-OR projects. These utilities include:
The project managers of Cgl are Robin Lougee (@rlougee) and Francois Margot.
Cgl 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 Cgl development site is https://github.com/coin-or/Cgl.
What follows is a quick start guide for obtaining or building Cgl on common platforms. More detailed information is available here.
There is a Docker image that provides Cgl, as well as other projects in the COIN-OR Optimization Suite here
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 (see https://repology.org/project/coin-or-cgl/versions for a complete listing):
$ sudo pacman -S coin-or-cgl
$ sudo apt-get install coinor-cgl coinor-libcgl-dev
$ sudo dnf install coin-or-Cgl coin-or-Cgl-devel
$ sudo pkg install math/cgl
$ brew install cgl
Windows: The easiest way to get Cgl on Windows is to download an archive as described above.
Mac OS X: The easiest way to get Cgl on Mac OS X is through Homebrew.
$ brew tap coin-or-tools/coinor
$ brew install coin-or-tools/coinor/cgl
conda (cross-platform):
$ conda install coin-or-cgl
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 open a discussion on Github.
Source code can be obtained either by
Cgl has a number of dependencies, which are detailed in
config.yml. Dependencies on other COIN-OR projects are
automatically downloaded when obtaining the source with coinbrew. For some
of the remaining third-party dependencies, automatic download scripts and
build wrappers are provided (and will also be automatically run for required
and recommended dependencies), while other libraries that are aeasy to obtain
must be installed using an appropriate package manager (or may come with your
OS by default).
These quick start instructions assume you are in a bash shell.
coinbrewTo download and build Cgl from source, execute the following on the command line.
wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
chmod u+x coinbrew
./coinbrew fetch Cgl@master
./coinbrew build Cgl
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.
coinbrew (Expert users)./configure -C
make
make test
make install
If you have Doxygen available, you can build a HTML documentation by typing
make doxydoc
in the build directory. If Cgl was built via coinbrew, then the build
directory will be ./build/Cgl/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.
A cut generator in Cgl must conform to the following:
CglCutGeneratorDeriv is derived from the class CglCutGenerator.CglDataDeriv derived from CglData; it should contain pointers on all data used by the generator that might be obtained from an OsiSolverInterface object when calling generateCuts() with an OsiSolverInterface object as parameter. The class CglDataDeriv might be CglData if the latter is sufficient. An exception is made for generators needing information deemed too expensive to collect from the solver (for example the optimal Simplex tableau); in this case CglDataDeriv might still contain a pointer on the OsiSolverInterface object, but its use should be limited to obtaining the "expensive" information from the solver.CglParamDeriv derived from CglParam. It should contain parameters of the generator that can be set by the user. The parameters in the class CglParamDeriv must be taken into account during the cut generation. The class CglParamDeriv might be CglParam if the latter is sufficient.CglTreeInfoDeriv derived from CglTreeInfo. The class CglTreeInfoDeriv might be CglTreeInfo if the latter is sufficient.CglCutGeneratorDeriv must have
CglParamDeriv used to store the current parameters.getParam() that returns the object storing the current parameters.generateCuts(const OsiSolverInterface & si, OsiCuts & cs, const CglTreeInfoDeriv info)generateCuts(const CglDataDeriv &data, OsiCuts & cs, const CglTreeInfoDeriv info)CglDataDeriv must have methods getMember() and setMember() for each member of the class. Data members in CglData irrelevant for a generator are completely ignored. If a data member that is used by a generator is not available when generateCuts(const CglDataDeriv &data, OsiCuts & cs, const CglTreeInfoDeriv info) is called, the call is aborted, as if no cuts were found. A warning message might be printed.CglParamDeriv must have methods getMember() and setMember() for each member of the class. All parameters must have default values. Each cut generator with a derived class is free to change the default values for all the members of CglParamDeriv, including those from CglParam.generateCuts() should not generate any output. If an error occurs, a message might be printed.13 followers · starred Oct 2023
Projects such as this one are maintained by a small group of volunteers under the auspices of the non-profit COIN-OR Foundation and we need your help! Please consider sponsoring our activities or volunteering to help!
This file is auto-generated from config.yml using the generate_readme script. To make changes, please edit config.yml or the generation scripts here and here.
The COIN-OR Cut Generation Library (Cgl) is a collection of cut generators that can be
used with other COIN-OR packages that make use of cuts, such as, among others, the linear solver
Clp or the mixed integer linear programming solvers
Cbc or BCP.
Cgl uses the abstract class OsiSolverInterface
(see Osi) to use or communicate with a solver.
It does not directly call a solver.
Each cut generator is in a separate directory with its own maintainer.
All generators are combined in one library when Cgl is compiled.
Available cut generators are:
Combinatorial cuts:
Flow cover cuts:
Gomory cuts and variants:
Lift-and-project cuts:
Mixed integer rounding cuts and variants:
Strengthening:
CoinUtils is an open-source collection of classes and helper functions that are generally useful to multiple COIN-OR projects. These utilities include:
The project managers of Cgl are Robin Lougee (@rlougee) and Francois Margot.
Cgl 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 Cgl development site is https://github.com/coin-or/Cgl.
What follows is a quick start guide for obtaining or building Cgl on common platforms. More detailed information is available here.
There is a Docker image that provides Cgl, as well as other projects in the COIN-OR Optimization Suite here
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 (see https://repology.org/project/coin-or-cgl/versions for a complete listing):
$ sudo pacman -S coin-or-cgl
$ sudo apt-get install coinor-cgl coinor-libcgl-dev
$ sudo dnf install coin-or-Cgl coin-or-Cgl-devel
$ sudo pkg install math/cgl
$ brew install cgl
Windows: The easiest way to get Cgl on Windows is to download an archive as described above.
Mac OS X: The easiest way to get Cgl on Mac OS X is through Homebrew.
$ brew tap coin-or-tools/coinor
$ brew install coin-or-tools/coinor/cgl
conda (cross-platform):
$ conda install coin-or-cgl
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 open a discussion on Github.
Source code can be obtained either by
Cgl has a number of dependencies, which are detailed in
config.yml. Dependencies on other COIN-OR projects are
automatically downloaded when obtaining the source with coinbrew. For some
of the remaining third-party dependencies, automatic download scripts and
build wrappers are provided (and will also be automatically run for required
and recommended dependencies), while other libraries that are aeasy to obtain
must be installed using an appropriate package manager (or may come with your
OS by default).
These quick start instructions assume you are in a bash shell.
coinbrewTo download and build Cgl from source, execute the following on the command line.
wget https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
chmod u+x coinbrew
./coinbrew fetch Cgl@master
./coinbrew build Cgl
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.
coinbrew (Expert users)./configure -C
make
make test
make install
If you have Doxygen available, you can build a HTML documentation by typing
make doxydoc
in the build directory. If Cgl was built via coinbrew, then the build
directory will be ./build/Cgl/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.
A cut generator in Cgl must conform to the following:
CglCutGeneratorDeriv is derived from the class CglCutGenerator.CglDataDeriv derived from CglData; it should contain pointers on all data used by the generator that might be obtained from an OsiSolverInterface object when calling generateCuts() with an OsiSolverInterface object as parameter. The class CglDataDeriv might be CglData if the latter is sufficient. An exception is made for generators needing information deemed too expensive to collect from the solver (for example the optimal Simplex tableau); in this case CglDataDeriv might still contain a pointer on the OsiSolverInterface object, but its use should be limited to obtaining the "expensive" information from the solver.CglParamDeriv derived from CglParam. It should contain parameters of the generator that can be set by the user. The parameters in the class CglParamDeriv must be taken into account during the cut generation. The class CglParamDeriv might be CglParam if the latter is sufficient.CglTreeInfoDeriv derived from CglTreeInfo. The class CglTreeInfoDeriv might be CglTreeInfo if the latter is sufficient.CglCutGeneratorDeriv must have
CglParamDeriv used to store the current parameters.getParam() that returns the object storing the current parameters.generateCuts(const OsiSolverInterface & si, OsiCuts & cs, const CglTreeInfoDeriv info)generateCuts(const CglDataDeriv &data, OsiCuts & cs, const CglTreeInfoDeriv info)CglDataDeriv must have methods getMember() and setMember() for each member of the class. Data members in CglData irrelevant for a generator are completely ignored. If a data member that is used by a generator is not available when generateCuts(const CglDataDeriv &data, OsiCuts & cs, const CglTreeInfoDeriv info) is called, the call is aborted, as if no cuts were found. A warning message might be printed.CglParamDeriv must have methods getMember() and setMember() for each member of the class. All parameters must have default values. Each cut generator with a derived class is free to change the default values for all the members of CglParamDeriv, including those from CglParam.generateCuts() should not generate any output. If an error occurs, a message might be printed.13 followers · starred Oct 2023