oemof / tespy

Thermal Engineering Systems in Python (TESPy). This package provides a powerful simulation toolkit for thermal engineering plants such as power plants, district heating systems or heat pumps.
https://tespy.readthedocs.io
MIT License
256 stars 80 forks source link

Force absolute difference mode for target values equal to zero #456

Closed fwitte closed 6 months ago

fwitte commented 7 months ago

Newton helper functions can either use absolute or relative difference as convergence criteria. In case the target value is zero, relative difference does not make sense. The changes force absolute differences for these cases.