SimJava
v2.0

eduni.simjava
Class Sim_stat

java.lang.Object
  |
  +--eduni.simjava.Sim_stat
All Implemented Interfaces:
java.io.Serializable

public class Sim_stat
extends java.lang.Object
implements java.io.Serializable

A class that provides entities with statistical support.

If a modeller is interested in collecting statistical measurements from an entity he needs to create a Sim_stat object, define measures of interest, and set it as the entity's statistics gatherer. The Sim_stat objects defined in the simulation are also accessed by Sim_system in order to apply output analysis as well as certain transient and termination conditions.

The first step to adding statistical support to an entity is to create a Sim_stat object in the entity's constructor. Following this, an add_measure method is called to define a measure of interest for the entity. This is repeated for each measure that is of interest. The way in which a measure is defined depends on its type. A measure can be either default or custom.

Default measures are measures that can be considered in most simulations. Since their meaning is straightforward, observations for these can be collected automatically based on the internal events within the simulation. All that is required from the modeller is to define the default measures of interest and then let Sim_system include summary statistics based on their observations in the simulation report. The modeller also has access to the measures at runtime via the several measurement calculation methods. The measurements that can be obtained from default measures depend on the measure's type.

Custom measures on the other hand are measures with a simulation specific meaning. They are not generally applicable and as such the modeller needs to define their type and the instances at which they will be updated. Apart from the definition of custom measures and their updating, they do not differ in any way from default measures.

All measures can be classified in one of the following categories:

The default measures provided are the following:

The measurements available for each measure type are the following:

These measurements are produced by relevant methods of Sim_stat. These may be called at runtime by the user to check a measure's progress, or at the simulation's end by Sim_system in order to apply output analysis and to generate the simulation's report.

To calculate exceedence proportions the user calls calc_proportions on the Sim_stat object after the relevant measure has been defined. The levels of interest for which proportions will be calculated are provided with this method.

The user also has the ability to specify certain event tags for which the measures defined should be considered. This is made possible through the measure_for method. The ability to select tags of interest is important since events with specific tags are often used as control events between the entities and do not represent actual system jobs. Furthermore, it could be the case that tags differentiate between different types of events, in which case the user may be interested only in measures for one of those types. The tags specified are used to decide whether or not observations should be collected for default measures. In the case of custom measures the specified tags are not considered. This is the case since custom measures are updated by the modeller explicitly.

Custom measures may also be used to implement default measures for several different event types. In this case the user defines separate measures for each event type of interest and proceeds to update them during the simulation run.

Apart from defining a measure as default or custom, the user has an additional option regarding its calculation efficiency. The default way in which measurements are calculated is through observation collection. Whenever an internal (for default measures) or user called update method (for custom measures) is used, an observation is collected based on the given parameters. The approach of collecting observations for each measure provides the maximum possible information level. Such detailed measures can be used with all output analysis methods, in all transient and termination conditions and also used to produce graphs of the measures' progress through time. However, considerable memory requirements are presented in this case that could be in certain cases prohibiting.

For this reason the user has the option to define a measure as being "efficient". In this case observations are not collected, but measurements are rather dynamically recalculated with each update. This approach minimises the memory requirements and is to be used in cases of large simulations with many entities and measures, which are to have large run lengths. The tradeoff in this case is functionality. When efficient measures are defined batch means can't be used as an output analysis method. Furthermore, the minimum-maximum method of transient period estimation can't be used with an efficient measure. The measurements of variance and standard deviation are not available for these measures and the other measurements may be calculated only for the entire run length or the entire steady state - not for arbitrary time periods. Finally, graphs may not be produced for efficient measures.

Which approach is to be used is left to the user's discretion. It is possible however to have a mix of detailed and efficient measures with the above stated limitations. A measure is specified as being efficient by calling a set_efficient method while the Sim_stat object is being setup.

A final point of consideration is the order with which the setup steps are carried out for a Sim_stat object:

More information on SimJava's statistical support can be found at the SimJava Tutorial.

See Also:
Sim_system, Sim_entity, Serialized Form

