465b / nemf

A novel three step network-based general ecosystem modeling framework
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

stability checks fails or is imprecise if absolute value is close to zero #8

Closed 465b closed 4 years ago

465b commented 4 years ago

The stability check of the inverse models uses the relative fluctuation to determine whether the time evolution is stable. However, if the value of the tested time_evolution is close to zero, the relative fluctuation increases drastically due to the numerical precision of the float. This can cause the stability check to fail even though its "stable".

465b commented 4 years ago

fixed now it returns stable if: (relative changes OR absolute changes) < threshold, instead of: (relative changes) < threshold,