#include <ClpPresolve.hpp>
private or protected data | |
virtual const CoinPresolveAction * | presolve (CoinPresolveMatrix *prob) |
If you want to apply the individual presolve routines differently, or perhaps add your own to the mix, define a derived class and override this method. | |
virtual void | postsolve (CoinPostsolveMatrix &prob) |
Postsolving is pretty generic; just apply the transformations in reverse order. | |
virtual ClpSimplex * | gutsOfPresolvedModel (ClpSimplex *originalModel,double feasibilityTolerance, bool keepIntegers, int numberPasses, bool dropNames) |
This is main part of Presolve. | |
ClpSimplex * | originalModel_ |
Original model - must not be destroyed before postsolve. | |
ClpSimplex * | presolvedModel_ |
ClpPresolved model - up to user to destroy by deleteClpPresolvedModel. | |
double | nonLinearValue_ |
"Magic" number. | |
int * | originalColumn_ |
Original column numbers. | |
int * | originalRow_ |
Original row numbers. | |
const CoinPresolveAction * | paction_ |
The list of transformations applied. | |
int | ncols_ |
The postsolved problem will expand back to its former size as postsolve transformations are applied. | |
int | nrows_ |
If you want to apply the individual presolve routines differently, or perhaps add your own to the mix, define a derived class and override this method. | |
CoinBigIndex | nelems_ |
If you want to apply the individual presolve routines differently, or perhaps add your own to the mix, define a derived class and override this method. | |
int | numberPasses_ |
Number of major passes. | |
std::string | saveFile_ |
Name of saved model file. | |
Public Methods | |
ClpPresolve () | |
Default constructor. | |
virtual | ~ClpPresolve () |
Virtual destructor. | |
presolve - presolves a model, transforming the model | |
and saving information in the ClpPresolve object needed for postsolving.
This underlying (protected) method is virtual; the idea is that in the future, one could override this method to customize how the various presolve techniques are applied.
This version of presolve returns a pointer to a new presolved model. NULL if infeasible or unbounded. This should be paired with postsolve below. The advantage of going back to original model is that it will be exactly as it was i.e. 0.0 will not become 1.0e-19. If keepIntegers is true then bounds may be tightened in original. Bounds will be moved by up to feasibilityTolerance to try and stay feasible. Names will be dropped in presolved model if asked | |
ClpSimplex * | presolvedModel (ClpSimplex &si, double feasibilityTolerance=0.0, bool keepIntegers=true, int numberPasses=5, bool dropNames=false) |
int | presolvedModelToFile (ClpSimplex &si, std::string fileName, double feasibilityTolerance=0.0, bool keepIntegers=true, int numberPasses=5) |
This version saves data in a file. | |
ClpSimplex * | model () const |
Return pointer to presolved model, Up to user to destroy. | |
ClpSimplex * | originalModel () const |
Return pointer to original model. | |
void | setOriginalModel (ClpSimplex *model) |
Set pointer to original model. | |
const int * | originalColumns () const |
return pointer to original columns | |
const int * | originalRows () const |
return pointer to original rows | |
void | setNonLinearValue (double value) |
"Magic" number. | |
double | nonLinearValue () const |
postsolve - postsolve the problem. If the problem | |
has not been solved to optimality, there are no guarantees.
If you are using an algorithm like simplex that has a concept of "basic" rows/cols, then set updateStatus
Note that if you modified the original problem after presolving, then you must ``undo'' these modifications before calling postsolve. This version updates original | |
virtual void | postsolve (bool updateStatus=true) |
void | destroyPresolve () |
Gets rid of presolve actions (e.g.when infeasible). |
|
Default constructor.
|
|
Virtual destructor.
|
|
|
|
This version saves data in a file. The passed in model is updated to be presolved model. names are always dropped. Returns non-zero if infeasible |
|
Return pointer to presolved model, Up to user to destroy.
|
|
Return pointer to original model.
|
|
Set pointer to original model.
|
|
return pointer to original columns
|
|
return pointer to original rows
|
|
"Magic" number. If this is non-zero then any elements with this value may change and so presolve is very limited in what can be done to the row and column. This is for non-linear problems. Definition at line 62 of file ClpPresolve.hpp. References nonLinearValue_. |
|
Definition at line 64 of file ClpPresolve.hpp. References nonLinearValue_. |
|
|
|
Gets rid of presolve actions (e.g.when infeasible).
|
|
If you want to apply the individual presolve routines differently, or perhaps add your own to the mix, define a derived class and override this method.
|
|
Postsolving is pretty generic; just apply the transformations in reverse order. You will probably only be interested in overriding this method if you want to add code to test for consistency while debugging new presolve techniques. |
|
This is main part of Presolve.
|
|
Original model - must not be destroyed before postsolve.
Definition at line 83 of file ClpPresolve.hpp. |
|
ClpPresolved model - up to user to destroy by deleteClpPresolvedModel.
Definition at line 86 of file ClpPresolve.hpp. |
|
"Magic" number. If this is non-zero then any elements with this value may change and so presolve is very limited in what can be done to the row and column. This is for non-linear problems. One could also allow for cases where sign of coefficient is known. Definition at line 92 of file ClpPresolve.hpp. Referenced by nonLinearValue(), and setNonLinearValue(). |
|
Original column numbers.
Definition at line 94 of file ClpPresolve.hpp. |
|
Original row numbers.
Definition at line 96 of file ClpPresolve.hpp. |
|
The list of transformations applied.
Definition at line 98 of file ClpPresolve.hpp. |
|
The postsolved problem will expand back to its former size as postsolve transformations are applied. It is efficient to allocate data structures for the final size of the problem rather than expand them as needed. These fields give the size of the original problem. Definition at line 105 of file ClpPresolve.hpp. |
|
If you want to apply the individual presolve routines differently, or perhaps add your own to the mix, define a derived class and override this method.
Definition at line 106 of file ClpPresolve.hpp. |
|
If you want to apply the individual presolve routines differently, or perhaps add your own to the mix, define a derived class and override this method.
Definition at line 107 of file ClpPresolve.hpp. |
|
Number of major passes.
Definition at line 109 of file ClpPresolve.hpp. |
|
Name of saved model file.
Definition at line 111 of file ClpPresolve.hpp. |