Field Summary
static int ARRIVAL_RATE
          Constant specifying the entity's arrival rate.
static int INTERVAL_BASED
          Constant defining interval based measures.
static int QUEUE_LENGTH
          Constant specifying the entity's queue length.
static int RATE_BASED
          Constant defining rate based measures.
static int RESIDENCE_TIME
          Constant specifying the entity's event residence time.
static int SERVICE_TIME
          Constant specifying the entity's event service time.
static int STATE_BASED
          Constant defining state based measures.
static int THROUGHPUT
          Constant specifying the entity's throughput.
static int UTILISATION
          Constant specifying the entity's utilisation.
static int WAITING_TIME
          Constant specifying the entity's event waiting time.
 
Constructor Summary
Sim_stat()
          The constructor used to create a new Sim_stat object.
 
Method Summary
 void add_measure(int measure)
          Specify a default measure to be calculated.
 void add_measure(java.lang.String measure_name, int measure_type)
          Specify a (continuous) state or interval based custom measure to be calculated.
 void add_measure(java.lang.String measure_name, int measure_type, boolean continuous)
          Specify a (continuous or non-continuous) state based custom measure.
 void add_measure(java.lang.String measure_name, int measure_type, double level)
          Specify a continuous state based custom measure with a given initial state.
 double average(int measure)
          Get the sample average for a default measure.
 double average(int measure, double start_time, double end_time)
          Get the sample average for a default measure, applying to a specific time interval.
 double average(java.lang.String measure)
          Get the sample average for a custom measure.
 double average(java.lang.String measure, double start_time, double end_time)
          Get the sample average for a custom measure, applying to a specific time interval.
 void calc_proportions(int measure, double[] levels)
          Specify a default measure for which exceedence proportions are to be calculated.
 void calc_proportions(java.lang.String measure, double[] levels)
          Specify a custom measure for which exceedence proportions are to be calculated.
 int count(int measure)
          Get the event count for a default rate based measure.
 int count(int measure, double start_time, double end_time)
          Get the event count for a default rate based measure, applying to a specific time interval.
 int count(java.lang.String measure)
          Get the event count for a custom rate based measure.
 int count(java.lang.String measure, double start_time, double end_time)
          Get the event count for a custom rate based measure, applying to a specific time interval.
 int detailed_measure_count()
          Get the number of detailed measures defined in this Sim_stat object.
 double[] exc_proportion(int measure)
          Get the exceedence proportions for the defined levels for a default state or rate based measure.
 double exc_proportion(int measure, double level)
          Get an exceedence proportion for a default state or interval based measure.
 double[] exc_proportion(int measure, double[] levels)
          Get the exceedence proportions for arbitrary levels, for a default state or interval based measure.
 double[] exc_proportion(int measure, double[] levels, double start_time, double end_time)
          Get the exceedence proportions for a set of levels, for a default state or interval based measure, applying to a specific time interval.
 double exc_proportion(int measure, double level, double start_time, double end_time)
          Get an exceedence proportion for a specific level, for a default state or interval based measure, applying to a specific time interval.
 double[] exc_proportion(java.lang.String measure)
          Get the exceedence proportions for the defined levels for a custom state or rate based measure.
 double exc_proportion(java.lang.String measure, double level)
          Get an exceedence proportion for a custom state or interval based measure.
 double[] exc_proportion(java.lang.String measure, double[] levels)
          Get the exceedence proportions for arbitrary levels, for a custom state or interval based measure.
 double[] exc_proportion(java.lang.String measure, double[] levels, double start_time, double end_time)
          Get the exceedence proportions for a set of levels, for a custom state or interval based measure, applying to a specific time interval.
 double exc_proportion(java.lang.String measure, double level, double start_time, double end_time)
          Get an exceedence proportions for a specific level, for a custom state or interval based measure, applying to a specific time interval.
 java.util.List[] get_data()
          Get all the data contained in the Sim_stat object.
 java.util.List get_detailed_measures()
          Get the information for the non-efficient measures defined in the Sim_stat object.
 double[] get_levels(int measure)
          Get the exceedence proportion levels defined for a default measure.
 double[] get_levels(java.lang.String measure)
          Get the exceedence proportion levels defined for a custom measure.
 java.util.List get_measures()
          Get the information for the measures defined in the Sim_stat object.
 java.lang.String get_name()
          Get the name of the entity to which this Sim_stat object belongs to.
 boolean is_efficient(int measure)
          Check to see whether a default measure is specified to be efficient.
 boolean is_efficient(java.lang.String measure)
          Check to see whether a custom measure is specified to be efficient.
 double maximum(int measure)
          Get the maximum observation for a default state or interval based measure.
 double maximum(int measure, double start_time, double end_time)
          Get the maximum observation for a default state or interval based measure, applying to a specific time interval.
 double maximum(java.lang.String measure)
          Get the maximum observation for a custom state or interval based measure.
 double maximum(java.lang.String measure, double start_time, double end_time)
          Get the maximum observation for a custom state or interval based measure, applying to a specific time interval.
 void measure_for(int[] tags)
          Specify a set of event tags for which measures are to be considered.
 double minimum(int measure)
          Get the minimum observation for a default state or interval based measure.
 double minimum(int measure, double start_time, double end_time)
          Get the minimum observation for a default state or interval based measure, applying to a specific time interval.
 double minimum(java.lang.String measure)
          Get the minimum observation for a custom state or interval based measure.
 double minimum(java.lang.String measure, double start_time, double end_time)
          Get the minimum observation for a custom state or interval based measure, applying to a specific time interval.
 void set_efficient(int measure)
          Mark a default measure as memory efficient.
 void set_efficient(java.lang.String measure)
          Mark a custom measure as memory efficient
 double std_deviation(int measure)
          Get the sample standard deviation for a default state or interval based measure.
 double std_deviation(int measure, double start_time, double end_time)
          Get the sample standard deviation for a default state or interval based measure, applying to a specific time interval.
 double std_deviation(java.lang.String measure)
          Get the sample standard deviation for a custom state or interval based measure.
 double std_deviation(java.lang.String measure, double start_time, double end_time)
          Get the sample standard deviation for a custom state or interval based measure, applying to a specific time interval.
 void update(java.lang.String measure, double time_occurred)
          Update a custom rate based measure.
 void update(java.lang.String measure, double first, double end_time)
          Update a custom continuous state based or custom interval based measure.
 void update(java.lang.String measure, double level, double start_time, double end_time)
          Update a custom non-continuous state based measure.
 double variance(int measure)
          Get the sample variance for a default state or interval based measure.
 double variance(int measure, double start_time, double end_time)
          Get the sample variance for a default state or interval based measure, applying to a specific time interval.
 double variance(java.lang.String measure)
          Get the sample variance for a custom state or interval based measure.
 double variance(java.lang.String measure, double start_time, double end_time)
          Get the sample variance for a custom state or interval based measure, applying to a specific time interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RATE_BASED

