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);
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
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
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);
00366 void copyFactorization( ClpFactorization & factorization);
00376 int tightenPrimalBounds(double factor=0.0,int doTight=0,bool tightIntegers=false);
00393 int crash(double gap,int pivot);
00395 void setDualRowPivotAlgorithm(ClpDualRowPivot & choice);
00397 void setPrimalColumnPivotAlgorithm(ClpPrimalColumnPivot & choice);
00406 int strongBranching(int numberVariables,const int * variables,
00407 double * newLower, double * newUpper,
00408 double ** outputSolution,
00409 int * outputStatus, int * outputIterations,
00410 bool stopOnFirstInfeasible=true,
00411 bool alwaysFinish=false,
00412 int startFinishOptions=0);
00414 int fathom(void * stuff);
00420 int fathomMany(void * stuff);
00422 double doubleCheck();
00424 int startFastDual2(ClpNodeStuff * stuff);
00426 int fastDual2(ClpNodeStuff * stuff);
00428 void stopFastDual2(ClpNodeStuff * stuff);
00435 ClpSimplex * fastCrunch(ClpNodeStuff * stuff, int mode);
00437
00445 int pivot();
00446
00452 int primalPivotResult();
00453
00460 int dualPivotResult();
00461
00473 int startup(int ifValuesPass,int startFinishOptions=0);
00474 void finish(int startFinishOptions=0);
00475
00477 bool statusOfProblem(bool initial=false);
00479 void defaultFactorizationFrequency();
00481
00484
00485 inline bool primalFeasible() const
00486 { return (numberPrimalInfeasibilities_==0);}
00488 inline bool dualFeasible() const
00489 { return (numberDualInfeasibilities_==0);}
00491 inline ClpFactorization * factorization() const
00492 { return factorization_;}
00494 bool sparseFactorization() const;
00495 void setSparseFactorization(bool value);
00497 int factorizationFrequency() const;
00498 void setFactorizationFrequency(int value);
00500 inline double dualBound() const
00501 { return dualBound_;}
00502 void setDualBound(double value);
00504 inline double infeasibilityCost() const
00505 { return infeasibilityCost_;}
00506 void setInfeasibilityCost(double value);
00523 inline int perturbation() const
00524 { return perturbation_;}
00525 void setPerturbation(int value);
00527 inline int algorithm() const
00528 {return algorithm_; }
00530 inline void setAlgorithm(int value)
00531 {algorithm_=value; }
00533 bool isObjectiveLimitTestValid() const ;
00535 inline double sumDualInfeasibilities() const
00536 { return sumDualInfeasibilities_;}
00537 inline void setSumDualInfeasibilities(double value)
00538 { sumDualInfeasibilities_=value;}
00540 inline double sumOfRelaxedDualInfeasibilities() const
00541 { return sumOfRelaxedDualInfeasibilities_;}
00542 inline void setSumOfRelaxedDualInfeasibilities(double value)
00543 { sumOfRelaxedDualInfeasibilities_=value;}
00545 inline int numberDualInfeasibilities() const
00546 { return numberDualInfeasibilities_;}
00547 inline void setNumberDualInfeasibilities(int value)
00548 { numberDualInfeasibilities_=value;}
00550 inline int numberDualInfeasibilitiesWithoutFree() const
00551 { return numberDualInfeasibilitiesWithoutFree_;}
00553 inline double sumPrimalInfeasibilities() const
00554 { return sumPrimalInfeasibilities_;}
00555 inline void setSumPrimalInfeasibilities(double value)
00556 { sumPrimalInfeasibilities_=value;}
00558 inline double sumOfRelaxedPrimalInfeasibilities() const
00559 { return sumOfRelaxedPrimalInfeasibilities_;}
00560 inline void setSumOfRelaxedPrimalInfeasibilities(double value)
00561 { sumOfRelaxedPrimalInfeasibilities_=value;}
00563 inline int numberPrimalInfeasibilities() const
00564 { return numberPrimalInfeasibilities_;}
00565 inline void setNumberPrimalInfeasibilities(int value)
00566 { numberPrimalInfeasibilities_=value;}
00573 int saveModel(const char * fileName);
00576 int restoreModel(const char * fileName);
00577
00585 void checkSolution(int setToBounds=false);
00588 void checkSolutionInternal();
00590 inline CoinIndexedVector * rowArray(int index) const
00591 { return rowArray_[index];}
00593 inline CoinIndexedVector * columnArray(int index) const
00594 { return columnArray_[index];}
00596
00597
00603 int getSolution ( const double * rowActivities,
00604 const double * columnActivities);
00608 int getSolution ();
00615 int createPiecewiseLinearCosts(const int * starts,
00616 const double * lower, const double * gradient);
00618 ClpDualRowPivot * dualRowPivot() const
00619 { return dualRowPivot_;}
00621 inline bool goodAccuracy() const
00622 { return (largestPrimalError_<1.0e-7&&largestDualError_<1.0e-7);}
00624 void returnModel(ClpSimplex & otherModel);
00632 int internalFactorize(int solveType);
00634 ClpDataSave saveData() ;
00636 void restoreData(ClpDataSave saved);
00638 void cleanStatus();
00640 int factorize();
00643 void computeDuals(double * givenDjs);
00645 void computePrimals ( const double * rowActivities,
00646 const double * columnActivities);
00648 void add(double * array,
00649 int column, double multiplier) const;
00655 void unpack(CoinIndexedVector * rowArray) const ;
00661 void unpack(CoinIndexedVector * rowArray,int sequence) const;
00668 void unpackPacked(CoinIndexedVector * rowArray) ;
00675 void unpackPacked(CoinIndexedVector * rowArray,int sequence);
00676 protected:
00681 int housekeeping(double objectiveChange);
00684 void checkPrimalSolution(const double * rowActivities=NULL,
00685 const double * columnActivies=NULL);
00688 void checkDualSolution();
00690 void checkBothSolutions();
00695 double scaleObjective(double value);
00697 int solveDW(CoinStructuredModel * model);
00699 int solveBenders(CoinStructuredModel * model);
00700 public:
00711 void setValuesPassAction(double incomingInfeasibility,
00712 double allowedInfeasibility);
00714
00716 public:
00718 inline double alphaAccuracy() const
00719 { return alphaAccuracy_;}
00720 inline void setAlphaAccuracy(double value)
00721 { alphaAccuracy_ = value;}
00722 public:
00724 inline void setDisasterHandler(ClpDisasterHandler * handler)
00725 { disasterArea_= handler;}
00727 inline ClpDisasterHandler * disasterHandler() const
00728 { return disasterArea_;}
00730 inline double largeValue() const
00731 { return largeValue_;}
00732 void setLargeValue( double value) ;
00734 inline double largestPrimalError() const
00735 { return largestPrimalError_;}
00737 inline double largestDualError() const
00738 { return largestDualError_;}
00740 inline void setLargestPrimalError(double value)
00741 { largestPrimalError_=value;}
00743 inline void setLargestDualError(double value)
00744 { largestDualError_=value;}
00746 inline double zeroTolerance() const
00747 { return zeroTolerance_;}
00749 inline void setZeroTolerance( double value)
00750 { zeroTolerance_ = value;}
00752 inline int * pivotVariable() const
00753 { return pivotVariable_;}
00755 inline bool automaticScaling() const
00756 { return automaticScale_!=0;}
00757 inline void setAutomaticScaling(bool onOff)
00758 { automaticScale_ = onOff ? 1: 0;}
00760 inline double currentDualTolerance() const
00761 { return dualTolerance_;}
00762 inline void setCurrentDualTolerance(double value)
00763 { dualTolerance_ = value;}
00765 inline double currentPrimalTolerance() const
00766 { return primalTolerance_;}
00767 inline void setCurrentPrimalTolerance(double value)
00768 { primalTolerance_ = value;}
00770 inline int numberRefinements() const
00771 { return numberRefinements_;}
00772 void setNumberRefinements( int value) ;
00774 inline double alpha() const { return alpha_;}
00775 inline void setAlpha(double value) { alpha_ = value;}
00777 inline double dualIn() const { return dualIn_;}
00779 inline int pivotRow() const{ return pivotRow_;}
00780 inline void setPivotRow(int value) { pivotRow_=value;}
00782 double valueIncomingDual() const;
00784
00785 protected:
00791 int gutsOfSolution ( double * givenDuals,
00792 const double * givenPrimals,
00793 bool valuesPass=false);
00795 void gutsOfDelete(int type);
00797 void gutsOfCopy(const ClpSimplex & rhs);
00809 bool createRim(int what,bool makeRowCopy=false,int startFinishOptions=0);
00811 void createRim1(bool initial);
00813 void createRim4(bool initial);
00815 void createRim5(bool initial);
00820 void deleteRim(int getRidOfFactorizationData=2);
00822 bool sanityCheck();
00824 public:
00829 inline double * solutionRegion(int section) const
00830 { if (!section) return rowActivityWork_; else return columnActivityWork_;}
00831 inline double * djRegion(int section) const
00832 { if (!section) return rowReducedCost_; else return reducedCostWork_;}
00833 inline double * lowerRegion(int section) const
00834 { if (!section) return rowLowerWork_; else return columnLowerWork_;}
00835 inline double * upperRegion(int section) const
00836 { if (!section) return rowUpperWork_; else return columnUpperWork_;}
00837 inline double * costRegion(int section) const
00838 { if (!section) return rowObjectiveWork_; else return objectiveWork_;}
00840 inline double * solutionRegion() const
00841 { return solution_;}
00842 inline double * djRegion() const
00843 { return dj_;}
00844 inline double * lowerRegion() const
00845 { return lower_;}
00846 inline double * upperRegion() const
00847 { return upper_;}
00848 inline double * costRegion() const
00849 { return cost_;}
00850 inline Status getStatus(int sequence) const
00851 {return static_cast<Status> (status_[sequence]&7);}
00852 inline void setStatus(int sequence, Status status)
00853 {
00854 unsigned char & st_byte = status_[sequence];
00855 st_byte = static_cast<unsigned char>(st_byte & ~7);
00856 st_byte = static_cast<unsigned char>(st_byte | status);
00857 }
00859 bool startPermanentArrays();
00864 void setInitialDenseFactorization(bool onOff);
00865 bool initialDenseFactorization() const;
00867 inline int sequenceIn() const
00868 {return sequenceIn_;}
00869 inline int sequenceOut() const
00870 {return sequenceOut_;}
00872 inline void setSequenceIn(int sequence)
00873 { sequenceIn_=sequence;}
00874 inline void setSequenceOut(int sequence)
00875 { sequenceOut_=sequence;}
00877 inline int directionIn() const
00878 {return directionIn_;}
00879 inline int directionOut() const
00880 {return directionOut_;}
00882 inline void setDirectionIn(int direction)
00883 { directionIn_=direction;}
00884 inline void setDirectionOut(int direction)
00885 { directionOut_=direction;}
00887 inline double valueOut() const
00888 { return valueOut_;}
00890 inline int isColumn(int sequence) const
00891 { return sequence<numberColumns_ ? 1 : 0;}
00893 inline int sequenceWithin(int sequence) const
00894 { return sequence<numberColumns_ ? sequence : sequence-numberColumns_;}
00896 inline double solution(int sequence)
00897 { return solution_[sequence];}
00899 inline double & solutionAddress(int sequence)
00900 { return solution_[sequence];}
00901 inline double reducedCost(int sequence)
00902 { return dj_[sequence];}
00903 inline double & reducedCostAddress(int sequence)
00904 { return dj_[sequence];}
00905 inline double lower(int sequence)
00906 { return lower_[sequence];}
00908 inline double & lowerAddress(int sequence)
00909 { return lower_[sequence];}
00910 inline double upper(int sequence)
00911 { return upper_[sequence];}
00913 inline double & upperAddress(int sequence)
00914 { return upper_[sequence];}
00915 inline double cost(int sequence)
00916 { return cost_[sequence];}
00918 inline double & costAddress(int sequence)
00919 { return cost_[sequence];}
00921 inline double originalLower(int iSequence) const
00922 { if (iSequence<numberColumns_) return columnLower_[iSequence]; else
00923 return rowLower_[iSequence-numberColumns_];}
00925 inline double originalUpper(int iSequence) const
00926 { if (iSequence<numberColumns_) return columnUpper_[iSequence]; else
00927 return rowUpper_[iSequence-numberColumns_];}
00929 inline double theta() const
00930 { return theta_;}
00933 inline double bestPossibleImprovement() const
00934 { return bestPossibleImprovement_;}
00936 inline ClpNonLinearCost * nonLinearCost() const
00937 { return nonLinearCost_;}
00946 inline int moreSpecialOptions() const
00947 { return moreSpecialOptions_;}
00953 inline void setMoreSpecialOptions(int value)
00954 { moreSpecialOptions_ = value;}
00956
00958 inline void setFakeBound(int sequence, FakeBound fakeBound)
00959 {
00960 unsigned char & st_byte = status_[sequence];
00961 st_byte = static_cast<unsigned char>(st_byte & ~24);
00962 st_byte = static_cast<unsigned char>(st_byte | (fakeBound<<3));
00963 }
00964 inline FakeBound getFakeBound(int sequence) const
00965 {return static_cast<FakeBound> ((status_[sequence]>>3)&3);}
00966 inline void setRowStatus(int sequence, Status status)
00967 {
00968 unsigned char & st_byte = status_[sequence+numberColumns_];
00969 st_byte = static_cast<unsigned char>(st_byte & ~7);
00970 st_byte = static_cast<unsigned char>(st_byte | status);
00971 }
00972 inline Status getRowStatus(int sequence) const
00973 {return static_cast<Status> (status_[sequence+numberColumns_]&7);}
00974 inline void setColumnStatus(int sequence, Status status)
00975 {
00976 unsigned char & st_byte = status_[sequence];
00977 st_byte = static_cast<unsigned char>(st_byte & ~7);
00978 st_byte = static_cast<unsigned char>(st_byte | status);
00979 }
00980 inline Status getColumnStatus(int sequence) const
00981 {return static_cast<Status> (status_[sequence]&7);}
00982 inline void setPivoted( int sequence)
00983 { status_[sequence] = static_cast<unsigned char>(status_[sequence] | 32);}
00984 inline void clearPivoted( int sequence)
00985 { status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~32);}
00986 inline bool pivoted(int sequence) const
00987 {return (((status_[sequence]>>5)&1)!=0);}
00989 void setFlagged( int sequence);
00990 inline void clearFlagged( int sequence)
00991 {
00992 status_[sequence] = static_cast<unsigned char>(status_[sequence] & ~64);
00993 }
00994 inline bool flagged(int sequence) const
00995 {return ((status_[sequence]&64)!=0);}
00997 inline void setActive( int iRow)
00998 {
00999 status_[iRow] = static_cast<unsigned char>(status_[iRow] | 128);
01000 }
01001 inline void clearActive( int iRow)
01002 {
01003 status_[iRow] = static_cast<unsigned char>(status_[iRow] & ~128);
01004 }
01005 inline bool active(int iRow) const
01006 {return ((status_[iRow]&128)!=0);}
01009 void createStatus() ;
01012 void allSlackBasis(bool resetSolution=false);
01013
01015 inline int lastBadIteration() const
01016 {return lastBadIteration_;}
01018 inline int progressFlag() const
01019 {return (progressFlag_&3);}
01021 inline void forceFactorization(int value)
01022 { forceFactorization_ = value;}
01024 inline double rawObjectiveValue() const
01025 { return objectiveValue_;}
01027 void computeObjectiveValue(bool useWorkingSolution=false);
01029 double computeInternalObjectiveValue();
01033 inline int numberExtraRows() const
01034 { return numberExtraRows_;}
01037 inline int maximumBasic() const
01038 { return maximumBasic_;}
01040 inline int baseIteration() const
01041 { return baseIteration_;}
01043 void generateCpp( FILE * fp,bool defaultFactor=false);
01045 ClpFactorization * getEmptyFactorization();
01047 void setEmptyFactorization();
01049 void moveInfo(const ClpSimplex & rhs, bool justStatus=false);
01051
01053
01054
01055
01057 void getBInvARow(int row, double* z, double * slack=NULL);
01058
01060 void getBInvRow(int row, double* z);
01061
01063 void getBInvACol(int col, double* vec);
01064
01066 void getBInvCol(int col, double* vec);
01067
01072 void getBasics(int* index);
01073
01075
01079 void setObjectiveCoefficient( int elementIndex, double elementValue );
01081 inline void setObjCoeff( int elementIndex, double elementValue )
01082 { setObjectiveCoefficient( elementIndex, elementValue);}
01083
01086 void setColumnLower( int elementIndex, double elementValue );
01087
01090 void setColumnUpper( int elementIndex, double elementValue );
01091
01093 void setColumnBounds( int elementIndex,
01094 double lower, double upper );
01095
01104 void setColumnSetBounds(const int* indexFirst,
01105 const int* indexLast,
01106 const double* boundList);
01107
01110 inline void setColLower( int elementIndex, double elementValue )
01111 { setColumnLower(elementIndex, elementValue);}
01114 inline void setColUpper( int elementIndex, double elementValue )
01115 { setColumnUpper(elementIndex, elementValue);}
01116
01118 inline void setColBounds( int elementIndex,
01119 double lower, double upper )
01120 { setColumnBounds(elementIndex, lower, upper);}
01121
01128 inline void setColSetBounds(const int* indexFirst,
01129 const int* indexLast,
01130 const double* boundList)
01131 { setColumnSetBounds(indexFirst, indexLast, boundList);}
01132
01135 void setRowLower( int elementIndex, double elementValue );
01136
01139 void setRowUpper( int elementIndex, double elementValue ) ;
01140
01142 void setRowBounds( int elementIndex,
01143 double lower, double upper ) ;
01144
01151 void setRowSetBounds(const int* indexFirst,
01152 const int* indexLast,
01153 const double* boundList);
01154
01156
01158 protected:
01159
01168 double bestPossibleImprovement_;
01170 double zeroTolerance_;
01172 int columnPrimalSequence_;
01174 int rowPrimalSequence_;
01176 double columnDualInfeasibility_;
01178 double rowDualInfeasibility_;
01180 int moreSpecialOptions_;
01182 int baseIteration_;
01184 double primalToleranceToGetOptimal_;
01186 double remainingDualInfeasibility_;
01188 double largeValue_;
01190 double largestPrimalError_;
01192 double largestDualError_;
01194 double alphaAccuracy_;
01196 double dualBound_;
01198 double alpha_;
01200 double theta_;
01202 double lowerIn_;
01204 double valueIn_;
01206 double upperIn_;
01208 double dualIn_;
01210 double lowerOut_;
01212 double valueOut_;
01214 double upperOut_;
01216 double dualOut_;
01218 double dualTolerance_;
01220 double primalTolerance_;
01222 double sumDualInfeasibilities_;
01224 double sumPrimalInfeasibilities_;
01226 double infeasibilityCost_;
01228 double sumOfRelaxedDualInfeasibilities_;
01230 double sumOfRelaxedPrimalInfeasibilities_;
01232 double acceptablePivot_;
01234 double * lower_;
01236 double * rowLowerWork_;
01238 double * columnLowerWork_;
01240 double * upper_;
01242 double * rowUpperWork_;
01244 double * columnUpperWork_;
01246 double * cost_;
01248 double * rowObjectiveWork_;
01250 double * objectiveWork_;
01252 CoinIndexedVector * rowArray_[6];
01254 CoinIndexedVector * columnArray_[6];
01256 int sequenceIn_;
01258 int directionIn_;
01260 int sequenceOut_;
01262 int directionOut_;
01264 int pivotRow_;
01266 int lastGoodIteration_;
01268 double * dj_;
01270 double * rowReducedCost_;
01272 double * reducedCostWork_;
01274 double * solution_;
01276 double * rowActivityWork_;
01278 double * columnActivityWork_;
01280 int numberDualInfeasibilities_;
01282 int numberDualInfeasibilitiesWithoutFree_;
01284 int numberPrimalInfeasibilities_;
01286 int numberRefinements_;
01288 ClpDualRowPivot * dualRowPivot_;
01290 ClpPrimalColumnPivot * primalColumnPivot_;
01292 int * pivotVariable_;
01294 ClpFactorization * factorization_;
01296 double * savedSolution_;
01298 int numberTimesOptimal_;
01300 ClpDisasterHandler * disasterArea_;
01302 int changeMade_;
01304 int algorithm_;
01307 int forceFactorization_;
01315 int perturbation_;
01317 unsigned char * saveStatus_;
01322 ClpNonLinearCost * nonLinearCost_;
01324 int lastBadIteration_;
01326 int lastFlaggedIteration_;
01328 int numberFake_;
01330 int numberChanged_;
01332 int progressFlag_;
01334 int firstFree_;
01338 int numberExtraRows_;
01341 int maximumBasic_;
01343 int dontFactorizePivots_;
01353 double incomingInfeasibility_;
01354 double allowedInfeasibility_;
01356 int automaticScale_;
01358 int maximumPerturbationSize_;
01360 double * perturbationArray_;
01362 ClpSimplex * baseModel_;
01364 ClpSimplexProgress progress_;
01365 public:
01367 mutable int spareIntArray_[4];
01369 mutable double spareDoubleArray_[4];
01370 protected:
01372 friend class OsiClpSolverInterface;
01374 };
01375
01384 void
01385 ClpSimplexUnitTest(const std::string & mpsDir);
01386
01387
01388 #define DEVEX_TRY_NORM 1.0e-4
01389 #define DEVEX_ADD_ONE 1.0
01390 #endif