ClpSimplexOther.hpp

Go to the documentation of this file.
00001 /* $Id: ClpSimplexOther.hpp 2070 2014-11-18 11:12:54Z forrest $ */
00002 // Copyright (C) 2004, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
00005 /*
00006    Authors
00007 
00008    John Forrest
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);
00100      int parametrics(double startingTheta, double & endingTheta, 
00101                      const double * changeLowerBound, const double * changeUpperBound,
00102                      const double * changeLowerRhs, const double * changeUpperRhs);
00103      int parametricsObj(double startingTheta, double & endingTheta, 
00104                         const double * changeObjective);
00106     double bestPivot(bool justColumns=false);
00107   typedef struct {
00108     double startingTheta;
00109     double endingTheta;
00110     double maxTheta;
00111     double acceptableMaxTheta; // if this far then within tolerances
00112     double * lowerChange; // full array of lower bound changes
00113     int * lowerList; // list of lower bound changes
00114     double * upperChange; // full array of upper bound changes
00115     int * upperList; // list of upper bound changes
00116     char * markDone; // mark which ones looked at
00117     int * backwardBasic; // from sequence to pivot row
00118     int * lowerActive;
00119     double * lowerGap;
00120     double * lowerCoefficient;
00121     int * upperActive;
00122     double * upperGap;
00123     double * upperCoefficient;
00124     int unscaledChangesOffset; 
00125     bool firstIteration; // so can update rhs for accuracy
00126   } parametricsData;
00127 
00128 private:
00137      int parametricsLoop(parametricsData & paramData, double reportIncrement,
00138                          const double * changeLower, const double * changeUpper,
00139                          const double * changeObjective, ClpDataSave & data,
00140                          bool canTryQuick);
00141      int parametricsLoop(parametricsData & paramData,
00142                          ClpDataSave & data,bool canSkipFactorization=false);
00143      int parametricsObjLoop(parametricsData & paramData,
00144                          ClpDataSave & data,bool canSkipFactorization=false);
00152      void statusOfProblemInParametrics(int type, ClpDataSave & saveData);
00153      void statusOfProblemInParametricsObj(int type, ClpDataSave & saveData);
00164      int whileIterating(parametricsData & paramData, double reportIncrement,
00165                         const double * changeObjective);
00170      int nextTheta(int type, double maxTheta, parametricsData & paramData,
00171                    const double * changeObjective);
00172      int whileIteratingObj(parametricsData & paramData);
00173      int nextThetaObj(double maxTheta, parametricsData & paramData);
00175      void originalBound(int iSequence, double theta, const double * changeLower,
00176                      const double * changeUpper);
00178      double computeRhsEtc(parametricsData & paramData);
00180      void redoInternalArrays();
00186      void checkDualRatios(CoinIndexedVector * rowArray,
00187                           CoinIndexedVector * columnArray,
00188                           double & costIncrease, int & sequenceIncrease, double & alphaIncrease,
00189                           double & costDecrease, int & sequenceDecrease, double & alphaDecrease);
00194      void checkPrimalRatios(CoinIndexedVector * rowArray,
00195                             int direction);
00197      double primalRanging1(int whichIn, int whichOther);
00198 
00199 public:
00214      int writeBasis(const char *filename,
00215                     bool writeValues = false,
00216                     int formatType = 0) const;
00218      int readBasis(const char *filename);
00224      ClpSimplex * dualOfModel(double fractionRowRanges = 1.0, double fractionColumnRanges = 1.0) const;
00228      int restoreFromDual(const ClpSimplex * dualProblem,
00229                          bool checkAccuracy=false);
00233      int setInDual(ClpSimplex * dualProblem);
00237      ClpSimplex * crunch(double * rhs, int * whichRows, int * whichColumns,
00238                          int & nBound, bool moreBounds = false, bool tightenBounds = false);
00242      void afterCrunch(const ClpSimplex & small,
00243                       const int * whichRows, const int * whichColumns,
00244                       int nBound);
00248      ClpSimplex * gubVersion(int * whichRows, int * whichColumns,
00249                              int neededGub,
00250                              int factorizationFrequency=50);
00252      void setGubBasis(ClpSimplex &original,const int * whichRows,
00253                       const int * whichColumns);
00255      void getGubBasis(ClpSimplex &original,const int * whichRows,
00256                       const int * whichColumns) const;
00258      void cleanupAfterPostsolve();
00261      int tightenIntegerBounds(double * rhsSpace);
00272      int expandKnapsack(int knapsackRow, int & numberOutput,
00273                         double * buildObj, CoinBigIndex * buildStart,
00274                         int * buildRow, double * buildElement, int reConstruct = -1) const;
00276 };
00277 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Mar 2015 for Clp by  doxygen 1.6.1