5 #ifndef CglPreProcess_H
6 #define CglPreProcess_H
52 bool makeEquality=
false,
int numberPasses=5);
65 int makeEquality=0,
int numberPasses=5,
69 ,
bool deleteStuff=
true);
85 double fractionToKeep=0.25,
86 bool fixContinuousAsWell=
false,
87 char * keep=NULL)
const;
93 double cliquesNeeded=0.0)
const;
const char * prohibited()
Updated prohibited columns.
int numberCutGenerators() const
Get the number of cut generators.
int numberRowType_
Number of rows in original row types.
void passInRowTypes(const char *rowTypes, int numberRows)
Pass in row types 0 normal 1 cut rows - will be dropped if remain in At end of preprocess cut rows wi...
char * prohibited_
Columns which should not be presolved e.g. SOS.
int * originalRow_
Original row numbers.
void passInProhibited(const char *prohibited, int numberColumns)
Pass in prohibited columns.
Base class for message handling.
CglUniqueRowCuts(int initialMaxSize=0, int hashMultiplier=4)
double * weightSOS_
Weights for each SOS column.
int * startSOS_
Start of each SOS.
int numberIterationsPre_
Number of iterations done in PreProcessing.
int numberSOS() const
Number of SOS if found.
bool defaultHandler_
Flag to say if handler_ is the default handler.
void bronKerbosch()
For recursive Bron-Kerbosch.
void setLanguage(CoinMessages::Language language)
Pass in Message handler (not deleted at end)
int * originalColumn_
Original column numbers.
int numberRows_
Number of original rows.
int numberIn_
Current number in clique.
Class for preProcessing and postProcessing.
void eraseRowCut(int sequence)
int * candidates_
Current candidates (created at each level)
void passInMessageHandler(CoinMessageHandler *handler)
Pass in Message handler (not deleted at end)
~CglPreProcess()
Destructor.
char * rowType_
Row types (may be NULL) Carried around and corresponds to existing rows -1 added by preprocess e...
CoinMessages * messagesPointer()
Return pointer to messages.
const char * rowTypes()
Updated row types - may be NULL Carried around and corresponds to existing rows -1 added by preproces...
void insert(const OsiRowCut &cut)
const int * originalRows()
Return a pointer to the original rows MUST be called before postProcess otherwise you just get 0...
int numberIterationsPre() const
Number of iterations PreProcessing.
Sparse Matrix Base Class.
CglCutGenerator * cutGenerator(int i) const
Get the specified cut generator.
CglCutGenerator ** cutGenerators() const
Get the list of cut generators.
Collections of row cuts and column cuts.
int numberSolvers_
Number of solvers at various stages.
int numberCandidates_
Current number of candidates.
const int * whichSOS() const
Columns in SOS.
OsiSolverInterface * cliqueIt(OsiSolverInterface &model, double cliquesNeeded=0.0) const
Replace cliques by more maximal cliques Returns NULL if rows not reduced by greater than cliquesNeede...
void addCuts(OsiCuts &cs)
int numberProhibited_
Number of columns in original prohibition set.
Only store unique row cuts.
int numberIterationsPost() const
Number of iterations PostProcessing.
int numberPossible_
Number possible.
void update(const OsiPresolve *pinfo, const OsiSolverInterface *solver)
Update prohibited and rowType.
int firstNot_
First not (stored backwards from numberPossible_)
OsiPresolve * presolve(int iPass) const
Matching presolve information.
OsiSolverInterface * someFixed(OsiSolverInterface &model, double fractionToKeep=0.25, bool fixContinuousAsWell=false, char *keep=NULL) const
Fix some of problem - returning new problem.
OsiSolverInterface * startModel_
Solver after making clique equalities (may == original)
OsiSolverInterface * startModel() const
Solver after making clique equalities (may == original)
OsiSolverInterface * preProcessNonDefault(OsiSolverInterface &model, int makeEquality=0, int numberPasses=5, int tuning=0)
preProcess problem - returning new problem.
void postProcess(OsiSolverInterface &model, bool deleteStuff=true)
Creates solution in original model.
int numberIterationsPost_
Number of iterations done in PostProcessing.
OSI interface to COIN problem simplification capabilities.
const int * originalColumns()
Return a pointer to the original columns (with possible clique slacks) MUST be called before postProc...
OsiSolverInterface * originalModel() const
The original solver associated with this model.
const int * startSOS() const
Start of each SOS.
CglPreProcess()
Constructor.
int * whichSOS_
Columns in SOS.
int numberSOS_
Number of SOS if found.
OsiSolverInterface * modified(OsiSolverInterface *model, bool constraints, int &numberChanges, int iBigPass, int numberPasses)
Return model with useful modifications.
This is a first attempt at a message handler.
int lastColumn_
Current candidates (created at each level)
void setCutoff(double value)
Set cutoff bound on the objective function.
OsiRowCut * cut(int sequence) const
void * appData_
Pointer to user-defined data structure.
Abstract Base Class for describing an interface to a solver.
void makeInteger()
Make continuous variables integer.
CglPreProcess & operator=(const CglPreProcess &rhs)
Assignment operator.
Cut Generator Base Class.
CoinMessageHandler * messageHandler() const
Return handler.
void gutsOfDestructor()
Clears out as much as possible.
int insertIfNotDuplicate(const OsiRowCut &cut)
int * start_
Starts for graph (numberPossible+1)
int options_
Options 1 - original model had integer bounds before tightening 2 - don't do probing 4 - don't do dup...
CglStored cuts_
Cuts from dropped rows.
Class to hold and manipulate an array of massaged messages.
int * typeSOS_
Type of each SOS.
const char * rowType_
points to row types
const CglStored * cutsPointer() const
Return pointer to cuts from dropped rows.
void * getApplicationData() const
Get application data.
OsiSolverInterface * modifiedModel(int iPass) const
Copies of solver at various stages after presolve after modifications.
OsiPresolve ** presolve_
Matching presolve information.
CglUniqueRowCuts & operator=(const CglUniqueRowCuts &rhs)
void newLanguage(CoinMessages::Language language)
Set language.
int reducedCostFix(OsiSolverInterface &model)
If we have a cutoff - fix variables.
OsiRowCut * rowCutPtr(int sequence)
const CglStored & cuts() const
Return cuts from dropped rows.
int * dominated_
How many times each original row dominated.
void setApplicationData(void *appData)
Set application data.
int tightenPrimalBounds(OsiSolverInterface &model, double factor=0.0)
Tightens primal bounds to make dual and branch and cutfaster.
int numberColumns_
Number of original columns.
CoinMessages messages()
Return messages.
Stored Cut Generator Class.
OsiSolverInterface * preProcess(OsiSolverInterface &model, bool makeEquality=false, int numberPasses=5)
preProcess problem - returning new problem.
CglBK & operator=(const CglBK &rhs)
Assignment operator.
CoinMessageHandler * handler_
Message handler.
OsiSolverInterface ** modifiedModel_
Copies of solver at various stages after presolve after modifications.
CoinPackedMatrix * cliqueMatrix_
Clique entries.
OsiSolverInterface * newSolver(const OsiSolverInterface &model)
Creates strengthened smaller model.
CglBK()
Default constructor.
int * originalRow_
Original row (in parallel with otherColumn_)
CoinMessages messages_
Cgl messages.
void addCutGenerator(CglCutGenerator *generator)
Add one generator - up to user to delete generators.
CglCutGenerator ** generator_
Cut generators.
const int * typeSOS() const
Type of each SOS.
Language
Supported languages.
const double * weightSOS() const
Weights for each SOS column.
OsiSolverInterface * originalModel_
The original solver associated with this model.
void createOriginalIndices()
create original columns and rows
void setOptions(int value)
Set options.
CglHashLink * hash_
Hash table.
OsiSolverInterface ** model_
Copies of solver at various stages after presolve.
int numberCutGenerators_
Number of cut generators.
int * otherColumn_
Other column/node.
char * mark_
Array to mark stuff.
double getCutoff() const
Get the cutoff bound on the objective function - always as minimize.
OsiSolverInterface * modelAtPass(int iPass) const
Copies of solver at various stages after presolve.
int left_
For acceleration.