simso icon indicating copy to clipboard operation
simso copied to clipboard

Add probabilistic WCET feature

Open SlimBenAmor opened this issue 6 years ago • 2 comments

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.

SlimBenAmor avatar Nov 29 '18 22:11 SlimBenAmor

Sorry I didn't have the time to do a proper review yet but I'll eventually do it :).

MaximeCheramy avatar Dec 18 '18 19:12 MaximeCheramy

Thanks for you review. I have fixed the typo. Please feel free to contact me for any additional modification.

SlimBenAmor avatar Dec 19 '18 10:12 SlimBenAmor