Clp 1.17.6

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OsiPresolve.hpp
Go to the documentation of this file.
1 // Copyright (C) 2003, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 // This code is licensed under the terms of the Eclipse Public License (EPL).
4
5 #ifndef OsiPresolve_H
6 #define OsiPresolve_H
7 #include "OsiSolverInterface.hpp"
8
9 class CoinPresolveAction;
10 #include "CoinPresolveMatrix.hpp"
11
59 class OsiPresolve {
60 public:
62 OsiPresolve();
63
65 virtual ~OsiPresolve();
66
87 virtual OsiSolverInterface *presolvedModel(OsiSolverInterface &origModel,
88 double feasibilityTolerance = 0.0,
89 bool keepIntegers = true,
90 int numberPasses = 5,
91 const char *prohibited = NULL,
92 bool doStatus = true,
93 const char *rowProhibited = NULL);
94
112 virtual void postsolve(bool updateStatus = true);
113
115 OsiSolverInterface *model() const;
116
118 OsiSolverInterface *originalModel() const;
119
121 void setOriginalModel(OsiSolverInterface *model);
122
124 const int *originalColumns() const;
125
127 const int *originalRows() const;
128
130 inline int getNumRows() const
131 {
132 return nrows_;
133 }
134
136 inline int getNumCols() const
137 {
138 return ncols_;
139 }
140
145 inline void setNonLinearValue(double value)
146 {
147 nonLinearValue_ = value;
148 }
149 inline double nonLinearValue() const
150 {
151 return nonLinearValue_;
152 }
171 inline void setPresolveActions(int action)
172 {
173 presolveActions_ = (presolveActions_ & 0xffff0000) | (action & 0xffff);
174 }
176 inline OsiSolverInterface *presolvedModel() const
177 {
178 return presolvedModel_;
179 }
181 inline void setPresolvedModel(OsiSolverInterface *presolvedModel)
182 {
183 presolvedModel_ = presolvedModel;
184 }
185
186 private:
191 OsiSolverInterface *originalModel_;
192
197 OsiSolverInterface *presolvedModel_;
198
204 double nonLinearValue_;
205
207 int *originalColumn_;
208
210 int *originalRow_;
211
213 const CoinPresolveAction *paction_;
214
221 int ncols_;
222
224 int nrows_;
225
227 CoinBigIndex nelems_;
228
234 int presolveActions_;
236 int numberPasses_;
237
238 protected:
247 virtual const CoinPresolveAction *presolve(CoinPresolveMatrix *prob);
248
259 virtual void postsolve(CoinPostsolveMatrix &prob);
260
267 void gutsOfDestroy();
268 };
269 #endif
270
271 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
272 */
OsiPresolve::numberPasses_
int numberPasses_
Number of major passes.
Definition: OsiPresolve.hpp:236
OsiPresolve::nrows_
int nrows_
Number of rows in original model.
Definition: OsiPresolve.hpp:224
OsiPresolve::ncols_
int ncols_
Number of columns in original model.
Definition: OsiPresolve.hpp:221
OsiPresolve::originalRows
const int * originalRows() const
Return a pointer to the original rows.
OsiPresolve::model
OsiSolverInterface * model() const
Return a pointer to the presolved model.
OsiPresolve::postsolve
virtual void postsolve(bool updateStatus=true)
Restate the solution to the presolved problem in terms of the original problem and load it into the o...
OsiPresolve::nonLinearValue
double nonLinearValue() const
Definition: OsiPresolve.hpp:149
CoinPresolveAction
Abstract base class of all presolve routines.
Definition: CoinPresolveMatrix.hpp:163
OsiPresolve::setOriginalModel
void setOriginalModel(OsiSolverInterface *model)
Set the pointer to the original model.
OsiPresolve::presolvedModel_
OsiSolverInterface * presolvedModel_
Presolved model (solver interface loaded with the presolved problem)
Definition: OsiPresolve.hpp:197
OsiSolverInterface
Abstract Base Class for describing an interface to a solver.
Definition: OsiSolverInterface.hpp:61
CoinPresolveMatrix.hpp
Declarations for CoinPresolveMatrix and CoinPostsolveMatrix and their common base class CoinPrePostso...
OsiPresolve::setPresolvedModel
void setPresolvedModel(OsiSolverInterface *presolvedModel)
Set presolved model.
Definition: OsiPresolve.hpp:181
OsiPresolve::setNonLinearValue
void setNonLinearValue(double value)
&quot;Magic&quot; number.
Definition: OsiPresolve.hpp:145
OsiPresolve::setPresolveActions
void setPresolveActions(int action)
Fine control over presolve actions.
Definition: OsiPresolve.hpp:171
CoinPostsolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during postsol...
Definition: CoinPresolveMatrix.hpp:1552
OsiPresolve::presolvedModel
OsiSolverInterface * presolvedModel() const
Get presolved model.
Definition: OsiPresolve.hpp:176
OsiPresolve::getNumCols
int getNumCols() const
Return number of columns in original model.
Definition: OsiPresolve.hpp:136
OsiPresolve::~OsiPresolve
virtual ~OsiPresolve()
Virtual destructor.
OsiPresolve::nonLinearValue_
double nonLinearValue_
&quot;Magic&quot; number.
Definition: OsiPresolve.hpp:204
OsiPresolve::nelems_
CoinBigIndex nelems_
Number of nonzero matrix coefficients in the original model.
Definition: OsiPresolve.hpp:227
CoinPresolveMatrix
Augments CoinPrePostsolveMatrix with information about the problem that is only needed during presolv...
Definition: CoinPresolveMatrix.hpp:905
OsiPresolve
OSI interface to COIN problem simplification capabilities.
Definition: OsiPresolve.hpp:59
OsiPresolve::originalRow_
int * originalRow_
Original row numbers.
Definition: OsiPresolve.hpp:210
OsiPresolve::gutsOfDestroy
void gutsOfDestroy()
Destroys queued postsolve actions.
OsiPresolve::paction_
const CoinPresolveAction * paction_
The list of transformations applied.
Definition: OsiPresolve.hpp:213
OsiPresolve::presolve
virtual const CoinPresolveAction * presolve(CoinPresolveMatrix *prob)
Apply presolve transformations to the problem.
OsiSolverInterface.hpp
OsiPresolve::originalModel_
OsiSolverInterface * originalModel_
Original model (solver interface loaded with the original problem).
Definition: OsiPresolve.hpp:191
OsiPresolve::originalModel
OsiSolverInterface * originalModel() const
Return a pointer to the original model.
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
OsiPresolve::presolveActions_
int presolveActions_
Whether we want to skip dual part of presolve etc.
Definition: OsiPresolve.hpp:234
OsiPresolve::OsiPresolve
OsiPresolve()
Default constructor (empty object)
OsiPresolve::originalColumns
const int * originalColumns() const
Return a pointer to the original columns.
OsiPresolve::originalColumn_
int * originalColumn_
Original column numbers.
Definition: OsiPresolve.hpp:207
OsiPresolve::getNumRows
int getNumRows() const
Return number of rows in original model.
Definition: OsiPresolve.hpp:130