public static final int RATE_BASED
Constant defining rate based measures.

STATE_BASED

public static final int STATE_BASED
Constant defining state based measures.

INTERVAL_BASED

public static final int INTERVAL_BASED
Constant defining interval based measures.

ARRIVAL_RATE

public static final int ARRIVAL_RATE
Constant specifying the entity's arrival rate.

THROUGHPUT

public static final int THROUGHPUT
Constant specifying the entity's throughput.

QUEUE_LENGTH

public static final int QUEUE_LENGTH
Constant specifying the entity's queue length.

UTILISATION

public static final int UTILISATION
Constant specifying the entity's utilisation.

WAITING_TIME

public static final int WAITING_TIME
Constant specifying the entity's event waiting time.

RESIDENCE_TIME

public static final int RESIDENCE_TIME
Constant specifying the entity's event residence time.

SERVICE_TIME

public static final int SERVICE_TIME
Constant specifying the entity's event service time.
Constructor Detail

Sim_stat

public Sim_stat()
The constructor used to create a new Sim_stat object.
Method Detail

get_name

public java.lang.String get_name()
Get the name of the entity to which this Sim_stat object belongs to.
Returns:
The Sim_stat owner's name

add_measure

public void add_measure(int measure)
Specify a default measure to be calculated.
Parameters:
measure - The int constant defining the default measure of interest

