MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
Static Public Member Functions | Static Protected Member Functions
MCScheduling.MixedCriticality.CDefaultMixedCriticalityInstanceGenerator Class Reference

The default implemenation of the IMixedCriticalityInstanceGenerator interface. More...

List of all members.

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.

Detailed Description

The default implemenation of the IMixedCriticalityInstanceGenerator interface.


Member Function Documentation

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.

Parameters:
executionTimesThe resulting vector of exec. times.
maximumExecutionTimesThe maximum value of WCET per criticality level.
criticalityThe maximum (zero-based) criticality to be set.
randomizerThe 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.

Parameters:
numberThe number whose digits are counted.
Returns:
The format string for instance name suffix.
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.

Parameters:
instanceNamePrefixThe prefix of the generated instances names.
instanceCountThe number of MC instances to generate.
jobCountPerCriticalityThe number of jobs per criticality level.
maximumExecutionTimesThe maximum random value of an exectution time per level.
maxIdleTimeThe maximum length of an idle time interval between jobs' executions.
timeWindowSpanThe length of the [release time; deadline] time window does not exceeds the largest execution time of a job times this constant.
Returns:
The list of generated MC instances.

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.

Parameters:
permutationThe permutation to be shuffled.
randomizerThe 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.

Parameters:
xThe first variable.
yThe 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.

Parameters:
instanceThe instance to be validated.
Returns:
Returns true if the given (generated) instance is specified correctly, if not, it returns false.
 All Classes Namespaces Functions Variables Properties