From b5de8517a0bf970f6bd9dc458ca01210b45e96ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pacaud?= Date: Thu, 5 Sep 2024 14:46:04 +0200 Subject: [PATCH] [FIX] fix missing check in get_status_output (#369) --- src/enums.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/enums.jl b/src/enums.jl index afe25555..491cbe31 100644 --- a/src/enums.jl +++ b/src/enums.jl @@ -45,7 +45,7 @@ function get_status_output(status, opt) if status == SOLVE_SUCCEEDED - return @sprintf "Optimal Solution Found (tol = %5.1e)." opt.tol + return @sprintf "Optimal Solution Found (tol = %5.1e)." opt.tol elseif status == SOLVED_TO_ACCEPTABLE_LEVEL return @sprintf "Solved To Acceptable Level (tol = %5.1e)." opt.acceptable_tol elseif status == SEARCH_DIRECTION_BECOMES_TOO_SMALL @@ -78,9 +78,9 @@ function get_status_output(status, opt) return "Invalid number in NLP constraint function detected." elseif status == INVALID_NUMBER_JACOBIAN return "Invalid number in NLP constraint Jacobian detected." - elseif INVALID_NUMBER_HESSIAN_LAGRANGIAN + elseif status == INVALID_NUMBER_HESSIAN_LAGRANGIAN return "Invalid number in NLP Hessian Lagrangian detected." else - error("status code is not valid") + error("status code is not valid") end end