/build/buildd/clp-1.12.0/Clp/src/ClpModel.hpp
Go to the documentation of this file.
00001 /* $Id: ClpModel.hpp 1525 2010-02-26 17:27:59Z mjs $ */
00002 // Copyright (C) 2002, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 #ifndef ClpModel_H
00005 #define ClpModel_H
00006 
00007 #include "ClpConfig.h"
00008 
00009 #include <iostream>
00010 #include <cassert>
00011 #include <cmath>
00012 #include <vector>
00013 #include <string>
00014 //#ifndef COIN_USE_CLP
00015 //#define COIN_USE_CLP
00016 //#endif
00017 #include "ClpPackedMatrix.hpp"
00018 #include "CoinMessageHandler.hpp"
00019 #include "CoinHelperFunctions.hpp"
00020 #include "CoinFinite.hpp"
00021 #include "ClpParameters.hpp"
00022 #include "ClpObjective.hpp"
00023 class ClpEventHandler;
00033 class CoinBuild;
00034 class CoinModel;
00035 class ClpModel {
00036 
00037 public:
00038 
00044 
00045      ClpModel (bool emptyMessages = false  );
00046 
00051      ClpModel(const ClpModel & rhs, int scalingMode = -1);
00053      ClpModel & operator=(const ClpModel & rhs);
00058      ClpModel (const ClpModel * wholeModel,
00059                int numberRows, const int * whichRows,
00060                int numberColumns, const int * whichColumns,
00061                bool dropNames = true, bool dropIntegers = true);
00063      ~ClpModel (  );
00065 
00079      void loadProblem (  const ClpMatrixBase& matrix,
00080                          const double* collb, const double* colub,
00081                          const double* obj,
00082                          const double* rowlb, const double* rowub,
00083                          const double * rowObjective = NULL);
00084      void loadProblem (  const CoinPackedMatrix& matrix,
00085                          const double* collb, const double* colub,
00086                          const double* obj,
00087                          const double* rowlb, const double* rowub,
00088                          const double * rowObjective = NULL);
00089 
00092      void loadProblem (  const int numcols, const int numrows,
00093                          const CoinBigIndex* start, const int* index,
00094                          const double* value,
00095                          const double* collb, const double* colub,
00096                          const double* obj,
00097                          const double* rowlb, const double* rowub,
00098                          const double * rowObjective = NULL);
00104      int loadProblem (  CoinModel & modelObject, bool tryPlusMinusOne = false);
00106      void loadProblem (  const int numcols, const int numrows,
00107                          const CoinBigIndex* start, const int* index,
00108                          const double* value, const int * length,
00109                          const double* collb, const double* colub,
00110                          const double* obj,
00111                          const double* rowlb, const double* rowub,
00112                          const double * rowObjective = NULL);
00114      void loadQuadraticObjective(const int numberColumns,
00115                                  const CoinBigIndex * start,
00116                                  const int * column, const double * element);
00117      void loadQuadraticObjective (  const CoinPackedMatrix& matrix);
00119      void deleteQuadraticObjective();
00121      void setRowObjective(const double * rowObjective);
00123      int readMps(const char *filename,
00124                  bool keepNames = false,
00125                  bool ignoreErrors = false);
00127      int readGMPL(const char *filename, const char * dataName,
00128                   bool keepNames = false);
00130      void copyInIntegerInformation(const char * information);
00132      void deleteIntegerInformation();
00134      void setContinuous(int index);
00136      void setInteger(int index);
00138      bool isInteger(int index) const;
00140      void resize (int newNumberRows, int newNumberColumns);
00142      void deleteRows(int number, const int * which);
00144      void addRow(int numberInRow, const int * columns,
00145                  const double * elements, double rowLower = -COIN_DBL_MAX,
00146                  double rowUpper = COIN_DBL_MAX);
00148      void addRows(int number, const double * rowLower,
00149                   const double * rowUpper,
00150                   const CoinBigIndex * rowStarts, const int * columns,
00151                   const double * elements);
00153      void addRows(int number, const double * rowLower,
00154                   const double * rowUpper,
00155                   const CoinBigIndex * rowStarts, const int * rowLengths,
00156                   const int * columns,
00157                   const double * elements);
00158 #ifndef CLP_NO_VECTOR
00159      void addRows(int number, const double * rowLower,
00160                   const double * rowUpper,
00161                   const CoinPackedVectorBase * const * rows);
00162 #endif
00163 
00168      int addRows(const CoinBuild & buildObject, bool tryPlusMinusOne = false,
00169                  bool checkDuplicates = true);
00178      int addRows(CoinModel & modelObject, bool tryPlusMinusOne = false,
00179                  bool checkDuplicates = true);
00180 
00182      void deleteColumns(int number, const int * which);
00184      void addColumn(int numberInColumn,
00185                     const int * rows,
00186                     const double * elements,
00187                     double columnLower = 0.0,
00188                     double  columnUpper = COIN_DBL_MAX,
00189                     double  objective = 0.0);
00191      void addColumns(int number, const double * columnLower,
00192                      const double * columnUpper,
00193                      const double * objective,
00194                      const CoinBigIndex * columnStarts, const int * rows,
00195                      const double * elements);
00196      void addColumns(int number, const double * columnLower,
00197                      const double * columnUpper,
00198                      const double * objective,
00199                      const CoinBigIndex * columnStarts, const int * columnLengths,
00200                      const int * rows,
00201                      const double * elements);
00202 #ifndef CLP_NO_VECTOR
00203      void addColumns(int number, const double * columnLower,
00204                      const double * columnUpper,
00205                      const double * objective,
00206                      const CoinPackedVectorBase * const * columns);
00207 #endif
00208 
00213      int addColumns(const CoinBuild & buildObject, bool tryPlusMinusOne = false,
00214                     bool checkDuplicates = true);
00222      int addColumns(CoinModel & modelObject, bool tryPlusMinusOne = false,
00223                     bool checkDuplicates = true);
00225      inline void modifyCoefficient(int row, int column, double newElement,
00226                                    bool keepZero = false) {
00227           matrix_->modifyCoefficient(row, column, newElement, keepZero);
00228      }
00230      void chgRowLower(const double * rowLower);
00232      void chgRowUpper(const double * rowUpper);
00234      void chgColumnLower(const double * columnLower);
00236      void chgColumnUpper(const double * columnUpper);
00238      void chgObjCoefficients(const double * objIn);
00242      void borrowModel(ClpModel & otherModel);
00245      void returnModel(ClpModel & otherModel);
00246 
00248      void createEmptyMatrix();
00256      int cleanMatrix(double threshold = 1.0e-20);
00258      void copy(const ClpMatrixBase * from, ClpMatrixBase * & to);
00259 #ifndef CLP_NO_STD
00260 
00261      void dropNames();
00263      void copyNames(std::vector<std::string> & rowNames,
00264                     std::vector<std::string> & columnNames);
00266      void copyRowNames(const std::vector<std::string> & rowNames, int first, int last);
00268      void copyColumnNames(const std::vector<std::string> & columnNames, int first, int last);
00270      void copyRowNames(const char * const * rowNames, int first, int last);
00272      void copyColumnNames(const char * const * columnNames, int first, int last);
00274      void setRowName(int rowIndex, std::string & name) ;
00276      void setColumnName(int colIndex, std::string & name) ;
00277 #endif
00278 
00285      int findNetwork(char * rotate, double fractionNeeded = 0.75);
00288      CoinModel * createCoinModel() const;
00289 
00302      int writeMps(const char *filename,
00303                   int formatType = 0, int numberAcross = 2,
00304                   double objSense = 0.0) const ;
00306 
00308 
00309      inline int numberRows() const {
00310           return numberRows_;
00311      }
00312      inline int getNumRows() const {
00313           return numberRows_;
00314      }
00316      inline int getNumCols() const {
00317           return numberColumns_;
00318      }
00319      inline int numberColumns() const {
00320           return numberColumns_;
00321      }
00323      inline double primalTolerance() const {
00324           return dblParam_[ClpPrimalTolerance];
00325      }
00326      void setPrimalTolerance( double value) ;
00328      inline double dualTolerance() const  {
00329           return dblParam_[ClpDualTolerance];
00330      }
00331      void setDualTolerance( double value) ;
00333      inline double primalObjectiveLimit() const {
00334           return dblParam_[ClpPrimalObjectiveLimit];
00335      }
00336      void setPrimalObjectiveLimit(double value);
00338      inline double dualObjectiveLimit() const {
00339           return dblParam_[ClpDualObjectiveLimit];
00340      }
00341      void setDualObjectiveLimit(double value);
00343      inline double objectiveOffset() const {
00344           return dblParam_[ClpObjOffset];
00345      }
00346      void setObjectiveOffset(double value);
00348      inline double presolveTolerance() const {
00349           return dblParam_[ClpPresolveTolerance];
00350      }
00351 #ifndef CLP_NO_STD
00352      inline std::string problemName() const {
00353           return strParam_[ClpProbName];
00354      }
00355 #endif
00356 
00357      inline int numberIterations() const  {
00358           return numberIterations_;
00359      }
00360      inline int getIterationCount() const {
00361           return numberIterations_;
00362      }
00363      inline void setNumberIterations(int numberIterationsNew) {
00364           numberIterations_ = numberIterationsNew;
00365      }
00367      inline int solveType() const {
00368           return solveType_;
00369      }
00370      inline void setSolveType(int type) {
00371           solveType_ = type;
00372      }
00374      inline int maximumIterations() const {
00375           return intParam_[ClpMaxNumIteration];
00376      }
00377      void setMaximumIterations(int value);
00379      inline double maximumSeconds() const {
00380           return dblParam_[ClpMaxSeconds];
00381      }
00382      void setMaximumSeconds(double value);
00384      bool hitMaximumIterations() const;
00394      inline int status() const            {
00395           return problemStatus_;
00396      }
00397      inline int problemStatus() const            {
00398           return problemStatus_;
00399      }
00401      inline void setProblemStatus(int problemStatusNew) {
00402           problemStatus_ = problemStatusNew;
00403      }
00418      inline int secondaryStatus() const            {
00419           return secondaryStatus_;
00420      }
00421      inline void setSecondaryStatus(int newstatus) {
00422           secondaryStatus_ = newstatus;
00423      }
00425      inline bool isAbandoned() const             {
00426           return problemStatus_ == 4;
00427      }
00429      inline bool isProvenOptimal() const         {
00430           return problemStatus_ == 0;
00431      }
00433      inline bool isProvenPrimalInfeasible() const {
00434           return problemStatus_ == 1;
00435      }
00437      inline bool isProvenDualInfeasible() const  {
00438           return problemStatus_ == 2;
00439      }
00441      bool isPrimalObjectiveLimitReached() const ;
00443      bool isDualObjectiveLimitReached() const ;
00445      inline bool isIterationLimitReached() const {
00446           return problemStatus_ == 3;
00447      }
00449      inline double optimizationDirection() const {
00450           return  optimizationDirection_;
00451      }
00452      inline double getObjSense() const    {
00453           return optimizationDirection_;
00454      }
00455      void setOptimizationDirection(double value);
00457      inline double * primalRowSolution() const    {
00458           return rowActivity_;
00459      }
00460      inline const double * getRowActivity() const {
00461           return rowActivity_;
00462      }
00464      inline double * primalColumnSolution() const {
00465           return columnActivity_;
00466      }
00467      inline const double * getColSolution() const {
00468           return columnActivity_;
00469      }
00470      inline void setColSolution(const double * input) {
00471           memcpy(columnActivity_, input, numberColumns_ * sizeof(double));
00472      }
00474      inline double * dualRowSolution() const      {
00475           return dual_;
00476      }
00477      inline const double * getRowPrice() const    {
00478           return dual_;
00479      }
00481      inline double * dualColumnSolution() const   {
00482           return reducedCost_;
00483      }
00484      inline const double * getReducedCost() const {
00485           return reducedCost_;
00486      }
00488      inline double* rowLower() const              {
00489           return rowLower_;
00490      }
00491      inline const double* getRowLower() const     {
00492           return rowLower_;
00493      }
00495      inline double* rowUpper() const              {
00496           return rowUpper_;
00497      }
00498      inline const double* getRowUpper() const     {
00499           return rowUpper_;
00500      }
00501      //-------------------------------------------------------------------------
00505      void setObjectiveCoefficient( int elementIndex, double elementValue );
00507      inline void setObjCoeff( int elementIndex, double elementValue ) {
00508           setObjectiveCoefficient( elementIndex, elementValue);
00509      }
00510 
00513      void setColumnLower( int elementIndex, double elementValue );
00514 
00517      void setColumnUpper( int elementIndex, double elementValue );
00518 
00520      void setColumnBounds( int elementIndex,
00521                            double lower, double upper );
00522 
00531      void setColumnSetBounds(const int* indexFirst,
00532                              const int* indexLast,
00533                              const double* boundList);
00534 
00537      inline void setColLower( int elementIndex, double elementValue ) {
00538           setColumnLower(elementIndex, elementValue);
00539      }
00542      inline void setColUpper( int elementIndex, double elementValue ) {
00543           setColumnUpper(elementIndex, elementValue);
00544      }
00545 
00547      inline void setColBounds( int elementIndex,
00548                                double lower, double upper ) {
00549           setColumnBounds(elementIndex, lower, upper);
00550      }
00551 
00558      inline void setColSetBounds(const int* indexFirst,
00559                                  const int* indexLast,
00560                                  const double* boundList) {
00561           setColumnSetBounds(indexFirst, indexLast, boundList);
00562      }
00563 
00566      void setRowLower( int elementIndex, double elementValue );
00567 
00570      void setRowUpper( int elementIndex, double elementValue ) ;
00571 
00573      void setRowBounds( int elementIndex,
00574                         double lower, double upper ) ;
00575 
00582      void setRowSetBounds(const int* indexFirst,
00583                           const int* indexLast,
00584                           const double* boundList);
00585 
00587 
00588      inline const double * rowScale() const {
00589           return rowScale_;
00590      }
00591      inline const double * columnScale() const {
00592           return columnScale_;
00593      }
00594      inline const double * inverseRowScale() const {
00595           return inverseRowScale_;
00596      }
00597      inline const double * inverseColumnScale() const {
00598           return inverseColumnScale_;
00599      }
00600      inline double * mutableRowScale() const {
00601           return rowScale_;
00602      }
00603      inline double * mutableColumnScale() const {
00604           return columnScale_;
00605      }
00606      inline double * mutableInverseRowScale() const {
00607           return inverseRowScale_;
00608      }
00609      inline double * mutableInverseColumnScale() const {
00610           return inverseColumnScale_;
00611      }
00612      void setRowScale(double * scale) ;
00613      void setColumnScale(double * scale);
00615      inline double objectiveScale() const {
00616           return objectiveScale_;
00617      }
00618      inline void setObjectiveScale(double value) {
00619           objectiveScale_ = value;
00620      }
00622      inline double rhsScale() const {
00623           return rhsScale_;
00624      }
00625      inline void setRhsScale(double value) {
00626           rhsScale_ = value;
00627      }
00629      void scaling(int mode = 1);
00632      void unscale();
00634      inline int scalingFlag() const {
00635           return scalingFlag_;
00636      }
00638      inline double * objective() const {
00639           if (objective_) {
00640                double offset;
00641                return objective_->gradient(NULL, NULL, offset, false);
00642           } else {
00643                return NULL;
00644           }
00645      }
00646      inline double * objective(const double * solution, double & offset, bool refresh = true) const {
00647           offset = 0.0;
00648           if (objective_) {
00649                return objective_->gradient(NULL, solution, offset, refresh);
00650           } else {
00651                return NULL;
00652           }
00653      }
00654      inline const double * getObjCoefficients() const {
00655           if (objective_) {
00656                double offset;
00657                return objective_->gradient(NULL, NULL, offset, false);
00658           } else {
00659                return NULL;
00660           }
00661      }
00663      inline double * rowObjective() const         {
00664           return rowObjective_;
00665      }
00666      inline const double * getRowObjCoefficients() const {
00667           return rowObjective_;
00668      }
00670      inline double * columnLower() const          {
00671           return columnLower_;
00672      }
00673      inline const double * getColLower() const    {
00674           return columnLower_;
00675      }
00677      inline double * columnUpper() const          {
00678           return columnUpper_;
00679      }
00680      inline const double * getColUpper() const    {
00681           return columnUpper_;
00682      }
00684      inline CoinPackedMatrix * matrix() const {
00685           if ( matrix_ == NULL ) return NULL;
00686           else return matrix_->getPackedMatrix();
00687      }
00689      inline int getNumElements() const {
00690           return matrix_->getNumElements();
00691      }
00694      inline double getSmallElementValue() const {
00695           return smallElement_;
00696      }
00697      inline void setSmallElementValue(double value) {
00698           smallElement_ = value;
00699      }
00701      inline ClpMatrixBase * rowCopy() const       {
00702           return rowCopy_;
00703      }
00705      void setNewRowCopy(ClpMatrixBase * newCopy);
00707      inline ClpMatrixBase * clpMatrix() const     {
00708           return matrix_;
00709      }
00711      inline ClpPackedMatrix * clpScaledMatrix() const     {
00712           return scaledMatrix_;
00713      }
00715      inline void setClpScaledMatrix(ClpPackedMatrix * scaledMatrix) {
00716           delete scaledMatrix_;
00717           scaledMatrix_ = scaledMatrix;
00718      }
00724      void replaceMatrix(ClpMatrixBase * matrix, bool deleteCurrent = false);
00730      inline void replaceMatrix(CoinPackedMatrix * newmatrix,
00731                                bool deleteCurrent = false) {
00732           replaceMatrix(new ClpPackedMatrix(newmatrix), deleteCurrent);
00733      }
00735      inline double objectiveValue() const {
00736           return objectiveValue_ * optimizationDirection_ - dblParam_[ClpObjOffset];
00737      }
00738      inline void setObjectiveValue(double value) {
00739           objectiveValue_ = (value + dblParam_[ClpObjOffset]) / optimizationDirection_;
00740      }
00741      inline double getObjValue() const {
00742           return objectiveValue_ * optimizationDirection_ - dblParam_[ClpObjOffset];
00743      }
00745      inline char * integerInformation() const     {
00746           return integerType_;
00747      }
00750      double * infeasibilityRay() const;
00751      double * unboundedRay() const;
00753      inline bool statusExists() const {
00754           return (status_ != NULL);
00755      }
00757      inline unsigned char *  statusArray() const {
00758           return status_;
00759      }
00762      unsigned char *  statusCopy() const;
00764      void copyinStatus(const unsigned char * statusArray);
00765 
00767      inline void setUserPointer (void * pointer) {
00768           userPointer_ = pointer;
00769      }
00770      inline void * getUserPointer () const {
00771           return userPointer_;
00772      }
00774      inline void setTrustedUserPointer (ClpTrustedData * pointer) {
00775           trustedUserPointer_ = pointer;
00776      }
00777      inline ClpTrustedData * getTrustedUserPointer () const {
00778           return trustedUserPointer_;
00779      }
00781      inline int whatsChanged() const {
00782           return whatsChanged_;
00783      }
00784      inline void setWhatsChanged(int value) {
00785           whatsChanged_ = value;
00786      }
00788      inline int numberThreads() const {
00789           return numberThreads_;
00790      }
00791      inline void setNumberThreads(int value) {
00792           numberThreads_ = value;
00793      }
00795 
00797 
00798      void passInMessageHandler(CoinMessageHandler * handler);
00800      CoinMessageHandler * pushMessageHandler(CoinMessageHandler * handler,
00801                                              bool & oldDefault);
00803      void popMessageHandler(CoinMessageHandler * oldHandler, bool oldDefault);
00805      void newLanguage(CoinMessages::Language language);
00806      inline void setLanguage(CoinMessages::Language language) {
00807           newLanguage(language);
00808      }
00810      inline CoinMessageHandler * messageHandler() const       {
00811           return handler_;
00812      }
00814      inline CoinMessages messages() const                     {
00815           return messages_;
00816      }
00818      inline CoinMessages * messagesPointer()                  {
00819           return & messages_;
00820      }
00822      inline CoinMessages coinMessages() const                  {
00823           return coinMessages_;
00824      }
00826      inline CoinMessages * coinMessagesPointer()                  {
00827           return & coinMessages_;
00828      }
00837      inline void setLogLevel(int value)    {
00838           handler_->setLogLevel(value);
00839      }
00840      inline int logLevel() const           {
00841           return handler_->logLevel();
00842      }
00844      inline bool defaultHandler() const {
00845           return defaultHandler_;
00846      }
00848      void passInEventHandler(const ClpEventHandler * eventHandler);
00850      inline ClpEventHandler * eventHandler() const {
00851           return eventHandler_;
00852      }
00854      inline CoinThreadRandom * randomNumberGenerator() {
00855           return &randomNumberGenerator_;
00856      }
00858      inline CoinThreadRandom & mutableRandomNumberGenerator() {
00859           return randomNumberGenerator_;
00860      }
00862      inline void setRandomSeed(int value) {
00863           randomNumberGenerator_.setSeed(value);
00864      }
00866      inline int lengthNames() const {
00867           return lengthNames_;
00868      }
00869 #ifndef CLP_NO_STD
00870 
00871      inline void setLengthNames(int value) {
00872           lengthNames_ = value;
00873      }
00875      inline const std::vector<std::string> * rowNames() const {
00876           return &rowNames_;
00877      }
00878      inline const std::string& rowName(int iRow) const {
00879           return rowNames_[iRow];
00880      }
00882      std::string getRowName(int iRow) const;
00884      inline const std::vector<std::string> * columnNames() const {
00885           return &columnNames_;
00886      }
00887      inline const std::string& columnName(int iColumn) const {
00888           return columnNames_[iColumn];
00889      }
00891      std::string getColumnName(int iColumn) const;
00892 #endif
00893 
00894      inline ClpObjective * objectiveAsObject() const {
00895           return objective_;
00896      }
00897      void setObjective(ClpObjective * objective);
00898      inline void setObjectivePointer(ClpObjective * newobjective) {
00899           objective_ = newobjective;
00900      }
00903      int emptyProblem(int * infeasNumber = NULL, double * infeasSum = NULL, bool printMessage = true);
00904 
00906 
00915      void times(double scalar,
00916                 const double * x, double * y) const;
00920      void transposeTimes(double scalar,
00921                          const double * x, double * y) const ;
00923 
00924 
00925      //---------------------------------------------------------------------------
00943 
00944      bool setIntParam(ClpIntParam key, int value) ;
00946      bool setDblParam(ClpDblParam key, double value) ;
00947 #ifndef CLP_NO_STD
00948 
00949      bool setStrParam(ClpStrParam key, const std::string & value);
00950 #endif
00951      // Get an integer parameter
00952      inline bool getIntParam(ClpIntParam key, int& value) const {
00953           if (key < ClpLastIntParam) {
00954                value = intParam_[key];
00955                return true;
00956           } else {
00957                return false;
00958           }
00959      }
00960      // Get an double parameter
00961      inline bool getDblParam(ClpDblParam key, double& value) const {
00962           if (key < ClpLastDblParam) {
00963                value = dblParam_[key];
00964                return true;
00965           } else {
00966                return false;
00967           }
00968      }
00969 #ifndef CLP_NO_STD
00970      // Get a string parameter
00971      inline bool getStrParam(ClpStrParam key, std::string& value) const {
00972           if (key < ClpLastStrParam) {
00973                value = strParam_[key];
00974                return true;
00975           } else {
00976                return false;
00977           }
00978      }
00979 #endif
00980 
00981      void generateCpp( FILE * fp);
01014      inline unsigned int specialOptions() const {
01015           return specialOptions_;
01016      }
01017      void setSpecialOptions(unsigned int value);
01018 #define COIN_CBC_USING_CLP 0x01000000
01019      inline bool inCbcBranchAndBound() const {
01020           return (specialOptions_ & COIN_CBC_USING_CLP) != 0;
01021      }
01023 
01026 protected:
01028      void gutsOfDelete(int type);
01032      void gutsOfCopy(const ClpModel & rhs, int trueCopy = 1);
01034      void getRowBound(int iRow, double& lower, double& upper) const;
01036      void gutsOfLoadModel ( int numberRows, int numberColumns,
01037                             const double* collb, const double* colub,
01038                             const double* obj,
01039                             const double* rowlb, const double* rowub,
01040                             const double * rowObjective = NULL);
01042      void gutsOfScaling();
01044      inline double rawObjectiveValue() const {
01045           return objectiveValue_;
01046      }
01048      inline bool permanentArrays() const {
01049           return (specialOptions_ & 65536) != 0;
01050      }
01052      void startPermanentArrays();
01054      void stopPermanentArrays();
01056      const char * const * rowNamesAsChar() const;
01058      const char * const * columnNamesAsChar() const;
01060      void deleteNamesAsChar(const char * const * names, int number) const;
01062      void onStopped();
01064 
01065 
01067 protected:
01068 
01071 
01072      double optimizationDirection_;
01074      double dblParam_[ClpLastDblParam];
01076      double objectiveValue_;
01078      double smallElement_;
01080      double objectiveScale_;
01082      double rhsScale_;
01084      int numberRows_;
01086      int numberColumns_;
01088      double * rowActivity_;
01090      double * columnActivity_;
01092      double * dual_;
01094      double * reducedCost_;
01096      double* rowLower_;
01098      double* rowUpper_;
01100      ClpObjective * objective_;
01102      double * rowObjective_;
01104      double * columnLower_;
01106      double * columnUpper_;
01108      ClpMatrixBase * matrix_;
01110      ClpMatrixBase * rowCopy_;
01112      ClpPackedMatrix * scaledMatrix_;
01114      double * ray_;
01116      double * rowScale_;
01118      double * columnScale_;
01120      double * inverseRowScale_;
01122      double * inverseColumnScale_;
01125      int scalingFlag_;
01133      unsigned char * status_;
01135      char * integerType_;
01137      void * userPointer_;
01139      ClpTrustedData * trustedUserPointer_;
01141      int intParam_[ClpLastIntParam];
01143      int numberIterations_;
01145      int solveType_;
01162      unsigned int whatsChanged_;
01164      int problemStatus_;
01166      int secondaryStatus_;
01168      int lengthNames_;
01170      int numberThreads_;
01174      unsigned int specialOptions_;
01176      CoinMessageHandler * handler_;
01178      bool defaultHandler_;
01180      CoinThreadRandom randomNumberGenerator_;
01182      ClpEventHandler * eventHandler_;
01183 #ifndef CLP_NO_STD
01184 
01185      std::vector<std::string> rowNames_;
01187      std::vector<std::string> columnNames_;
01188 #endif
01189 
01190      CoinMessages messages_;
01192      CoinMessages coinMessages_;
01194      int maximumColumns_;
01196      int maximumRows_;
01198      int maximumInternalColumns_;
01200      int maximumInternalRows_;
01202      CoinPackedMatrix baseMatrix_;
01204      CoinPackedMatrix baseRowCopy_;
01206      double * savedRowScale_;
01208      double * savedColumnScale_;
01209 #ifndef CLP_NO_STD
01210 
01211      std::string strParam_[ClpLastStrParam];
01212 #endif
01213 
01214 };
01217 class ClpDataSave {
01218 
01219 public:
01223 
01224      ClpDataSave (  );
01225 
01227      ClpDataSave(const ClpDataSave &);
01229      ClpDataSave & operator=(const ClpDataSave & rhs);
01231      ~ClpDataSave (  );
01232 
01234 
01236 public:
01237 
01240      double dualBound_;
01241      double infeasibilityCost_;
01242      double pivotTolerance_;
01243      double zeroFactorizationTolerance_;
01244      double zeroSimplexTolerance_;
01245      double acceptablePivot_;
01246      double objectiveScale_;
01247      int sparseThreshold_;
01248      int perturbation_;
01249      int forceFactorization_;
01250      int scalingFlag_;
01251      unsigned int specialOptions_;
01253 };
01254 
01255 #endif