MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
|
The default implemenation of the IMixedCriticalityInstanceGenerator interface. More...
Static Public Member Functions | |
static List < CMixedCriticalityInstance > | generate (string instanceNamePrefix, int instanceCount, int[] jobCountPerCriticality, int[] maximumExecutionTimes, int maxIdleTime, double timeWindowSpan) |
Creates a set of instanceCount mixed-criticality instances, each containing jobCountPerCriticality[i] mixed-criticality jobs of the i-th criticality, each is being assigned a random worst- case execution time for each criticality level with its maximum value bounded by maxExecutionTimes. | |
static void | createExecutionTimes (double[] executionTimes, int[] maximumExecutionTimes, int criticality, CUniformRandom randomizer) |
Creates a random list of worst-case execution times for a job of the specified criticality. | |
static string | determineInstanceNameSuffix (int number) |
An auxiliary method which determines a number of digits in the specified number, and according to that creates a format string for MC-instances name suffix. | |
static bool | validateGeneratedInstance (CMixedCriticalityInstance instance) |
Validates the specified mixed-criticality instance. | |
Static Protected Member Functions | |
static void | shuffle (int[] permutation, CUniformRandom randomizer) |
Shuffles the specified permutation, i.e creating random permutation out of it. | |
static void | swap (ref int x, ref int y) |
Swaps the content of the specified variables. |
The default implemenation of the IMixedCriticalityInstanceGenerator interface.
static void MCScheduling.MixedCriticality.CDefaultMixedCriticalityInstanceGenerator.createExecutionTimes | ( | double[] | executionTimes, |
int[] | maximumExecutionTimes, | ||
int | criticality, | ||
CUniformRandom | randomizer | ||
) | [static] |
Creates a random list of worst-case execution times for a job of the specified criticality.
The maximum values of execution times are specified in maximumExecutionTimes.
executionTimes | The resulting vector of exec. times. |
maximumExecutionTimes | The maximum value of WCET per criticality level. |
criticality | The maximum (zero-based) criticality to be set. |
randomizer | The random number generator to use. |
static string MCScheduling.MixedCriticality.CDefaultMixedCriticalityInstanceGenerator.determineInstanceNameSuffix | ( | int | number | ) | [static] |
An auxiliary method which determines a number of digits in the specified number, and according to that creates a format string for MC-instances name suffix.
number | The number whose digits are counted. |
static List<CMixedCriticalityInstance> MCScheduling.MixedCriticality.CDefaultMixedCriticalityInstanceGenerator.generate | ( | string | instanceNamePrefix, |
int | instanceCount, | ||
int[] | jobCountPerCriticality, | ||
int[] | maximumExecutionTimes, | ||
int | maxIdleTime, | ||
double | timeWindowSpan | ||
) | [static] |
Creates a set of instanceCount mixed-criticality instances, each containing jobCountPerCriticality[i] mixed-criticality jobs of the i-th criticality, each is being assigned a random worst- case execution time for each criticality level with its maximum value bounded by maxExecutionTimes.
The release times and deadlines of the jobs are determined randomly (if the resp. arguments are set to true), but it is guaranteed that there is at least one feasible schedule.
instanceNamePrefix | The prefix of the generated instances names. |
instanceCount | The number of MC instances to generate. |
jobCountPerCriticality | The number of jobs per criticality level. |
maximumExecutionTimes | The maximum random value of an exectution time per level. |
maxIdleTime | The maximum length of an idle time interval between jobs' executions. |
timeWindowSpan | The length of the [release time; deadline] time window does not exceeds the largest execution time of a job times this constant. |
A pseudo-random number generator.
static void MCScheduling.MixedCriticality.CDefaultMixedCriticalityInstanceGenerator.shuffle | ( | int[] | permutation, |
CUniformRandom | randomizer | ||
) | [static, protected] |
Shuffles the specified permutation, i.e creating random permutation out of it.
permutation | The permutation to be shuffled. |
randomizer | The random number generator to use. |
static void MCScheduling.MixedCriticality.CDefaultMixedCriticalityInstanceGenerator.swap | ( | ref int | x, |
ref int | y | ||
) | [static, protected] |
Swaps the content of the specified variables.
x | The first variable. |
y | The second variable. |
static bool MCScheduling.MixedCriticality.CDefaultMixedCriticalityInstanceGenerator.validateGeneratedInstance | ( | CMixedCriticalityInstance | instance | ) | [static] |
Validates the specified mixed-criticality instance.
The jobs in the instance is assumed to be in order in which they appear in the feasible schedule from which the instance has been generated.
instance | The instance to be validated. |