add_measure

public void add_measure(java.lang.String measure_name,
                        int measure_type)
Specify a (continuous) state or interval based custom measure to be calculated. If a state based measure is defined the original state is set to 0.0.
Parameters:
measure_name - The name of the measure. This must be unique among the entity's measures.
measure_type - The int constant that specifies the measure's type

add_measure

public void add_measure(java.lang.String measure_name,
                        int measure_type,
                        double level)
Specify a continuous state based custom measure with a given initial state.
Parameters:
measure_name - The name of the measure. This must be unique among the entity's measures.
measure_type - The int constant that specifies the measure's type. In this case the type must be STATE_BASED.
level - The initial state of the measure

add_measure

public void add_measure(java.lang.String measure_name,
                        int measure_type,
                        boolean continuous)
Specify a (continuous or non-continuous) state based custom measure. If the measure is continuous the initial state is set to 0.0.
Parameters:
measure_name - The name of the measure. This must be unique among the entity's measures.
measure_type - The int constant that specifies the measure's type. In this case the type must be STATE_BASED.
continuous - true for a continuous measure, false for a non-continuous measure.

calc_proportions

public void calc_proportions(int measure,
                             double[] levels)
Specify a default measure for which exceedence proportions are to be calculated. The measure must be state or interval based but not utilisation.
Parameters:
measure - The int constant defining the default measure of interest
levels - The set of exceedence proportion levels

calc_proportions

public void calc_proportions(java.lang.String measure,
                             double[] levels)
Specify a custom measure for which exceedence proportions are to be calculated. The measure must be state or interval based.
Parameters:
measure - The name of the measure
levels - he set of exceedence proportion levels

measure_for

public void measure_for(int[] tags)
Specify a set of event tags for which measures are to be considered. This is used for default measures that need to be automatically updated. Events with tags other than the ones specified will not be considered for the defined default measures. If the measure is not called, all the event tags will be considered. Finally, in the case of utilisation, the selected tags are not taken into account and observations are always collected.
Parameters:
tags - The set of event tags of interest

set_efficient

public void set_efficient(int measure)
Mark a default measure as memory efficient.
Parameters:
measure - The int constant defining the default measure of interest

set_efficient

public void set_efficient(java.lang.String measure)
Mark a custom measure as memory efficient
Parameters:
measure - The name of the measure

update

public void update(java.lang.String measure,
                   double time_occurred)
Update a custom rate based measure.
Parameters:
measure - The name of the measure
time_occurred - The occurrence time of the event
Throws:
Sim_stat_exception - If an update error occurs. This error can be left unchecked.

update

public void update(java.lang.String measure,
                   double level,
                   double start_time,
                   double end_time)
Update a custom non-continuous state based measure.
Parameters:
measure - The name of the measure
level - The state of the measure for this update
start_time - The interval's start time
end_time - The interval's end_time
Throws:
Sim_stat_exception - If an update error occurs. This error can be left unchecked.

update

public void update(java.lang.String measure,
                   double first,
                   double end_time)
Update a custom continuous state based or custom interval based measure.
Parameters:
measure - The name of the measure
first - If the measure is state based this represents the update's level. If the measure is interval based it represents the interval's start time.
end_time - If the measure is state based this represents the time at which the entity entered the update's state. If the measure is interval based it represents the interval's end time.
Throws:
Sim_stat_exception - If an update error occurs. This error can be left unchecked.

count

public int count(int measure)
Get the event count for a default rate based measure. In the case of efficient measures, before steady state is reached the count applies to the entire run length up to that point. If steady state has been reached the count applies to the steady state up to that point.

If the provided measure isn't efficient the count applies to the entire run length.

Parameters:
measure - The int constant representing the default measure
Returns:
The event count
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

average

