24 const std::string mpdDir );
96 virtual void generateCuts(
const OsiSolverInterface & si, OsiCuts & cs,
112 int snapshot (
const OsiSolverInterface & si,
113 char * possible=NULL,
114 bool withObjective=
true);
123 int minimumSize=2,
int maximumSize=100);
236 void tightenThese(
const OsiSolverInterface & solver,
int number,
const int * which);
272 int probe(
const OsiSolverInterface & si,
274 const OsiRowCutDebugger * debugger,
276 double * colLower,
double * colUpper, CoinPackedMatrix *rowCopy,
277 CoinPackedMatrix *columnCopy,
const CoinBigIndex * rowStartPos,
278 const int * realRow,
const double * rowLower,
const double * rowUpper,
279 const char * intVar,
double * minR,
double * maxR,
int * markR,
283 const OsiRowCutDebugger * debugger,
285 double * colLower,
double * colUpper, CoinPackedMatrix *rowCopy,
286 CoinPackedMatrix *columnCopy,
const int * realRow,
287 double * rowLower,
double * rowUpper,
288 char * intVar,
double * minR,
double * maxR,
int * markR,
292 const OsiRowCutDebugger * debugger,
294 double * colLower,
double * colUpper, CoinPackedMatrix *rowCopy,
295 CoinPackedMatrix *columnCopy,
296 double * rowLower,
double * rowUpper,
297 char * intVar,
double * minR,
double * maxR,
int * markR,
303 double * rowLower,
double * rowUpper,
304 double * colLower,
double * colUpper,
310 int tighten(
double *colLower,
double * colUpper,
311 const int *column,
const double *rowElements,
312 const CoinBigIndex *rowStart,
const CoinBigIndex * rowStartPos,
313 const int * rowLength,
314 double *rowLower,
double *rowUpper,
315 int nRows,
int nCols,
char * intVar,
int maxpass,
316 double tolerance)
const;
318 void tighten2(
double *colLower,
double * colUpper,
319 const int *column,
const double *rowElements,
320 const CoinBigIndex *rowStart,
321 const int * rowLength,
322 double *rowLower,
double *rowUpper,
323 double * minR,
double * maxR,
int * markR,
404 unsigned int equality:1;
443 { assert ((dis.
affected&0x80000000)!=0);
return true;}
448 {
return (dis.
affected&0x40000000)!=0;}
452 {
return (dis.
affected&0x20000000)!=0;}
454 { dis.
affected = (affectedToUB ? 0x20000000 : 0)|(dis.
affected&0xdfffffff);}
463 const std::string mpdDir );
474 virtual void generateCuts(
const OsiSolverInterface & si, OsiCuts & cs,
int numberRows_
Number of rows in snapshot (or when cliqueRow stuff computed)
virtual ~CglProbing()
Destructor.
int totalTimesCalled_
Total number of times called.
void setMaxLookRoot(int value)
Set maximum number of variables to look at in one probe (root node)
const double * tightLower() const
Lower.
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) const
This just sets minima and maxima on rows.
CglImplication()
Default constructor.
void setMaxElements(int value)
Set maximum number of elements in row for it to be considered.
void setProbingInfo(CglTreeProbingInfo *info)
Set implication.
struct CglProbing::disaggregation_struct_tag disaggregation
Disaggregation cuts and for building cliques.
CglImplication & operator=(const CglImplication &rhs)
Assignment operator.
void setMaxProbe(int value)
Set maximum number of unsatisfied variables to look at.
int getLogLevel() const
Get log level.
virtual CglCutGenerator * clone() const
Clone.
int * cliqueRowStart_
cliqueRow_ starts for each row
char * tightenBounds_
If not null and [i] !=0 then also tighten even if continuous.
virtual bool mayGenerateRowCutsInTree() const
Returns true if may generate Row cuts in tree (rather than root node).
bool zeroOneInDisaggregation(const disaggregationAction &dis)
void setAffectedToUBInDisaggregation(disaggregationAction &dis, bool affectedToUB)
int * oneFixStart_
Start of oneFixes cliques for a column in matrix or -1 if not in any clique.
void CglProbingUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglProbing class.
int * zeroFixStart_
Start of zeroFixes cliques for a column in matrix or -1 if not in any clique.
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) const
Does probing and adding cuts (with cliques)
CglTreeProbingInfo * probingInfo_
Pointer to tree probing info.
void setAffectedInDisaggregation(disaggregationAction &dis, int affected)
int getUsingObjective() const
Get.
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) const
Does probing and adding cuts for clique slacks.
void setRowCuts(int type)
Set 0 no cuts, 1 just disaggregation type, 2 coefficient ( 3 both)
virtual CglCutGenerator * clone() const
Clone.
virtual void refreshSolver(OsiSolverInterface *solver)
This can be used to refresh any inforamtion.
void setMaxPassRoot(int value)
Set maximum number of passes per node (root node)
int getMaxElements() const
Get maximum number of elements in row for it to be considered.
CglProbing()
Default constructor.
int generateCutsAndModify(const OsiSolverInterface &si, OsiCuts &cs, CglTreeInfo *info)
Generate probing/disaggregation cuts for the model of the solver interface, si.
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) const
Does probing and adding cuts (without cliques and mode_!=0)
int getMaxPassRoot() const
Get maximum number of passes per node (root node)
virtual ~CglImplication()
Destructor.
int numberCliques_
Cliques Number of cliques.
int number01Integers_
Number of 0-1 integer variables.
int maxPassRoot_
Maximum number of passes to do in probing at root.
double * rowLower_
Lower bounds on rows.
int getMaxLook() const
Get maximum number of variables to look at in one probe.
double * rowUpper_
Upper bounds on rows.
void setMaxProbeRoot(int value)
Set maximum number of unsatisfied variables to look at (root node)
void setMaxElementsRoot(int value)
Set maximum number of elements in row for it to be considered (root node)
friend void CglProbingUnitTest(const OsiSolverInterface *siP, const std::string mpdDir)
A function that tests the methods in the CglProbing class.
void setUsingObjective(int yesNo)
Set 0 don't 1 do -1 don't even think about it.
disaggregation * cutVector_
Disaggregation cuts and for building cliques.
cliqueType * cliqueType_
Disaggregation cuts and for building cliques.
int getMaxLookRoot() const
Get maximum number of variables to look at in one probe (root node)
int getMaxProbe() const
Get maximum number of unsatisfied variables to look at.
CoinPackedMatrix * columnCopy_
Column copy (only if snapshot)
int getMaxPass() const
Get maximum number of passes per node.
void setMaxLook(int value)
Set maximum number of variables to look at in one probe.
const int * lookedAt() const
Which ones looked at this time.
int numberThisTime_
Number looked at this time.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const
Generate probing/disaggregation cuts for the model of the solver interface, si.
Only useful type of disaggregation is most normal For now just done for 0-1 variables Can be used for...
void deleteSnapshot()
Deletes snapshot.
Probing Cut Generator Class.
const double * tightUpper() const
Upper.
double * colUpper_
Upper bounds on columns.
int maxElements_
Maximum number of elements in row for scan.
int * endFixStart_
End of fixes for a column.
double primalTolerance_
Tolerance to see if infeasible.
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) const
This tightens column bounds (and can declare infeasibility) It may also declare rows to be redundant...
Derived class to pick up probing info.
int logLevel_
Log level - 0 none, 1 - a bit, 2 - more details.
int createCliques(OsiSolverInterface &si, int minimumSize=2, int maximumSize=100)
Creates cliques for use by probing.
Cut Generator Base Class.
void setWhenAtUBInDisaggregation(disaggregationAction &dis, bool whenAtUB)
cliqueEntry * cliqueRow_
For each column with nonzero in row copy this gives a clique "number".
void setZeroOneInDisaggregation(disaggregationAction &dis, bool zeroOne)
bool whenAtUBInDisaggregation(const disaggregationAction &dis)
int * lookedAt_
Which ones looked at this time.
int getMaxElementsRoot() const
Get maximum number of elements in row for it to be considered (root node)
const double * relaxedRowUpper() const
Upper.
virtual void generateCuts(const OsiSolverInterface &si, OsiCuts &cs, const CglTreeInfo info=CglTreeInfo()) const
Generate cuts from implication table Insert generated cuts into the cut set cs.
void deleteCliques()
Delete all clique information.
int affectedInDisaggregation(const disaggregationAction &dis)
int getMaxProbeRoot() const
Get maximum number of unsatisfied variables to look at (root node)
int usingObjective_
Whether to include objective as constraint.
int rowCuts_
Row cuts flag 0 no cuts, 1 just disaggregation type, 2 coefficient ( 3 both), 4 just column cuts -n a...
int maxElementsRoot_
Maximum number of elements in row for scan at root.
This just uses implication info.
void tightenThese(const OsiSolverInterface &solver, int number, const int *which)
Mark variables to be tightened.
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...
CoinPackedMatrix * rowCopy_
Row copy (only if snapshot)
Disaggregation cuts and for building cliques.
bool affectedToUBInDisaggregation(const disaggregationAction &dis)
CglProbing & operator=(const CglProbing &rhs)
Assignment operator.
void setMaxPass(int value)
Set maximum number of passes per node.
const double * relaxedRowLower() const
Lower.
int numberColumns_
Number of columns in problem ( must == current)
int * whichClique_
Clique numbers for one or zero fixes.
disaggregationAction * index
cliqueEntry * cliqueEntry_
Entries for clique.
int gutsOfGenerateCuts(const OsiSolverInterface &si, OsiCuts &cs, double *rowLower, double *rowUpper, double *colLower, double *colUpper, CglTreeInfo *info) const
Does most of work of generateCuts Returns number of infeasibilities.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
Information about where the cut generator is invoked from.
void setMode(int mode)
Set.
double * colLower_
Lower bounds on columns.
int maxStack_
Maximum number of variables to look at in one probe.
int maxProbe_
Maximum number of unsatisfied variables to probe.
virtual std::string generateCpp(FILE *fp)
Create C++ lines to get to current state.
void setupRowCliqueInformation(const OsiSolverInterface &si)
Sets up clique information for each row.
int numberThisTime() const
Number looked at this time.
const char * tightenBounds() const
Array which says tighten continuous.
void setLogLevel(int value)
Set log level - 0 none, 1 - a bit, 2 - more details.
int maxPass_
Maximum number of passes to do in probing.
int numberIntegers_
Number of integer variables.
int maxStackRoot_
Maximum number of variables to look at in one probe at root.
int maxProbeRoot_
Maximum number of unsatisfied variables to probe at root.
int * cliqueStart_
Start of each clique.
int mode_
Mode - 0 lazy using snapshot, 1 just unsatisfied, 2 all.