Changeset 2150
 Timestamp:
 Jun 26, 2015 10:38:27 AM (5 years ago)
 Location:
 trunk/Clp/src
 Files:

 7 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/ClpPEDualRowSteepest.cpp
r2149 r2150 472 472 { 473 473 // See if we need to initialize ClpPESimplex 474 if (!modelPE_model!=modelPE_>clpModel()) { 474 if (!modelPE_model!=modelPE_>clpModel() 475 !modelPE_>checkSize()) { 475 476 delete modelPE_; 476 477 modelPE_ = new ClpPESimplex(model); 
trunk/Clp/src/ClpPEDualRowSteepest.hpp
r2149 r2150 72 72 //@} 73 73 74 74 // Psi 75 inline double psi() const 76 { return psi_;} 75 77 76 78 // 
trunk/Clp/src/ClpPEPrimalColumnSteepest.cpp
r2149 r2150 31 31 ClpPEPrimalColumnSteepest::ClpPEPrimalColumnSteepest (double psi, int mode) 32 32 : ClpPrimalColumnSteepest(mode), modelPE_(NULL), psi_(psi), 33 iCurrent_(0), iInterval_(100), updateCompatibles_(true), 34 coDegenCompatibles_(0), coConsecutiveCompatibles_(0) 33 iCurrent_(0), iInterval_(100), 34 coDegenCompatibles_(0), coConsecutiveCompatibles_(0), 35 updateCompatibles_(true) 35 36 { 36 37 } … … 594 595 { 595 596 // See if we need to initialize ClpPESimplex 596 if (!modelPE_model!=modelPE_>clpModel()) { 597 if (!modelPE_model!=modelPE_>clpModel() 598 !modelPE_>checkSize()) { 597 599 delete modelPE_; 598 600 modelPE_ = new ClpPESimplex(model); 
trunk/Clp/src/ClpPEPrimalColumnSteepest.hpp
r2149 r2150 83 83 virtual void updateWeights(CoinIndexedVector * input); 84 84 // 85 // Psi 86 inline double psi() const 87 { return psi_;} 85 88 86 89 private: 
trunk/Clp/src/ClpPESimplex.cpp
r2149 r2150 682 682 return isCompatible; 683 683 } 684 // checks size 685 bool 686 ClpPESimplex::checkSize() 687 { 688 return (numberRows_==model_>numberRows()&& 689 numberColumns_==model_>numberColumns()); 690 } 684 691 /* Update the dual compatible rows */ 685 692 void 
trunk/Clp/src/ClpPESimplex.hpp
r2149 r2150 60 60 61 61 inline bool isCompatibleCol(int sequence) {return isCompatibleCol_[sequence];} 62 inline bool isCompatibleRow(int row) {return isCompatibleRow_[row];} 62 inline bool isCompatibleRow(int row) { 63 assert (row>=0&&row<numberRows_); 64 return isCompatibleRow_[row];} 63 65 64 66 inline ClpSimplex* clpModel() {return model_;} 65 67 // check seems to be same model  returns false if size changed 68 bool checkSize(); 66 69 /** PUBLIC METHODS RELATED TO COMPATIBILITY */ 67 70 public: 
trunk/Clp/src/ClpSimplex.cpp
r2149 r2150 24 24 #include "ClpPrimalColumnDantzig.hpp" 25 25 #include "ClpPrimalColumnSteepest.hpp" 26 #include "ClpPEDualRowSteepest.hpp" 27 #include "ClpPEPrimalColumnSteepest.hpp" 26 28 #include "ClpNonLinearCost.hpp" 27 29 #include "ClpMessage.hpp" … … 410 412 //factorization_ = new ClpFactorization(*rhs>factorization_, 411 413 // rhs>factorization_>goDenseThreshold()); 412 ClpDualRowDantzig * pivot = 413 dynamic_cast< ClpDualRowDantzig*>(rhs>dualRowPivot_); 414 // say Steepest pricing 415 if (!pivot) 416 dualRowPivot_ = new ClpDualRowSteepest(); 417 else 418 dualRowPivot_ = new ClpDualRowDantzig(); 419 // say Steepest pricing 420 primalColumnPivot_ = new ClpPrimalColumnSteepest(); 414 ClpPEDualRowSteepest * pivotDualPE = 415 dynamic_cast< ClpPEDualRowSteepest*>(rhs>dualRowPivot_); 416 if (pivotDualPE) { 417 dualRowPivot_ = new ClpPEDualRowSteepest(pivotDualPE>psi()); 418 } else { 419 ClpDualRowDantzig * pivot = 420 dynamic_cast< ClpDualRowDantzig*>(rhs>dualRowPivot_); 421 // say Steepest pricing 422 if (!pivot) 423 dualRowPivot_ = new ClpDualRowSteepest(); 424 else 425 dualRowPivot_ = new ClpDualRowDantzig(); 426 } 427 ClpPEPrimalColumnSteepest * pivotPrimalPE = 428 dynamic_cast< ClpPEPrimalColumnSteepest*>(rhs>primalColumnPivot_); 429 if (pivotPrimalPE) { 430 primalColumnPivot_ = new ClpPEPrimalColumnSteepest(pivotPrimalPE>psi()); 431 } else { 432 // say Steepest pricing 433 primalColumnPivot_ = new ClpPrimalColumnSteepest(); 434 } 421 435 solveType_ = 1; // say simplex based life form 422 436 if (fixOthers) {
Note: See TracChangeset
for help on using the changeset viewer.