-
Notifications
You must be signed in to change notification settings - Fork 4
Use eta_plus_closed(w) in SPNPScheduler::b_plus instead of eta_plus(w + EPSILON) #13
Description
Original report by Philipp Reinkemeier (Bitbucket: preinkemeier, GitHub: preinkemeier).
In the function b_plus of class SPNPScheduler, the function eta_plus is called with some argument w (which is probably always an integer, except if ctx_switch_overhead is some floating point value) + some EPSILON value, which is 1e-9 by default. This results in floating point values being written into the cache used by the eta_plus function. I do not know much about python, but at least in other programming languages, comparing floating point numbers for equality is something one likes to avoid.
So i think that the function eta_plus_closed(w) should be used instead. The comment in EventModel::eta_plus_closed already makes it explicit that eta_plus_closed(w) is identical to eta_plus(w + EPSILON), but that there are issues with floating point precision.