00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef ClpSimplexOther_H
00012 #define ClpSimplexOther_H
00013
00014 #include "ClpSimplex.hpp"
00015
00023 class ClpSimplexOther : public ClpSimplex {
00024
00025 public:
00026
00049 void dualRanging(int numberCheck, const int * which,
00050 double * costIncrease, int * sequenceIncrease,
00051 double * costDecrease, int * sequenceDecrease,
00052 double * valueIncrease = NULL, double * valueDecrease = NULL);
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);
00090 int parametrics(const char * dataFile);
00091
00092 private:
00101 int parametricsLoop(double startingTheta, double & endingTheta, double reportIncrement,
00102 const double * changeLower, const double * changeUpper,
00103 const double * changeObjective, ClpDataSave & data,
00104 bool canTryQuick);
00112 void statusOfProblemInParametrics(int type, ClpDataSave & saveData);
00123 int whileIterating(double startingTheta, double & endingTheta, double reportIncrement,
00124 const double * changeLower, const double * changeUpper,
00125 const double * changeObjective);
00130 int nextTheta(int type, double maxTheta, double * primalChange, double * dualChange,
00131 const double * changeLower, const double * changeUpper,
00132 const double * changeObjective);
00138 void checkDualRatios(CoinIndexedVector * rowArray,
00139 CoinIndexedVector * columnArray,
00140 double & costIncrease, int & sequenceIncrease, double & alphaIncrease,
00141 double & costDecrease, int & sequenceDecrease, double & alphaDecrease);
00146 void checkPrimalRatios(CoinIndexedVector * rowArray,
00147 int direction);
00149 double primalRanging1(int whichIn, int whichOther);
00150
00151 public:
00166 int writeBasis(const char *filename,
00167 bool writeValues = false,
00168 int formatType = 0) const;
00170 int readBasis(const char *filename);
00176 ClpSimplex * dualOfModel(double fractionRowRanges = 1.0, double fractionColumnRanges = 1.0) const;
00180 int restoreFromDual(const ClpSimplex * dualProblem);
00184 ClpSimplex * crunch(double * rhs, int * whichRows, int * whichColumns,
00185 int & nBound, bool moreBounds = false, bool tightenBounds = false);
00189 void afterCrunch(const ClpSimplex & small,
00190 const int * whichRows, const int * whichColumns,
00191 int nBound);
00195 ClpSimplex * gubVersion(int * whichRows, int * whichColumns,
00196 int neededGub,
00197 int factorizationFrequency=50);
00199 void setGubBasis(ClpSimplex &original,const int * whichRows,
00200 const int * whichColumns);
00202 void getGubBasis(ClpSimplex &original,const int * whichRows,
00203 const int * whichColumns) const;
00205 void cleanupAfterPostsolve();
00208 int tightenIntegerBounds(double * rhsSpace);
00219 int expandKnapsack(int knapsackRow, int & numberOutput,
00220 double * buildObj, CoinBigIndex * buildStart,
00221 int * buildRow, double * buildElement, int reConstruct = -1) const;
00223 };
00224 #endif