Go to the documentation of this file.
27 const std::string mpdDir );
99 virtual void generateCuts(
const OsiSolverInterface & si, OsiCuts & cs,
116 char * possible=NULL,
117 bool withObjective=
true);
126 int minimumSize=2,
int maximumSize=100);
132 OsiSolverInterface *
cliqueModel(
const OsiSolverInterface * model,
144 {
return tightenBounds_;}
215 {
return numberThisTime_;}
238 {
return numberCliques_;}
241 {
return cliqueType_;}
244 {
return cliqueStart_;}
247 {
return cliqueEntry_;}
264 void tightenThese(
const OsiSolverInterface & solver,
int number,
const int * which);
300 int probe(
const OsiSolverInterface & si,
302 const OsiRowCutDebugger * debugger,
304 double * colLower,
double * colUpper, CoinPackedMatrix *rowCopy,
305 CoinPackedMatrix *columnCopy,
const CoinBigIndex * rowStartPos,
306 const int * realRow,
const double * rowLower,
const double * rowUpper,
307 const char * intVar,
double * minR,
double * maxR,
int * markR,
310 int probeCliques(
const OsiSolverInterface & si,
311 const OsiRowCutDebugger * debugger,
313 double * colLower,
double * colUpper, CoinPackedMatrix *rowCopy,
314 CoinPackedMatrix *columnCopy,
const int * realRow,
315 double * rowLower,
double * rowUpper,
316 char * intVar,
double * minR,
double * maxR,
int * markR,
319 int probeSlacks(
const OsiSolverInterface & si,
320 const OsiRowCutDebugger * debugger,
322 double * colLower,
double * colUpper, CoinPackedMatrix *rowCopy,
323 CoinPackedMatrix *columnCopy,
324 double * rowLower,
double * rowUpper,
325 char * intVar,
double * minR,
double * maxR,
int * markR,
329 int gutsOfGenerateCuts(
const OsiSolverInterface & si,
331 double * rowLower,
double * rowUpper,
332 double * colLower,
double * colUpper,
335 void setupRowCliqueInformation(
const OsiSolverInterface & si);
338 int tighten(
double *colLower,
double * colUpper,
339 const int *column,
const double *rowElements,
340 const CoinBigIndex *rowStart,
const CoinBigIndex * rowStartPos,
341 const int * rowLength,
342 double *rowLower,
double *rowUpper,
343 int nRows,
int nCols,
char * intVar,
int maxpass,
346 void tighten2(
double *colLower,
double * colUpper,
347 const int *column,
const double *rowElements,
348 const CoinBigIndex *rowStart,
349 const int * rowLength,
350 double *rowLower,
double *rowUpper,
351 double * minR,
double * maxR,
int * markR,
357 struct disaggregation_struct_tag ;
362 CoinPackedMatrix * rowCopy_;
365 CoinPackedMatrix * columnCopy_;
379 double primalTolerance_;
406 int maxElementsRoot_;
412 int number01Integers_;
416 int totalTimesCalled_;
420 typedef struct disaggregation_struct_tag {
426 disaggregation * cutVector_;
431 CliqueType * cliqueType_;
452 int * cliqueRowStart_;
454 char * tightenBounds_;
468 { assert ((dis.
affected&0x80000000)!=0);
return true;}
473 {
return (dis.
affected&0x40000000)!=0;}
477 {
return (dis.
affected&0x20000000)!=0;}
479 { dis.
affected = (affectedToUB ? 0x20000000 : 0)|(dis.
affected&0xdfffffff);}
488 const std::string mpdDir );
499 virtual void generateCuts(
const OsiSolverInterface & si, OsiCuts & cs,
533 { probingInfo_=info;}
CglImplication & operator=(const CglImplication &rhs)
Assignment operator.
int getMaxLook() const
Get maximum number of variables to look at in one probe.
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
bool zeroOneInDisaggregation(const disaggregationAction &dis)
CglImplication()
Default constructor.
Information about where the cut generator is invoked from.
int getUsingObjective() const
Get.
const double * tightUpper() const
Upper.
Probing Cut Generator Class.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
int numberCliques() const
Number of cliques.
bool affectedToUBInDisaggregation(const disaggregationAction &dis)
void CglProbingUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglProbing class.
const double * tightLower() const
Lower.
int generateCutsAndModify(const OsiSolverInterface &si, OsiCuts &cs, CglTreeInfo *info)
const int * lookedAt() const
Which ones looked at this time.
virtual CglCutGenerator * clone() const
Clone.
CglImplication(const CglImplication &)
Copy constructor.
int getMaxProbe() const
Get maximum number of unsatisfied variables to look at.
int getMaxElementsRoot() const
Get maximum number of elements in row for it to be considered (root node)
int snapshot(const OsiSolverInterface &si, char *possible=NULL, bool withObjective=true)
Create a copy of matrix which is to be used this is to speed up process and to give global cuts Can g...
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate cuts from implication table Insert generated cuts into the cut set cs.
int affectedInDisaggregation(const disaggregationAction &dis)
void setAffectedToUBInDisaggregation(disaggregationAction &dis, bool affectedToUB)
CliqueType * cliqueType() const
Clique type.
void setRowCuts(int type)
Set 0 no cuts, 1 just disaggregation type, 2 coefficient ( 3 both)
void deleteCliques()
Delete all clique information.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
int numberThisTime() const
Number looked at this time.
const char * tightenBounds() const
Array which says tighten continuous.
friend void CglProbingUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglProbing class.
bool whenAtUBInDisaggregation(const disaggregationAction &dis)
void setLogLevel(int value)
Set log level - 0 none, 1 - a bit, 2 - more details.
CglImplication(CglTreeProbingInfo *info)
Constructor with info.
void setMaxProbeRoot(int value)
Set maximum number of unsatisfied variables to look at (root node)
void setProbingInfo(CglTreeProbingInfo *info)
Set implication.
Cut Generator Base Class.
CglProbing & operator=(const CglProbing &rhs)
Assignment operator.
void tightenThese(const OsiSolverInterface &solver, int number, const int *which)
Mark variables to be tightened.
int getMaxProbeRoot() const
Get maximum number of unsatisfied variables to look at (root node)
Only useful type of disaggregation is most normal For now just done for 0-1 variables Can be used for...
void setUsingObjective(int yesNo)
Set 0 don't 1 do -1 don't even think about it.
virtual ~CglImplication()
Destructor.
void setMaxElements(int value)
Set maximum number of elements in row for it to be considered.
void setMaxLookRoot(int value)
Set maximum number of variables to look at in one probe (root node)
int getLogLevel() const
Get log level.
int getMaxLookRoot() const
Get maximum number of variables to look at in one probe (root node)
CglProbing(const CglProbing &)
Copy constructor.
void setMaxPassRoot(int value)
Set maximum number of passes per node (root node)
virtual ~CglProbing()
Destructor.
void setMode(int mode)
Set.
This just uses implication info
void setMaxPass(int value)
Set maximum number of passes per node.
void setWhenAtUBInDisaggregation(disaggregationAction &dis, bool whenAtUB)
int getMaxPassRoot() const
Get maximum number of passes per node (root node)
void setMaxElementsRoot(int value)
Set maximum number of elements in row for it to be considered (root node)
int getMaxPass() const
Get maximum number of passes per node.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
const double * relaxedRowUpper() const
Upper.
void setMaxLook(int value)
Set maximum number of variables to look at in one probe.
virtual CglCutGenerator * clone() const
Clone.
void deleteSnapshot()
Deletes snapshot.
Derived class to pick up probing info.
int createCliques(OsiSolverInterface &si, int minimumSize=2, int maximumSize=100)
Creates cliques for use by probing.
CliqueEntry * cliqueEntry() const
Entries for clique.
CglProbing()
Default constructor.
const double * relaxedRowLower() const
Lower.
int * cliqueStart() const
Start of each clique.
void setAffectedInDisaggregation(disaggregationAction &dis, int affected)
void setMaxProbe(int value)
Set maximum number of unsatisfied variables to look at.
friend struct CglProbing::disaggregation_struct_tag
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate probing/disaggregation cuts for the model of the solver interface, si.
void setZeroOneInDisaggregation(disaggregationAction &dis, bool zeroOne)
int getMaxElements() const
Get maximum number of elements in row for it to be considered.
OsiSolverInterface * cliqueModel(const OsiSolverInterface *model, int type)
Create a fake model by adding cliques if type&4 then delete rest of model first, if 1 then add proper...