Skip to content

Commit 7909415

Browse files
authored
In deduce_retcode, check more retcodes from NLopt
1 parent b6b117a commit 7909415

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/utils.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,15 @@ function deduce_retcode(retcode::Symbol)
100100
return ReturnCode.Default
101101
elseif retcode == :Success || retcode == :EXACT_SOLUTION_LEFT ||
102102
retcode == :FLOATING_POINT_LIMIT || retcode == :true || retcode == :OPTIMAL ||
103-
retcode == :LOCALLY_SOLVED || retcode == :ROUNDOFF_LIMITED || retcode == :SUCCESS
103+
retcode == :LOCALLY_SOLVED || retcode == :ROUNDOFF_LIMITED || retcode == :SUCCESS ||
104+
retcode == :STOPVAL_REACHED || retcode == :FTOL_REACHED || retcode == :XTOL_REACHED
104105
return ReturnCode.Success
105106
elseif retcode == :Terminated
106107
return ReturnCode.Terminated
107108
elseif retcode == :MaxIters || retcode == :MAXITERS_EXCEED ||
108109
retcode == :MAXEVAL_REACHED
109110
return ReturnCode.MaxIters
110-
elseif retcode == :MaxTime || retcode == :TIME_LIMIT
111+
elseif retcode == :MaxTime || retcode == :TIME_LIMIT || retcode == :MAXTIME_REACHED
111112
return ReturnCode.MaxTime
112113
elseif retcode == :DtLessThanMin
113114
return ReturnCode.DtLessThanMin

0 commit comments

Comments
 (0)