6 #ifndef CglKnapsackCover_H 7 #define CglKnapsackCover_H 17 const std::string mpdDir );
28 virtual void generateCuts(
const OsiSolverInterface & si, OsiCuts & cs,
63 {
if (value>0) maxInKnapsack_ = value;}
66 {
return maxInKnapsack_;}
69 { expensiveCuts_=
false;}
72 { expensiveCuts_=
true;}
89 const OsiSolverInterface & si,
99 const double * element);
102 const OsiSolverInterface & si,
116 int findExactMostViolatedMinCover(
128 int findLPMostViolatedMinCover(
156 int liftAndUncomplementAndAdd(
167 void seqLiftAndUncomplementAndAdd(
179 void liftUpDownAndUncomplementAndAdd(
196 int findPseudoJohnAndEllisCover (
205 int findJohnAndEllisCover (
222 int exactSolveKnapsack(
238 int minimumSize=2,
int maximumSize=100,
bool extendCliques=
false);
241 void deleteCliques();
264 const OsiSolverInterface * solver_;
272 unsigned int equality:1;
274 CliqueType * cliqueType_;
308 const std::string mpdDir );
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
void setTestedRowIndices(int num, const int *ind)
A method to set which rows should be tested for knapsack covers.
Information about where the cut generator is invoked from.
CglKnapsackCover()
Default constructor.
virtual ~CglKnapsackCover()
Destructor.
CglKnapsackCover & operator=(const CglKnapsackCover &rhs)
Assignment operator.
friend void CglKnapsackCoverUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglKnapsackCover class.
Derived class to pick up probing info.
void switchOffExpensive()
Switch off expensive cuts.
Cut Generator Base Class.
int getMaxInKnapsack() const
get limit on number in knapsack
int createCliques(OsiSolverInterface &si, int minimumSize=2, int maximumSize=100, bool extendCliques=false)
Creates cliques for use by probing.
void switchOnExpensive()
Switch on expensive cuts.
void CglKnapsackCoverUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglKnapsackCover class.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate knapsack cover cuts for the model of the solver interface, si.
Knapsack Cover Cut Generator Class.
void setMaxInKnapsack(int value)
Set limit on number in knapsack.
virtual CglCutGenerator * clone() const
Clone.