This section shows how to interface with COIN's Cut Generator Library (CGL) to find violated cuts. One way to store cuts generated by CGL is to use OsiCuts, which is a list of cuts. Currently, all CGLs are derived from the base class CglCutGenerator. Therefore, each CGL has a base method called generateCuts() which takes the solver interface as an argument and returns cuts to an OsiCuts cut list.
OsiCuts cutlist; //create CGL gomory cuts CglGomory * gomory = new CglGomory; gomory->generateCuts(*si, cutlist); //create CGL knapsack cuts CglKnapsackCover * knapsack = new CglKnapsackCover; knapsack->generateCuts(*si, cutlist); //create CGL simple rounding cuts CglSimpleRounding * rounding = new CglSimpleRounding; rounding->generateCuts(*si, cutlist); //create CGL odd hole cuts CglOddHole * oddhole = new CglOddHole; oddhole->generateCuts(*si, cutlist); //create CGL probing cuts CglProbing * probe = new CglProbing; probe->generateCuts(*si, cutlist); //apply the cuts to the interface si->applyCuts(cutlist);