aivika-4.3.1: A multi-paradigm simulation library

Copyright Copyright (c) 2009-2015, David Sorokin BSD3 David Sorokin experimental None Haskell2010

Simulation.Aivika.Results.Transform

Description

Tested with: GHC 7.10.1

The module defines useful result transformations that can be used in simulation experiments.

# Basic Class Type

class ResultTransformer a where Source

Something that can transform the results.

Methods

tr :: a -> ResultTransform Source

Return the result transform.

# Sampling Statistics

newtype SamplingStats Source

Represents a statistics based upon observations.

Constructors

 SamplingStats ResultTransform

Instances

 Source

The total number of samples.

The minimum value among the samples.

The maximum value among the samples.

The average value.

The average square value.

Return tha variance.

Return the deviation.

# Time-dependent Statistics

newtype TimingStats Source

The time-dependent statistics.

Constructors

 TimingStats ResultTransform

Instances

 Source

Return the number of samples.

Return the minimum value.

Return the maximum value.

Return the average value.

Return the variance.

Return the deviation.

Return the time at which the minimum is attained.

Return the time at which the maximum is attained.

Return the start time of sampling.

Return the last time of sampling.

Return the sum of values.

Return the sum of square values.

# Sampling-based Counter

newtype SamplingCounter Source

A counter for which the statistics is collected too.

Constructors

 SamplingCounter ResultTransform

Instances

 Source

The counter value.

The counter statistics.

# Time-dependent Counter

newtype TimingCounter Source

A time-dependent counter that collects the statistics too.

Constructors

 TimingCounter ResultTransform

Instances

 Source

The counter value.

The counter statistics.

# Queue

newtype Queue Source

Represents either finite or infinite queue.

Constructors

 Queue ResultTransform

Instances

 Source

The strategy applied to the enqueueing (input) processes when the finite queue is full.

The strategy applied when storing (in memory) items in the queue.

The strategy applied to the dequeueing (output) processes when the queue is empty.

Test whether the queue is empty.

Test whether the finite queue is full.

The finite queue capacity.

Return the current queue size.

Return the queue size statistics.

Return the total number of input items that were enqueued in the finite queue.

Return the number of lost items for the finite queue.

Return the total number of input items that were stored.

Return the total number of requests for dequeueing the items, not taking into account the failed attempts to dequeue immediately without suspension.

Return the total number of output items that were actually dequeued.

Return the load factor: the finite queue size divided by its capacity.

Return the rate of the input items that were enqueued in the finite queue: how many items per time.

Return the rate of the items that were stored: how many items per time.

Return the rate of the requests for dequeueing the items: how many requests per time. It does not include the failed attempts to dequeue immediately without suspension.

Return the rate of the output items that were dequeued: how many items per time.

Return the wait time from the time at which the item was stored in the queue to the time at which it was dequeued.

Return the total wait time for the finite queue from the time at which the enqueueing operation was initiated to the time at which the item was dequeued.

Return the wait time from the time at which the item was stored in the queue to the time at which it was dequeued.

Return the dequeue wait time from the time at which the item was requested for dequeueing to the time at which it was actually dequeued.

Return a long-term average queue rate calculated as the average queue size divided by the average wait time.

# Arrival Timer

newtype ArrivalTimer Source

Accumulates the statistics about that how long the arrived events are processed.

Constructors

 ArrivalTimer ResultTransform

Instances

 Source

Return the statistics about that how long the arrived events were processed.

# Server

newtype Server Source

It models the server that prodives a service.

Constructors

 Server ResultTransform

Instances

 Source

The initial state of the server.

Return the current state of the server.

Return the counted total time when the server was locked while awaiting the input.

Return the counted total time spent by the server while processing the tasks.

Return the counted total time when the server was locked while trying to deliver the output.

Return the counted total time spent by the server while it was preempted waiting for the further proceeding.

Return the statistics of the time when the server was locked while awaiting the input.

Return the statistics of the time spent by the server while processing the tasks.

Return the statistics of the time when the server was locked while trying to deliver the output.

Return the statistics of the time spent by the server while it was preempted waiting for the further proceeding.

It returns the factor changing from 0 to 1, which estimates how often the server was awaiting for the next input task.

It returns the factor changing from 0 to 1, which estimates how often the server was busy with direct processing its tasks.

It returns the factor changing from 0 to 1, which estimates how often the server was locked trying to deliver the output after the task is finished.

It returns the factor changing from 0 to 1, which estimates how often the server was preempted waiting for the further proceeding.

# Activity

newtype Activity Source

It models an activity that can be utilised.

Constructors

 Activity ResultTransform

Instances

 Source

The initial state of the activity.

Return the current state of the activity.

Return the counted total time when the activity was utilised.

Return the counted total time when the activity was idle.

Return the counted total time when the activity was preemted waiting for the further proceeding.

Return the statistics for the time when the activity was utilised.

Return the statistics for the time when the activity was idle.

Return the statistics for the time when the activity was preempted waiting for the further proceeding.

It returns the factor changing from 0 to 1, which estimates how often the activity was utilised.

It returns the factor changing from 0 to 1, which estimates how often the activity was idle.

It returns the factor changing from 0 to 1, which estimates how often the activity was preempted waiting for the further proceeding.

# Resource

newtype Resource Source

The resource which can be acquired and then released.

Constructors

 Resource ResultTransform

Instances

 Source

Return the current available count of the resource.

Return the statistics for the available count of the resource.

Return the current utilisation count of the resource.

Return the statistics for the utilisation count of the resource.

Return the current queue length of the resource.

Return the statistics for the queue length of the resource.

Return the total wait time of the resource.

Return the statistics for the wait time of the resource.

# Operation

newtype Operation Source

It models an opreation which actvity can be utilised.

Constructors

 Operation ResultTransform

Instances

 Source

Return the counted total time when the operation activity was utilised.

Return the counted total time when the operation activity was preemted waiting for the further proceeding.

Return the statistics for the time when the operation activity was utilised.

Return the statistics for the time when the operation activity was preempted waiting for the further proceeding.

It returns the factor changing from 0 to 1, which estimates how often the operation activity was utilised.

It returns the factor changing from 0 to 1, which estimates how often the operation activity was preempted waiting for the further proceeding.