#include <CglPreProcess.hpp>
Public Member Functions | |
Main methods | |
OsiSolverInterface * | preProcess (OsiSolverInterface &model, bool makeEquality=false, int numberPasses=5) |
preProcess problem - returning new problem. | |
OsiSolverInterface * | preProcessNonDefault (OsiSolverInterface &model, int makeEquality=0, int numberPasses=5) |
preProcess problem - returning new problem. | |
void | postProcess (OsiSolverInterface &model) |
Creates solution in original model. | |
int | tightenPrimalBounds (OsiSolverInterface &model, double factor=0.0) |
Tightens primal bounds to make dual and branch and cutfaster. | |
OsiSolverInterface * | someFixed (OsiSolverInterface &model, double fractionToKeep=0.25, bool fixContinuousAsWell=false, char *keep=NULL) const |
Fix some of problem - returning new problem. | |
Parameter set/get methods | |
The set methods return true if the parameter was set to the given value, false if the value of the parameter is out of range.
The get methods return the value of the parameter. | |
void | setCutoff (double value) |
Set cutoff bound on the objective function. | |
double | getCutoff () const |
Get the cutoff bound on the objective function - always as minimize. | |
OsiSolverInterface * | originalModel () const |
The original solver associated with this model. | |
OsiSolverInterface * | startModel () const |
Solver after making clique equalities (may == original). | |
OsiSolverInterface * | modelAtPass (int iPass) const |
Copies of solver at various stages after presolve. | |
OsiSolverInterface * | modifiedModel (int iPass) const |
Copies of solver at various stages after presolve after modifications. | |
OsiPresolve * | presolve (int iPass) const |
Matching presolve information. | |
const int * | originalColumns () const |
Return a pointer to the original columns (with possible clique slacks) MUST be called before postProcess otherwise you just get 0,1,2.. | |
const int * | originalRows () const |
Return a pointer to the original rows MUST be called before postProcess otherwise you just get 0,1,2.. | |
int | numberSOS () const |
Number of SOS if found. | |
const int * | typeSOS () const |
Type of each SOS. | |
const int * | startSOS () const |
Start of each SOS. | |
const int * | whichSOS () const |
Columns in SOS. | |
const double * | weightSOS () const |
Weights for each SOS column. | |
Cut generator methods | |
int | numberCutGenerators () const |
Get the number of cut generators. | |
CglCutGenerator ** | cutGenerators () const |
Get the list of cut generators. | |
CglCutGenerator * | cutGenerator (int i) const |
Get the specified cut generator. | |
void | addCutGenerator (CglCutGenerator *generator) |
Add one generator - up to user to delete generators. | |
Setting/Accessing application data | |
void | setApplicationData (void *appData) |
Set application data. | |
void * | getApplicationData () const |
Get application data. | |
Message handling | |
void | passInMessageHandler (CoinMessageHandler *handler) |
Pass in Message handler (not deleted at end). | |
void | newLanguage (CoinMessages::Language language) |
Set language. | |
void | setLanguage (CoinMessages::Language language) |
Pass in Message handler (not deleted at end). | |
CoinMessageHandler * | messageHandler () const |
Return handler. | |
CoinMessages | messages () |
Return messages. | |
CoinMessages * | messagesPointer () |
Return pointer to messages. | |
Constructors and destructors etc | |
CglPreProcess () | |
Constructor. | |
CglPreProcess (const CglPreProcess &rhs) | |
Copy constructor . | |
CglPreProcess & | operator= (const CglPreProcess &rhs) |
Assignment operator. | |
~CglPreProcess () | |
Destructor. | |
void | gutsOfDestructor () |
Clears out as much as possible. | |
Private Member Functions | |
private methods | |
OsiSolverInterface * | modified (OsiSolverInterface *model, bool constraints, int &numberChanges, int iBigPass) |
Return model with useful modifications. | |
void | createOriginalIndices () const |
create original columns and rows | |
Private Attributes | |
Private member data | |
OsiSolverInterface * | originalModel_ |
The original solver associated with this model. | |
OsiSolverInterface * | startModel_ |
Solver after making clique equalities (may == original). | |
int | numberSolvers_ |
Number of solvers at various stages. | |
OsiSolverInterface ** | model_ |
Copies of solver at various stages after presolve. | |
OsiSolverInterface ** | modifiedModel_ |
Copies of solver at various stages after presolve after modifications. | |
OsiPresolve ** | presolve_ |
Matching presolve information. | |
CoinMessageHandler * | handler_ |
Message handler. | |
bool | defaultHandler_ |
Flag to say if handler_ is the default handler. | |
CoinMessages | messages_ |
Cgl messages. | |
void * | appData_ |
Pointer to user-defined data structure. | |
int * | originalColumn_ |
Original column numbers. | |
int * | originalRow_ |
Original row numbers. | |
int | numberCutGenerators_ |
Number of cut generators. | |
CglCutGenerator ** | generator_ |
Cut generators. | |
int | numberSOS_ |
Number of SOS if found. | |
int * | typeSOS_ |
Type of each SOS. | |
int * | startSOS_ |
Start of each SOS. | |
int * | whichSOS_ |
Columns in SOS. | |
double * | weightSOS_ |
Weights for each SOS column. |
While cuts can be added at any time in the tree, some cuts are actually just stronger versions of existing constraints. In this case they can replace those constraints rather than being added as new constraints. This is awkward in the tree but reasonable at the root node.
This is a general process class which uses other cut generators to strengthen constraints, establish that constraints are redundant, fix variables and find relationships such as x + y == 1.
Presolve will also be done.
If row names existed they may be replaced by R0000000 etc
Definition at line 34 of file CglPreProcess.hpp.
|
Constructor.
|
|
Copy constructor .
|
|
Destructor.
|
|
preProcess problem - returning new problem. If makeEquality true then <= cliques converted to ==. Presolve will be done numberPasses times. Returns NULL if infeasible This version uses default strategy. For more control copy and edit code from this function i.e. call preProcessNonDefault |
|
preProcess problem - returning new problem. If makeEquality true then <= cliques converted to ==. Presolve will be done numberPasses times. Returns NULL if infeasible This version assumes user has added cut generators to CglPreProcess object before calling it. As an example use coding in preProcess If makeEquality is 1 add slacks to get cliques, if 2 add slacks to get sos (but only if looks plausible) and keep sos info |
|
Creates solution in original model.
|
|
Tightens primal bounds to make dual and branch and cutfaster. Unless fixed or integral, bounds are slightly looser than they could be. Returns non-zero if problem infeasible Fudge for branch and bound - put bounds on columns of factor * largest value (at continuous) - should improve stability in branch and bound on infeasible branches (0.0 is off) |
|
Fix some of problem - returning new problem. Uses reduced costs. Optional signed character array 1 always keep, -1 always discard, 0 use djs |
|
Set cutoff bound on the objective function. When using strict comparison, the bound is adjusted by a tolerance to avoid accidentally cutting off the optimal solution. |
|
Get the cutoff bound on the objective function - always as minimize.
|
|
The original solver associated with this model.
Definition at line 107 of file CglPreProcess.hpp. |
|
Solver after making clique equalities (may == original).
Definition at line 110 of file CglPreProcess.hpp. |
|
Copies of solver at various stages after presolve.
Definition at line 113 of file CglPreProcess.hpp. |
|
Copies of solver at various stages after presolve after modifications.
Definition at line 116 of file CglPreProcess.hpp. |
|
Matching presolve information.
Definition at line 119 of file CglPreProcess.hpp. |
|
Return a pointer to the original columns (with possible clique slacks) MUST be called before postProcess otherwise you just get 0,1,2..
|
|
Return a pointer to the original rows MUST be called before postProcess otherwise you just get 0,1,2..
|
|
Number of SOS if found.
Definition at line 128 of file CglPreProcess.hpp. |
|
Type of each SOS.
Definition at line 131 of file CglPreProcess.hpp. |
|
Start of each SOS.
Definition at line 134 of file CglPreProcess.hpp. |
|
Columns in SOS.
Definition at line 137 of file CglPreProcess.hpp. |
|
Weights for each SOS column.
Definition at line 140 of file CglPreProcess.hpp. |
|
Get the number of cut generators.
Definition at line 147 of file CglPreProcess.hpp. |
|
Get the list of cut generators.
Definition at line 150 of file CglPreProcess.hpp. |
|
Get the specified cut generator.
Definition at line 153 of file CglPreProcess.hpp. |
|
Add one generator - up to user to delete generators.
|
|
Set application data. This is a pointer that the application can store into and retrieve. This field is available for the application to optionally define and use. |
|
Get application data.
|
|
Pass in Message handler (not deleted at end).
|
|
Set language.
|
|
Pass in Message handler (not deleted at end).
Definition at line 183 of file CglPreProcess.hpp. |
|
Return handler.
Definition at line 186 of file CglPreProcess.hpp. |
|
Return messages.
Definition at line 189 of file CglPreProcess.hpp. |
|
Return pointer to messages.
Definition at line 192 of file CglPreProcess.hpp. |
|
Assignment operator.
|
|
Clears out as much as possible.
|
|
Return model with useful modifications. If constraints true then adds any x+y=1 or x-y=0 constraints If NULL infeasible |
|
create original columns and rows
|
|
The original solver associated with this model.
Definition at line 238 of file CglPreProcess.hpp. |
|
Solver after making clique equalities (may == original).
Definition at line 240 of file CglPreProcess.hpp. |
|
Number of solvers at various stages.
Definition at line 242 of file CglPreProcess.hpp. |
|
Copies of solver at various stages after presolve.
Definition at line 244 of file CglPreProcess.hpp. |
|
Copies of solver at various stages after presolve after modifications.
Definition at line 246 of file CglPreProcess.hpp. |
|
Matching presolve information.
Definition at line 248 of file CglPreProcess.hpp. |
|
Message handler.
Definition at line 251 of file CglPreProcess.hpp. |
|
Flag to say if handler_ is the default handler. The default handler is deleted when the model is deleted. Other handlers (supplied by the client) will not be deleted. Definition at line 258 of file CglPreProcess.hpp. |
|
Cgl messages.
Definition at line 261 of file CglPreProcess.hpp. |
|
Pointer to user-defined data structure.
Definition at line 264 of file CglPreProcess.hpp. |
|
Original column numbers.
Definition at line 266 of file CglPreProcess.hpp. |
|
Original row numbers.
Definition at line 268 of file CglPreProcess.hpp. |
|
Number of cut generators.
Definition at line 270 of file CglPreProcess.hpp. |
|
Cut generators.
Definition at line 272 of file CglPreProcess.hpp. |
|
Number of SOS if found.
Definition at line 274 of file CglPreProcess.hpp. |
|
Type of each SOS.
Definition at line 276 of file CglPreProcess.hpp. |
|
Start of each SOS.
Definition at line 278 of file CglPreProcess.hpp. |
|
Columns in SOS.
Definition at line 280 of file CglPreProcess.hpp. |
|
Weights for each SOS column.
Definition at line 282 of file CglPreProcess.hpp. |