Go to the documentation of this file.
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 );
void switchOnExpensive()
Switch on expensive cuts.
friend void CglKnapsackCoverUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglKnapsackCover class.
int createCliques(OsiSolverInterface &si, int minimumSize=2, int maximumSize=100, bool extendCliques=false)
Creates cliques for use by probing.
Information about where the cut generator is invoked from.
int getMaxInKnapsack() const
get limit on number in knapsack
void CglKnapsackCoverUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglKnapsackCover class.
void setMaxInKnapsack(int value)
Set limit on number in knapsack.
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.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
Cut Generator Base Class.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any information.
virtual CglCutGenerator * clone() const
Clone.
CglKnapsackCover()
Default constructor.
void switchOffExpensive()
Switch off expensive cuts.
void setTestedRowIndices(int num, const int *ind)
A method to set which rows should be tested for knapsack covers.
Derived class to pick up probing info.
virtual ~CglKnapsackCover()
Destructor.
CglKnapsackCover & operator=(const CglKnapsackCover &rhs)
Assignment operator.