-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add probabilistic WCET feature #19
base: master
Are you sure you want to change the base?
Conversation
simso/utils/probabilistic_calc.py
Outdated
import numpy as np | ||
|
||
|
||
def randon_int_from_distr(proba_dist, n_sample=1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in the function name : randon instead of random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my (novice) point of view it seems ok except for the typo that requires a little refactoring (cf. my comment) !
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. |
d508a37
to
a8cb544
Compare
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.
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:
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.