00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef ClpSimplex_H
00011 #define ClpSimplex_H
00012
00013 #include <iostream>
00014 #include <cfloat>
00015 #include "ClpModel.hpp"
00016 #include "ClpMatrixBase.hpp"
00017 #include "ClpSolve.hpp"
00018 class ClpDualRowPivot;
00019 class ClpPrimalColumnPivot;
00020 class ClpFactorization;
00021 #include "ClpFactorization.hpp"
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
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);
00124 #ifdef CLP_AUXILIARY_MODEL
00125
00138 void auxiliaryModel(int options);
00140 void deleteAuxiliaryModel();
00142 inline bool usingAuxiliaryModel() const
00143 { return auxiliaryModel_!=NULL;}
00144 #endif
00146 void makeBaseModel();
00148 void deleteBaseModel();
00150 inline ClpSimplex * baseModel() const
00151 { return baseModel_;}
00155 void setToBaseModel(ClpSimplex * model=NULL);
00157 ClpSimplex & operator=(const ClpSimplex & rhs);
00159 ~ClpSimplex ( );
00160
00172 void loadProblem ( const ClpMatrixBase& matrix,
00173 const double* collb, const double* colub,
00174 const double* obj,
00175 const double* rowlb, const double* rowub,
00176 const double * rowObjective=NULL);
00177 void loadProblem ( const CoinPackedMatrix& matrix,
00178 const double* collb, const double* colub,
00179 const double* obj,
00180 const double* rowlb, const double* rowub,
00181 const double * rowObjective=NULL);
00182
00185 void loadProblem ( const int numcols, const int numrows,
00186 const CoinBigIndex* start, const int* index,
00187 const double* value,
00188 const double* collb, const double* colub,
00189 const double* obj,
00190 const double* rowlb, const double* rowub,
00191 const double * rowObjective=NULL);
00193 void loadProblem ( const int numcols, const int numrows,
00194 const CoinBigIndex* start, const int* index,
00195 const double* value,const int * length,
00196 const double* collb, const double* colub,
00197 const double* obj,
00198 const double* rowlb, const double* rowub,
00199 const double * rowObjective=NULL);
00204 int loadProblem ( CoinModel & modelObject,bool keepSolution=false);
00206 int readMps(const char *filename,
00207 bool keepNames=false,
00208 bool ignoreErrors = false);
00210 int readGMPL(const char *filename,const char * dataName,
00211 bool keepNames=false);
00214 int readLp(const char *filename, const double epsilon = 1e-5);
00219 void borrowModel(ClpModel & otherModel);
00220 void borrowModel(ClpSimplex & otherModel);
00222 void passInEventHandler(const ClpEventHandler * eventHandler);
00224 void getbackSolution(const ClpSimplex & smallModel,const int * whichRow, const int * whichColumn);
00233 int loadNonLinear(void * info, int & numberConstraints,
00234 ClpConstraint ** & constraints);
00236
00242 int initialSolve(ClpSolve & options);
00244 int initialSolve();
00246 int initialDualSolve();
00248 int initialPrimalSolve();
00250 int initialBarrierSolve();
00252 int initialBarrierNoCrossSolve();
00263 int dual(int ifValuesPass=0, int startFinishOptions=0);
00264
00265 int dualDebug(int ifValuesPass=0, int startFinishOptions=0);
00276 int primal(int ifValuesPass=0, int startFinishOptions=0);
00282 int nonlinearSLP(int numberPasses,double deltaTolerance);
00288 int nonlinearSLP(int numberConstraints, ClpConstraint ** constraints,
00289 int numberPasses,double deltaTolerance);
00292 int barrier(bool crossover=true);
00295 int reducedGradient(int phase=0);
00297 int solve(CoinStructuredModel * model);
00304 int loadProblem ( CoinStructuredModel & modelObject,
00305 bool originalOrder=true,bool keepSolution=false);
00320 int cleanup(int cleanupScaling);
00341 int dualRanging(int numberCheck,const int * which,
00342 double * costIncrease, int * sequenceIncrease,
00343 double * costDecrease, int * sequenceDecrease,
00344 double * valueIncrease=NULL, double * valueDecrease=NULL);
00359 int primalRanging(int numberCheck,const int * which,
00360 double * valueIncrease, int * sequenceIncrease,
00361 double * valueDecrease, int * sequenceDecrease);
00376 int writeBasis(const char *filename,
00377 bool writeValues=false,
00378 int formatType=0) const;
00381 int readBasis(const char *filename);
00383 CoinWarmStartBasis * getBasis() const;
00385 void setFactorization( ClpFactorization & factorization);
00387 void copyFactorization( ClpFactorization & factorization);
00397 int tightenPrimalBounds(double factor=0.0,int doTight=0,bool tightIntegers=false);
00414 int crash(double gap,int pivot);
00416 void setDualRowPivotAlgorithm(ClpDualRowPivot & choice);
00418 void setPrimalColumnPivotAlgorithm(ClpPrimalColumnPivot & choice);
00427 int strongBranching(int numberVariables,const int * variables,
00428 double * newLower, double * newUpper,
00429 double ** outputSolution,
00430 int * outputStatus, int * outputIterations,
00431 bool stopOnFirstInfeasible=true,
00432 bool alwaysFinish=false,
00433 int startFinishOptions=0);
00435 int fathom(void * stuff);
00441 int fathomMany(void * stuff);
00443 double doubleCheck();
00445 int startFastDual2(ClpNodeStuff * stuff);
00447 int fastDual2(ClpNodeStuff * stuff);
00449 void stopFastDual2(ClpNodeStuff * stuff);
00456 ClpSimplex * fastCrunch(ClpNodeStuff * stuff, int mode);
00458
00466 int pivot();
00467
00473 int primalPivotResult();
00474
00481 int dualPivotResult();
00482
00494 int startup(int ifValuesPass,int startFinishOptions=0);
00495 void finish(int startFinishOptions=0);
00496
00498 bool statusOfProblem(bool initial=false);
00500 void defaultFactorizationFrequency();
00502
00505
00506 inline bool primalFeasible() const
00507 { return (numberPrimalInfeasibilities_==0);}
00509 inline bool dualFeasible() const
00510 { return (numberDualInfeasibilities_==0);}
00512 inline ClpFactorization * factorization() const
00513 { return factorization_;}
00515 bool sparseFactorization() const;
00516 void setSparseFactorization(bool value);
00518 int factorizationFrequency() const;
00519 void setFactorizationFrequency(int value);
00521 inline double dualBound() const
00522 { return dualBound_;}
00523 void setDualBound(double value);
00525 inline double infeasibilityCost() const
00526 { return infeasibilityCost_;}
00527 void setInfeasibilityCost(double value);
00544 inline int perturbation() const
00545 { return perturbation_;}
00546 void setPerturbation(int value);
00548 inline int algorithm() const
00549 {return algorithm_; }
00551 inline void setAlgorithm(int value)
00552 {algorithm_=value; }
00554 bool isObjectiveLimitTestValid() const ;
00556 inline double sumDualInfeasibilities() const
00557 { return sumDualInfeasibilities_;}
00558 inline void setSumDualInfeasibilities(double value)
00559 { sumDualInfeasibilities_=value;}
00561 inline double sumOfRelaxedDualInfeasibilities() const
00562 { return sumOfRelaxedDualInfeasibilities_;}
00563 inline void setSumOfRelaxedDualInfeasibilities(double value)
00564 { sumOfRelaxedDualInfeasibilities_=value;}
00566 inline int numberDualInfeasibilities() const
00567 { return numberDualInfeasibilities_;}
00568 inline void setNumberDualInfeasibilities(int value)
00569 { numberDualInfeasibilities_=value;}
00571 inline int numberDualInfeasibilitiesWithoutFree() const
00572 { return numberDualInfeasibilitiesWithoutFree_;}
00574 inline double sumPrimalInfeasibilities() const
00575 { return sumPrimalInfeasibilities_;}
00576 inline void setSumPrimalInfeasibilities(double value)
00577 { sumPrimalInfeasibilities_=value;}
00579 inline double sumOfRelaxedPrimalInfeasibilities() const
00580 { return sumOfRelaxedPrimalInfeasibilities_;}
00581 inline void setSumOfRelaxedPrimalInfeasibilities(double value)
00582 { sumOfRelaxedPrimalInfeasibilities_=value;}
00584 inline int numberPrimalInfeasibilities() const
00585 { return numberPrimalInfeasibilities_;}
00586 inline void setNumberPrimalInfeasibilities(int value)
00587 { numberPrimalInfeasibilities_=value;}
00594 int saveModel(const char * fileName);
00597 int restoreModel(const char * fileName);
00598
00606 void checkSolution(int setToBounds=false);
00609 void checkSolutionInternal();
00611 inline CoinIndexedVector * rowArray(int index) const
00612 { return rowArray_[index];}
00614 inline CoinIndexedVector * columnArray(int index) const
00615 { return columnArray_[index];}
00617
00618
00624 int getSolution ( const double * rowActivities,
00625 const double * columnActivities);
00629 int getSolution ();
00636 int createPiecewiseLinearCosts(const int * starts,
00637 const double * lower, const double * gradient);
00639 ClpDualRowPivot * dualRowPivot() const
00640 { return dualRowPivot_;}
00642 inline bool goodAccuracy() const
00643 { return (largestPrimalError_<1.0e-7&&largestDualError_<1.0e-7);}
00645 void returnModel(ClpSimplex & otherModel);
00653 int internalFactorize(int solveType);
00655 ClpDataSave saveData() ;
00657 void restoreData(ClpDataSave saved);
00659 void cleanStatus();
00661 int factorize();
00664 void computeDuals(double * givenDjs);
00666 void computePrimals ( const double * rowActivities,
00667 const double * columnActivities);
00669 void add(double * array,
00670 int column, double multiplier) const;
00676 void unpack(CoinIndexedVector * rowArray) const ;
00682 void unpack(CoinIndexedVector * rowArray,int sequence) const;
00689 void unpackPacked(CoinIndexedVector * rowArray) ;
00696 void unpackPacked(CoinIndexedVector * rowArray,int sequence);
00697 protected:
00702 int housekeeping(double objectiveChange);
00705 void checkPrimalSolution(const double * rowActivities=NULL,
00706 const double * columnActivies=NULL);
00709 void checkDualSolution();
00711 void checkBothSolutions();
00716 double scaleObjective(double value);
00718 int solveDW(CoinStructuredModel * model);
00720 int solveBenders(CoinStructuredModel * model);
00721 public:
00732 void setValuesPassAction(double incomingInfeasibility,
00733 double allowedInfeasibility);
00735
00737 public:
00739 inline double alphaAccuracy() const
00740 { return alphaAccuracy_;}
00741 inline void setAlphaAccuracy(double value)
00742 { alphaAccuracy_ = value;}
00743 public:
00745 inline void setDisasterHandler(ClpDisasterHandler * handler)
00746 { disasterArea_= handler;}
00748 inline ClpDisasterHandler * disasterHandler() const
00749 { return disasterArea_;}
00751 inline double largeValue() const
00752 { return largeValue_;}
00753 void setLargeValue( double value) ;
00755 inline double largestPrimalError() const
00756 { return largestPrimalError_;}
00758 inline double largestDualError() const
00759 { return largestDualError_;}
00761 inline void setLargestPrimalError(double value)
00762 { largestPrimalError_=value;}
00764 inline void setLargestDualError(double value)
00765 { largestDualError_=value;}
00767 inline double zeroTolerance() const
00768 { return zeroTolerance_;}
00770 inline void setZeroTolerance( double value)
00771 { zeroTolerance_ = value;}
00773 inline int * pivotVariable() const
00774 { return pivotVariable_;}
00776 inline bool automaticScaling() const
00777 { return automaticScale_!=0;}
00778 inline void setAutomaticScaling(bool onOff)
00779 { automaticScale_ = onOff ? 1: 0;}
00781 inline double currentDualTolerance() const
00782 { return dualTolerance_;}
00783 inline void setCurrentDualTolerance(double value)
00784 { dualTolerance_ = value;}
00786 inline double currentPrimalTolerance() const
00787 { return primalTolerance_;}
00788 inline void setCurrentPrimalTolerance(double value)
00789 { primalTolerance_ = value;}
00791 inline int numberRefinements() const
00792 { return numberRefinements_;}
00793 void setNumberRefinements( int value) ;
00795 inline double alpha() const { return alpha_;}
00796 inline void setAlpha(double value) { alpha_ = value;}
00798 inline double dualIn() const { return dualIn_;}
00800 inline int pivotRow() const{ return pivotRow_;}
00801 inline void setPivotRow(int value) { pivotRow_=value;}
00803 double valueIncomingDual() const;
00805
00806 protected:
00812 int gutsOfSolution ( double * givenDuals,
00813 const double * givenPrimals,
00814 bool valuesPass=false);
00816 void gutsOfDelete(int type);
00818 void gutsOfCopy(const ClpSimplex & rhs);
00830 bool createRim(int what,bool makeRowCopy=false,int startFinishOptions=0);
00832 void createRim1(bool initial);
00834 void createRim4(bool initial);
00836 void createRim5(bool initial);
00841 void deleteRim(int getRidOfFactorizationData=2);
00843 bool sanityCheck();
00845 public:
00850 inline double * solutionRegion(int section) const
00851 { if (!section) return rowActivityWork_; else return columnActivityWork_;}
00852 inline double * djRegion(int section) const
00853 { if (!section) return rowReducedCost_; else return reducedCostWork_;}
00854 inline double * lowerRegion(int section) const
00855 { if (!section) return rowLowerWork_; else return columnLowerWork_;}
00856 inline double * upperRegion(int section) const
00857 { if (!section) return rowUpperWork_; else return columnUpperWork_;}
00858 inline double * costRegion(int section) const
00859 { if (!section) return rowObjectiveWork_; else return objectiveWork_;}
00861 inline double * solutionRegion() const
00862 { return solution_;}
00863 inline double * djRegion() const
00864 { return dj_;}
00865 inline double * lowerRegion() const
00866 { return lower_;}
00867 inline double * upperRegion() const
00868 { return upper_;}
00869 inline double * costRegion() const
00870 { return cost_;}
00871 inline Status getStatus(int sequence) const
00872 {return static_cast<Status> (status_[sequence]&7);}
00873 inline void setStatus(int sequence, Status status)
00874 {
00875 unsigned char & st_byte = status_[sequence];
00876 st_byte = static_cast<unsigned char>(st_byte & ~7);
00877 st_byte = static_cast<unsigned char>(st_byte | status);
00878 }
00880 bool startPermanentArrays();
00885 void setInitialDenseFactorization(bool onOff);
00886 bool initialDenseFactorization() const;
00888 inline int sequenceIn() const
00889 {return sequenceIn_;}
00890 inline int sequenceOut() const
00891 {return sequenceOut_;}
00893 inline void setSequenceIn(int sequence)
00894 { sequenceIn_=sequence;}
00895 inline void setSequenceOut(int sequence)
00896 { sequenceOut_=sequence;}
00898 inline int directionIn() const
00899 {return directionIn_;}
00900 inline int directionOut() const
00901 {return directionOut_;}
00903 inline void setDirectionIn(int direction)
00904 { directionIn_=direction;}
00905 inline void setDirectionOut(int direction)
00906 { directionOut_=direction;}
00908 inline double valueOut() const
00909 { return valueOut_;}
00911 inline int isColumn(int sequence) const
00912 { return sequence<numberColumns_ ? 1 : 0;}
00914 inline int sequenceWithin(int sequence) const
00915 { return sequence<numberColumns_ ? sequence : sequence-numberColumns_;}
00917 inline double solution(int sequence)
00918 { return solution_[sequence];}
00920 inline double & solutionAddress(int sequence)
00921 { return solution_[sequence];}
00922 inline double reducedCost(int sequence)
00923 { return dj_[sequence];}
00924 inline double & reducedCostAddress(int sequence)
00925 { return dj_[sequence];}
00926 inline double lower(int sequence)
00927 { return lower_[sequence];}
00929 inline double & lowerAddress(int sequence)
00930 { return lower_[sequence];}
00931 inline double upper(int sequence)
00932 { return upper_[sequence];}
00934 inline double & upperAddress(int sequence)
00935 { return upper_[sequence];}
00936 inline double cost(int sequence)
00937 { return cost_[sequence];}
00939 inline double & costAddress(int sequence)
00940 { return cost_[sequence];}
00942 inline double originalLower(int iSequence) const
00943 { if (iSequence<numberColumns_) return columnLower_[iSequence]; else
00944 return rowLower_[iSequence-numberColumns_];}
00946 inline double originalUpper(int iSequence) const
00947 { if (iSequence<numberColumns_) return columnUpper_[iSequence]; else
00948 return rowUpper_[iSequence-numberColumns_];}
00950 inline double theta() const
00951 { return theta_;}
00953 inline ClpNonLinearCost * nonLinearCost() const
00954 { return nonLinearCost_;}
00963 inline int moreSpecialOptions() const
00964 { return moreSpecialOptions_;}
00970 inline void setMoreSpecialOptions(int value)
00971 { moreSpecialOptions_ = value;}
00973
00975 inline void setFakeBound(int sequence, FakeBound fakeBound)
00976 {
00977 unsigned char & st_byte = status_[sequence];
00978 st_byte = static_cast<unsigned char>(st_byte & ~24);
00979 st_byte = static_cast<unsigned char>(st_byte | (fakeBound<<3));
00980 }
00981 inline FakeBound getFakeBound(int sequence) const
00982 {return static_cast<FakeBound> ((status_[sequence]>>3)&3);}
00983 inline void setRowStatus(int sequence, Status status)
00984 {
00985 unsigned char & st_byte = status_[sequence+numberColumns_];
00986 st_byte = static_cast<unsigned char>(st_byte & ~7);
00987 st_byte = static_cast<unsigned char>(st_byte | status);
00988 }
00989 inline Status getRowStatus(int sequence) const
00990 {return static_cast<Status> (status_[sequence+numberColumns_]&7);}
00991 inline void setColumnStatus(int sequence, Status status)
00992 {
00993 unsigned char & st_byte = status_[sequence];
00994 st_byte = static_cast<unsigned char>(st_byte & ~7);
00995 st_byte = static_cast<unsigned char>(st_byte | status);
00996 }
00997 inline Status getColumnStatus(int sequence) const
00998 {return static_cast<Status> (status_[sequence]&7);}
00999 inline void setPivoted( int sequence)
01000 { status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32);}
01001 inline void clearPivoted( int sequence)
01002 { status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32);}
01003 inline bool pivoted(int sequence) const
01004 {return (((status_[sequence]>>5)&1)!=0);}
01006 void setFlagged( int sequence);
01007 inline void clearFlagged( int sequence)
01008 {
01009 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64);
01010 }
01011 inline bool flagged(int sequence) const
01012 {return ((status_[sequence]&64)!=0);}
01014 inline void setActive( int iRow)
01015 {
01016 status_[iRow] = static_cast<unsigned char>(status_[iRow] | 128);
01017 }
01018 inline void clearActive( int iRow)
01019 {
01020 status_[iRow] = static_cast<unsigned char>(status_[iRow] & ~128);
01021 }
01022 inline bool active(int iRow) const
01023 {return ((status_[iRow]&128)!=0);}
01026 void createStatus() ;
01029 void allSlackBasis(bool resetSolution=false);
01030
01032 inline int lastBadIteration() const
01033 {return lastBadIteration_;}
01035 inline int progressFlag() const
01036 {return (progressFlag_&3);}
01038 inline void forceFactorization(int value)
01039 { forceFactorization_ = value;}
01041 inline double rawObjectiveValue() const
01042 { return objectiveValue_;}
01044 void computeObjectiveValue(bool useWorkingSolution=false);
01046 double computeInternalObjectiveValue();
01050 inline int numberExtraRows() const
01051 { return numberExtraRows_;}
01054 inline int maximumBasic() const
01055 { return maximumBasic_;}
01057 inline int baseIteration() const
01058 { return baseIteration_;}
01060 void generateCpp( FILE * fp,bool defaultFactor=false);
01062 ClpFactorization * getEmptyFactorization();
01064 void setEmptyFactorization();
01066 void moveInfo(const ClpSimplex & rhs, bool justStatus=false);
01068
01070
01071
01072
01074 void getBInvARow(int row, double* z, double * slack=NULL);
01075
01077 void getBInvRow(int row, double* z);
01078
01080 void getBInvACol(int col, double* vec);
01081
01083 void getBInvCol(int col, double* vec);
01084
01089 void getBasics(int* index);
01090
01092
01096 void setObjectiveCoefficient( int elementIndex, double elementValue );
01098 inline void setObjCoeff( int elementIndex, double elementValue )
01099 { setObjectiveCoefficient( elementIndex, elementValue);}
01100
01103 void setColumnLower( int elementIndex, double elementValue );
01104
01107 void setColumnUpper( int elementIndex, double elementValue );
01108
01110 void setColumnBounds( int elementIndex,
01111 double lower, double upper );
01112
01121 void setColumnSetBounds(const int* indexFirst,
01122 const int* indexLast,
01123 const double* boundList);
01124
01127 inline void setColLower( int elementIndex, double elementValue )
01128 { setColumnLower(elementIndex, elementValue);}
01131 inline void setColUpper( int elementIndex, double elementValue )
01132 { setColumnUpper(elementIndex, elementValue);}
01133
01135 inline void setColBounds( int elementIndex,
01136 double lower, double upper )
01137 { setColumnBounds(elementIndex, lower, upper);}
01138
01145 inline void setColSetBounds(const int* indexFirst,
01146 const int* indexLast,
01147 const double* boundList)
01148 { setColumnSetBounds(indexFirst, indexLast, boundList);}
01149
01152 void setRowLower( int elementIndex, double elementValue );
01153
01156 void setRowUpper( int elementIndex, double elementValue ) ;
01157
01159 void setRowBounds( int elementIndex,
01160 double lower, double upper ) ;
01161
01168 void setRowSetBounds(const int* indexFirst,
01169 const int* indexLast,
01170 const double* boundList);
01171
01173
01175 protected:
01176
01185 double bestPossibleImprovement_;
01187 double zeroTolerance_;
01189 int columnPrimalSequence_;
01191 int rowPrimalSequence_;
01193 double columnDualInfeasibility_;
01195 double rowDualInfeasibility_;
01197 int moreSpecialOptions_;
01199 int baseIteration_;
01201 double primalToleranceToGetOptimal_;
01203 double remainingDualInfeasibility_;
01205 double largeValue_;
01207 double largestPrimalError_;
01209 double largestDualError_;
01211 double alphaAccuracy_;
01213 double dualBound_;
01215 double alpha_;
01217 double theta_;
01219 double lowerIn_;
01221 double valueIn_;
01223 double upperIn_;
01225 double dualIn_;
01227 double lowerOut_;
01229 double valueOut_;
01231 double upperOut_;
01233 double dualOut_;
01235 double dualTolerance_;
01237 double primalTolerance_;
01239 double sumDualInfeasibilities_;
01241 double sumPrimalInfeasibilities_;
01243 double infeasibilityCost_;
01245 double sumOfRelaxedDualInfeasibilities_;
01247 double sumOfRelaxedPrimalInfeasibilities_;
01249 double acceptablePivot_;
01251 double * lower_;
01253 double * rowLowerWork_;
01255 double * columnLowerWork_;
01257 double * upper_;
01259 double * rowUpperWork_;
01261 double * columnUpperWork_;
01263 double * cost_;
01265 double * rowObjectiveWork_;
01267 double * objectiveWork_;
01269 CoinIndexedVector * rowArray_[6];
01271 CoinIndexedVector * columnArray_[6];
01273 int sequenceIn_;
01275 int directionIn_;
01277 int sequenceOut_;
01279 int directionOut_;
01281 int pivotRow_;
01283 int lastGoodIteration_;
01285 double * dj_;
01287 double * rowReducedCost_;
01289 double * reducedCostWork_;
01291 double * solution_;
01293 double * rowActivityWork_;
01295 double * columnActivityWork_;
01296 #ifdef CLP_AUXILIARY_MODEL
01298 ClpSimplex * auxiliaryModel_;
01299 #endif
01301 int numberDualInfeasibilities_;
01303 int numberDualInfeasibilitiesWithoutFree_;
01305 int numberPrimalInfeasibilities_;
01307 int numberRefinements_;
01309 ClpDualRowPivot * dualRowPivot_;
01311 ClpPrimalColumnPivot * primalColumnPivot_;
01313 int * pivotVariable_;
01315 ClpFactorization * factorization_;
01317 double * savedSolution_;
01319 int numberTimesOptimal_;
01321 ClpDisasterHandler * disasterArea_;
01323 int changeMade_;
01325 int algorithm_;
01326
01328 int forceFactorization_;
01336 int perturbation_;
01338 unsigned char * saveStatus_;
01343 ClpNonLinearCost * nonLinearCost_;
01345 int lastBadIteration_;
01347 int lastFlaggedIteration_;
01349 int numberFake_;
01351 int numberChanged_;
01353 int progressFlag_;
01355 int firstFree_;
01359 int numberExtraRows_;
01362 int maximumBasic_;
01364 int dontFactorizePivots_;
01374 double incomingInfeasibility_;
01375 double allowedInfeasibility_;
01377 int automaticScale_;
01379 int maximumPerturbationSize_;
01381 double * perturbationArray_;
01383 ClpSimplex * baseModel_;
01385 ClpSimplexProgress progress_;
01386 public:
01388 mutable int spareIntArray_[4];
01390 mutable double spareDoubleArray_[4];
01391 protected:
01393 friend class OsiClpSolverInterface;
01395 };
01396
01405 void
01406 ClpSimplexUnitTest(const std::string & mpsDir);
01407
01408
01409 #define DEVEX_TRY_NORM 1.0e-4
01410 #define DEVEX_ADD_ONE 1.0
01411 #endif