You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When tot at Cobyla.cs:962 is very small, this line evaluates to temp = 0.0. This causes line 963 to divide by zero, evaluating to alpha = NaN. This eventually causes both step and stepful to both be NaN, which causes Cobyla.cs:1292 to always evaluate to false (because (NaN == NaN) == false), looping forever.
This is annoying since it makes the algorithm unusable for production purposes.
The text was updated successfully, but these errors were encountered:
@jcb-entrnce could you please provide the objective function and the constraints used, in the unit test code form hopefully, so that we could try to reproduce the problem? Also, any extra info on top of that would be appreciated - thanks in advance.
@jcb-entrnce Sorry for this extremely late response.
Looking at the code, my initial estimate would be that the following code in lines 963-964 would resolve your issue:
var alpha = temp != 0 ? sp / temp : Math.Sign(sp);
var beta = temp != 0 ? tot / temp : Math.Sign(tot);
(potentially checking a small epsilon rather than 0). Do you agree?
When
tot
atCobyla.cs:962
is very small, this line evaluates totemp = 0.0
. This causes line 963 to divide by zero, evaluating toalpha = NaN
. This eventually causes both step and stepful to both beNaN
, which causesCobyla.cs:1292
to always evaluate to false (because(NaN == NaN) == false
), looping forever.This is annoying since it makes the algorithm unusable for production purposes.
The text was updated successfully, but these errors were encountered: