193 Int_t stopCorrections = 0;
198 std::cout <<
"**** Entering the correction loop ****" << std::endl;
201 alpha < 1.0 && !stopCorrections) {
208 if (alpha_target > 1.0) alpha_target = 1.0;
229 if (alpha_enhanced == 1.0) {
231 alpha = alpha_enhanced;
235 else if(alpha_enhanced >= (1.0+
fAcceptTol)*alpha) {
240 alpha = alpha_enhanced;
283 std::cout << std::endl <<
"Duality Gap: " << resid->
GetDualityGap() << std::endl;
286 <<
" alpha = " << alpha << std::endl;
288 std::cout <<
" *** Iteration " << i <<
" *** " << std::endl;
289 std::cout <<
" mu = " << mu <<
" relative residual norm = "
296 std::cout << std::endl
297 <<
" *** SUCCESSFUL TERMINATION ***"
301 std::cout << std::endl
302 <<
" *** MAXIMUM ITERATIONS REACHED *** " << std::endl;
305 std::cout << std::endl
306 <<
" *** TERMINATION: PROBABLY INFEASIBLE *** "
310 std::cout << std::endl
311 <<
" *** TERMINATION: STATUS UNKNOWN *** " << std::endl;
316 std::cout <<
" *** sigma = " <<
sigma << std::endl;
338 if (
this != &source) {
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
@ kSUCCESSFUL_TERMINATION
Int_t fMaximum_correctors
Int_t fNumberGondzioCorrections
TGondzioSolver()
Default constructor.
Int_t Solve(TQpDataBase *prob, TQpVar *iterate, TQpResidual *resid) override
Solve the quadratic programming problem as formulated through prob, store the final solution in itera...
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) override
Print information about the optimization process and monitor the convergence status of thye algorithm...
~TGondzioSolver() override
Deconstructor.
TGondzioSolver & operator=(const TGondzioSolver &source)
Assignment operator.
TQpResidual * fCorrector_resid
Data for the general QP formulation.
virtual Double_t DataNorm()=0
default general problem formulation:
The Residuals class calculates and stores the quantities that appear on the right-hand side of the li...
Double_t GetResidualNorm()
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...
void CalcResids(TQpDataBase *problem, TQpVar *vars)
Calculate residuals, their norms, and duality complementarity gap, given a problem and variable set.
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 void Start(TQpProbBase *formulation, TQpVar *iterate, TQpDataBase *prob, TQpResidual *resid, TQpVar *step)
Implements a default starting-point heuristic.
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.
TQpSolverBase()
Default constructor.
virtual Int_t DoStatus(TQpDataBase *data, TQpVar *vars, TQpResidual *resids, Int_t i, Double_t mu, Int_t level)
Tests for termination.
virtual Double_t FinalStepLength(TQpVar *iterate, TQpVar *step)
Implements a version of Mehrotra starting point heuristic, modified to ensure identical steps in the ...
TQpSolverBase & operator=(const TQpSolverBase &source)
Assignment operator.
Class containing the variables for the general QP formulation.
int iterate(rng_state_t *X)
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.