67 fMaximum_correctors = 0;
68 fNumberGondzioCorrections = 0;
155 this->
DoMonitor(prob,iterate,resid,alpha,sigma,
fIter,mu,status_code,0);
172 this->
DoMonitor(prob,iterate,resid,alpha,sigma,
fIter,mu,status_code,2);
194 Int_t stopCorrections = 0;
199 std::cout <<
"**** Entering the correction loop ****" << std::endl;
202 alpha < 1.0 && !stopCorrections) {
209 if (alpha_target > 1.0) alpha_target = 1.0;
230 if (alpha_enhanced == 1.0) {
232 alpha = alpha_enhanced;
236 else if(alpha_enhanced >= (1.0+
fAcceptTol)*alpha) {
241 alpha = alpha_enhanced;
261 mu = iterate->
GetMu();
266 this->
DoMonitor(prob,iterate,resid,alpha,sigma,
fIter,mu,status_code,1);
284 std::cout << std::endl <<
"Duality Gap: " << resid->
GetDualityGap() << std::endl;
287 <<
" alpha = " << alpha << std::endl;
289 std::cout <<
" *** Iteration " << i <<
" *** " << std::endl;
290 std::cout <<
" mu = " << mu <<
" relative residual norm = " 297 std::cout << std::endl
298 <<
" *** SUCCESSFUL TERMINATION ***" 302 std::cout << std::endl
303 <<
" *** MAXIMUM ITERATIONS REACHED *** " << std::endl;
306 std::cout << std::endl
307 <<
" *** TERMINATION: PROBABLY INFEASIBLE *** " 311 std::cout << std::endl
312 <<
" *** TERMINATION: STATUS UNKNOWN *** " << std::endl;
317 std::cout <<
" *** sigma = " << sigma << std::endl;
339 if (
this != &source) {
virtual Double_t DataNorm()=0
int iterate(rng_state_t *X)
virtual TQpVar * MakeVariables(const TQpDataBase *data)=0
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...
TGondzioSolver()
Default constructor.
virtual void DefMonitor(TQpDataBase *data, TQpVar *vars, TQpResidual *resids, Double_t alpha, Double_t sigma, Int_t i, Double_t mu, Int_t status_code, Int_t level)
Print information about the optimization process and monitor the convergence status of thye algorithm...
virtual Double_t MuStep(TQpVar *step, Double_t alpha)
Compute the complementarity gap resulting from a step of length "alpha" along direction "step"...
void Project_r3(Double_t rmin, Double_t rmax)
Perform the projection operation required by Gondzio algorithm: replace each component r3_i of the co...
Int_t fNumberGondzioCorrections
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
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 TQpResidual * MakeResiduals(const TQpDataBase *data)=0
virtual Double_t GetMu()
compute complementarity gap, obtained by taking the inner product of the complementary vectors and di...
static Double_t StepBound(TVectorD &v, TVectorD &dir, Double_t maxStep)
Find the maximum stepsize of v in direction dir before violating the nonnegativity constraints...
virtual void Start(TQpProbBase *formulation, TQpVar *iterate, TQpDataBase *prob, TQpResidual *resid, TQpVar *step)
Implements a default starting-point heuristic.
Double_t GetResidualNorm()
void Add_r3_xz_alpha(TQpVar *vars, Double_t alpha)
Modify the "complementarity" component of the residuals, by adding the pairwise products of the compl...
virtual Int_t Solve(TQpDataBase *prob, TQpVar *iterate, TQpResidual *resid)
Solve the quadratic programming problem as formulated through prob, store the final solution in itera...
TQpResidual * fCorrector_resid
virtual TQpLinSolverBase * MakeLinSys(const TQpDataBase *data)=0
virtual void Negate()
Perform a "negate" operation on all data vectors : x = -x.
Int_t fMaximum_correctors
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 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.
TGondzioSolver & operator=(const TGondzioSolver &source)
Assignment operator.
void Clear_r1r2()
set the noncomplementarity components of the residual (the terms arising from the linear equalities i...
virtual ~TGondzioSolver()
Deconstructor.