121 this->
DefStart(formulation,iterate,prob,resid,step);
132 Double_t a = sdatanorm;
133 Double_t
b = sdatanorm;
144 iterate->
Saxpy(step,1.0);
146 Double_t shift = 1.e3+2*iterate->
Violation();
185 Double_t shift = 1.5*iterate->
Violation();
190 const Double_t mutemp = iterate->
GetMu();
191 const Double_t xsnorm = iterate->
Norm1();
206 const Double_t sdatanorm =
fDnorm;
207 const Double_t a = 1.e3;
208 const Double_t
b = 1.e5;
209 const Double_t bigstart = a*sdatanorm+
b;
221 Double_t primalValue; Double_t primalStep; Double_t dualValue; Double_t dualStep;
222 const Double_t maxAlpha = iterate->
FindBlocking(step,primalValue,primalStep,
223 dualValue,dualStep,firstOrSecond);
224 Double_t mufull = iterate->
MuStep(step,maxAlpha);
228 Double_t alpha = 1.0;
229 switch (firstOrSecond) {
234 alpha = (-primalValue+mufull/(dualValue+maxAlpha*dualStep))/primalStep;
237 alpha = (-dualValue+mufull/(primalValue+maxAlpha*primalStep))/dualStep;
240 R__ASSERT(0 &&
"Can't get here");
256 Double_t alpha,Double_t sigma,Int_t i,Double_t mu,
257 Int_t stop_code,Int_t level)
259 this->
DefMonitor(data,vars,resids,alpha,sigma,i,mu,stop_code,level);
269 Int_t i,Double_t mu,Int_t level)
271 return this->
DefStatus(data,vars,resids,i,mu,level);
286 Int_t idx = iterate-1;
287 if (idx < 0 ) idx = 0;
319 if (rnorm/fDnorm >
fArtol &&
332 if (
this != &source) {
333 TObject::operator=(source);
Double_t * fRnorm_history
int iterate(rng_state_t *X)
TQpSolverBase()
Default constructor.
virtual void DoMonitor(TQpDataBase *data, TQpVar *vars, TQpResidual *resids, Double_t alpha, Double_t sigma, Int_t i, Double_t mu, Int_t stop_code, Int_t level)
Monitor progress / convergence aat each interior-point iteration.
void CalcResids(TQpDataBase *problem, TQpVar *vars)
Calculate residuals, their norms, and duality complementarity gap, given a problem and variable set...
virtual Double_t MuStep(TQpVar *step, Double_t alpha)
Compute the complementarity gap resulting from a step of length "alpha" along direction "step"...
virtual void SteveStart(TQpProbBase *formulation, TQpVar *iterate, TQpDataBase *prob, TQpResidual *resid, TQpVar *step)
Starting point algoritm according to Stephen Wright.
virtual void DefStart(TQpProbBase *formulation, TQpVar *iterate, TQpDataBase *prob, TQpResidual *resid, TQpVar *step)
Default starting point.
virtual void Solve(TQpDataBase *prob, TQpVar *vars, TQpResidual *resids, TQpVar *step)
Solves the system for a given set of residuals.
virtual Double_t FinalStepLength(TQpVar *iterate, TQpVar *step)
Implements a version of Mehrotra starting point heuristic, modified to ensure identical steps in the ...
virtual Int_t DoStatus(TQpDataBase *data, TQpVar *vars, TQpResidual *resids, Int_t i, Double_t mu, Int_t level)
Tests for termination.
TQpSolverBase & operator=(const TQpSolverBase &source)
Assignment operator.
virtual Double_t Violation()
The amount by which the current variables violate the non-negativity constraints. ...
virtual Double_t GetMu()
compute complementarity gap, obtained by taking the inner product of the complementary vectors and di...
virtual ~TQpSolverBase()
Deconstructor.
virtual void Start(TQpProbBase *formulation, TQpVar *iterate, TQpDataBase *prob, TQpResidual *resid, TQpVar *step)
Implements a default starting-point heuristic.
Double_t GetResidualNorm()
virtual void DumbStart(TQpProbBase *formulation, TQpVar *iterate, TQpDataBase *prob, TQpResidual *resid, TQpVar *step)
Alternative starting point heuristic: sets the "complementary" variables to a large positive value (b...
virtual void ShiftBoundVariables(Double_t alpha, Double_t beta)
Add alpha to components of (u,t,v,w) and beta to components of (lambda,pi,phi,gamma) ...
virtual Int_t DefStatus(TQpDataBase *data, TQpVar *vars, TQpResidual *resids, Int_t i, Double_t mu, Int_t level)
Default status method.
virtual void Negate()
Perform a "negate" operation on all data vectors : x = -x.
void Set_r3_xz_alpha(TQpVar *vars, Double_t alpha)
Set the "complementarity" component of the residuals to the pairwise products of the complementary va...
virtual void DefMonitor(TQpDataBase *data, TQpVar *vars, TQpResidual *resids, Double_t alpha, Double_t sigma, Int_t i, Double_t mu, Int_t stop_code, Int_t level)=0
static Double_t FindBlocking(TVectorD &w, TVectorD &wstep, TVectorD &u, TVectorD &ustep, Double_t maxStep, Double_t &w_elt, Double_t &wstep_elt, Double_t &u_elt, Double_t &ustep_elt, int &first_or_second)
See other FindBlocking function.
virtual void Saxpy(TQpVar *b, Double_t alpha)
Perform a "saxpy" operation on all data vectors : x += alpha*y.
virtual void Factor(TQpDataBase *prob, TQpVar *vars)
Sets up the matrix for the main linear system in "augmented system" form.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
virtual void InteriorPoint(Double_t alpha, Double_t beta)
Sets components of (u,t,v,w) to alpha and of (lambda,pi,phi,gamma) to beta.
virtual Double_t Norm1()
Return the sum of the vector-norm1's.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Int_t fNComplementaryVariables
Double_t Sqrt(Double_t x)
Double_t * fPhi_min_history