Skip to content
Snippets Groups Projects
Commit c5e1f781 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Also accept the solution if an acceptable tolerance was reached.

When the prescribed tolerance was not reached, but IpOpt still
computed an acceptable solution, then continue and print a warning.
parent 66cada01
No related branches found
No related tags found
No related merge requests found
...@@ -756,7 +756,9 @@ void QuadraticIPOptSolver<MatrixType,VectorType,JacobianType>::solve() ...@@ -756,7 +756,9 @@ void QuadraticIPOptSolver<MatrixType,VectorType,JacobianType>::solve()
if (status == Ipopt::Invalid_Option) if (status == Ipopt::Invalid_Option)
DUNE_THROW(Dune::Exception, "IPOpt returned 'Invalid_Option' error!"); DUNE_THROW(Dune::Exception, "IPOpt returned 'Invalid_Option' error!");
if (status != Ipopt::Solve_Succeeded) if (status == Ipopt::Solved_To_Acceptable_Level)
std::cout<<"WARNING: Desired tolerance could not be reached, but still accetable tolerance is reached.\n";
else if (status != Ipopt::Solve_Succeeded)
DUNE_THROW(Dune::Exception, "IPOpt: Error during optimization!"); DUNE_THROW(Dune::Exception, "IPOpt: Error during optimization!");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment