00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ClpSimplexDual_H
00011 #define ClpSimplexDual_H
00012
00013 #include "ClpSimplex.hpp"
00014
00022 class ClpSimplexDual : public ClpSimplex {
00023
00024 public:
00025
00117 int dual(int ifValuesPass,int startFinishOptions=0);
00126 int strongBranching(int numberVariables,const int * variables,
00127 double * newLower, double * newUpper,
00128 double ** outputSolution,
00129 int * outputStatus, int * outputIterations,
00130 bool stopOnFirstInfeasible=true,
00131 bool alwaysFinish=false,
00132 int startFinishOptions=0);
00134 ClpFactorization * setupForStrongBranching(char * arrays, int numberRows,
00135 int numberColumns,bool solveLp=false);
00137 void cleanupAfterStrongBranching(ClpFactorization * factorization);
00139
00155 int whileIterating(double * & givenPi,int ifValuesPass);
00163 int updateDualsInDual(CoinIndexedVector * rowArray,
00164 CoinIndexedVector * columnArray,
00165 CoinIndexedVector * outputArray,
00166 double theta,
00167 double & objectiveChange,
00168 bool fullRecompute);
00172 void updateDualsInValuesPass(CoinIndexedVector * rowArray,
00173 CoinIndexedVector * columnArray,
00174 double theta);
00179 void flipBounds(CoinIndexedVector * rowArray,
00180 CoinIndexedVector * columnArray,
00181 double change);
00193 double dualColumn(CoinIndexedVector * rowArray,
00194 CoinIndexedVector * columnArray,
00195 CoinIndexedVector * spareArray,
00196 CoinIndexedVector * spareArray2,
00197 double accpetablePivot,
00198 CoinBigIndex * dubiousWeights);
00200 int dualColumn0(const CoinIndexedVector * rowArray,
00201 const CoinIndexedVector * columnArray,
00202 CoinIndexedVector * spareArray,
00203 double acceptablePivot,
00204 double & upperReturn, double &bestReturn,double & badFree);
00211 void checkPossibleValuesMove(CoinIndexedVector * rowArray,
00212 CoinIndexedVector * columnArray,
00213 double acceptablePivot);
00220 void checkPossibleCleanup(CoinIndexedVector * rowArray,
00221 CoinIndexedVector * columnArray,
00222 double acceptablePivot);
00227 void doEasyOnesInValuesPass(double * givenReducedCosts);
00237 void dualRow(int alreadyChosen);
00247 int changeBounds(int initialize,CoinIndexedVector * outputArray,
00248 double & changeCost);
00251 bool changeBound( int iSequence);
00253 void originalBound(int iSequence);
00256 int checkUnbounded(CoinIndexedVector * ray,CoinIndexedVector * spare,
00257 double changeCost);
00267 void statusOfProblemInDual(int & lastCleaned, int type,
00268 double * givenDjs, ClpDataSave & saveData,
00269 int ifValuesPass);
00272 int perturb();
00278 int fastDual(bool alwaysFinish=false);
00281 int numberAtFakeBound();
00282
00288 int pivotResult();
00290 int nextSuperBasic();
00293 int startupSolve(int ifValuesPass,double * saveDuals,int startFinishOptions);
00294 void finishSolve(int startFinishOptions);
00295 void gutsOfDual(int ifValuesPass,double * & saveDuals,int initialStatus,
00296 ClpDataSave & saveData);
00297
00298 void resetFakeBounds(int type);
00299
00301 };
00302 #endif