- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/svn-release/Bcps-0.93.11/Clp/src/OsiClp/OsiClpSolverInterface.hpp

Go to the documentation of this file.

    00001 // $Id$
    00002 // Copyright (C) 2000, 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
    00007 #ifndef OsiClpSolverInterface_H
    00008 #define OsiClpSolverInterface_H
    00009
    00010 #include <string>
    00011 #include <cfloat>
    00012 #include <map>
    00013
    00014 #include "ClpSimplex.hpp"
    00015 #include "ClpLinearObjective.hpp"
    00016 #include "CoinPackedMatrix.hpp"
    00017 #include "OsiSolverInterface.hpp"
    00018 #include "CoinWarmStartBasis.hpp"
    00019 #include "ClpEventHandler.hpp"
    00020 #include "ClpNode.hpp"
    00021 #include "CoinIndexedVector.hpp"
    00022 #include "CoinFinite.hpp"
    00023
    00024 class OsiRowCut;
    00025 class OsiClpUserSolver;
    00026 class OsiClpDisasterHandler;
    00027 class CoinSet;
    00028 static const double OsiClpInfinity = COIN_DBL_MAX;
    00029
    00030 //#############################################################################
    00031
    00038 class OsiClpSolverInterface :
    00039   virtual public OsiSolverInterface {
    00040   friend void OsiClpSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir);
    00041
    00042 public:
    00043   //---------------------------------------------------------------------------
    00046
    00047   virtual void initialSolve();
    00048
    00050   virtual void resolve();
    00051
    00053   virtual void resolveGub(int needed);
    00054
    00056   virtual void branchAndBound();
    00057
    00065   void crossover(int options,int basis);
    00067
    00083   virtual int canDoSimplexInterface() const;
    00084
    00093   virtual void enableFactorization() const;
    00094
    00096   virtual void disableFactorization() const;
    00097
    00102   virtual bool basisIsAvailable() const;
    00103
    00119   virtual void getBasisStatus(int* cstat, int* rstat) const;
    00120
    00131   virtual int setBasisStatus(const int* cstat, const int* rstat);
    00132
    00134   virtual void getReducedGradient(double* columnReducedCosts,
    00135                                   double * duals,
    00136                                   const double * c) const ;
    00137
    00139   virtual void getBInvARow(int row, double* z, double * slack=NULL) const;
    00140
    00145   virtual void getBInvARow(int row, CoinIndexedVector * z, CoinIndexedVector * slack=NULL,
    00146                            bool keepScaled=false) const;
    00147
    00149   virtual void getBInvRow(int row, double* z) const;
    00150
    00152   virtual void getBInvACol(int col, double* vec) const ;
    00153
    00155   virtual void getBInvACol(int col, CoinIndexedVector * vec) const ;
    00156
    00161   virtual void getBInvACol(CoinIndexedVector * vec) const ;
    00162
    00164   virtual void getBInvCol(int col, double* vec) const ;
    00165
    00170   virtual void getBasics(int* index) const;
    00171
    00178   virtual void enableSimplexInterface(bool doingPrimal);
    00180   void copyEnabledSuff(OsiClpSolverInterface & rhs);
    00181
    00183   virtual void disableSimplexInterface();
    00185   void copyEnabledStuff(ClpSimplex & rhs);
    00186
    00194   virtual int pivot(int colIn, int colOut, int outStatus);
    00195
    00207   virtual int primalPivotResult(int colIn, int sign,
    00208                                 int& colOut, int& outStatus,
    00209                                 double& t, CoinPackedVector* dx);
    00210
    00217   virtual int dualPivotResult(int& colIn, int& sign,
    00218                               int colOut, int outStatus,
    00219                               double& t, CoinPackedVector* dx);
    00220
    00221
    00223   //---------------------------------------------------------------------------
    00239   // Set an integer parameter
    00240   bool setIntParam(OsiIntParam key, int value);
    00241   // Set an double parameter
    00242   bool setDblParam(OsiDblParam key, double value);
    00243   // Set a string parameter
    00244   bool setStrParam(OsiStrParam key, const std::string & value);
    00245   // Get an integer parameter
    00246   bool getIntParam(OsiIntParam key, int& value) const;
    00247   // Get an double parameter
    00248   bool getDblParam(OsiDblParam key, double& value) const;
    00249   // Get a string parameter
    00250   bool getStrParam(OsiStrParam key, std::string& value) const;
    00251   // Set a hint parameter - overrides OsiSolverInterface
    00252   virtual bool setHintParam(OsiHintParam key, bool yesNo=true,
    00253                             OsiHintStrength strength=OsiHintTry,
    00254                             void * otherInformation=NULL);
    00256
    00257   //---------------------------------------------------------------------------
    00259
    00260
    00261   virtual bool isAbandoned() const;
    00263   virtual bool isProvenOptimal() const;
    00265   virtual bool isProvenPrimalInfeasible() const;
    00267   virtual bool isProvenDualInfeasible() const;
    00269   virtual bool isPrimalObjectiveLimitReached() const;
    00271   virtual bool isDualObjectiveLimitReached() const;
    00273   virtual bool isIterationLimitReached() const;
    00275
    00276   //---------------------------------------------------------------------------
    00279
    00287   virtual CoinWarmStart *getEmptyWarmStart () const;
    00288
    00290   virtual CoinWarmStart* getWarmStart() const;
    00292   inline CoinWarmStartBasis* getPointerToWarmStart()
    00293   { return &basis_;}
    00295   inline const CoinWarmStartBasis* getConstPointerToWarmStart() const
    00296   { return &basis_;}
    00299   virtual bool setWarmStart(const CoinWarmStart* warmstart);
    00309   virtual CoinWarmStart* getPointerToWarmStart(bool & mustDelete) ;
    00310
    00312
    00313   //---------------------------------------------------------------------------
    00320
    00321   virtual void markHotStart();
    00323   virtual void solveFromHotStart();
    00325   virtual void unmarkHotStart();
    00334   int startFastDual(int options);
    00336   void stopFastDual();
    00338   void setStuff(double tolerance,double increment);
    00340
    00341   //---------------------------------------------------------------------------
    00356
    00357   virtual int getNumCols() const {
    00358     return modelPtr_->numberColumns(); }
    00359
    00361   virtual int getNumRows() const {
    00362     return modelPtr_->numberRows(); }
    00363
    00365   virtual int getNumElements() const {
    00366     int retVal = 0;
    00367     const CoinPackedMatrix * matrix =modelPtr_->matrix();
    00368     if ( matrix != NULL ) retVal=matrix->getNumElements();
    00369     return retVal; }
    00370
    00373     virtual std::string getRowName(int rowIndex,
    00374                                    unsigned maxLen = static_cast<unsigned>(std::string::npos)) const;
    00375
    00378     virtual std::string getColName(int colIndex,
    00379                                    unsigned maxLen = static_cast<unsigned>(std::string::npos)) const;
    00380
    00381
    00383   virtual const double * getColLower() const { return modelPtr_->columnLower(); }
    00384
    00386   virtual const double * getColUpper() const { return modelPtr_->columnUpper(); }
    00387
    00397   virtual const char * getRowSense() const;
    00398
    00407   virtual const double * getRightHandSide() const ;
    00408
    00417   virtual const double * getRowRange() const ;
    00418
    00420   virtual const double * getRowLower() const { return modelPtr_->rowLower(); }
    00421
    00423   virtual const double * getRowUpper() const { return modelPtr_->rowUpper(); }
    00424
    00426   virtual const double * getObjCoefficients() const
    00427   { if (fakeMinInSimplex_)
    00428       return linearObjective_ ;
    00429     else
    00430       return modelPtr_->objective(); }
    00431
    00433   virtual double getObjSense() const
    00434   { return ((fakeMinInSimplex_)?-modelPtr_->optimizationDirection():
    00435                                  modelPtr_->optimizationDirection()); }
    00436
    00438   virtual bool isContinuous(int colNumber) const;
    00440   virtual bool isBinary(int colIndex) const;
    00441
    00446   virtual bool isInteger(int colIndex) const;
    00447
    00449   virtual bool isIntegerNonBinary(int colIndex) const;
    00450
    00452   virtual bool isFreeBinary(int colIndex) const;
    00458   virtual const char * getColType(bool refresh=false) const;
    00459
    00465   bool isOptionalInteger(int colIndex) const;
    00467   void setOptionalInteger(int index);
    00468
    00470   virtual const CoinPackedMatrix * getMatrixByRow() const;
    00471
    00473   virtual const CoinPackedMatrix * getMatrixByCol() const;
    00474
    00476   virtual CoinPackedMatrix * getMutableMatrixByCol() const;
    00477
    00479   virtual double getInfinity() const { return OsiClpInfinity; }
    00481
    00484
    00485   virtual const double * getColSolution() const;
    00486
    00488   virtual const double * getRowPrice() const;
    00489
    00491   virtual const double * getReducedCost() const;
    00492
    00495   virtual const double * getRowActivity() const;
    00496
    00498   virtual double getObjValue() const;
    00499
    00502   virtual int getIterationCount() const
    00503   { return modelPtr_->numberIterations(); }
    00504
    00522   virtual std::vector<double*> getDualRays(int maxNumRays,
    00523                                            bool fullRay = false) const;
    00535   virtual std::vector<double*> getPrimalRays(int maxNumRays) const;
    00536
    00538
    00539
    00540   //---------------------------------------------------------------------------
    00541
    00544   //-------------------------------------------------------------------------
    00548   virtual void setObjCoeff( int elementIndex, double elementValue );
    00549
    00552   virtual void setColLower( int elementIndex, double elementValue );
    00553
    00556   virtual void setColUpper( int elementIndex, double elementValue );
    00557
    00559   virtual void setColBounds( int elementIndex,
    00560                              double lower, double upper );
    00561
    00570   virtual void setColSetBounds(const int* indexFirst,
    00571                                const int* indexLast,
    00572                                const double* boundList);
    00573
    00576   virtual void setRowLower( int elementIndex, double elementValue );
    00577
    00580   virtual void setRowUpper( int elementIndex, double elementValue ) ;
    00581
    00583   virtual void setRowBounds( int elementIndex,
    00584                              double lower, double upper ) ;
    00585
    00587   virtual void setRowType(int index, char sense, double rightHandSide,
    00588                           double range);
    00589
    00598   virtual void setRowSetBounds(const int* indexFirst,
    00599                                const int* indexLast,
    00600                                const double* boundList);
    00601
    00612   virtual void setRowSetTypes(const int* indexFirst,
    00613                               const int* indexLast,
    00614                               const char* senseList,
    00615                               const double* rhsList,
    00616                               const double* rangeList);
    00621     virtual void setObjective(const double * array);
    00622
    00627     virtual void setColLower(const double * array);
    00628
    00633     virtual void setColUpper(const double * array);
    00634
    00635 //    using OsiSolverInterface::setRowName ;
    00637 //    virtual void setRowName(int rowIndex, std::string & name) ;
    00638     virtual void setRowName(int rowIndex, std::string  name) ;
    00639
    00640 //    using OsiSolverInterface::setColName ;
    00642 //    virtual void setColName(int colIndex, std::string & name) ;
    00643     virtual void setColName(int colIndex, std::string  name) ;
    00644
    00646
    00647   //-------------------------------------------------------------------------
    00651   virtual void setContinuous(int index);
    00653   virtual void setInteger(int index);
    00656   virtual void setContinuous(const int* indices, int len);
    00659   virtual void setInteger(const int* indices, int len);
    00661   inline int numberSOS() const
    00662   { return numberSOS_;}
    00664   inline const CoinSet * setInfo() const
    00665   { return setInfo_;}
    00675   virtual int findIntegersAndSOS(bool justCount);
    00677
    00678   //-------------------------------------------------------------------------
    00680   virtual void setObjSense(double s )
    00681   { modelPtr_->setOptimizationDirection( s < 0 ? -1 : 1); }
    00682
    00693   virtual void setColSolution(const double * colsol);
    00694
    00705   virtual void setRowPrice(const double * rowprice);
    00706
    00707   //-------------------------------------------------------------------------
    00712
    00713   //using OsiSolverInterface::addCol ;
    00715   virtual void addCol(const CoinPackedVectorBase& vec,
    00716                       const double collb, const double colub,
    00717                       const double obj);
    00720   virtual void addCol(const CoinPackedVectorBase& vec,
    00721                       const double collb, const double colub,
    00722                       const double obj, std::string name) ;
    00724   virtual void addCol(int numberElements, const int * rows, const double * elements,
    00725                       const double collb, const double colub,
    00726                       const double obj) ;
    00729   virtual void addCol(int numberElements,
    00730                       const int* rows, const double* elements,
    00731                       const double collb, const double colub,
    00732                       const double obj, std::string name) ;
    00734   virtual void addCols(const int numcols,
    00735                        const CoinPackedVectorBase * const * cols,
    00736                        const double* collb, const double* colub,
    00737                        const double* obj);
    00739   virtual void addCols(const int numcols,
    00740                        const int * columnStarts, const int * rows, const double * elements,
    00741                        const double* collb, const double* colub,
    00742                        const double* obj);
    00744   virtual void deleteCols(const int num, const int * colIndices);
    00745
    00747   virtual void addRow(const CoinPackedVectorBase& vec,
    00748                       const double rowlb, const double rowub);
    00755     virtual void addRow(const CoinPackedVectorBase& vec,
    00756                         const double rowlb, const double rowub,
    00757                         std::string name) ;
    00758   virtual void addRow(const CoinPackedVectorBase& vec,
    00759                       const char rowsen, const double rowrhs,
    00760                       const double rowrng);
    00762   virtual void addRow(int numberElements, const int * columns, const double * element,
    00763                       const double rowlb, const double rowub) ;
    00766     virtual void addRow(const CoinPackedVectorBase& vec,
    00767                         const char rowsen, const double rowrhs,
    00768                         const double rowrng, std::string name) ;
    00770   virtual void addRows(const int numrows,
    00771                        const CoinPackedVectorBase * const * rows,
    00772                        const double* rowlb, const double* rowub);
    00774   virtual void addRows(const int numrows,
    00775                        const CoinPackedVectorBase * const * rows,
    00776                        const char* rowsen, const double* rowrhs,
    00777                        const double* rowrng);
    00778
    00780   virtual void addRows(const int numrows,
    00781                        const int * rowStarts, const int * columns, const double * element,
    00782                        const double* rowlb, const double* rowub);
    00784   void modifyCoefficient(int row, int column, double newElement,
    00785                         bool keepZero=false)
    00786         {modelPtr_->modifyCoefficient(row,column,newElement, keepZero);}
    00787
    00789   virtual void deleteRows(const int num, const int * rowIndices);
    00792   virtual void saveBaseModel() ;
    00796   virtual void restoreBaseModel(int numberRows);
    00797
    00798   //-----------------------------------------------------------------------
    00802   virtual void applyRowCuts(int numberCuts, const OsiRowCut * cuts);
    00807   virtual void applyRowCuts(int numberCuts, const OsiRowCut ** cuts);
    00830     virtual ApplyCutsReturnCode applyCuts(const OsiCuts & cs,
    00831                                           double effectivenessLb = 0.0);
    00832
    00834
    00835
    00836   //---------------------------------------------------------------------------
    00837
    00838 public:
    00839
    00853   virtual void loadProblem(const CoinPackedMatrix& matrix,
    00854                            const double* collb, const double* colub,
    00855                            const double* obj,
    00856                            const double* rowlb, const double* rowub);
    00857
    00865   virtual void assignProblem(CoinPackedMatrix*& matrix,
    00866                              double*& collb, double*& colub, double*& obj,
    00867                              double*& rowlb, double*& rowub);
    00868
    00881   virtual void loadProblem(const CoinPackedMatrix& matrix,
    00882                            const double* collb, const double* colub,
    00883                            const double* obj,
    00884                            const char* rowsen, const double* rowrhs,
    00885                            const double* rowrng);
    00886
    00894   virtual void assignProblem(CoinPackedMatrix*& matrix,
    00895                              double*& collb, double*& colub, double*& obj,
    00896                              char*& rowsen, double*& rowrhs,
    00897                              double*& rowrng);
    00898
    00901   virtual void loadProblem(const ClpMatrixBase& matrix,
    00902                            const double* collb, const double* colub,
    00903                            const double* obj,
    00904                            const double* rowlb, const double* rowub) ;
    00905
    00908   virtual void loadProblem(const int numcols, const int numrows,
    00909                            const CoinBigIndex * start, const int* index,
    00910                            const double* value,
    00911                            const double* collb, const double* colub,
    00912                            const double* obj,
    00913                            const double* rowlb, const double* rowub);
    00914
    00917   virtual void loadProblem(const int numcols, const int numrows,
    00918                            const CoinBigIndex * start, const int* index,
    00919                            const double* value,
    00920                            const double* collb, const double* colub,
    00921                            const double* obj,
    00922                            const char* rowsen, const double* rowrhs,
    00923                            const double* rowrng);
    00925   virtual int loadFromCoinModel (  CoinModel & modelObject, bool keepSolution=false);
    00926
    00927   using OsiSolverInterface::readMps ;
    00930   virtual int readMps(const char *filename,
    00931                       const char *extension = "mps") ;
    00934   int readMps(const char *filename,bool keepNames,bool allowErrors);
    00936   virtual int readMps (const char *filename, const char*extension,
    00937                         int & numberSets, CoinSet ** & sets);
    00938
    00943   virtual void writeMps(const char *filename,
    00944                         const char *extension = "mps",
    00945                         double objSense=0.0) const;
    00954   virtual int writeMpsNative(const char *filename,
    00955                              const char ** rowNames, const char ** columnNames,
    00956                              int formatType=0,int numberAcross=2,
    00957                              double objSense=0.0) const ;
    00959   virtual int readLp(const char *filename, const double epsilon = 1e-5);
    00965   virtual void writeLp(const char *filename,
    00966                        const char *extension = "lp",
    00967                        double epsilon = 1e-5,
    00968                        int numberAcross = 10,
    00969                        int decimals = 5,
    00970                        double objSense = 0.0,
    00971                        bool useRowNames = true) const;
    00976   virtual void writeLp(FILE *fp,
    00977                double epsilon = 1e-5,
    00978                int numberAcross = 10,
    00979                int decimals = 5,
    00980                double objSense = 0.0,
    00981                bool useRowNames = true) const;
    00987   virtual void replaceMatrixOptional(const CoinPackedMatrix & matrix);
    00989   virtual void replaceMatrix(const CoinPackedMatrix & matrix) ;
    00991
    01002   virtual void passInMessageHandler(CoinMessageHandler * handler);
    01004   void newLanguage(CoinMessages::Language language);
    01005   void setLanguage(CoinMessages::Language language)
    01006   {newLanguage(language);}
    01008   void setLogLevel(int value);
    01010   void generateCpp( FILE * fp);
    01012   //---------------------------------------------------------------------------
    01013
    01016
    01017   ClpSimplex * getModelPtr() const ;
    01019   inline ClpSimplex * swapModelPtr(ClpSimplex * newModel)
    01020   { ClpSimplex * model = modelPtr_; modelPtr_=newModel;return model;}
    01022   inline unsigned int specialOptions() const
    01023   { return specialOptions_;}
    01024   void setSpecialOptions(unsigned int value);
    01026   inline int lastAlgorithm() const
    01027   { return lastAlgorithm_;}
    01029   inline void setLastAlgorithm(int value)
    01030   { lastAlgorithm_ = value;}
    01032   inline int cleanupScaling() const
    01033   { return cleanupScaling_;}
    01046   inline void setCleanupScaling(int value)
    01047   { cleanupScaling_=value;}
    01050   inline double smallestElementInCut() const
    01051   { return smallestElementInCut_;}
    01054   inline void setSmallestElementInCut(double value)
    01055   { smallestElementInCut_=value;}
    01062   inline double smallestChangeInCut() const
    01063   { return smallestChangeInCut_;}
    01070   inline void setSmallestChangeInCut(double value)
    01071   { smallestChangeInCut_=value;}
    01073   inline void setSolveOptions(const ClpSolve & options)
    01074   { solveOptions_ = options;}
    01078   virtual int tightenBounds(int lightweight=0);
    01080   virtual CoinBigIndex getSizeL() const;
    01082   virtual CoinBigIndex getSizeU() const;
    01084   const OsiClpDisasterHandler * disasterHandler() const
    01085   { return disasterHandler_;}
    01087   void passInDisasterHandler(OsiClpDisasterHandler * handler);
    01089   ClpLinearObjective * fakeObjective() const
    01090   { return fakeObjective_;}
    01092   void setFakeObjective(ClpLinearObjective * fakeObjective);
    01094   void setFakeObjective(double * fakeObjective);
    01114   void setupForRepeatedUse(int senseOfAdventure=0, int printOut=0);
    01116   virtual void synchronizeModel();
    01121   void setSpecialOptionsMutable(unsigned int value) const;
    01122
    01124
    01125   //---------------------------------------------------------------------------
    01126
    01129
    01130   OsiClpSolverInterface ();
    01131
    01133   virtual OsiSolverInterface * clone(bool copyData = true) const;
    01134
    01136   OsiClpSolverInterface (const OsiClpSolverInterface &);
    01137
    01139   OsiClpSolverInterface (ClpSimplex * rhs, bool reallyOwn=false);
    01140
    01142   void releaseClp();
    01143
    01145   OsiClpSolverInterface & operator=(const OsiClpSolverInterface& rhs);
    01146
    01148   virtual ~OsiClpSolverInterface ();
    01149
    01151   virtual void reset();
    01153
    01154   //---------------------------------------------------------------------------
    01155
    01156 protected:
    01158
    01159
    01160   virtual void applyRowCut(const OsiRowCut& rc);
    01161
    01163   virtual void applyColCut(const OsiColCut& cc);
    01165
    01166   //---------------------------------------------------------------------------
    01167
    01168 protected:
    01171
    01172   void gutsOfDestructor();
    01173
    01175   void freeCachedResults() const;
    01176
    01178   void freeCachedResults0() const;
    01179
    01181   void freeCachedResults1() const;
    01182
    01184   void extractSenseRhsRange() const;
    01185
    01187   void fillParamMaps();
    01196   CoinWarmStartBasis getBasis(ClpSimplex * model) const;
    01205   void setBasis( const CoinWarmStartBasis & basis, ClpSimplex * model);
    01207   void crunch();
    01209   void redoScaleFactors(int numberRows,const CoinBigIndex * starts,
    01210                         const int * indices, const double * elements);
    01211 public:
    01214   void setBasis( const CoinWarmStartBasis & basis);
    01216   inline void setBasis( )
    01217   { setBasis(basis_,modelPtr_);}
    01219   CoinWarmStartDiff * getBasisDiff(const unsigned char * statusArray) const ;
    01221   CoinWarmStartBasis * getBasis(const unsigned char * statusArray) const ;
    01223   void deleteScaleFactors();
    01225   inline const double * upRange() const
    01226   { return rowActivity_;}
    01227   inline const double * downRange() const
    01228   { return columnActivity_;}
    01230   inline void passInRanges(int * array)
    01231   { whichRange_=array;}
    01233   void setSOSData(int numberSOS,const char * type,
    01234                   const int * start,const int * indices, const double * weights=NULL);
    01236   void computeLargestAway();
    01238   inline double largestAway() const
    01239   { return largestAway_;}
    01241   inline void setLargestAway(double value)
    01242   { largestAway_ = value;}
    01244   void lexSolve();
    01246
    01247 protected:
    01250
    01251   mutable ClpSimplex * modelPtr_;
    01253
    01255
    01256   mutable char    *rowsense_;
    01257
    01259   mutable double  *rhs_;
    01260
    01264   mutable double  *rowrange_;
    01265
    01268   mutable CoinWarmStartBasis* ws_;
    01271   mutable double * rowActivity_;
    01272   mutable double * columnActivity_;
    01274   ClpNodeStuff stuff_;
    01276   int numberSOS_;
    01278   CoinSet * setInfo_;
    01280   ClpSimplex * smallModel_;
    01282   ClpFactorization * factorization_;
    01285   double smallestElementInCut_;
    01289   double smallestChangeInCut_;
    01291   double largestAway_;
    01293   char * spareArrays_;
    01295   CoinWarmStartBasis basis_;
    01297   int itlimOrig_;
    01298
    01309   mutable int lastAlgorithm_;
    01310
    01312   bool notOwned_;
    01313
    01315   mutable CoinPackedMatrix *matrixByRow_;
    01316
    01318   CoinPackedMatrix *matrixByRowAtContinuous_;
    01319
    01321   char * integerInformation_;
    01322
    01327   int * whichRange_;
    01328
    01329   //std::map<OsiIntParam, ClpIntParam> intParamMap_;
    01330   //std::map<OsiDblParam, ClpDblParam> dblParamMap_;
    01331   //std::map<OsiStrParam, ClpStrParam> strParamMap_;
    01332
    01334   mutable bool fakeMinInSimplex_ ;
    01341   mutable double *linearObjective_;
    01342
    01344   mutable ClpDataSave saveData_;
    01346   ClpSolve solveOptions_;
    01359   int cleanupScaling_;
    01387   mutable unsigned int specialOptions_;
    01389   ClpSimplex * baseModel_;
    01391   int lastNumberRows_;
    01393   ClpSimplex * continuousModel_;
    01395   OsiClpDisasterHandler * disasterHandler_ ;
    01397   ClpLinearObjective * fakeObjective_;
    01399   CoinDoubleArrayWithLength rowScale_;
    01401   CoinDoubleArrayWithLength columnScale_;
    01403 };
    01404
    01405 class OsiClpDisasterHandler : public ClpDisasterHandler {
    01406 public:
    01410
    01411   virtual void intoSimplex();
    01413   virtual bool check() const ;
    01415   virtual void saveInfo();
    01417   virtual int typeOfDisaster();
    01419
    01420
    01425   OsiClpDisasterHandler(OsiClpSolverInterface * model = NULL);
    01427   virtual ~OsiClpDisasterHandler();
    01428   // Copy
    01429   OsiClpDisasterHandler(const OsiClpDisasterHandler&);
    01430   // Assignment
    01431   OsiClpDisasterHandler& operator=(const OsiClpDisasterHandler&);
    01433   virtual ClpDisasterHandler * clone() const;
    01434
    01436
    01441   void setOsiModel(OsiClpSolverInterface * model);
    01443   inline OsiClpSolverInterface * osiModel() const
    01444   { return osiModel_;}
    01446   inline void setWhereFrom(int value)
    01447   { whereFrom_=value;}
    01449   inline int whereFrom() const
    01450   { return whereFrom_;}
    01452   inline void setPhase(int value)
    01453   { phase_=value;}
    01455   inline int phase() const
    01456   { return phase_;}
    01458   inline bool inTrouble() const
    01459   { return inTrouble_;}
    01460
    01462
    01463
    01464 protected:
    01468
    01469   OsiClpSolverInterface * osiModel_;
    01477   int whereFrom_;
    01485   int phase_;
    01487   bool inTrouble_;
    01489 };
    01490 // So unit test can find out if NDEBUG set
    01491 bool OsiClpHasNDEBUG();
    01492 //#############################################################################
    01494 void OsiClpSolverInterfaceUnitTest(const std::string & mpsDir, const std::string & netlibDir);
    01495 #endif