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