From b27216faabe06c8e1c808162e26335f479ef2269 Mon Sep 17 00:00:00 2001 From: Sergey Nikolaevich Averkin Date: Wed, 30 Oct 2024 00:33:12 -0400 Subject: [PATCH] Add missing Ipopt return codes. Maximum_CpuTime_Exceeded return code was introduced in at least Ipopt 3.10.4 (2013-05-05). Maximum_WallTime_Exceeded return code was added in Ipopt 3.14.0 (2021-06-15). Please, see Ipopt changelog for details: https://coin-or.github.io/Ipopt/md_ChangeLog.html. Without these return codes, the pagmo2 throws an exception when any of these conditions is satisfied. Signed-off-by: Sergey Averkin --- src/algorithms/ipopt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/algorithms/ipopt.cpp b/src/algorithms/ipopt.cpp index d018726af..f280d4fb7 100644 --- a/src/algorithms/ipopt.cpp +++ b/src/algorithms/ipopt.cpp @@ -101,6 +101,8 @@ const ipopt_result_map_t ipopt_results = {PAGMO_DETAIL_IPOPT_RES_ENTRY(Solve_Suc PAGMO_DETAIL_IPOPT_RES_ENTRY(Maximum_Iterations_Exceeded), PAGMO_DETAIL_IPOPT_RES_ENTRY(Restoration_Failed), PAGMO_DETAIL_IPOPT_RES_ENTRY(Error_In_Step_Computation), + PAGMO_DETAIL_IPOPT_RES_ENTRY(Maximum_CpuTime_Exceeded), + PAGMO_DETAIL_IPOPT_RES_ENTRY(Maximum_WallTime_Exceeded), PAGMO_DETAIL_IPOPT_RES_ENTRY(Not_Enough_Degrees_Of_Freedom), PAGMO_DETAIL_IPOPT_RES_ENTRY(Invalid_Problem_Definition), PAGMO_DETAIL_IPOPT_RES_ENTRY(Invalid_Option),