‘Discrete Time’ scheduler¶
Warning
Do not use this scheduler!
This scheduler will only work if all models are scheduled at exactly the same time, or are not scheduled at all (scheduling at infinity is allowed though).
- class pypdevs.schedulers.schedulerDT.SchedulerDT(models, epsilon, total_models)[source]¶
Scheduler class itself
- __init__(models, epsilon, total_models)[source]¶
Constructor
- Parameters
models – all models in the simulation
- getImminent(time)[source]¶
Returns a list of all models that transition at the provided time, with the specified epsilon deviation allowed.
- Parameters
time – timestamp to check for models
Warning
For efficiency, this method only checks the first elements, so trying to invoke this function with a timestamp higher than the value provided with the readFirst method, will always return an empty set.
- massReschedule(reschedule_set)[source]¶
Reschedule all models provided. Equivalent to calling unschedule(model); schedule(model) on every element in the iterable.
- Parameters
reschedule_set – iterable containing all models to reschedule