EdGarrity / SOS

Search for an Optimum Solution
1 stars 0 forks source link

Epsilons Calculation Error #66

Open EdGarrity opened 5 years ago

EdGarrity commented 5 years ago

During testing of branch First_differences (issue #63), a bug was found in calculating the epsilons. The pushGP::median function in Selection.cpp was generating an exception whenever the array of errors passed to the function contained errors set to the maximum error value (std::numeric_limits::max()). The exception was generated when the median function attempted to add two maximum values.

The fix was to set the maximum errors to zero prior to calling the median function. However, while testing the Throttle_CPU_Usage branch I realized that this change was causing the epsilon values to always be zero.

A better fix for the original issue would be to have the median function check for maximum values in the input and handle them appropriately.