topsim.algorithms.scheduling.Scheduling

class topsim.algorithms.scheduling.Scheduling[source]

Abstract base class for all Scheduling Algorithms (used in the dynamic allocation by the ‘scheduler’).

The Algorithm base class only requires the single run() method to be implemented; the to_df may simply be used as a stubb.

Notes

It is important to note that the simulation will run with an ‘incorrect’ algorithm. An algorithm is ‘incorrect’ if it attempts to:

  • Allocate to a machine that is already occupied

  • Schedule a task to a machine that has already been scheduled.

These will raise RuntimeErrors.

It is also important for the algorithm to take into account

Attributes

LOW_MAX_RESOURCES

LOW_REALTIME_RESOURCES

MID_MAX_RESOURCES

MID_REALTIME_RESOURCES

Methods

__init__()

run(cluster, planner, clock, plan, schedule, ...)

to_df()

Produce a Pandas DataFrame object to return current state of the scheduling algorithm

to_string()

Return the string name of the implemenation of this class