Skip to content

Commit

Permalink
options for the Newton solver
Browse files Browse the repository at this point in the history
  • Loading branch information
cnpetra committed Feb 5, 2024
1 parent 76230ae commit f4d0d46
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Optimization/hiopAlgFilterIPM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ hiopSolveStatus hiopAlgFilterIPMQuasiNewton::run()
bret = it_curr->fractionToTheBdry(*dir, _tau, _alpha_primal, _alpha_dual);
assert(bret);
//Step `_alpha_primal` may be reduced when option 'moving_lim_abs' or 'moving_lim_rel' is active.
//Return bool indicates if reduction was done.
//Returned bool indicates if reduction was done or not.
bret = ensure_moving_lims(*it_curr, *dir, _alpha_primal);

double theta = onenorm_pr_curr_ = resid->get_theta(); //at it_curr
Expand Down Expand Up @@ -2169,6 +2169,10 @@ hiopSolveStatus hiopAlgFilterIPMNewton::run()

//maximum step
bret = it_curr->fractionToTheBdry(*dir, _tau, _alpha_primal, _alpha_dual); assert(bret);
//Step `_alpha_primal` may be reduced when option 'moving_lim_abs' or 'moving_lim_rel' is active.
//Returned bool indicates if reduction was done or not.
bret = ensure_moving_lims(*it_curr, *dir, _alpha_primal);

double theta = onenorm_pr_curr_ = resid->get_theta(); //at it_curr
double theta_trial;
nlp->runStats.tmSolverInternal.stop();
Expand Down Expand Up @@ -2526,7 +2530,8 @@ bool hiopAlgFilterIPMBase::ensure_moving_lims(const hiopIterate& it, const hiopI
"Moving lim (absolute, [%7.3e]): step reduced: %7.3e -> %7.3e.\n",
moving_lim_abs,
alpha_pr_in,
alpha_pr);
alpha_pr);
return true;
} else {
nlp->log->printf(hovLinesearch,
"Moving lim (absolute, [%7.3e]) satisfied, step (norm %7.3e) not reduced.\n",
Expand Down

0 comments on commit f4d0d46

Please sign in to comment.