public double average(int measure)
Get the sample average for a default measure. In the case of efficient measures, before steady state is reached the average applies to the entire run length up to that point. If steady state has been reached the average applies to the steady state up to that point.

If the provided measure isn't efficient the average applies to the entire run length.

The measure provided may not be the utilisation.

Parameters:
measure - The int constant representing the default measure
Returns:
The sample average
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

maximum

public double maximum(int measure)
Get the maximum observation for a default state or interval based measure. In the case of efficient measures, before steady state is reached the maximum applies to the entire run length up to that point. If steady state has been reached the maximum applies to the steady state up to that point.

If the provided measure isn't efficient the maximum applies to the entire run length.

The measure provided may not be the utilisation.

Parameters:
measure - The int constant representing the default measure
Returns:
The maximum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

minimum

public double minimum(int measure)
Get the minimum observation for a default state or interval based measure. In the case of efficient measures, before steady state is reached the minimum applies to the entire run length up to that point. If steady state has been reached the minimum applies to the steady state up to that point.

If the provided measure isn't efficient the minimum applies to the entire run length.

The measure provided may not be utilisation.

Parameters:
measure - The int constant representing the default measure
Returns:
The minimum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

variance

public double variance(int measure)
Get the sample variance for a default state or interval based measure. The variance can't be obtained for a measure when it is defined as efficient. Furthermore, the measure provided may not be the utilisation. The variance applies to the entire run length.
Parameters:
measure - The int constant representing the default measure
Returns:
The sample variance
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

std_deviation

public double std_deviation(int measure)
Get the sample standard deviation for a default state or interval based measure. The standard deviation can't be obtained for a measure when it is defined as efficient. Furthermore, the measure provided may not be the utilisation. The standard deviation applies to the entire run length.
Parameters:
measure - The int constant representing the default measure
Returns:
The sample standard deviation.
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double[] exc_proportion(int measure,
                               double[] levels)
Get the exceedence proportions for arbitrary levels, for a default state or interval based measure. The proportions apply to the entire run length. The measure provided may not be utilisation.
Parameters:
measure - The int constant representing the default measure
levels - The levels for which exceedence proportions will be calculated
Returns:
The set of exceedence proportions
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double exc_proportion(int measure,
                             double level)
Get an exceedence proportion for a default state or interval based measure. The proportion applies to the entire run length. The measure provided may not be the utilisation.
Parameters:
measure - The int constant representing the default measure
levels - The level for which the exceedence proportion will be calculated
Returns:
The exceedence proportion
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double[] exc_proportion(int measure)
Get the exceedence proportions for the defined levels for a default state or rate based measure. In the case of efficient measures, before steady state is reached the proportions apply to the entire run length up to that point. If steady state has been reached they apply to the steady state up to that point.

If the provided measure isn't efficient the average applies to the entire run length.

The measure provided may not be the utilisation.

Parameters:
measure - The int constant representing the default measure
Returns:
The set of exceedence proportions
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

count

public int count(java.lang.String measure)
Get the event count for a custom rate based measure. In the case of efficient measures, before steady state is reached the count applies to the entire run length up to that point. If steady state has been reached the count applies to the steady state up to that point.

If the provided measure isn't efficient the count applies to the entire run length.

Parameters:
measure - The name of the custom measure
Returns:
The event count
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

average

public double average(java.lang.String measure)
Get the sample average for a custom measure. In the case of efficient measures, before steady state is reached the average applies to the entire run length up to that point. If steady state has been reached the average applies to the steady state up to that point.

If the provided measure isn't efficient the average applies to the entire run length.

Parameters:
measure - The name of the custom measure
Returns:
The sample average
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

maximum

public double maximum(java.lang.String measure)
Get the maximum observation for a custom state or interval based measure. In the case of efficient measures, before steady state is reached the maximum applies to the entire run length up to that point. If steady state has been reached the maximum applies to the steady state up to that point.

If the provided measure isn't efficient the maximum applies to the entire run length.

Parameters:
measure - The name of the custom measure
Returns:
The maximum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

