Cgl 0.60.2

- 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
ClpSimplexDual.hpp
Go to the documentation of this file.
1 /* $Id: ClpSimplexDual.hpp 2385 2019-01-06 19:43:06Z unxusr $ */
2 // Copyright (C) 2002, International Business Machines
3 // Corporation and others. All Rights Reserved.
4 // This code is licensed under the terms of the Eclipse Public License (EPL).
5 /*
6 Authors
7
8 John Forrest
9
10 */
11 #ifndef ClpSimplexDual_H
12 #define ClpSimplexDual_H
13
14 #include "ClpSimplex.hpp"
15
23 class ClpSimplexDual : public ClpSimplex {
24
25 public:
117 int dual(int ifValuesPass, int startFinishOptions = 0);
126 int strongBranching(int numberVariables, const int *variables,
127 double *newLower, double *newUpper,
128 double **outputSolution,
129 int *outputStatus, int *outputIterations,
130 bool stopOnFirstInfeasible = true,
131 bool alwaysFinish = false,
132 int startFinishOptions = 0);
134 ClpFactorization *setupForStrongBranching(char *arrays, int numberRows,
135 int numberColumns, bool solveLp = false);
137 void cleanupAfterStrongBranching(ClpFactorization *factorization);
139
155 int whileIterating(double *&givenPi, int ifValuesPass);
163 int updateDualsInDual(CoinIndexedVector *rowArray,
164 CoinIndexedVector *columnArray,
165 CoinIndexedVector *outputArray,
166 double theta,
167 double &objectiveChange,
168 bool fullRecompute);
172 void updateDualsInValuesPass(CoinIndexedVector *rowArray,
173 CoinIndexedVector *columnArray,
174 double theta);
178 void flipBounds(CoinIndexedVector *rowArray,
179 CoinIndexedVector *columnArray);
191 double dualColumn(CoinIndexedVector *rowArray,
192 CoinIndexedVector *columnArray,
193 CoinIndexedVector *spareArray,
194 CoinIndexedVector *spareArray2,
195 double accpetablePivot,
196 CoinBigIndex *dubiousWeights);
198 int dualColumn0(const CoinIndexedVector *rowArray,
199 const CoinIndexedVector *columnArray,
200 CoinIndexedVector *spareArray,
201 double acceptablePivot,
202 double &upperReturn, double &badFree);
209 void checkPossibleValuesMove(CoinIndexedVector *rowArray,
210 CoinIndexedVector *columnArray,
211 double acceptablePivot);
218 void checkPossibleCleanup(CoinIndexedVector *rowArray,
219 CoinIndexedVector *columnArray,
220 double acceptablePivot);
225 void doEasyOnesInValuesPass(double *givenReducedCosts);
235 void dualRow(int alreadyChosen);
245 int changeBounds(int initialize, CoinIndexedVector *outputArray,
246 double &changeCost);
248 int checkFakeBounds() const;
251 bool changeBound(int iSequence);
253 void originalBound(int iSequence);
256 int checkUnbounded(CoinIndexedVector *ray, CoinIndexedVector *spare,
257 double changeCost);
267 void statusOfProblemInDual(int &lastCleaned, int type,
268 double *givenDjs, ClpDataSave &saveData,
269 int ifValuesPass);
272 int perturb();
278 int fastDual(bool alwaysFinish = false);
281 int numberAtFakeBound();
282
287 int pivotResultPart1();
289 int nextSuperBasic();
292 int startupSolve(int ifValuesPass, double *saveDuals, int startFinishOptions);
293 void finishSolve(int startFinishOptions);
294 void gutsOfDual(int ifValuesPass, double *&saveDuals, int initialStatus,
295 ClpDataSave &saveData);
296 //int dual2(int ifValuesPass,int startFinishOptions=0);
297 void resetFakeBounds(int type);
298
300 };
301 #endif
302
303 /* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
304 */
ClpModel::ray
double * ray() const
For advanced users - no need to delete - sign not changed.
Definition: ClpModel.hpp:859
ClpSimplexDual::numberAtFakeBound
int numberAtFakeBound()
Checks number of variables at fake bounds.
ClpSimplexDual::checkUnbounded
int checkUnbounded(CoinIndexedVector *ray, CoinIndexedVector *spare, double changeCost)
Checks if tentative optimal actually means unbounded in dual Returns -3 if not, 2 if is unbounded...
ClpSimplexDual::fastDual
int fastDual(bool alwaysFinish=false)
Fast iterations.
ClpSimplex.hpp
ClpSimplexDual::startupSolve
int startupSolve(int ifValuesPass, double *saveDuals, int startFinishOptions)
Startup part of dual (may be extended to other algorithms) returns 0 if good, 1 if bad...
ClpSimplexDual::setupForStrongBranching
ClpFactorization * setupForStrongBranching(char *arrays, int numberRows, int numberColumns, bool solveLp=false)
This does first part of StrongBranching.
ClpSimplexDual::changeBound
bool changeBound(int iSequence)
As changeBounds but just changes new bounds for a single variable.
ClpSimplex::theta
double theta() const
Theta (pivot change)
Definition: ClpSimplex.hpp:1365
ClpSimplexDual::changeBounds
int changeBounds(int initialize, CoinIndexedVector *outputArray, double &changeCost)
Checks if any fake bounds active - if so returns number and modifies updatedDualBound_ and everything...
ClpSimplexDual::gutsOfDual
void gutsOfDual(int ifValuesPass, double *&saveDuals, int initialStatus, ClpDataSave &saveData)
ClpSimplexDual::statusOfProblemInDual
void statusOfProblemInDual(int &lastCleaned, int type, double *givenDjs, ClpDataSave &saveData, int ifValuesPass)
Refactorizes if necessary Checks if finished.
ClpSimplexDual::cleanupAfterStrongBranching
void cleanupAfterStrongBranching(ClpFactorization *factorization)
This cleans up after strong branching.
ClpFactorization
This just implements CoinFactorization when an ClpMatrixBase object is passed.
Definition: ClpFactorization.hpp:34
ClpSimplexDual::checkPossibleCleanup
void checkPossibleCleanup(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double acceptablePivot)
Row array has row part of pivot row Column array has column part.
ClpSimplexDual::pivotResultPart1
int pivotResultPart1()
Pivot in a variable and choose an outgoing one.
ClpModel::numberColumns
int numberColumns() const
Definition: ClpModel.hpp:328
ClpSimplexDual::dualRow
void dualRow(int alreadyChosen)
Chooses dual pivot row Would be faster with separate region to scan and will have this (with square o...
ClpSimplexDual::strongBranching
int strongBranching(int numberVariables, const int *variables, double *newLower, double *newUpper, double **outputSolution, int *outputStatus, int *outputIterations, bool stopOnFirstInfeasible=true, bool alwaysFinish=false, int startFinishOptions=0)
For strong branching.
ClpSimplexDual::dualColumn
double dualColumn(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, CoinIndexedVector *spareArray, CoinIndexedVector *spareArray2, double accpetablePivot, CoinBigIndex *dubiousWeights)
Row array has row part of pivot row Column array has column part.
ClpSimplexDual::perturb
int perturb()
Perturbs problem (method depends on perturbation()) returns nonzero if should go to dual...
ClpSimplexDual::dual
int dual(int ifValuesPass, int startFinishOptions=0)
Dual algorithm.
ClpSimplex
This solves LPs using the simplex method.
Definition: ClpSimplex.hpp:106
ClpSimplexDual::updateDualsInDual
int updateDualsInDual(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, CoinIndexedVector *outputArray, double theta, double &objectiveChange, bool fullRecompute)
The duals are updated by the given arrays.
CoinIndexedVector
Indexed Vector.
Definition: CoinIndexedVector.hpp:104
ClpSimplexDual::checkPossibleValuesMove
void checkPossibleValuesMove(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double acceptablePivot)
Row array has row part of pivot row Column array has column part.
ClpSimplexDual::doEasyOnesInValuesPass
void doEasyOnesInValuesPass(double *givenReducedCosts)
This sees if we can move duals in dual values pass.
ClpSimplexDual::finishSolve
void finishSolve(int startFinishOptions)
ClpSimplexDual::flipBounds
void flipBounds(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray)
While updateDualsInDual sees what effect is of flip this does actual flipping.
ClpDataSave
This is a tiny class where data can be saved round calls.
Definition: ClpModel.hpp:1397
ClpSimplex::columnArray
CoinIndexedVector * columnArray(int index) const
Useful column length arrays (0,1,2,3,4,5)
Definition: ClpSimplex.hpp:820
ClpSimplexDual::dualColumn0
int dualColumn0(const CoinIndexedVector *rowArray, const CoinIndexedVector *columnArray, CoinIndexedVector *spareArray, double acceptablePivot, double &upperReturn, double &badFree)
Does first bit of dualColumn.
ClpSimplexDual::originalBound
void originalBound(int iSequence)
Restores bound to original bound.
ClpSimplexDual::resetFakeBounds
void resetFakeBounds(int type)
ClpSimplexDual::checkFakeBounds
int checkFakeBounds() const
Just checks if any fake bounds active - if so returns number.
ClpModel::numberRows
int numberRows() const
Number of rows.
Definition: ClpModel.hpp:315
CoinBigIndex
int CoinBigIndex
Definition: Coin_C_defines.h:136
ClpSimplexDual::updateDualsInValuesPass
void updateDualsInValuesPass(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double theta)
The duals are updated by the given arrays.
ClpSimplex::factorization
ClpFactorization * factorization() const
factorization
Definition: ClpSimplex.hpp:676
ClpSimplexDual::nextSuperBasic
int nextSuperBasic()
Get next free , -1 if none.
ClpSimplex::rowArray
CoinIndexedVector * rowArray(int index) const
Useful row length arrays (0,1,2,3,4,5)
Definition: ClpSimplex.hpp:815
ClpSimplex::saveData
ClpDataSave saveData()
Save data.
ClpSimplexDual
This solves LPs using the dual simplex method.
Definition: ClpSimplexDual.hpp:23
ClpSimplexDual::whileIterating
int whileIterating(double *&givenPi, int ifValuesPass)
This has the flow between re-factorizations Broken out for clarity and will be used by strong branchi...