Skip to content

Commit

Permalink
update changelog, style change
Browse files Browse the repository at this point in the history
  • Loading branch information
svigerske committed Feb 13, 2023
1 parent 47131f7 commit 66939fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 4 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ More detailed information about incremental changes can be found in the

### 3.14.12 (2023-xx-yy)

- Fix that a source file was installed and install more header files [#642]
- Fix that a source file was installed and install more header files.
[#641, #642, by Joao Sousa Pinto]
- Fixed crash of GetIpoptCurrentIterate() and GetIpoptCurrentViolations() in
C interface when called before or after IpoptSolve(). [#644, #645, by Robbybp]

### 3.14.11 (2023-02-07)

Expand Down
16 changes: 6 additions & 10 deletions src/Interfaces/IpStdCInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,12 @@ bool GetIpoptCurrentIterate(
ipnumber* lambda
)
{
if (IsNull(ipopt_problem->tnlp))
if( IsNull(ipopt_problem->tnlp) )
{
return false;
}
else
{
return ipopt_problem->tnlp->get_curr_iterate(scaled, n, x, z_L, z_U, m, g, lambda);
}

return ipopt_problem->tnlp->get_curr_iterate(scaled, n, x, z_L, z_U, m, g, lambda);
}

bool GetIpoptCurrentViolations(
Expand All @@ -326,12 +324,10 @@ bool GetIpoptCurrentViolations(
ipnumber* compl_g
)
{
if (IsNull(ipopt_problem->tnlp))
if( IsNull(ipopt_problem->tnlp) )
{
return false;
}
else
{
return ipopt_problem->tnlp->get_curr_violations(scaled != 0, n, x_L_violation, x_U_violation, compl_x_L, compl_x_U, grad_lag_x, m, nlp_constraint_violation, compl_g);
}

return ipopt_problem->tnlp->get_curr_violations(scaled != 0, n, x_L_violation, x_U_violation, compl_x_L, compl_x_U, grad_lag_x, m, nlp_constraint_violation, compl_g);
}

0 comments on commit 66939fd

Please sign in to comment.