minimum

public double minimum(java.lang.String measure)
Get the minimum observation for a custom state or interval based measure. In the case of efficient measures, before steady state is reached the minimum applies to the entire run length up to that point. If steady state has been reached the minimum applies to the steady state up to that point.

If the provided measure isn't efficient the minimum applies to the entire run length.

Parameters:
measure - The name of the custom measure
Returns:
The minimum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

variance

public double variance(java.lang.String measure)
Get the sample variance for a custom state or interval based measure. The variance can't be obtained for a measure when it is defined as efficient. The variance applies to the entire run length.
Parameters:
measure - The name of the custom measure
Returns:
The sample variance
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

std_deviation

public double std_deviation(java.lang.String measure)
Get the sample standard deviation for a custom state or interval based measure. The standard deviation can't be obtained for a measure when it is defined as efficient. The standard deviation applies to the entire run length.
Parameters:
measure - The name of the ustom measure
Returns:
The sample variance
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double[] exc_proportion(java.lang.String measure,
                               double[] levels)
Get the exceedence proportions for arbitrary levels, for a custom state or interval based measure. The proportions apply to the entire run length.
Parameters:
measure - The name of the custom measure
levels - The levels for which exceedence proportions will be calculated
Returns:
The set of exceedence proportions
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double exc_proportion(java.lang.String measure,
                             double level)
Get an exceedence proportion for a custom state or interval based measure. The proportion applies to the entire run length.
Parameters:
measure - The name of the custom measure
levels - The level for which the exceedence proportion will be calculated
Returns:
The exceedence proportion
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double[] exc_proportion(java.lang.String measure)
Get the exceedence proportions for the defined levels for a custom state or rate based measure. In the case of efficient measures, before steady state is reached the proportions apply to the entire run length up to that point. If steady state has been reached they apply to the steady state up to that point.

If the provided measure isn't efficient the average applies to the entire run length.

Parameters:
measure - The name of the custom measure
Returns:
The set of exceedence proportions
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

count

public int count(int measure,
                 double start_time,
                 double end_time)
Get the event count for a default rate based measure, applying to a specific time interval.
Parameters:
measure - The int constant representing the default measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The event count
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

average

public double average(int measure,
                      double start_time,
                      double end_time)
Get the sample average for a default measure, applying to a specific time interval.
Parameters:
measure - The int constant representing the default measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The sample average
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

maximum

public double maximum(int measure,
                      double start_time,
                      double end_time)
Get the maximum observation for a default state or interval based measure, applying to a specific time interval. The provided measure may not be the utilisation.
Parameters:
measure - The int constant representing the default measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The maximum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

minimum

public double minimum(int measure,
                      double start_time,
                      double end_time)
Get the minimum observation for a default state or interval based measure, applying to a specific time interval. The provided measure may not be the utilisation.
Parameters:
measure - The int constant representing the default measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The minimum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

variance

public double variance(int measure,
                       double start_time,
                       double end_time)
Get the sample variance for a default state or interval based measure, applying to a specific time interval. The provided measure may not be the utilisation.
Parameters:
measure - The int constant representing the default measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The sample variance observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

std_deviation

public double std_deviation(int measure,
                            double start_time,
                            double end_time)
Get the sample standard deviation for a default state or interval based measure, applying to a specific time interval. The provided measure may not be the utilisation.
Parameters:
measure - The int constant representing the default measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The sample standard deviation observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double[] exc_proportion(int measure,
                               double[] levels,
                               double start_time,
                               double end_time)
Get the exceedence proportions for a set of levels, for a default state or interval based measure, applying to a specific time interval. The provided measure may not be the utilisation.
Parameters:
measure - The int constant representing the default measure
levels - The set of levels for which exceedence proportions will be calculated
start_time - The interval's start time
end_time - The interval's end time
Returns:
The set of exceedence proportions
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double exc_proportion(int measure,
                             double level,
                             double start_time,
                             double end_time)
