• Main Page
  • Classes
  • Files
  • File List
  • File Members

/build/buildd/clp-1.11.1/Clp/src/ClpSimplex.hpp

Go to the documentation of this file.
00001 /* $Id: ClpSimplex.hpp 1532 2010-03-23 14:36:16Z forrest $ */
00002 // Copyright (C) 2002, International Business Machines
00003 // Corporation and others.  All Rights Reserved.
00004 
00005 /* 
00006    Authors
00007  
00008    John Forrest
00009 
00010  */
00011 #ifndef ClpSimplex_H
00012 #define ClpSimplex_H
00013 
00014 #include <iostream>
00015 #include <cfloat>
00016 #include "ClpModel.hpp"
00017 #include "ClpMatrixBase.hpp"
00018 #include "ClpSolve.hpp"
00019 class ClpDualRowPivot;
00020 class ClpPrimalColumnPivot;
00021 class ClpFactorization;
00022 class CoinIndexedVector;
00023 class ClpNonLinearCost;
00024 class ClpNodeStuff;
00025 class CoinStructuredModel;
00026 class OsiClpSolverInterface;
00027 class CoinWarmStartBasis;
00028 class ClpDisasterHandler;
00029 class ClpConstraint;
00030 
00049 class ClpSimplex : public ClpModel {
00050   friend void ClpSimplexUnitTest(const std::string & mpsDir);
00051 
00052 public:
00057   enum Status {
00058     isFree = 0x00,
00059     basic = 0x01,
00060     atUpperBound = 0x02,
00061     atLowerBound = 0x03,
00062     superBasic = 0x04,
00063     isFixed = 0x05
00064   };
00065   // For Dual
00066   enum FakeBound {
00067     noFake = 0x00,
00068     lowerFake = 0x01,
00069     upperFake = 0x02,
00070     bothFake = 0x03
00071   };
00072 
00075 
00076     ClpSimplex (bool emptyMessages = false  );
00077 
00082   ClpSimplex(const ClpSimplex & rhs, int scalingMode =-1);
00087   ClpSimplex(const ClpModel & rhs, int scalingMode=-1);
00094   ClpSimplex (const ClpModel * wholeModel,
00095               int numberRows, const int * whichRows,
00096               int numberColumns, const int * whichColumns,
00097               bool dropNames=true, bool dropIntegers=true,
00098               bool fixOthers=false);
00105   ClpSimplex (const ClpSimplex * wholeModel,
00106               int numberRows, const int * whichRows,
00107               int numberColumns, const int * whichColumns,
00108               bool dropNames=true, bool dropIntegers=true,
00109               bool fixOthers=false);
00113   ClpSimplex (ClpSimplex * wholeModel,
00114               int numberColumns, const int * whichColumns);
00117   void originalModel(ClpSimplex * miniModel);
00123   void setPersistenceFlag(int value);
00125   void makeBaseModel();
00127   void deleteBaseModel();
00129   inline ClpSimplex *  baseModel() const
00130   { return baseModel_;}
00134   void setToBaseModel(ClpSimplex * model=NULL);
00136     ClpSimplex & operator=(const ClpSimplex & rhs);
00138    ~ClpSimplex (  );
00139   // Ones below are just ClpModel with some changes
00151   void loadProblem (  const ClpMatrixBase& matrix,
00152                      const double* collb, const double* colub,   
00153                      const double* obj,
00154                      const double* rowlb, const double* rowub,
00155                       const double * rowObjective=NULL);
00156   void loadProblem (  const CoinPackedMatrix& matrix,
00157                      const double* collb, const double* colub,   
00158                      const double* obj,
00159                      const double* rowlb, const double* rowub,
00160                       const double * rowObjective=NULL);
00161 
00164   void loadProblem (  const int numcols, const int numrows,
00165                      const CoinBigIndex* start, const int* index,
00166                      const double* value,
00167                      const double* collb, const double* colub,   
00168                      const double* obj,
00169                       const double* rowlb, const double* rowub,
00170                       const double * rowObjective=NULL);
00172   void loadProblem (  const int numcols, const int numrows,
00173                      const CoinBigIndex* start, const int* index,
00174                       const double* value,const int * length,
00175                      const double* collb, const double* colub,   
00176                      const double* obj,
00177                       const double* rowlb, const double* rowub,
00178                       const double * rowObjective=NULL);
00183   int loadProblem (  CoinModel & modelObject,bool keepSolution=false);
00185   int readMps(const char *filename,
00186               bool keepNames=false,
00187               bool ignoreErrors = false);
00189   int readGMPL(const char *filename,const char * dataName,
00190                bool keepNames=false);
00193   int readLp(const char *filename, const double epsilon = 1e-5);
00198   void borrowModel(ClpModel & otherModel);
00199   void borrowModel(ClpSimplex & otherModel);
00201    void passInEventHandler(const ClpEventHandler * eventHandler);
00203   void getbackSolution(const ClpSimplex & smallModel,const int * whichRow, const int * whichColumn);
00212   int loadNonLinear(void * info, int & numberConstraints, 
00213                     ClpConstraint ** & constraints);
00215 
00221   int initialSolve(ClpSolve & options);
00223   int initialSolve();
00225   int initialDualSolve();
00227   int initialPrimalSolve();
00229   int initialBarrierSolve();
00231   int initialBarrierNoCrossSolve();
00242   int dual(int ifValuesPass=0, int startFinishOptions=0);
00243   // If using Debug
00244   int dualDebug(int ifValuesPass=0, int startFinishOptions=0);
00255   int primal(int ifValuesPass=0, int startFinishOptions=0);
00261   int nonlinearSLP(int numberPasses,double deltaTolerance);
00267   int nonlinearSLP(int numberConstraints, ClpConstraint ** constraints,
00268                    int numberPasses,double deltaTolerance);
00271   int barrier(bool crossover=true);
00274   int reducedGradient(int phase=0);
00276   int solve(CoinStructuredModel * model);
00283   int loadProblem (  CoinStructuredModel & modelObject,
00284                      bool originalOrder=true,bool keepSolution=false);
00299   int cleanup(int cleanupScaling);
00320   int dualRanging(int numberCheck,const int * which,
00321                   double * costIncrease, int * sequenceIncrease,
00322                   double * costDecrease, int * sequenceDecrease,
00323                   double * valueIncrease=NULL, double * valueDecrease=NULL);
00338   int primalRanging(int numberCheck,const int * which,
00339                   double * valueIncrease, int * sequenceIncrease,
00340                   double * valueDecrease, int * sequenceDecrease);
00355   int writeBasis(const char *filename,
00356                  bool writeValues=false,
00357                  int formatType=0) const;
00360   int readBasis(const char *filename);
00362   CoinWarmStartBasis * getBasis() const;
00364   void setFactorization( ClpFactorization & factorization);
00365   // Swaps factorization
00366   ClpFactorization * swapFactorization( ClpFactorization * factorization);
00368   void copyFactorization( ClpFactorization & factorization);
00378   int tightenPrimalBounds(double factor=0.0,int doTight=0,bool tightIntegers=false);
00395   int crash(double gap,int pivot);
00397   void setDualRowPivotAlgorithm(ClpDualRowPivot & choice);
00399   void setPrimalColumnPivotAlgorithm(ClpPrimalColumnPivot & choice);
00408   int strongBranching(int numberVariables,const int * variables,
00409                       double * newLower, double * newUpper,
00410                       double ** outputSolution,
00411                       int * outputStatus, int * outputIterations,
00412                       bool stopOnFirstInfeasible=true,
00413                       bool alwaysFinish=false,
00414                       int startFinishOptions=0);
00416   int fathom(void * stuff);
00422   int fathomMany(void * stuff);
00424   double doubleCheck();
00426   int startFastDual2(ClpNodeStuff * stuff);
00428   int fastDual2(ClpNodeStuff * stuff);
00430   void stopFastDual2(ClpNodeStuff * stuff);
00437   ClpSimplex * fastCrunch(ClpNodeStuff * stuff, int mode);
00439 
00447   int pivot();
00448 
00454   int primalPivotResult();
00455   
00462   int dualPivotResult();
00463 
00475   int startup(int ifValuesPass,int startFinishOptions=0);
00476   void finish(int startFinishOptions=0);
00477   
00479   bool statusOfProblem(bool initial=false);
00481   void defaultFactorizationFrequency();
00483 
00486 
00487   inline bool primalFeasible() const
00488          { return (numberPrimalInfeasibilities_==0);}
00490   inline bool dualFeasible() const
00491          { return (numberDualInfeasibilities_==0);}
00493   inline ClpFactorization * factorization() const 
00494           { return factorization_;}
00496   bool sparseFactorization() const;
00497   void setSparseFactorization(bool value);
00499   int factorizationFrequency() const;
00500   void setFactorizationFrequency(int value);
00502   inline double dualBound() const
00503           { return dualBound_;}
00504   void setDualBound(double value);
00506   inline double infeasibilityCost() const
00507           { return infeasibilityCost_;}
00508   void setInfeasibilityCost(double value);
00525   inline int perturbation() const
00526     { return perturbation_;}
00527   void setPerturbation(int value);
00529   inline int algorithm() const 
00530   {return algorithm_; } 
00532   inline void setAlgorithm(int value)
00533   {algorithm_=value; } 
00535   bool isObjectiveLimitTestValid() const ;
00537   inline double sumDualInfeasibilities() const 
00538           { return sumDualInfeasibilities_;} 
00539   inline void setSumDualInfeasibilities(double value)
00540           { sumDualInfeasibilities_=value;} 
00542   inline double sumOfRelaxedDualInfeasibilities() const 
00543           { return sumOfRelaxedDualInfeasibilities_;} 
00544   inline void setSumOfRelaxedDualInfeasibilities(double value)
00545           { sumOfRelaxedDualInfeasibilities_=value;} 
00547   inline int numberDualInfeasibilities() const 
00548           { return numberDualInfeasibilities_;} 
00549   inline void setNumberDualInfeasibilities(int value)
00550           { numberDualInfeasibilities_=value;} 
00552   inline int numberDualInfeasibilitiesWithoutFree() const 
00553           { return numberDualInfeasibilitiesWithoutFree_;} 
00555   inline double sumPrimalInfeasibilities() const 
00556           { return sumPrimalInfeasibilities_;} 
00557   inline void setSumPrimalInfeasibilities(double value)
00558           { sumPrimalInfeasibilities_=value;} 
00560   inline double sumOfRelaxedPrimalInfeasibilities() const 
00561           { return sumOfRelaxedPrimalInfeasibilities_;} 
00562   inline void setSumOfRelaxedPrimalInfeasibilities(double value)
00563           { sumOfRelaxedPrimalInfeasibilities_=value;} 
00565   inline int numberPrimalInfeasibilities() const 
00566           { return numberPrimalInfeasibilities_;} 
00567   inline void setNumberPrimalInfeasibilities(int value)
00568           { numberPrimalInfeasibilities_=value;} 
00575   int saveModel(const char * fileName);
00578   int restoreModel(const char * fileName);
00579   
00587   void checkSolution(int setToBounds=0);
00590   void checkSolutionInternal();
00592   inline CoinIndexedVector * rowArray(int index) const
00593   { return rowArray_[index];}
00595   inline CoinIndexedVector * columnArray(int index) const
00596   { return columnArray_[index];}
00598   inline void setFirstFree(int value)
00599   { firstFree_=value;}
00601 
00602   /******************** End of most useful part **************/
00608   int getSolution (  const double * rowActivities,
00609                      const double * columnActivities);
00613   int getSolution ();
00620   int createPiecewiseLinearCosts(const int * starts,
00621                    const double * lower, const double * gradient);
00623   inline ClpDualRowPivot * dualRowPivot() const
00624   { return dualRowPivot_;}
00626   inline ClpPrimalColumnPivot * primalColumnPivot() const
00627   { return primalColumnPivot_;}
00629   inline bool goodAccuracy() const
00630   { return (largestPrimalError_<1.0e-7&&largestDualError_<1.0e-7);}
00632   void returnModel(ClpSimplex & otherModel);
00640   int internalFactorize(int solveType);
00642   ClpDataSave saveData() ;
00644   void restoreData(ClpDataSave saved);
00646   void cleanStatus();
00648   int factorize();
00651   void computeDuals(double * givenDjs);
00653   void computePrimals (  const double * rowActivities,
00654                      const double * columnActivities);
00656   void add(double * array,
00657                    int column, double multiplier) const;
00663   void unpack(CoinIndexedVector * rowArray) const ;
00669   void unpack(CoinIndexedVector * rowArray,int sequence) const;
00676   void unpackPacked(CoinIndexedVector * rowArray) ;
00683   void unpackPacked(CoinIndexedVector * rowArray,int sequence);
00684 protected:  
00689   int housekeeping(double objectiveChange);
00692   void checkPrimalSolution(const double * rowActivities=NULL,
00693                            const double * columnActivies=NULL);
00696   void checkDualSolution();
00698   void checkBothSolutions();
00703   double scaleObjective(double value);
00705   int solveDW(CoinStructuredModel * model);
00707   int solveBenders(CoinStructuredModel * model);
00708 public:
00719   void setValuesPassAction(double incomingInfeasibility,
00720                            double allowedInfeasibility);
00722 
00724 public: 
00726   inline double alphaAccuracy() const
00727           { return alphaAccuracy_;} 
00728   inline void setAlphaAccuracy(double value)
00729           { alphaAccuracy_ = value;} 
00730 public:
00732    //inline double objectiveValue() const {
00733   //return (objectiveValue_-bestPossibleImprovement_)*optimizationDirection_ - dblParam_[ClpObjOffset];
00734   //}
00736   inline void setDisasterHandler(ClpDisasterHandler * handler)
00737   { disasterArea_= handler;}
00739   inline ClpDisasterHandler * disasterHandler() const
00740   { return disasterArea_;}
00742   inline double largeValue() const 
00743           { return largeValue_;} 
00744   void setLargeValue( double value) ;
00746   inline double largestPrimalError() const
00747           { return largestPrimalError_;} 
00749   inline double largestDualError() const
00750           { return largestDualError_;} 
00752   inline void setLargestPrimalError(double value)
00753           { largestPrimalError_=value;} 
00755   inline void setLargestDualError(double value)
00756           { largestDualError_=value;} 
00758   inline double zeroTolerance() const 
00759   { return zeroTolerance_;/*factorization_->zeroTolerance();*/} 
00761   inline void setZeroTolerance( double value)
00762   { zeroTolerance_ = value;}
00764   inline int * pivotVariable() const
00765           { return pivotVariable_;}
00767   inline bool automaticScaling() const
00768   { return automaticScale_!=0;}
00769   inline void setAutomaticScaling(bool onOff)
00770   { automaticScale_ = onOff ? 1: 0;} 
00772   inline double currentDualTolerance() const 
00773           { return dualTolerance_;} 
00774   inline void setCurrentDualTolerance(double value)
00775           { dualTolerance_ = value;} 
00777   inline double currentPrimalTolerance() const 
00778           { return primalTolerance_;} 
00779   inline void setCurrentPrimalTolerance(double value)
00780           { primalTolerance_ = value;} 
00782   inline int numberRefinements() const 
00783           { return numberRefinements_;} 
00784   void setNumberRefinements( int value) ;
00786   inline double alpha() const { return alpha_;}
00787   inline void setAlpha(double value) { alpha_ = value;}
00789   inline double dualIn() const { return dualIn_;}
00791   inline int pivotRow() const{ return pivotRow_;}
00792   inline void setPivotRow(int value) { pivotRow_=value;}
00794   double valueIncomingDual() const;
00796 
00797   protected:
00803   int gutsOfSolution ( double * givenDuals,
00804                        const double * givenPrimals,
00805                        bool valuesPass=false);
00807   void gutsOfDelete(int type);
00809   void gutsOfCopy(const ClpSimplex & rhs);
00821   bool createRim(int what,bool makeRowCopy=false,int startFinishOptions=0);
00823   void createRim1(bool initial);
00825   void createRim4(bool initial);
00827   void createRim5(bool initial);
00832   void deleteRim(int getRidOfFactorizationData=2);
00834   bool sanityCheck();
00836   public:
00841   inline double * solutionRegion(int section) const
00842   { if (!section) return rowActivityWork_; else return columnActivityWork_;}
00843   inline double * djRegion(int section) const
00844   { if (!section) return rowReducedCost_; else return reducedCostWork_;}
00845   inline double * lowerRegion(int section) const
00846   { if (!section) return rowLowerWork_; else return columnLowerWork_;}
00847   inline double * upperRegion(int section) const
00848   { if (!section) return rowUpperWork_; else return columnUpperWork_;}
00849   inline double * costRegion(int section) const
00850   { if (!section) return rowObjectiveWork_; else return objectiveWork_;}
00852   inline double * solutionRegion() const
00853   { return solution_;}
00854   inline double * djRegion() const
00855   { return dj_;}
00856   inline double * lowerRegion() const
00857   { return lower_;}
00858   inline double * upperRegion() const
00859   { return upper_;}
00860   inline double * costRegion() const
00861   { return cost_;}
00862   inline Status getStatus(int sequence) const
00863   {return static_cast<Status> (status_[sequence]&7);}
00864   inline void setStatus(int sequence, Status newstatus)
00865   {
00866     unsigned char & st_byte = status_[sequence];
00867     st_byte = static_cast<unsigned char>(st_byte & ~7);
00868     st_byte = static_cast<unsigned char>(st_byte | newstatus);
00869   }
00871   bool startPermanentArrays();
00876   void setInitialDenseFactorization(bool onOff);
00877   bool  initialDenseFactorization() const;
00879   inline int sequenceIn() const
00880   {return sequenceIn_;}
00881   inline int sequenceOut() const
00882   {return sequenceOut_;}
00884   inline void  setSequenceIn(int sequence)
00885   { sequenceIn_=sequence;}
00886   inline void  setSequenceOut(int sequence)
00887   { sequenceOut_=sequence;}
00889   inline int directionIn() const
00890   {return directionIn_;}
00891   inline int directionOut() const
00892   {return directionOut_;}
00894   inline void  setDirectionIn(int direction)
00895   { directionIn_=direction;}
00896   inline void  setDirectionOut(int direction)
00897   { directionOut_=direction;}
00899   inline double valueOut() const
00900   { return valueOut_;}
00902   inline void setValueOut(double value)
00903   { valueOut_=value;}
00905   inline void setLowerOut(double value)
00906   { lowerOut_=value;}
00908   inline void setUpperOut(double value)
00909   { upperOut_=value;}
00911   inline void setTheta(double value)
00912   { theta_=value;}
00914   inline int isColumn(int sequence) const
00915   { return sequence<numberColumns_ ? 1 : 0;}
00917   inline int sequenceWithin(int sequence) const
00918   { return sequence<numberColumns_ ? sequence : sequence-numberColumns_;}
00920   inline double solution(int sequence)
00921   { return solution_[sequence];}
00923   inline double & solutionAddress(int sequence)
00924   { return solution_[sequence];}
00925   inline double reducedCost(int sequence)
00926    { return dj_[sequence];}
00927   inline double & reducedCostAddress(int sequence)
00928    { return dj_[sequence];}
00929   inline double lower(int sequence)
00930   { return lower_[sequence];}
00932   inline double & lowerAddress(int sequence)
00933   { return lower_[sequence];}
00934   inline double upper(int sequence)
00935   { return upper_[sequence];}
00937   inline double & upperAddress(int sequence)
00938   { return upper_[sequence];}
00939   inline double cost(int sequence)
00940   { return cost_[sequence];}
00942   inline double & costAddress(int sequence)
00943   { return cost_[sequence];}
00945   inline double originalLower(int iSequence) const
00946   { if (iSequence<numberColumns_) return columnLower_[iSequence]; else
00947     return rowLower_[iSequence-numberColumns_];}
00949   inline double originalUpper(int iSequence) const
00950   { if (iSequence<numberColumns_) return columnUpper_[iSequence]; else
00951     return rowUpper_[iSequence-numberColumns_];}
00953   inline double theta() const
00954   { return theta_;}
00957   inline double bestPossibleImprovement() const
00958   { return bestPossibleImprovement_;}
00960   inline ClpNonLinearCost * nonLinearCost() const
00961   { return nonLinearCost_;}
00974   inline int moreSpecialOptions() const
00975   { return moreSpecialOptions_;}
00988   inline void setMoreSpecialOptions(int value)
00989   { moreSpecialOptions_ = value;}
00991 
00993   inline void setFakeBound(int sequence, FakeBound fakeBound)
00994   {
00995     unsigned char & st_byte = status_[sequence];
00996     st_byte = static_cast<unsigned char>(st_byte & ~24);
00997     st_byte = static_cast<unsigned char>(st_byte | (fakeBound<<3));
00998   }
00999   inline FakeBound getFakeBound(int sequence) const
01000   {return static_cast<FakeBound> ((status_[sequence]>>3)&3);}
01001   inline void setRowStatus(int sequence, Status newstatus)
01002   {
01003     unsigned char & st_byte = status_[sequence+numberColumns_];
01004     st_byte = static_cast<unsigned char>(st_byte & ~7);
01005     st_byte = static_cast<unsigned char>(st_byte | newstatus);
01006   }
01007   inline Status getRowStatus(int sequence) const
01008   {return static_cast<Status> (status_[sequence+numberColumns_]&7);}
01009   inline void setColumnStatus(int sequence, Status newstatus)
01010   {
01011     unsigned char & st_byte = status_[sequence];
01012     st_byte = static_cast<unsigned char>(st_byte & ~7);
01013     st_byte = static_cast<unsigned char>(st_byte | newstatus);
01014   }
01015   inline Status getColumnStatus(int sequence) const
01016   {return static_cast<Status> (status_[sequence]&7);}
01017   inline void setPivoted( int sequence)
01018   { status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32);}
01019   inline void clearPivoted( int sequence)
01020   { status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32);}
01021   inline bool pivoted(int sequence) const
01022   {return (((status_[sequence]>>5)&1)!=0);}
01024   void setFlagged( int sequence);
01025   inline void clearFlagged( int sequence)
01026   {
01027     status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64);
01028   }
01029   inline bool flagged(int sequence) const
01030   {return ((status_[sequence]&64)!=0);}
01032   inline void setActive( int iRow)
01033   {
01034     status_[iRow] = static_cast<unsigned char>(status_[iRow] | 128);
01035   }
01036   inline void clearActive( int iRow)
01037   {
01038     status_[iRow] = static_cast<unsigned char>(status_[iRow] & ~128);
01039   }
01040   inline bool active(int iRow) const
01041   {return ((status_[iRow]&128)!=0);}
01044   void createStatus() ;
01047   void allSlackBasis(bool resetSolution=false);
01048     
01050   inline int lastBadIteration() const
01051   {return lastBadIteration_;}
01053   inline int progressFlag() const
01054   {return (progressFlag_&3);}
01056   inline void forceFactorization(int value)
01057   { forceFactorization_ = value;}
01059   inline double rawObjectiveValue() const
01060   { return objectiveValue_;}
01062   void computeObjectiveValue(bool useWorkingSolution=false);
01064   double computeInternalObjectiveValue();
01068   inline int numberExtraRows() const
01069   { return numberExtraRows_;}
01072   inline int maximumBasic() const
01073   { return maximumBasic_;}
01075   inline int baseIteration() const
01076   { return baseIteration_;}
01078   void generateCpp( FILE * fp,bool defaultFactor=false);
01080   ClpFactorization * getEmptyFactorization();
01082   void setEmptyFactorization();
01084   void moveInfo(const ClpSimplex & rhs, bool justStatus=false);
01086 
01088   // These are only to be used using startFinishOptions (ClpSimplexDual, ClpSimplexPrimal)
01089   // *** At present only without scaling
01090   // *** Slacks havve -1.0 element (so == row activity) - take care
01092   void getBInvARow(int row, double* z, double * slack=NULL);
01093   
01095   void getBInvRow(int row, double* z);
01096   
01098   void getBInvACol(int col, double* vec);
01099   
01101   void getBInvCol(int col, double* vec);
01102   
01107   void getBasics(int* index);
01108   
01110     //-------------------------------------------------------------------------
01114        void setObjectiveCoefficient( int elementIndex, double elementValue );
01116        inline void setObjCoeff( int elementIndex, double elementValue )
01117        { setObjectiveCoefficient( elementIndex, elementValue);}
01118 
01121        void setColumnLower( int elementIndex, double elementValue );
01122       
01125        void setColumnUpper( int elementIndex, double elementValue );
01126 
01128       void setColumnBounds( int elementIndex,
01129         double lower, double upper );
01130 
01139       void setColumnSetBounds(const int* indexFirst,
01140                                    const int* indexLast,
01141                                    const double* boundList);
01142       
01145        inline void setColLower( int elementIndex, double elementValue )
01146        { setColumnLower(elementIndex, elementValue);}
01149        inline void setColUpper( int elementIndex, double elementValue )
01150        { setColumnUpper(elementIndex, elementValue);}
01151 
01153       inline void setColBounds( int elementIndex,
01154         double newlower, double newupper )
01155        { setColumnBounds(elementIndex, newlower, newupper);}
01156 
01163       inline void setColSetBounds(const int* indexFirst,
01164                                    const int* indexLast,
01165                                    const double* boundList)
01166       { setColumnSetBounds(indexFirst, indexLast, boundList);}
01167       
01170       void setRowLower( int elementIndex, double elementValue );
01171       
01174       void setRowUpper( int elementIndex, double elementValue ) ;
01175     
01177       void setRowBounds( int elementIndex,
01178                                  double lower, double upper ) ;
01179     
01186       void setRowSetBounds(const int* indexFirst,
01187                                    const int* indexLast,
01188                                    const double* boundList);
01190   void resize (int newNumberRows, int newNumberColumns);
01191     
01193 
01195 protected:
01196 
01205   double bestPossibleImprovement_;
01207   double zeroTolerance_;
01209   int columnPrimalSequence_;
01211   int rowPrimalSequence_;
01213   double bestObjectiveValue_;
01215   int moreSpecialOptions_;
01217   int baseIteration_;
01219   double primalToleranceToGetOptimal_;
01221   double largeValue_;
01223   double largestPrimalError_;
01225   double largestDualError_;
01227   double alphaAccuracy_;
01229   double dualBound_;
01231   double alpha_;
01233   double theta_;
01235   double lowerIn_;
01237   double valueIn_;
01239   double upperIn_;
01241   double dualIn_;
01243   double lowerOut_;
01245   double valueOut_;
01247   double upperOut_;
01249   double dualOut_;
01251   double dualTolerance_;
01253   double primalTolerance_;
01255   double sumDualInfeasibilities_;
01257   double sumPrimalInfeasibilities_;
01259   double infeasibilityCost_;
01261   double sumOfRelaxedDualInfeasibilities_;
01263   double sumOfRelaxedPrimalInfeasibilities_;
01265   double acceptablePivot_;
01267   double * lower_;
01269   double * rowLowerWork_;
01271   double * columnLowerWork_;
01273   double * upper_;
01275   double * rowUpperWork_;
01277   double * columnUpperWork_;
01279   double * cost_;
01281   double * rowObjectiveWork_;
01283   double * objectiveWork_;
01285   CoinIndexedVector * rowArray_[6];
01287   CoinIndexedVector * columnArray_[6];
01289   int sequenceIn_;
01291   int directionIn_;
01293   int sequenceOut_;
01295   int directionOut_;
01297   int pivotRow_;
01299   int lastGoodIteration_;
01301   double * dj_;
01303   double * rowReducedCost_;
01305   double * reducedCostWork_;
01307   double * solution_;
01309   double * rowActivityWork_;
01311   double * columnActivityWork_;
01313   int numberDualInfeasibilities_;
01315   int numberDualInfeasibilitiesWithoutFree_;
01317   int numberPrimalInfeasibilities_;
01319   int numberRefinements_;
01321   ClpDualRowPivot * dualRowPivot_;
01323   ClpPrimalColumnPivot * primalColumnPivot_;
01325   int * pivotVariable_;
01327   ClpFactorization * factorization_;
01329   double * savedSolution_;
01331   int numberTimesOptimal_;
01333   ClpDisasterHandler * disasterArea_;
01335   int changeMade_;
01337   int algorithm_;
01340   int forceFactorization_;
01348   int perturbation_;
01350   unsigned char * saveStatus_;
01355   ClpNonLinearCost * nonLinearCost_;
01357   int lastBadIteration_;
01359   int lastFlaggedIteration_;
01361   int numberFake_;
01363   int numberChanged_;
01365   int progressFlag_;
01367   int firstFree_;
01371   int numberExtraRows_;
01374   int maximumBasic_;
01376   int dontFactorizePivots_;
01386   double incomingInfeasibility_;
01387   double allowedInfeasibility_;
01389   int automaticScale_;
01391   int maximumPerturbationSize_;
01393   double * perturbationArray_;
01395   ClpSimplex * baseModel_;
01397   ClpSimplexProgress progress_;
01398 public:
01400   mutable int spareIntArray_[4];
01402   mutable double spareDoubleArray_[4];
01403 protected:
01405   friend class OsiClpSolverInterface;
01407 };
01408 //#############################################################################
01417 void
01418 ClpSimplexUnitTest(const std::string & mpsDir);
01419 
01420 // For Devex stuff
01421 #define DEVEX_TRY_NORM 1.0e-4
01422 #define DEVEX_ADD_ONE 1.0
01423 #endif

Generated on Fri Aug 20 2010 06:29:29 by  doxygen 1.7.1