00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ClpSimplexOther_H
00011 #define ClpSimplexOther_H
00012
00013 #include "ClpSimplex.hpp"
00014
00022 class ClpSimplexOther : public ClpSimplex {
00023
00024 public:
00025
00048 void dualRanging(int numberCheck,const int * which,
00049 double * costIncrease, int * sequenceIncrease,
00050 double * costDecrease, int * sequenceDecrease,
00051 double * valueIncrease=NULL, double * valueDecrease=NULL);
00052
00067 void primalRanging(int numberCheck,const int * which,
00068 double * valueIncrease, int * sequenceIncrease,
00069 double * valueDecrease, int * sequenceDecrease);
00083 int parametrics(double startingTheta, double & endingTheta,double reportIncrement,
00084 const double * changeLowerBound, const double * changeUpperBound,
00085 const double * changeLowerRhs, const double * changeUpperRhs,
00086 const double * changeObjective);
00087 private:
00096 int parametricsLoop(double startingTheta, double & endingTheta,double reportIncrement,
00097 const double * changeLower, const double * changeUpper,
00098 const double * changeObjective, ClpDataSave & data,
00099 bool canTryQuick);
00107 void statusOfProblemInParametrics(int type,ClpDataSave & saveData);
00118 int whileIterating(double startingTheta, double & endingTheta,double reportIncrement,
00119 const double * changeLower, const double * changeUpper,
00120 const double * changeObjective);
00125 int nextTheta(int type, double maxTheta, double * primalChange, double * dualChange,
00126 const double * changeLower, const double * changeUpper,
00127 const double * changeObjective);
00133 void checkDualRatios(CoinIndexedVector * rowArray,
00134 CoinIndexedVector * columnArray,
00135 double & costIncrease, int & sequenceIncrease, double & alphaIncrease,
00136 double & costDecrease, int & sequenceDecrease, double & alphaDecrease);
00141 void checkPrimalRatios(CoinIndexedVector * rowArray,
00142 int direction);
00144 double primalRanging1(int whichIn, int whichOther);
00145
00146 public:
00161 int writeBasis(const char *filename,
00162 bool writeValues=false,
00163 int formatType=0) const;
00165 int readBasis(const char *filename);
00167 ClpSimplex * dualOfModel() const;
00169 void restoreFromDual(const ClpSimplex * dualProblem);
00173 ClpSimplex * crunch(double * rhs, int * whichRows, int * whichColumns,
00174 int & nBound, bool moreBounds=false, bool tightenBounds=false);
00178 void afterCrunch(const ClpSimplex & small,
00179 const int * whichRows, const int * whichColumns,
00180 int nBound);
00183 int tightenIntegerBounds(double * rhsSpace);
00185 };
00186 #endif