Get an exceedence proportion for a specific level, for a default state or interval based measure, applying to a specific time interval. The provided measure may not be the utilisation.
Parameters:
measure - The int constant representing the default measure
level - The level for which the exceedence proportion will be calculated
start_time - The interval's start time
end_time - The interval's end time
Returns:
The exceedence proportion
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

count

public int count(java.lang.String measure,
                 double start_time,
                 double end_time)
Get the event count for a custom rate based measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The event count
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

average

public double average(java.lang.String measure,
                      double start_time,
                      double end_time)
Get the sample average for a custom measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The sample average
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

maximum

public double maximum(java.lang.String measure,
                      double start_time,
                      double end_time)
Get the maximum observation for a custom state or interval based measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The maximum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

minimum

public double minimum(java.lang.String measure,
                      double start_time,
                      double end_time)
Get the minimum observation for a custom state or interval based measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The minimum observation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

variance

public double variance(java.lang.String measure,
                       double start_time,
                       double end_time)
Get the sample variance for a custom state or interval based measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The sample variance
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

std_deviation

public double std_deviation(java.lang.String measure,
                            double start_time,
                            double end_time)
Get the sample standard deviation for a custom state or interval based measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
start_time - The interval's start time
end_time - The interval's end time
Returns:
The sample standard deviation
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double[] exc_proportion(java.lang.String measure,
                               double[] levels,
                               double start_time,
                               double end_time)
Get the exceedence proportions for a set of levels, for a custom state or interval based measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
levels - The set of levels for which exceedence proportions will be calculated
start_time - The interval's start time
end_time - The interval's end time
Returns:
The set of exceedence proportions
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

exc_proportion

public double exc_proportion(java.lang.String measure,
                             double level,
                             double start_time,
                             double end_time)
Get an exceedence proportions for a specific level, for a custom state or interval based measure, applying to a specific time interval.
Parameters:
measure - The name of the custom measure
level - The level for which the exceedence proportion will be calculated
start_time - The interval's start time
end_time - The interval's end time
Returns:
The exceedence proportion
Throws:
Sim_stat_exception - If there is an error in the passed parameters. This error can be left unchecked.

get_data

public java.util.List[] get_data()
Get all the data contained in the Sim_stat object. The data is a two sized array of Lists. The first element of the array contains the measures' information:

List {Object[] {String measure_name, Integer measure_type [, Boolean is_continuous]}, ... }

The second element contains the measures' observations:

Returns:
The Sim_stat's data as described above

get_measures

public java.util.List get_measures()
Get the information for the measures defined in the Sim_stat object.

The information returned in the following form:

List {Object[] {String measure_name, Integer measure_type [, Boolean is_continuous]}, ... }

Returns:
The Sim_stat's measure information as described above

get_detailed_measures

public java.util.List get_detailed_measures()
Get the information for the non-efficient measures defined in the Sim_stat object.

The information is returned in the following form:

List {Object[] {String measure_name, Integer measure_type [, Boolean is_continuous]}, ... }

Returns:
The Sim_stat's measure information as described above

is_efficient

public boolean is_efficient(int measure)
Check to see whether a default measure is specified to be efficient.
Parameters:
measure - The int constant representing the default measure
Returns:
true if the measure is efficient, false otherwise

is_efficient

public boolean is_efficient(java.lang.String measure)
Check to see whether a custom measure is specified to be efficient.
Parameters:
measure - The name of the measure
Returns:
true if the measure is efficient, false otherwise

get_levels

public double[] get_levels(int measure)
Get the exceedence proportion levels defined for a default measure.
Parameters:
measure - The int constant representing the default measure
Returns:
The set of levels or null if none have been specified

get_levels

public double[] get_levels(java.lang.String measure)
Get the exceedence proportion levels defined for a custom measure.
Parameters:
measure - The name of the custom measure
Returns:
The set of levels or null if none have been specified

detailed_measure_count

public int detailed_measure_count()
Get the number of detailed measures defined in this Sim_stat object.
Returns:
The number of defined detailed (non-efficient) measures

SimJava
v2.0

The University of Edinburgh, 2002