Impacting the Solution Process

CbcModel is extremely flexible and customizable. The class structure of CBC is designed to make the most commonly desired customizations of branch-and-cut possible. These include:

To enable this flexibility, CbcModel uses other classes in CBC (some of which are virtual and may have multiple instances). Not all classes are created equal. The two tables below list in alphabetical order the classes used by CbcModel that are of most interest and of least interest.

Table 2.3. Classes Used by CbcModel - Most Useful

Class name Description Notes
CbcCompareBase Controls which node on the tree is selected. The default is CbcCompareDefault. Other comparison classes in CbcCompareActual.hpp include CbcCompareDepth and CbcCompareObjective. Experimenting with these classes and creating new compare classes is easy.
CbcCutGenerator A wrapper for CglCutGenerator with additional data to control when the cut generator is invoked during the tree search. Other than knowing how to add a cut generator to CbcModel, there is not much the average user needs to know about this class. However, sophisticated users can implement their own cut generators.
CbcHeuristic Heuristic that attempts to generate valid MIP-solutions leading to good upper bounds. Specialized heuristics can dramatically improve branch-and-cut performance. As many different heuristics as desired can be used in CBC. Advanced users should consider implementing custom heuristics when tackling difficult problems.
CbcObject Defines what it means for a variable to be satisfied. Used in branching. Virtual class. CBC's concept of branching is based on the idea of an "object". An object has (i) a feasible region, (ii) can be evaluated for infeasibility, (iii) can be branched on, e.g., a method of generating a branching object, which defines an up branch and a down branch, and (iv) allows comparison of the effect of branching. Instances of objects include CbcSimpleInteger, CbcSimpleIntegerPseudoCosts, CbcClique, CbcSOS (type 1 and 2), CbcFollowOn, and CbcLotsize.
OsiSolverInterface Defines the LP solver being used and the LP model. Normally a pointer to the desired OsiSolverInteface is passed to CbcModel before branch and cut. Virtual class. The user instantiates the solver interface of their choice, e.g., OsiClpSolverInterface.

There is not much about the classes listed in Table 2.4 that the average user needs to know about.