topsim.core.delay.DelayModel

class topsim.core.delay.DelayModel(prob, dist, degree=DelayDegree.LOW, seed=20)[source]

The delay model is the delay or failure model for tasks in a workflow. If we have a possibility for delay, then the timeout triggered by a process will be increased by a certain portion.

A delay model object may be passed to any of the actors within the simulation that yield a timeout to the environment. Each actor will store their expected (current) timeouts and, if present, the actual timeout if a delay has been triggered.

prob

The probabilty a delay will occur

Type:

float

dist

String name of the distribution from which values will be picked to create a delay.

Currently normal, poisson, and uniform distributions from numpy are supported. If

Type:

str

degree

The ‘degree’ to which we will be generating the delay. The higher degree, the larger the final delay.

Type:

enumerate.Enum (float)

Methods

__init__(prob, dist[, degree, seed])

generate_delay(task_runtime[, n])

Produce a delay based on current DelayModel attributes.