/home/coin/SVN-release/Bcp-1.2.1/Clp/src/ClpSimplex.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2002, International Business Machines
00002 // Corporation and others.  All Rights Reserved.
00003 
00004 /* 
00005    Authors
00006  
00007    John Forrest
00008 
00009  */
00010 #ifndef ClpSimplex_H
00011 #define ClpSimplex_H
00012 
00013 #include <iostream>
00014 #include <cfloat>
00015 #include "ClpModel.hpp"
00016 #include "ClpMatrixBase.hpp"
00017 #include "ClpSolve.hpp"
00018 class ClpDualRowPivot;
00019 class ClpPrimalColumnPivot;
00020 class ClpFactorization;
00021 class CoinIndexedVector;
00022 class ClpNonLinearCost;
00023 class ClpNodeStuff;
00024 class CoinModel;
00025 class OsiClpSolverInterface;
00026 class CoinWarmStartBasis;
00027 class ClpDisasterHandler;
00028 class ClpConstraint;
00029 
00048 class ClpSimplex : public ClpModel {
00049   friend void ClpSimplexUnitTest(const std::string & mpsDir);
00050 
00051 public:
00056   enum Status {
00057     isFree = 0x00,
00058     basic = 0x01,
00059     atUpperBound = 0x02,
00060     atLowerBound = 0x03,
00061     superBasic = 0x04,
00062     isFixed = 0x05
00063   };
00064   // For Dual
00065   enum FakeBound {
00066     noFake = 0x00,
00067     bothFake = 0x01,
00068     upperFake = 0x02,
00069     lowerFake = 0x03
00070   };
00071 
00074 
00075     ClpSimplex (bool emptyMessages = false  );
00076 
00081   ClpSimplex(const ClpSimplex & rhs, int scalingMode =-1);
00086   ClpSimplex(const ClpModel & rhs, int scalingMode=-1);
00093   ClpSimplex (const ClpModel * wholeModel,
00094               int numberRows, const int * whichRows,
00095               int numberColumns, const int * whichColumns,
00096               bool dropNames=true, bool dropIntegers=true,
00097               bool fixOthers=false);
00104   ClpSimplex (const ClpSimplex * wholeModel,
00105               int numberRows, const int * whichRows,
00106               int numberColumns, const int * whichColumns,
00107               bool dropNames=true, bool dropIntegers=true,
00108               bool fixOthers=false);
00112   ClpSimplex (ClpSimplex * wholeModel,
00113               int numberColumns, const int * whichColumns);
00116   void originalModel(ClpSimplex * miniModel);
00122   void setPersistenceFlag(int value);
00136   void auxiliaryModel(int options);
00138   void deleteAuxiliaryModel();
00140   inline bool usingAuxiliaryModel() const
00141   { return auxiliaryModel_!=NULL;}
00143   void makeBaseModel();
00145   void deleteBaseModel();
00147   inline ClpSimplex *  baseModel() const
00148   { return baseModel_;}
00152   void setToBaseModel(ClpSimplex * model=NULL);
00154     ClpSimplex & operator=(const ClpSimplex & rhs);
00156    ~ClpSimplex (  );
00157   // Ones below are just ClpModel with some changes
00169   void loadProblem (  const ClpMatrixBase& matrix,
00170                      const double* collb, const double* colub,   
00171                      const double* obj,
00172                      const double* rowlb, const double* rowub,
00173                       const double * rowObjective=NULL);
00174   void loadProblem (  const CoinPackedMatrix& matrix,
00175                      const double* collb, const double* colub,   
00176                      const double* obj,
00177                      const double* rowlb, const double* rowub,
00178                       const double * rowObjective=NULL);
00179 
00182   void loadProblem (  const int numcols, const int numrows,
00183                      const CoinBigIndex* start, const int* index,
00184                      const double* value,
00185                      const double* collb, const double* colub,   
00186                      const double* obj,
00187                       const double* rowlb, const double* rowub,
00188                       const double * rowObjective=NULL);
00190   void loadProblem (  const int numcols, const int numrows,
00191                      const CoinBigIndex* start, const int* index,
00192                       const double* value,const int * length,
00193                      const double* collb, const double* colub,   
00194                      const double* obj,
00195                       const double* rowlb, const double* rowub,
00196                       const double * rowObjective=NULL);
00201   int loadProblem (  CoinModel & modelObject,bool keepSolution=false);
00203   int readMps(const char *filename,
00204               bool keepNames=false,
00205               bool ignoreErrors = false);
00207   int readGMPL(const char *filename,const char * dataName,
00208                bool keepNames=false);
00211   int readLp(const char *filename, const double epsilon = 1e-5);
00216   void borrowModel(ClpModel & otherModel);
00217   void borrowModel(ClpSimplex & otherModel);
00219    void passInEventHandler(const ClpEventHandler * eventHandler);
00221   void getbackSolution(const ClpSimplex & smallModel,const int * whichRow, const int * whichColumn);
00230   int loadNonLinear(void * info, int & numberConstraints, 
00231                     ClpConstraint ** & constraints);
00233 
00239   int initialSolve(ClpSolve & options);
00241   int initialSolve();
00243   int initialDualSolve();
00245   int initialPrimalSolve();
00247   int initialBarrierSolve();
00249   int initialBarrierNoCrossSolve();
00260   int dual(int ifValuesPass=0, int startFinishOptions=0);
00261   // If using Debug
00262   int dualDebug(int ifValuesPass=0, int startFinishOptions=0);
00273   int primal(int ifValuesPass=0, int startFinishOptions=0);
00279   int nonlinearSLP(int numberPasses,double deltaTolerance);
00285   int nonlinearSLP(int numberConstraints, ClpConstraint ** constraints,
00286                    int numberPasses,double deltaTolerance);
00289   int barrier(bool crossover=true);
00292   int reducedGradient(int phase=0);
00307   int cleanup(int cleanupScaling);
00328   int dualRanging(int numberCheck,const int * which,
00329                   double * costIncrease, int * sequenceIncrease,
00330                   double * costDecrease, int * sequenceDecrease,
00331                   double * valueIncrease=NULL, double * valueDecrease=NULL);
00346   int primalRanging(int numberCheck,const int * which,
00347                   double * valueIncrease, int * sequenceIncrease,
00348                   double * valueDecrease, int * sequenceDecrease);
00363   int writeBasis(const char *filename,
00364                  bool writeValues=false,
00365                  int formatType=0) const;
00368   int readBasis(const char *filename);
00370   CoinWarmStartBasis * getBasis() const;
00372   void setFactorization( ClpFactorization & factorization);
00374   void copyFactorization( ClpFactorization & factorization);
00384   int tightenPrimalBounds(double factor=0.0,int doTight=0,bool tightIntegers=false);
00401   int crash(double gap,int pivot);
00403   void setDualRowPivotAlgorithm(ClpDualRowPivot & choice);
00405   void setPrimalColumnPivotAlgorithm(ClpPrimalColumnPivot & choice);
00414   int strongBranching(int numberVariables,const int * variables,
00415                       double * newLower, double * newUpper,
00416                       double ** outputSolution,
00417                       int * outputStatus, int * outputIterations,
00418                       bool stopOnFirstInfeasible=true,
00419                       bool alwaysFinish=false,
00420                       int startFinishOptions=0);
00422   int fathom(void * stuff);
00428   int fathomMany(void * stuff);
00430   double doubleCheck();
00432   int startFastDual2(ClpNodeStuff * stuff);
00434   int fastDual2(ClpNodeStuff * stuff);
00436   void stopFastDual2(ClpNodeStuff * stuff);
00443   ClpSimplex * fastCrunch(ClpNodeStuff * stuff, int mode);
00445 
00453   int pivot();
00454 
00460   int primalPivotResult();
00461   
00468   int dualPivotResult();
00469 
00481   int startup(int ifValuesPass,int startFinishOptions=0);
00482   void finish(int startFinishOptions=0);
00483   
00485   bool statusOfProblem(bool initial=false);
00487   void defaultFactorizationFrequency();
00489 
00492 
00493   inline bool primalFeasible() const
00494          { return (numberPrimalInfeasibilities_==0);}
00496   inline bool dualFeasible() const
00497          { return (numberDualInfeasibilities_==0);}
00499   inline ClpFactorization * factorization() const 
00500           { return factorization_;}
00502   bool sparseFactorization() const;
00503   void setSparseFactorization(bool value);
00505   int factorizationFrequency() const;
00506   void setFactorizationFrequency(int value);
00508   inline double dualBound() const
00509           { return dualBound_;}
00510   void setDualBound(double value);
00512   inline double infeasibilityCost() const
00513           { return infeasibilityCost_;}
00514   void setInfeasibilityCost(double value);
00531   inline int perturbation() const
00532     { return perturbation_;}
00533   void setPerturbation(int value);
00535   inline int algorithm() const 
00536   {return algorithm_; } 
00538   inline void setAlgorithm(int value)
00539   {algorithm_=value; } 
00541   inline double sumDualInfeasibilities() const 
00542           { return sumDualInfeasibilities_;} 
00543   inline void setSumDualInfeasibilities(double value)
00544           { sumDualInfeasibilities_=value;} 
00546   inline double sumOfRelaxedDualInfeasibilities() const 
00547           { return sumOfRelaxedDualInfeasibilities_;} 
00548   inline void setSumOfRelaxedDualInfeasibilities(double value)
00549           { sumOfRelaxedDualInfeasibilities_=value;} 
00551   inline int numberDualInfeasibilities() const 
00552           { return numberDualInfeasibilities_;} 
00553   inline void setNumberDualInfeasibilities(int value)
00554           { numberDualInfeasibilities_=value;} 
00556   inline int numberDualInfeasibilitiesWithoutFree() const 
00557           { return numberDualInfeasibilitiesWithoutFree_;} 
00559   inline double sumPrimalInfeasibilities() const 
00560           { return sumPrimalInfeasibilities_;} 
00561   inline void setSumPrimalInfeasibilities(double value)
00562           { sumPrimalInfeasibilities_=value;} 
00564   inline double sumOfRelaxedPrimalInfeasibilities() const 
00565           { return sumOfRelaxedPrimalInfeasibilities_;} 
00566   inline void setSumOfRelaxedPrimalInfeasibilities(double value)
00567           { sumOfRelaxedPrimalInfeasibilities_=value;} 
00569   inline int numberPrimalInfeasibilities() const 
00570           { return numberPrimalInfeasibilities_;} 
00571   inline void setNumberPrimalInfeasibilities(int value)
00572           { numberPrimalInfeasibilities_=value;} 
00579   int saveModel(const char * fileName);
00582   int restoreModel(const char * fileName);
00583   
00591   void checkSolution(int setToBounds=false);
00594   void checkSolutionInternal();
00596   inline CoinIndexedVector * rowArray(int index) const
00597   { return rowArray_[index];}
00599   inline CoinIndexedVector * columnArray(int index) const
00600   { return columnArray_[index];}
00602 
00603   /******************** End of most useful part **************/
00609   int getSolution (  const double * rowActivities,
00610                      const double * columnActivities);
00614   int getSolution ();
00621   int createPiecewiseLinearCosts(const int * starts,
00622                    const double * lower, const double * gradient);
00624   ClpDualRowPivot * dualRowPivot() const
00625   { return dualRowPivot_;}
00627   inline bool goodAccuracy() const
00628   { return (largestPrimalError_<1.0e-7&&largestDualError_<1.0e-7);}
00630   void returnModel(ClpSimplex & otherModel);
00638   int internalFactorize(int solveType);
00640   ClpDataSave saveData() ;
00642   void restoreData(ClpDataSave saved);
00644   void cleanStatus();
00646   int factorize();
00649   void computeDuals(double * givenDjs);
00651   void computePrimals (  const double * rowActivities,
00652                      const double * columnActivities);
00654   void add(double * array,
00655                    int column, double multiplier) const;
00661   void unpack(CoinIndexedVector * rowArray) const ;
00667   void unpack(CoinIndexedVector * rowArray,int sequence) const;
00674   void unpackPacked(CoinIndexedVector * rowArray) ;
00681   void unpackPacked(CoinIndexedVector * rowArray,int sequence);
00682 protected:  
00687   int housekeeping(double objectiveChange);
00690   void checkPrimalSolution(const double * rowActivities=NULL,
00691                            const double * columnActivies=NULL);
00694   void checkDualSolution();
00696   void checkBothSolutions();
00697 public:
00708   void setValuesPassAction(double incomingInfeasibility,
00709                            double allowedInfeasibility);
00711 
00713 public: 
00715   inline double alphaAccuracy() const
00716           { return alphaAccuracy_;} 
00717   inline void setAlphaAccuracy(double value)
00718           { alphaAccuracy_ = value;} 
00719 public:
00721   inline void setDisasterHandler(ClpDisasterHandler * handler)
00722   { disasterArea_= handler;}
00724   inline double largeValue() const 
00725           { return largeValue_;} 
00726   void setLargeValue( double value) ;
00728   inline double largestPrimalError() const
00729           { return largestPrimalError_;} 
00731   inline double largestDualError() const
00732           { return largestDualError_;} 
00734   inline void setLargestPrimalError(double value)
00735           { largestPrimalError_=value;} 
00737   inline void setLargestDualError(double value)
00738           { largestDualError_=value;} 
00740   inline int * pivotVariable() const
00741           { return pivotVariable_;}
00743   inline bool automaticScaling() const
00744   { return automaticScale_!=0;}
00745   inline void setAutomaticScaling(bool onOff)
00746   { automaticScale_ = onOff ? 1: 0;} 
00748   inline double currentDualTolerance() const 
00749           { return dualTolerance_;} 
00750   inline void setCurrentDualTolerance(double value)
00751           { dualTolerance_ = value;} 
00753   inline double currentPrimalTolerance() const 
00754           { return primalTolerance_;} 
00755   inline void setCurrentPrimalTolerance(double value)
00756           { primalTolerance_ = value;} 
00758   inline int numberRefinements() const 
00759           { return numberRefinements_;} 
00760   void setNumberRefinements( int value) ;
00762   inline double alpha() const { return alpha_;}
00763   inline void setAlpha(double value) { alpha_ = value;}
00765   inline double dualIn() const { return dualIn_;}
00767   inline int pivotRow() const{ return pivotRow_;}
00768   inline void setPivotRow(int value) { pivotRow_=value;}
00770   double valueIncomingDual() const;
00772 
00773   protected:
00779   int gutsOfSolution ( double * givenDuals,
00780                        const double * givenPrimals,
00781                        bool valuesPass=false);
00783   void gutsOfDelete(int type);
00785   void gutsOfCopy(const ClpSimplex & rhs);
00797   bool createRim(int what,bool makeRowCopy=false,int startFinishOptions=0);
00799   void createRim1(bool initial);
00801   void createRim4(bool initial);
00803   void createRim5(bool initial);
00808   void deleteRim(int getRidOfFactorizationData=2);
00810   bool sanityCheck();
00812   public:
00817   inline double * solutionRegion(int section) const
00818   { if (!section) return rowActivityWork_; else return columnActivityWork_;}
00819   inline double * djRegion(int section) const
00820   { if (!section) return rowReducedCost_; else return reducedCostWork_;}
00821   inline double * lowerRegion(int section) const
00822   { if (!section) return rowLowerWork_; else return columnLowerWork_;}
00823   inline double * upperRegion(int section) const
00824   { if (!section) return rowUpperWork_; else return columnUpperWork_;}
00825   inline double * costRegion(int section) const
00826   { if (!section) return rowObjectiveWork_; else return objectiveWork_;}
00828   inline double * solutionRegion() const
00829   { return solution_;}
00830   inline double * djRegion() const
00831   { return dj_;}
00832   inline double * lowerRegion() const
00833   { return lower_;}
00834   inline double * upperRegion() const
00835   { return upper_;}
00836   inline double * costRegion() const
00837   { return cost_;}
00838   inline Status getStatus(int sequence) const
00839   {return static_cast<Status> (status_[sequence]&7);}
00840   inline void setStatus(int sequence, Status status)
00841   {
00842     unsigned char & st_byte = status_[sequence];
00843     st_byte = static_cast<unsigned char>(st_byte & ~7);
00844     st_byte = static_cast<unsigned char>(st_byte | status);
00845   }
00847   bool startPermanentArrays();
00852   void setInitialDenseFactorization(bool onOff);
00853   bool  initialDenseFactorization() const;
00855   inline int sequenceIn() const
00856   {return sequenceIn_;}
00857   inline int sequenceOut() const
00858   {return sequenceOut_;}
00860   inline void  setSequenceIn(int sequence)
00861   { sequenceIn_=sequence;}
00862   inline void  setSequenceOut(int sequence)
00863   { sequenceOut_=sequence;}
00865   inline int directionIn() const
00866   {return directionIn_;}
00867   inline int directionOut() const
00868   {return directionOut_;}
00870   inline void  setDirectionIn(int direction)
00871   { directionIn_=direction;}
00872   inline void  setDirectionOut(int direction)
00873   { directionOut_=direction;}
00875   inline double valueOut() const
00876   { return valueOut_;}
00878   inline int isColumn(int sequence) const
00879   { return sequence<numberColumns_ ? 1 : 0;}
00881   inline int sequenceWithin(int sequence) const
00882   { return sequence<numberColumns_ ? sequence : sequence-numberColumns_;}
00884   inline double solution(int sequence)
00885   { return solution_[sequence];}
00887   inline double & solutionAddress(int sequence)
00888   { return solution_[sequence];}
00889   inline double reducedCost(int sequence)
00890    { return dj_[sequence];}
00891   inline double & reducedCostAddress(int sequence)
00892    { return dj_[sequence];}
00893   inline double lower(int sequence)
00894   { return lower_[sequence];}
00896   inline double & lowerAddress(int sequence)
00897   { return lower_[sequence];}
00898   inline double upper(int sequence)
00899   { return upper_[sequence];}
00901   inline double & upperAddress(int sequence)
00902   { return upper_[sequence];}
00903   inline double cost(int sequence)
00904   { return cost_[sequence];}
00906   inline double & costAddress(int sequence)
00907   { return cost_[sequence];}
00909   inline double originalLower(int iSequence) const
00910   { if (iSequence<numberColumns_) return columnLower_[iSequence]; else
00911     return rowLower_[iSequence-numberColumns_];}
00913   inline double originalUpper(int iSequence) const
00914   { if (iSequence<numberColumns_) return columnUpper_[iSequence]; else
00915     return rowUpper_[iSequence-numberColumns_];}
00917   inline double theta() const
00918   { return theta_;}
00920   inline ClpNonLinearCost * nonLinearCost() const
00921   { return nonLinearCost_;}
00928   inline int moreSpecialOptions() const
00929   { return moreSpecialOptions_;}
00935   inline void setMoreSpecialOptions(int value)
00936   { moreSpecialOptions_ = value;}
00938 
00940   inline void setFakeBound(int sequence, FakeBound fakeBound)
00941   {
00942     unsigned char & st_byte = status_[sequence];
00943     st_byte = static_cast<unsigned char>(st_byte & ~24);
00944     st_byte = static_cast<unsigned char>(st_byte | (fakeBound<<3));
00945   }
00946   inline FakeBound getFakeBound(int sequence) const
00947   {return static_cast<FakeBound> ((status_[sequence]>>3)&3);}
00948   inline void setRowStatus(int sequence, Status status)
00949   {
00950     unsigned char & st_byte = status_[sequence+numberColumns_];
00951     st_byte = static_cast<unsigned char>(st_byte & ~7);
00952     st_byte = static_cast<unsigned char>(st_byte | status);
00953   }
00954   inline Status getRowStatus(int sequence) const
00955   {return static_cast<Status> (status_[sequence+numberColumns_]&7);}
00956   inline void setColumnStatus(int sequence, Status status)
00957   {
00958     unsigned char & st_byte = status_[sequence];
00959     st_byte = static_cast<unsigned char>(st_byte & ~7);
00960     st_byte = static_cast<unsigned char>(st_byte | status);
00961   }
00962   inline Status getColumnStatus(int sequence) const
00963   {return static_cast<Status> (status_[sequence]&7);}
00964   inline void setPivoted( int sequence)
00965   { status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32);}
00966   inline void clearPivoted( int sequence)
00967   { status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32);}
00968   inline bool pivoted(int sequence) const
00969   {return (((status_[sequence]>>5)&1)!=0);}
00971   void setFlagged( int sequence);
00972   inline void clearFlagged( int sequence)
00973   {
00974     status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64);
00975   }
00976   inline bool flagged(int sequence) const
00977   {return ((status_[sequence]&64)!=0);}
00979   inline void setActive( int iRow)
00980   {
00981     status_[iRow] = static_cast<unsigned char>(status_[iRow] | 128);
00982   }
00983   inline void clearActive( int iRow)
00984   {
00985     status_[iRow] = static_cast<unsigned char>(status_[iRow] & ~128);
00986   }
00987   inline bool active(int iRow) const
00988   {return ((status_[iRow]&128)!=0);}
00991   void createStatus() ;
00994   void allSlackBasis(bool resetSolution=false);
00995     
00997   inline int lastBadIteration() const
00998   {return lastBadIteration_;}
01000   inline int progressFlag() const
01001   {return progressFlag_;}
01003   inline void forceFactorization(int value)
01004   { forceFactorization_ = value;}
01006   inline double rawObjectiveValue() const
01007   { return objectiveValue_;}
01009   void computeObjectiveValue(bool useWorkingSolution=false);
01011   double computeInternalObjectiveValue();
01015   inline int numberExtraRows() const
01016   { return numberExtraRows_;}
01019   inline int maximumBasic() const
01020   { return maximumBasic_;}
01022   inline int baseIteration() const
01023   { return baseIteration_;}
01025   void generateCpp( FILE * fp,bool defaultFactor=false);
01027   ClpFactorization * getEmptyFactorization();
01029   void setEmptyFactorization();
01031   void moveInfo(const ClpSimplex & rhs, bool justStatus=false);
01033 
01035   // These are only to be used using startFinishOptions (ClpSimplexDual, ClpSimplexPrimal)
01036   // *** At present only without scaling
01037   // *** Slacks havve -1.0 element (so == row activity) - take care
01039   void getBInvARow(int row, double* z, double * slack=NULL);
01040   
01042   void getBInvRow(int row, double* z);
01043   
01045   void getBInvACol(int col, double* vec);
01046   
01048   void getBInvCol(int col, double* vec);
01049   
01054   void getBasics(int* index);
01055   
01057     //-------------------------------------------------------------------------
01061        void setObjectiveCoefficient( int elementIndex, double elementValue );
01063        inline void setObjCoeff( int elementIndex, double elementValue )
01064        { setObjectiveCoefficient( elementIndex, elementValue);}
01065 
01068        void setColumnLower( int elementIndex, double elementValue );
01069       
01072        void setColumnUpper( int elementIndex, double elementValue );
01073 
01075       void setColumnBounds( int elementIndex,
01076         double lower, double upper );
01077 
01086       void setColumnSetBounds(const int* indexFirst,
01087                                    const int* indexLast,
01088                                    const double* boundList);
01089       
01092        inline void setColLower( int elementIndex, double elementValue )
01093        { setColumnLower(elementIndex, elementValue);}
01096        inline void setColUpper( int elementIndex, double elementValue )
01097        { setColumnUpper(elementIndex, elementValue);}
01098 
01100       inline void setColBounds( int elementIndex,
01101         double lower, double upper )
01102        { setColumnBounds(elementIndex, lower, upper);}
01103 
01110       inline void setColSetBounds(const int* indexFirst,
01111                                    const int* indexLast,
01112                                    const double* boundList)
01113       { setColumnSetBounds(indexFirst, indexLast, boundList);}
01114       
01117       void setRowLower( int elementIndex, double elementValue );
01118       
01121       void setRowUpper( int elementIndex, double elementValue ) ;
01122     
01124       void setRowBounds( int elementIndex,
01125                                  double lower, double upper ) ;
01126     
01133       void setRowSetBounds(const int* indexFirst,
01134                                    const int* indexLast,
01135                                    const double* boundList);
01136     
01138 
01140 protected:
01141 
01148 
01149   double columnPrimalInfeasibility_;
01151   double rowPrimalInfeasibility_;
01153   int columnPrimalSequence_;
01155   int rowPrimalSequence_;
01157   double columnDualInfeasibility_;
01159   double rowDualInfeasibility_;
01161   int moreSpecialOptions_;
01163   int baseIteration_;
01165   double primalToleranceToGetOptimal_;
01167   double remainingDualInfeasibility_;
01169   double largeValue_;
01171   double largestPrimalError_;
01173   double largestDualError_;
01175   double alphaAccuracy_;
01177   double dualBound_;
01179   double alpha_;
01181   double theta_;
01183   double lowerIn_;
01185   double valueIn_;
01187   double upperIn_;
01189   double dualIn_;
01191   double lowerOut_;
01193   double valueOut_;
01195   double upperOut_;
01197   double dualOut_;
01199   double dualTolerance_;
01201   double primalTolerance_;
01203   double sumDualInfeasibilities_;
01205   double sumPrimalInfeasibilities_;
01207   double infeasibilityCost_;
01209   double sumOfRelaxedDualInfeasibilities_;
01211   double sumOfRelaxedPrimalInfeasibilities_;
01213   double acceptablePivot_;
01215   double * lower_;
01217   double * rowLowerWork_;
01219   double * columnLowerWork_;
01221   double * upper_;
01223   double * rowUpperWork_;
01225   double * columnUpperWork_;
01227   double * cost_;
01229   double * rowObjectiveWork_;
01231   double * objectiveWork_;
01233   CoinIndexedVector * rowArray_[6];
01235   CoinIndexedVector * columnArray_[6];
01237   int sequenceIn_;
01239   int directionIn_;
01241   int sequenceOut_;
01243   int directionOut_;
01245   int pivotRow_;
01247   int lastGoodIteration_;
01249   double * dj_;
01251   double * rowReducedCost_;
01253   double * reducedCostWork_;
01255   double * solution_;
01257   double * rowActivityWork_;
01259   double * columnActivityWork_;
01261   ClpSimplex * auxiliaryModel_;
01263   int numberDualInfeasibilities_;
01265   int numberDualInfeasibilitiesWithoutFree_;
01267   int numberPrimalInfeasibilities_;
01269   int numberRefinements_;
01271   ClpDualRowPivot * dualRowPivot_;
01273   ClpPrimalColumnPivot * primalColumnPivot_;
01275   int * pivotVariable_;
01277   ClpFactorization * factorization_;
01279   double * savedSolution_;
01281   int numberTimesOptimal_;
01283   ClpDisasterHandler * disasterArea_;
01285   int changeMade_;
01287   int algorithm_;
01290   int forceFactorization_;
01298   int perturbation_;
01300   unsigned char * saveStatus_;
01305   ClpNonLinearCost * nonLinearCost_;
01307   int lastBadIteration_;
01309   int lastFlaggedIteration_;
01311   int numberFake_;
01313   int numberChanged_;
01315   int progressFlag_;
01317   int firstFree_;
01321   int numberExtraRows_;
01324   int maximumBasic_;
01326   int dontFactorizePivots_;
01336   double incomingInfeasibility_;
01337   double allowedInfeasibility_;
01339   int automaticScale_;
01341   ClpSimplex * baseModel_;
01343   ClpSimplexProgress progress_;
01344 public:
01346   mutable int spareIntArray_[4];
01348   mutable double spareDoubleArray_[4];
01349 protected:
01351   friend class OsiClpSolverInterface;
01353 };
01354 //#############################################################################
01363 void
01364 ClpSimplexUnitTest(const std::string & mpsDir);
01365 
01366 // For Devex stuff
01367 #define DEVEX_TRY_NORM 1.0e-4
01368 #define DEVEX_ADD_ONE 1.0
01369 #endif

Generated on Thu Jan 15 03:01:00 2009 for coin-Bcp by  doxygen 1.4.7