Skip to content

Commit 9f5b92a

Browse files
committed
fixed hardcoded SOC cond bypasses
1 parent 8e71f46 commit 9f5b92a

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

src/Optimization/hiopAlgFilterIPM.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,12 +1441,12 @@ hiopSolveStatus hiopAlgFilterIPMQuasiNewton::run()
14411441
theta_trial,
14421442
_alpha_primal);
14431443
nlp->runStats.tmSolverInternal.stop();
1444-
//break;
1444+
break;
14451445
}
14461446

14471447
nlp->runStats.tmSolverInternal.start();
14481448
// second order correction
1449-
if(true || iniStep && theta <= theta_trial) {
1449+
if(iniStep && theta <= theta_trial) {
14501450

14511451
bool grad_phi_dx_soc_computed = false;
14521452
double grad_phi_dx_soc = 0.0;

src/Optimization/hiopResidual.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,8 @@ void hiopResidual::update_soc(const hiopIterate& it,
485485
assert(it.sxu->matchesPattern(nlp->get_ixu()));
486486
#endif
487487
// rx = -grad_f - J_c^t*x - J_d^t*x+M*zl-M*zu - linear damping term in x
488-
//rx->copyFrom(grad);
489-
//jac_c.transTimesVec(1.0, *rx, 1.0, *it.yc);
490-
//jac_d.transTimesVec(1.0, *rx, 1.0, *it.yd);
491-
//rx->axpy(-1.0, *it.zl);
492-
//rx->axpy(1.0, *it.zu);
493488

494-
//using rxl as auxiliary variable to compute -M*zl+M*zu
489+
//using rxl as auxiliary variable to compute -M*zl+M*zu
495490
rxl->copyFrom(*it.zu);
496491
rxl->axpy(-1.0, *it.zl);
497492
nlp->inner_prod()->apply_M_lumped(*rxl, *rx);
@@ -503,13 +498,10 @@ void hiopResidual::update_soc(const hiopIterate& it,
503498
//buf = rx->infnorm_local();
504499
buf = nlp->inner_prod()->norm_stationarity(*rx);
505500
nrmInf_nlp_optim = fmax(nrmInf_nlp_optim, buf);
506-
//nrmOne_nlp_optim += rx->onenorm();
507-
nrmOne_nlp_optim += nlp->inner_prod()->norm_M_one(*rx);
501+
nrmOne_nlp_optim += nlp->inner_prod()->norm_M_one(*rx);
508502
nlp->log->printf(hovScalars, "NLP resid [update_soc]: inf norm rx=%22.17e\n", buf);
509503
logprob.addNonLogBarTermsToGrad_x(1.0, *rx);
510504
rx->negate();
511-
//nrmInf_bar_optim = fmax(nrmInf_bar_optim, rx->infnorm_local());
512-
//nrmOne_bar_optim += rx->onenorm();
513505
nrmInf_bar_optim = fmax(nrmInf_bar_optim, nlp->inner_prod()->norm_stationarity(*rx));
514506
nrmOne_bar_optim += nlp->inner_prod()->norm_M_one(*rx);
515507

0 commit comments

Comments
 (0)