// Copyright (C) 2002, International Business Machines // Corporation and others. All Rights Reserved. #ifndef CglGomory_H #define CglGomory_H #include #include "CglCutGenerator.hpp" class CoinWarmStartBasis; /** Gomory Cut Generator Class */ class CglGomory : public CglCutGenerator { friend void CglGomoryUnitTest(const OsiSolverInterface * siP, const std::string mpdDir ); public: /**@name Generate Cuts */ //@{ /** Generate Mixed Integer Gomory cuts for the model of the solver interface, si. Insert the generated cuts into OsiCut, cs. There is a limit option, which will only generate cuts with less than this number of entries. We can also only look at 0-1 variables a certain distance from integer. */ virtual void generateCuts( const OsiSolverInterface & si, OsiCuts & cs, const CglTreeInfo info = CglTreeInfo()) const; /** Generates cuts given matrix and solution etc, returns number of cuts generated */ int generateCuts( const OsiRowCutDebugger * debugger, OsiCuts & cs, const CoinPackedMatrix & columnCopy, const CoinPackedMatrix & rowCopy, const double * objective, const double * colsol, const double * colLower, const double * colUpper, const double * rowLower, const double * rowUpper, const char * intVar , const CoinWarmStartBasis* warm, const CglTreeInfo info = CglTreeInfo()) const; /** Generates cuts given matrix and solution etc, returns number of cuts generated (no row copy passed in) */ int generateCuts( const OsiRowCutDebugger * debugger, OsiCuts & cs, const CoinPackedMatrix & columnCopy, const double * objective, const double * colsol, const double * colLower, const double * colUpper, const double * rowLower, const double * rowUpper, const char * intVar , const CoinWarmStartBasis* warm, const CglTreeInfo info = CglTreeInfo()) const; /// Return true if needs optimal basis to do cuts (will return true) virtual bool needsOptimalBasis() const; //@} /**@name Change limit on how many variables in cut (default 50) */ //@{ /// Set void setLimit(int limit); /// Get int getLimit() const; /// Set at root (if