simso
simso copied to clipboard
Add probabilistic WCET feature
The aim of this commit is to add new feature for real time tasks simulator 'simso'. We allow WCET of a task to be defined as a discrete Probability Distribution Function (PDF) using a matrix (numpy array) of two row: one for possible WCET values and the other for their corresponding probabilities. When the WCET of a task is defined as probability distribution, the simulator will pick random value from the possible WCET values proportionally to their probabilities. Then, it create a new job that has as WCET the generated random value.
The modified files in this commit are:
- simso/utils/probabilistic_calc.py: new file contain function that
generate random value according to a probability distribution.
- simso/configuration/Configuration.py: In case of probabilistic
WCET, verify that all WCET values are positive and that
probabilities sum to one.
- simso/core/Job.py: define new attribute '_wcet' individual value
for each job instance.
- simso/core/Task.py: In case of probabilistic WCET, generate random
value of WCET using 'randon_int_from_distr' function from
'probabilistic_calc.py' module. Then, create new job with
the generated WCET.
- simso/core/__init__.py: change import order to avoid program crush.
misc/script.py file is also slightly modified to add a task 'T1' with probabilistic WCET. When run, this script will generate a scheduling where several instance of task 'T1' has different WCET values.
Sorry I didn't have the time to do a proper review yet but I'll eventually do it :).
Thanks for you review. I have fixed the typo. Please feel free to contact me for any additional modification.