Go to the documentation of this file.
27 const std::string mpdDir );
99 virtual void generateCuts(
const OsiSolverInterface & si, OsiCuts & cs,
115 int snapshot (
const OsiSolverInterface & si,
116 char * possible=NULL,
117 bool withObjective=
true);
126 int minimumSize=2,
int maximumSize=100);
132 OsiSolverInterface *
cliqueModel(
const OsiSolverInterface * model,
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,
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,
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,
331 double * rowLower,
double * rowUpper,
332 double * colLower,
double * colUpper,
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,
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,
CglImplication & operator=(const CglImplication &rhs)
Assignment operator.
int maxPassRoot_
Maximum number of passes to do in probing at root.
int numberCliques_
Cliques Number of cliques.
int getMaxLook() const
Get maximum number of variables to look at in one probe.
int rowCuts_
Row cuts flag 0 no cuts, 1 just disaggregation type, 2 coefficient ( 3 both), 4 just column cuts -n a...
disaggregationAction * index
int totalTimesCalled_
Total number of times called.
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
CliqueEntry * cliqueEntry_
Entries for clique.
int probe(const OsiSolverInterface &si, const OsiRowCutDebugger *debugger, OsiCuts &cs, double *colLower, double *colUpper, CoinPackedMatrix *rowCopy, CoinPackedMatrix *columnCopy, const CoinBigIndex *rowStartPos, const int *realRow, const double *rowLower, const double *rowUpper, const char *intVar, double *minR, double *maxR, int *markR, CglTreeInfo *info)
Does probing and adding cuts (without cliques and mode_!=0)
bool zeroOneInDisaggregation(const disaggregationAction &dis)
CglImplication()
Default constructor.
double * colUpper_
Upper bounds on columns.
Information about where the cut generator is invoked from.
int getUsingObjective() const
Get.
const double * tightUpper() const
Upper.
int numberIntegers_
Number of integer variables.
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 maxElementsRoot_
Maximum number of elements in row for scan at root.
double primalTolerance_
Tolerance to see if infeasible.
int generateCutsAndModify(const OsiSolverInterface &si, OsiCuts &cs, CglTreeInfo *info)
const int * lookedAt() const
Which ones looked at this time.
int usingObjective_
Whether to include objective as constraint.
virtual CglCutGenerator * clone() const
Clone.
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)
double * rowLower_
Lower bounds on rows.
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)
void tighten2(double *colLower, double *colUpper, const int *column, const double *rowElements, const CoinBigIndex *rowStart, const int *rowLength, double *rowLower, double *rowUpper, double *minR, double *maxR, int *markR, int nRows)
This just sets minima and maxima on rows.
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 tighten(double *colLower, double *colUpper, const int *column, const double *rowElements, const CoinBigIndex *rowStart, const CoinBigIndex *rowStartPos, const int *rowLength, double *rowLower, double *rowUpper, int nRows, int nCols, char *intVar, int maxpass, double tolerance)
This tightens column bounds (and can declare infeasibility) It may also declare rows to be redundant.
CoinBigIndex * cliqueStart_
Start of each clique.
CoinPackedMatrix * columnCopy_
Column copy (only if snapshot)
int numberThisTime() const
Number looked at this time.
const char * tightenBounds() const
Array which says tighten continuous.
int gutsOfGenerateCuts(const OsiSolverInterface &si, OsiCuts &cs, double *rowLower, double *rowUpper, double *colLower, double *colUpper, CglTreeInfo *info)
Does most of work of generateCuts Returns number of infeasibilities.
friend void CglProbingUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglProbing class.
int maxProbe_
Maximum number of unsatisfied variables to probe.
bool whenAtUBInDisaggregation(const disaggregationAction &dis)
void setLogLevel(int value)
Set log level - 0 none, 1 - a bit, 2 - more details.
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 probeCliques(const OsiSolverInterface &si, const OsiRowCutDebugger *debugger, OsiCuts &cs, double *colLower, double *colUpper, CoinPackedMatrix *rowCopy, CoinPackedMatrix *columnCopy, const int *realRow, double *rowLower, double *rowUpper, char *intVar, double *minR, double *maxR, int *markR, CglTreeInfo *info)
Does probing and adding cuts (with cliques)
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...
disaggregation * cutVector_
void setupRowCliqueInformation(const OsiSolverInterface &si)
Sets up clique information for each row.
void setUsingObjective(int yesNo)
Set 0 don't 1 do -1 don't even think about it.
virtual ~CglImplication()
Destructor.
CliqueEntry * cliqueRow_
For each column with nonzero in row copy this gives a clique "number".
void setMaxElements(int value)
Set maximum number of elements in row for it to be considered.
CoinPackedMatrix * rowCopy_
Row copy (only if snapshot)
int maxProbeRoot_
Maximum number of unsatisfied variables to probe at root.
void setMaxLookRoot(int value)
Set maximum number of variables to look at in one probe (root node)
int maxStackRoot_
Maximum number of variables to look at in one probe at root.
int getLogLevel() const
Get log level.
int maxPass_
Maximum number of passes to do in probing.
int getMaxLookRoot() const
Get maximum number of variables to look at in one probe (root node)
int maxStack_
Maximum number of variables to look at in one probe.
int probeSlacks(const OsiSolverInterface &si, const OsiRowCutDebugger *debugger, OsiCuts &cs, double *colLower, double *colUpper, CoinPackedMatrix *rowCopy, CoinPackedMatrix *columnCopy, double *rowLower, double *rowUpper, char *intVar, double *minR, double *maxR, int *markR, CglTreeInfo *info)
Does probing and adding cuts for clique slacks.
Disaggregation cuts and for building cliques.
void setMaxPassRoot(int value)
Set maximum number of passes per node (root node)
virtual ~CglProbing()
Destructor.
void setMode(int mode)
Set.
int numberColumns_
Number of columns in problem ( must == current)
This just uses implication info
int * endFixStart_
End of fixes for a column.
double * colLower_
Lower bounds on columns.
int maxElements_
Maximum number of elements in row for scan.
void setMaxPass(int value)
Set maximum number of passes per node.
int logLevel_
Log level - 0 none, 1 - a bit, 2 - more details.
double * rowUpper_
Upper bounds on rows.
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)
char * tightenBounds_
If not null and [i] !=0 then also tighten even if continuous.
CliqueType * cliqueType_
Clique type.
int * lookedAt_
Which ones looked at this time.
int getMaxPass() const
Get maximum number of passes per node.
int * oneFixStart_
Start of oneFixes cliques for a column in matrix or -1 if not in any clique.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
const double * relaxedRowUpper() const
Upper.
int numberRows_
Number of rows in snapshot (or when cliqueRow stuff computed)
int * cliqueRowStart_
cliqueRow_ starts for each row
void setMaxLook(int value)
Set maximum number of variables to look at in one probe.
int number01Integers_
Number of 0-1 integer variables.
virtual CglCutGenerator * clone() const
Clone.
void deleteSnapshot()
Deletes snapshot.
struct CglProbing::disaggregation_struct_tag disaggregation
Disaggregation cuts and for building cliques.
Derived class to pick up probing info.
int createCliques(OsiSolverInterface &si, int minimumSize=2, int maximumSize=100)
Creates cliques for use by probing.
int mode_
Mode - 0 lazy using snapshot, 1 just unsatisfied, 2 all.
CliqueEntry * cliqueEntry() const
Entries for clique.
CglProbing()
Default constructor.
const double * relaxedRowLower() const
Lower.
void setAffectedInDisaggregation(disaggregationAction &dis, int affected)
CoinBigIndex * cliqueStart() const
Start of each clique.
void setMaxProbe(int value)
Set maximum number of unsatisfied variables to look at.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo())
Generate probing/disaggregation cuts for the model of the solver interface, si.
int * zeroFixStart_
Start of zeroFixes cliques for a column in matrix or -1 if not in any clique.
void setZeroOneInDisaggregation(disaggregationAction &dis, bool zeroOne)
int * whichClique_
Clique numbers for one or zero fixes.
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...
CglTreeProbingInfo * probingInfo_
Pointer to tree probing info.
int numberThisTime_
Number looked at this time.