"How To" for Cgl Subproject Managers

This is just a few short points that might prove useful. For more information, please look at the CoinHelp for project managers

1) Download and installation of the code

  1. svn co coin-Cgl
  2. cd coin-Cgl
  3. mkdir build
  4. cd build
  5. cp -r ../BuildTools/share .
  6. Add at the bottom of the file build/share/
  7. ../configure -C
  8. make
  9. make test
  10. make install

2) Help with subversion

Go to the subversion Help pages for project managers.

3) Getting the correct version of the autotools

Follow the instructions available here. More information on the autotools used in COIN-OR is available here.

4) Add files to your subproject

To add myfile.cpp and myfile.hpp in your subproject coin-Cgl/trunk/Cgl/src/MySubProject directory, do the following:

  • Add in coin-Cgl/trunk/Cgl/src/MySubProject/ both myfile.cpp and myfile.hpp to the block starting with:
    # List all source files for this library, including headers
    libMySubProject_la_SOURCES = \

and add myfile.hpp (if it should be available to the user in the main include directory after installation) in the block starting with

# Here list all the header files that are required by a user of the library,
# and that therefore should be installed in 'install'
include_HEADERS = \
  • In coin-Cgl/trunk/Cgl/src/MySubProject, type
    svn add myfile.cpp
    svn add myfile.hpp
  • In coin-Cgl/trunk, run

(See instuction on the page CoinHelp for project managers for getting the correct version of the autotools.)

  • In coin-Cgl/trunk/Cgl/src/MySubProject, type
    svn commit

Specifications of a Cut Generator in Cgl

A cut generator in Cgl must conform to the following:

  • Its main class CglCutGeneratorDeriv is derived from the class CglCutGenerator.
  • It has three related classes used for data, parameters and information with respect to the enumeration tree:
    • A class 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.
    • A class 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.
    • A class CglTreeInfoDeriv derived from CglTreeInfo. The class CglTreeInfoDeriv might be CglTreeInfo if the latter is sufficient.
  • The class CglCutGeneratorDeriv must have
    • A member of type CglParamDeriv used to store the current parameters.
    • A method getParam() that returns the object storing the current parameters.
    • A method generateCuts(const OsiSolverInterface & si, OsiCuts & cs, const CglTreeInfoDeriv info)
    • A method generateCuts(const CglDataDeriv &data, OsiCuts & cs, const CglTreeInfoDeriv info)
  • The data class 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.
  • The class 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.
  • Once an object of the cut generator class is created, it should be possible to call generateCuts() several times in a row without having to destroy and re-create the object.
  • By default, a successful call to generateCuts() should not generate any output. If an error occurs, a message might be printed.
Last modified 12 years ago Last modified on Dec 19, 2006 2:03:30 PM