Skip to content

Commit

Permalink
update example solutions
Browse files Browse the repository at this point in the history
  • Loading branch information
nychiang committed Oct 6, 2023
1 parent 0e01b0d commit 4f7014a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Drivers/MDS/NlpMdsEx1Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int main(int argc, char **argv)


if(selfCheck) { // && has_empty_sp_row) {
if(fabs(obj_value-(-4.9994888159755632e+01))>1e-6) {
if(fabs(obj_value-(-4.9994906229741609e+01))>1e-6) {
printf("selfcheck: objective mismatch for MDS Ex1 problem with 400 sparse variables and 100 "
"dense variables did. BTW, obj=%18.12e was returned by HiOp.\n", obj_value);
ret_code = -1;
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/MDS/NlpMdsEx1RajaDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ int main(int argc, char **argv)
obj_value = solver.getObjective();

if(selfCheck && has_empty_sp_row) {
if(fabs(obj_value-(-4.9994888159755632e+01))>1e-6) {
if(fabs(obj_value-(-4.9994906229741609e+01))>1e-6) {
printf("selfcheck: objective mismatch for MDS Ex1 problem with 400 sparse variables and 100 "
"dense variables did. BTW, obj=%18.12e was returned by HiOp.\n", obj_value);
return -1;
}
} else if(status<0) {
if(rank==0)
if(rank==0)r
printf("solver returned negative solve status: %d (with objective is %18.12e)\n", status, obj_value);
return -1;
}
Expand Down
7 changes: 3 additions & 4 deletions src/Optimization/hiopAlgFilterIPM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,18 +547,17 @@ bool hiopAlgFilterIPMBase::update_log_barrier_params(hiopIterate& it,
double& mu_new,
double& tau_new)
{
const double target_tol = nlp->options->GetNumeric("tolerance");
const double target_comp_tol = nlp->options->GetNumeric("comp_tol")/nlp->get_obj_scale();
const double target_comp_tol = comp_tol_/nlp->get_obj_scale();
double new_mu = std::fmax(0.0, std::fmin(kappa_mu*mu_curr, std::pow(mu_curr,theta_mu)));
new_mu = std::fmax(new_mu, std::fmin(target_tol, target_comp_tol)/(10.+1.) );
new_mu = std::fmax(new_mu, std::fmin(eps_tol, target_comp_tol)/(10.+1.) );
if(fabs(new_mu-mu_curr)<1e-16) {
return false;
}
mu_new = new_mu;
tau_new = fmax(tau_min,1.0-mu_new);

if(elastic_mode_on) {
const double target_mu = target_tol;
const double target_mu = eps_tol;
const double bound_relax_perturb_init = nlp->options->GetNumeric("elastic_mode_bound_relax_initial");
const double bound_relax_perturb_min = nlp->options->GetNumeric("elastic_mode_bound_relax_final");
double bound_relax_perturb;
Expand Down

0 comments on commit 4f7014a

Please sign in to comment.