11#ifndef ClpSimplexDual_H
12#define ClpSimplexDual_H
117 int dual(
int ifValuesPass,
int startFinishOptions = 0);
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);
165 CoinIndexedVector *outputArray,
167 double &objectiveChange,
193 CoinIndexedVector *spareArray,
194 CoinIndexedVector *spareArray2,
195 double accpetablePivot,
196 CoinBigIndex *dubiousWeights);
200 CoinIndexedVector *spareArray,
201 double acceptablePivot,
202 double &upperReturn,
double &badFree);
211 double acceptablePivot);
220 double acceptablePivot);
292 int startupSolve(
int ifValuesPass,
double *saveDuals,
int startFinishOptions);
294 void gutsOfDual(
int ifValuesPass,
double *&saveDuals,
int initialStatus,
This is a tiny class where data can be saved round calls.
This just implements CoinFactorization when an ClpMatrixBase object is passed.
double * ray() const
For advanced users - no need to delete - sign not changed.
int numberColumns() const
int numberRows() const
Number of rows.
This solves LPs using the dual simplex method.
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.
void dualRow(int alreadyChosen)
Chooses dual pivot row Would be faster with separate region to scan and will have this (with square o...
void originalBound(int iSequence)
Restores bound to original bound.
void doEasyOnesInValuesPass(double *givenReducedCosts)
This sees if we can move duals in dual values pass.
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.
void finishSolve(int startFinishOptions)
void flipBounds(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray)
While updateDualsInDual sees what effect is of flip this does actual flipping.
int pivotResultPart1()
Pivot in a variable and choose an outgoing one.
void cleanupAfterStrongBranching(ClpFactorization *factorization)
This cleans up after strong branching.
int whileIterating(double *&givenPi, int ifValuesPass)
This has the flow between re-factorizations Broken out for clarity and will be used by strong branchi...
int perturb()
Perturbs problem (method depends on perturbation()) returns nonzero if should go to dual.
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.
void gutsOfDual(int ifValuesPass, double *&saveDuals, int initialStatus, ClpDataSave &saveData)
void resetFakeBounds(int type)
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.
void checkPossibleCleanup(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double acceptablePivot)
Row array has row part of pivot row Column array has column part.
ClpFactorization * setupForStrongBranching(char *arrays, int numberRows, int numberColumns, bool solveLp=false)
This does first part of StrongBranching.
int changeBounds(int initialize, CoinIndexedVector *outputArray, double &changeCost)
Checks if any fake bounds active - if so returns number and modifies updatedDualBound_ and everything...
int dual(int ifValuesPass, int startFinishOptions=0)
Dual algorithm.
void checkPossibleValuesMove(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double acceptablePivot)
Row array has row part of pivot row Column array has column part.
int updateDualsInDual(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, CoinIndexedVector *outputArray, double theta, double &objectiveChange, bool fullRecompute)
The duals are updated by the given arrays.
void statusOfProblemInDual(int &lastCleaned, int type, double *givenDjs, ClpDataSave &saveData, int ifValuesPass)
Refactorizes if necessary Checks if finished.
int dualColumn0(const CoinIndexedVector *rowArray, const CoinIndexedVector *columnArray, CoinIndexedVector *spareArray, double acceptablePivot, double &upperReturn, double &badFree)
Does first bit of dualColumn.
bool changeBound(int iSequence)
As changeBounds but just changes new bounds for a single variable.
int fastDual(bool alwaysFinish=false)
Fast iterations.
int numberAtFakeBound()
Checks number of variables at fake bounds.
int nextSuperBasic()
Get next free , -1 if none.
int checkFakeBounds() const
Just checks if any fake bounds active - if so returns number.
void updateDualsInValuesPass(CoinIndexedVector *rowArray, CoinIndexedVector *columnArray, double theta)
The duals are updated by the given arrays.
This solves LPs using the simplex method.
double theta() const
Theta (pivot change)
ClpDataSave saveData()
Save data.
ClpFactorization * factorization() const
factorization
CoinIndexedVector * rowArray(int index) const
Useful row length arrays (0,1,2,3,4,5)
CoinIndexedVector * columnArray(int index) const
Useful column length arrays (0,1,2,3,4,5)