Skip to content

Use eta_plus_closed(w) in SPNPScheduler::b_plus instead of eta_plus(w + EPSILON) #13

@IDA-TUBS

Description

@IDA-TUBS

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions