Add probabilistic WCET feature#19
Open
SlimBenAmor wants to merge 1 commit intoMaximeCheramy:masterfrom
Open
Conversation
jeanibarz
reviewed
Dec 18, 2018
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.
Typo in the function name : randon instead of random
jeanibarz
suggested changes
Dec 18, 2018
jeanibarz
left a comment
There was a problem hiding this comment.
From my (novice) point of view it seems ok except for the typo that requires a little refactoring (cf. my comment) !
Owner
|
Sorry I didn't have the time to do a proper review yet but I'll eventually do it :). |
jeanibarz
approved these changes
Dec 19, 2018
Author
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.