#include <ClpDualRowDantzig.hpp>
Inheritance diagram for ClpDualRowDantzig:
Public Member Functions | |
Algorithmic methods | |
virtual int | pivotRow () |
Returns pivot row, -1 if none. | |
virtual double | updateWeights (CoinIndexedVector *input, CoinIndexedVector *spare, CoinIndexedVector *updatedColumn) |
Updates weights and returns pivot alpha. | |
virtual void | updatePrimalSolution (CoinIndexedVector *input, double theta, double &changeInObjective) |
Constructors and destructors | |
ClpDualRowDantzig () | |
Default Constructor. | |
ClpDualRowDantzig (const ClpDualRowDantzig &) | |
Copy constructor. | |
ClpDualRowDantzig & | operator= (const ClpDualRowDantzig &rhs) |
Assignment operator. | |
virtual | ~ClpDualRowDantzig () |
Destructor. | |
virtual ClpDualRowPivot * | clone (bool copyData=true) const |
Clone. |
This is simplest choice - choose largest infeasibility
Definition at line 16 of file ClpDualRowDantzig.hpp.
|
Updates primal solution (and maybe list of candidates) Uses input vector which it deletes Computes change in objective function Implements ClpDualRowPivot. Definition at line 112 of file ClpDualRowDantzig.cpp. References ClpSimplex::cost(), CoinIndexedVector::denseVector(), CoinIndexedVector::getIndices(), CoinIndexedVector::getNumElements(), CoinIndexedVector::packedMode(), ClpSimplex::pivotVariable(), CoinIndexedVector::setNumElements(), and ClpSimplex::solutionAddress().
00115 { 00116 double * work = primalUpdate->denseVector(); 00117 int number = primalUpdate->getNumElements(); 00118 int * which = primalUpdate->getIndices(); 00119 int i; 00120 double changeObj=0.0; 00121 const int * pivotVariable = model_->pivotVariable(); 00122 if (primalUpdate->packedMode()) { 00123 for (i=0;i<number;i++) { 00124 int iRow=which[i]; 00125 int iPivot=pivotVariable[iRow]; 00126 double & value = model_->solutionAddress(iPivot); 00127 double cost = model_->cost(iPivot); 00128 double change = primalRatio*work[i]; 00129 value -= change; 00130 changeObj -= change*cost; 00131 work[i]=0.0; 00132 } 00133 } else { 00134 for (i=0;i<number;i++) { 00135 int iRow=which[i]; 00136 int iPivot=pivotVariable[iRow]; 00137 double & value = model_->solutionAddress(iPivot); 00138 double cost = model_->cost(iPivot); 00139 double change = primalRatio*work[iRow]; 00140 value -= change; 00141 changeObj -= change*cost; 00142 work[iRow]=0.0; 00143 } 00144 } 00145 primalUpdate->setNumElements(0); 00146 objectiveChange += changeObj; 00147 } |