aivika-6.0.0: A multi-method simulation library
CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Results

Description

Tested with: GHC 8.0.1

The module allows exporting the simulation results from the model.

Synopsis

Definitions Focused on Modeling

data Results Source #

It contains the results of simulation.

Instances

Instances details
Monoid Results Source # 
Instance details

Defined in Simulation.Aivika.Results

Semigroup Results Source # 
Instance details

Defined in Simulation.Aivika.Results

type ResultTransform = Results -> Results Source #

It transforms the results of simulation.

type ResultName = String Source #

A name used for indentifying the results when generating output.

class ResultProvider p where Source #

Represents a provider of the simulation results. It is usually something, or an array of something, or a list of such values which can be simulated to get data.

Minimal complete definition

resultSource'

Methods

resultSource :: ResultName -> ResultDescription -> p -> ResultSource Source #

Return the source of simulation results by the specified name, description and provider.

resultSource3 :: ResultName -> ResultDescription -> ResultDescription -> p -> ResultSource Source #

Return the source of simulation results by the specified name, description, title and provider.

resultSource' :: ResultName -> [ResultName] -> ResultId -> [ResultId] -> p -> ResultSource Source #

Return the source of simulation results by the specified name, its name path, identifier, the corresponding indentifier path and provider.

Instances

Instances details
ResultProvider ArrivalTimer Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultProvider Resource Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Dynamics (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Dynamics (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Dynamics (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Dynamics (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Dynamics a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Event (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Event (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Event (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Event (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Event a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Parameter (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Parameter (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Parameter (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Parameter (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Parameter a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Simulation (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Simulation (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Simulation (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Simulation (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Simulation a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Ref (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Ref (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Ref (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Ref (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Ref a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Ref (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Ref (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Ref (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Ref (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Ref a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Show s, ResultItemable (ResultValue s)) => ResultProvider (Resource s) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultProvider p => ResultProvider (ResultListWithSubscript p) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultProvider p => ResultProvider (ResultVectorWithSubscript p) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Signalable (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Signalable (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Signalable (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Signalable (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Signalable a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (SamplingStats a))) => ResultProvider (Var (SamplingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(ResultItemable (ResultValue a), ResultItemable (ResultValue (TimingStats a))) => ResultProvider (Var (TimingCounter a)) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Ix i, Show i, ResultItemable (ResultValue [e])) => ResultProvider (Var (Array i e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [e]) => ResultProvider (Var (Vector e)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue a) => ResultProvider (Var a) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultProvider p => ResultProvider (Vector p) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultProvider p => ResultProvider [p] Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultProvider (Operation a b) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Show i, Ix i, ResultProvider p) => ResultProvider (ResultArrayWithSubscript i p) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Show i, Ix i, ResultProvider p) => ResultProvider (Array i p) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Show s, ResultItemable (ResultValue s)) => ResultProvider (Activity s a b) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Show sm, Show so, ResultItemable (ResultValue sm), ResultItemable (ResultValue so)) => ResultProvider (Queue sm so a) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Show s, ResultItemable (ResultValue s)) => ResultProvider (Server s a b) Source # 
Instance details

Defined in Simulation.Aivika.Results

(Show si, Show sm, Show so, ResultItemable (ResultValue si), ResultItemable (ResultValue sm), ResultItemable (ResultValue so)) => ResultProvider (Queue si sm so a) Source # 
Instance details

Defined in Simulation.Aivika.Results

results :: [ResultSource] -> Results Source #

Prepare the simulation results.

expandResults :: ResultTransform Source #

Return an expanded version of the simulation results expanding the properties as possible, which takes place for expanding statistics to show the count, average, deviation, minimum, maximum etc. as separate values.

resultSummary :: ResultTransform Source #

Return a short version of the simulation results, i.e. their summary, expanding the main properties or excluding auxiliary properties if required.

resultByName :: ResultName -> ResultTransform Source #

Take a result by its name.

resultByProperty :: ResultName -> ResultTransform Source #

Take a result from the object with the specified property label, but it is more preferrable to refer to the property by its ResultId identifier with help of the resultById function.

resultById :: ResultId -> ResultTransform Source #

Take a result from the object with the specified identifier. It can identify an item, object property, the object iself, vector or its elements.

resultByIndex :: Int -> ResultTransform Source #

Take a result from the vector by the specified integer index.

resultBySubscript :: ResultName -> ResultTransform Source #

Take a result from the vector by the specified string subscript.

class ResultComputing m where Source #

Represents a computation that can return the simulation data.

Methods

computeResultData :: m a -> ResultData a Source #

Compute data with the results of simulation.

computeResultSignal :: m a -> ResultSignal Source #

Return the signal triggered when data change if such a signal exists.

Instances

Instances details
ResultComputing Dynamics Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing Event Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing Parameter Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing Simulation Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing Ref Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing Ref Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing ResultComputation Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing Signalable Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultComputing Var Source # 
Instance details

Defined in Simulation.Aivika.Results

data ResultComputation a Source #

Represents a computation that can return the simulation data.

Constructors

ResultComputation 

Fields

Definitions Focused on Using the Library

data ResultValue e Source #

A parameterised value that actually represents a generalised result item that have no parametric type.

Constructors

ResultValue 

Fields

Instances

Instances details
Functor ResultValue Source # 
Instance details

Defined in Simulation.Aivika.Results

Methods

fmap :: (a -> b) -> ResultValue a -> ResultValue b #

(<$) :: a -> ResultValue b -> ResultValue a #

ResultItemable (ResultValue FCFS) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue LCFS) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue SIRO) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue StaticPriorities) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue (SamplingStats Double)) Source # 
Instance details

Defined in Simulation.Aivika.Results

Methods

resultItemName :: ResultValue (SamplingStats Double) -> ResultName Source #

resultItemNamePath :: ResultValue (SamplingStats Double) -> [ResultName] Source #

resultItemId :: ResultValue (SamplingStats Double) -> ResultId Source #

resultItemIdPath :: ResultValue (SamplingStats Double) -> [ResultId] Source #

resultItemSignal :: ResultValue (SamplingStats Double) -> ResultSignal Source #

resultItemExpansion :: ResultValue (SamplingStats Double) -> ResultSource Source #

resultItemSummary :: ResultValue (SamplingStats Double) -> ResultSource Source #

resultItemAsIntValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue Int) Source #

resultItemAsIntListValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue [Int]) Source #

resultItemAsIntStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (SamplingStats Int)) Source #

resultItemAsIntTimingStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (TimingStats Int)) Source #

resultItemAsDoubleValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue Double) Source #

resultItemAsDoubleListValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue [Double]) Source #

resultItemAsDoubleStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (SamplingStats Double)) Source #

resultItemAsDoubleTimingStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (TimingStats Double)) Source #

resultItemAsStringValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue String) Source #

ResultItemable (ResultValue (SamplingStats Int)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue (TimingStats Double)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue (TimingStats Int)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue String) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue ()) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue Bool) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue Double) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue Int) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [Double]) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [Int]) Source # 
Instance details

Defined in Simulation.Aivika.Results

resultsToIntValues :: Results -> [ResultValue Int] Source #

Represent the results as integer numbers.

resultsToIntListValues :: Results -> [ResultValue [Int]] Source #

Represent the results as lists of integer numbers.

resultsToIntStatsValues :: Results -> [ResultValue (SamplingStats Int)] Source #

Represent the results as statistics based on integer numbers.

resultsToIntStatsEitherValues :: Results -> [ResultValue (Either Int (SamplingStats Int))] Source #

Represent the results as statistics based on integer numbers and optimised for fast aggregation.

resultsToIntTimingStatsValues :: Results -> [ResultValue (TimingStats Int)] Source #

Represent the results as timing statistics based on integer numbers.

resultsToDoubleValues :: Results -> [ResultValue Double] Source #

Represent the results as double floating point numbers.

resultsToDoubleListValues :: Results -> [ResultValue [Double]] Source #

Represent the results as lists of double floating point numbers.

resultsToDoubleStatsValues :: Results -> [ResultValue (SamplingStats Double)] Source #

Represent the results as statistics based on double floating point numbers.

resultsToDoubleStatsEitherValues :: Results -> [ResultValue (Either Double (SamplingStats Double))] Source #

Represent the results as statistics based on double floating point numbers and optimised for fast aggregation.

resultsToDoubleTimingStatsValues :: Results -> [ResultValue (TimingStats Double)] Source #

Represent the results as timing statistics based on double floating point numbers.

resultsToStringValues :: Results -> [ResultValue String] Source #

Represent the results as string values.

data ResultPredefinedSignals Source #

It representes the predefined signals provided by every simulation model.

Constructors

ResultPredefinedSignals 

Fields

newResultPredefinedSignals :: Simulation ResultPredefinedSignals Source #

Create the predefined signals provided by every simulation model.

resultSignal :: Results -> ResultSignal Source #

Return a signal emitted by the specified results.

pureResultSignal :: ResultPredefinedSignals -> ResultSignal -> Signal () Source #

Return a pure signal as a result of combination of the predefined signals with the specified result signal usually provided by the sources.

The signal returned is triggered when the source signal is triggered. The pure signal is also triggered in the integration time points if the source signal is unknown or it was combined with any unknown signal.

Definitions Focused on Extending the Library

type ResultSourceMap = Map ResultName ResultSource Source #

It associates the result sources with their names.

data ResultSource Source #

Encapsulates the result source.

Constructors

ResultItemSource ResultItem

The source consisting of a single item.

ResultObjectSource ResultObject

An object-like source.

ResultVectorSource ResultVector

A vector-like structure.

ResultSeparatorSource ResultSeparator

This is a separator text.

data ResultItem Source #

The simulation results represented by a single item.

Constructors

forall a.ResultItemable a => ResultItem a 

class ResultItemable a where Source #

Represents a type class for actual representing the items.

Methods

resultItemName :: a -> ResultName Source #

The item name.

resultItemNamePath :: a -> [ResultName] Source #

The item name path.

resultItemId :: a -> ResultId Source #

The item identifier.

resultItemIdPath :: a -> [ResultId] Source #

The item identifier path.

resultItemSignal :: a -> ResultSignal Source #

Whether the item emits a signal.

resultItemExpansion :: a -> ResultSource Source #

Return an expanded version of the item, for example, when the statistics item is exanded to an object having the corresponded properties for count, average, deviation, minimum, maximum and so on.

resultItemSummary :: a -> ResultSource Source #

Return usually a short version of the item, i.e. its summary, but values of some data types such as statistics can be implicitly expanded to an object with the corresponded properties.

resultItemAsIntValue :: a -> Maybe (ResultValue Int) Source #

Try to return integer numbers in time points.

resultItemAsIntListValue :: a -> Maybe (ResultValue [Int]) Source #

Try to return lists of integer numbers in time points.

resultItemAsIntStatsValue :: a -> Maybe (ResultValue (SamplingStats Int)) Source #

Try to return statistics based on integer numbers.

resultItemAsIntTimingStatsValue :: a -> Maybe (ResultValue (TimingStats Int)) Source #

Try to return timing statistics based on integer numbers.

resultItemAsDoubleValue :: a -> Maybe (ResultValue Double) Source #

Try to return double numbers in time points.

resultItemAsDoubleListValue :: a -> Maybe (ResultValue [Double]) Source #

Try to return lists of double numbers in time points.

resultItemAsDoubleStatsValue :: a -> Maybe (ResultValue (SamplingStats Double)) Source #

Try to return statistics based on double numbers.

resultItemAsDoubleTimingStatsValue :: a -> Maybe (ResultValue (TimingStats Double)) Source #

Try to return timing statistics based on integer numbers.

resultItemAsStringValue :: a -> Maybe (ResultValue String) Source #

Try to return string representations in time points.

Instances

Instances details
ResultItemable (ResultValue FCFS) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue LCFS) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue SIRO) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue StaticPriorities) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue (SamplingStats Double)) Source # 
Instance details

Defined in Simulation.Aivika.Results

Methods

resultItemName :: ResultValue (SamplingStats Double) -> ResultName Source #

resultItemNamePath :: ResultValue (SamplingStats Double) -> [ResultName] Source #

resultItemId :: ResultValue (SamplingStats Double) -> ResultId Source #

resultItemIdPath :: ResultValue (SamplingStats Double) -> [ResultId] Source #

resultItemSignal :: ResultValue (SamplingStats Double) -> ResultSignal Source #

resultItemExpansion :: ResultValue (SamplingStats Double) -> ResultSource Source #

resultItemSummary :: ResultValue (SamplingStats Double) -> ResultSource Source #

resultItemAsIntValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue Int) Source #

resultItemAsIntListValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue [Int]) Source #

resultItemAsIntStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (SamplingStats Int)) Source #

resultItemAsIntTimingStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (TimingStats Int)) Source #

resultItemAsDoubleValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue Double) Source #

resultItemAsDoubleListValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue [Double]) Source #

resultItemAsDoubleStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (SamplingStats Double)) Source #

resultItemAsDoubleTimingStatsValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue (TimingStats Double)) Source #

resultItemAsStringValue :: ResultValue (SamplingStats Double) -> Maybe (ResultValue String) Source #

ResultItemable (ResultValue (SamplingStats Int)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue (TimingStats Double)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue (TimingStats Int)) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue String) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue ()) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue Bool) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue Double) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue Int) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [Double]) Source # 
Instance details

Defined in Simulation.Aivika.Results

ResultItemable (ResultValue [Int]) Source # 
Instance details

Defined in Simulation.Aivika.Results

resultItemAsIntStatsEitherValue :: ResultItemable a => a -> Maybe (ResultValue (Either Int (SamplingStats Int))) Source #

Try to return a version optimised for fast aggregation of the statistics based on integer numbers.

resultItemAsDoubleStatsEitherValue :: ResultItemable a => a -> Maybe (ResultValue (Either Double (SamplingStats Double))) Source #

Try to return a version optimised for fast aggregation of the statistics based on double floating point numbers.

resultItemToIntValue :: ResultItemable a => a -> ResultValue Int Source #

Return integer numbers in time points.

resultItemToIntListValue :: ResultItemable a => a -> ResultValue [Int] Source #

Return lists of integer numbers in time points.

resultItemToIntStatsValue :: ResultItemable a => a -> ResultValue (SamplingStats Int) Source #

Return statistics based on integer numbers.

resultItemToIntStatsEitherValue :: ResultItemable a => a -> ResultValue (Either Int (SamplingStats Int)) Source #

Return a version optimised for fast aggregation of the statistics based on integer numbers.

resultItemToIntTimingStatsValue :: ResultItemable a => a -> ResultValue (TimingStats Int) Source #

Return timing statistics based on integer numbers.

resultItemToDoubleValue :: ResultItemable a => a -> ResultValue Double Source #

Return double numbers in time points.

resultItemToDoubleListValue :: ResultItemable a => a -> ResultValue [Double] Source #

Return lists of double numbers in time points.

resultItemToDoubleStatsValue :: ResultItemable a => a -> ResultValue (SamplingStats Double) Source #

Return statistics based on double numbers.

resultItemToDoubleStatsEitherValue :: ResultItemable a => a -> ResultValue (Either Double (SamplingStats Double)) Source #

Return a version optimised for fast aggregation of the statistics based on double floating point numbers.

resultItemToDoubleTimingStatsValue :: ResultItemable a => a -> ResultValue (TimingStats Double) Source #

Return timing statistics based on integer numbers.

resultItemToStringValue :: ResultItemable a => a -> ResultValue String Source #

Return string representations in time points.

data ResultObject Source #

The simulation results represented by an object having properties.

Constructors

ResultObject 

Fields

data ResultProperty Source #

The object property containing the simulation results.

Constructors

ResultProperty 

Fields

data ResultVector Source #

The simulation results represented by a vector.

Constructors

ResultVector 

Fields

memoResultVectorSignal :: ResultVector -> ResultVector Source #

Calculate the result vector signal and memoize it in a new vector.

memoResultVectorSummary :: ResultVector -> ResultVector Source #

Calculate the result vector summary and memoize it in a new vector.

data ResultSeparator Source #

It separates the simulation results when printing.

Constructors

ResultSeparator 

Fields

data ResultContainer e Source #

A container of the simulation results such as queue, server or array.

Constructors

ResultContainer 

Fields

Instances

Instances details
Functor ResultContainer Source # 
Instance details

Defined in Simulation.Aivika.Results

Methods

fmap :: (a -> b) -> ResultContainer a -> ResultContainer b #

(<$) :: a -> ResultContainer b -> ResultContainer a #

resultContainerPropertySource Source #

Arguments

:: ResultItemable (ResultValue b) 
=> ResultContainer a

the container

-> ResultName

the property label

-> ResultId

the property identifier

-> (a -> ResultData b)

get the specified data from the container

-> (a -> ResultSignal)

get the data signal from the container

-> ResultSource 

Create a new property source by the specified container.

resultContainerConstProperty Source #

Arguments

:: ResultItemable (ResultValue b) 
=> ResultContainer a

the container

-> ResultName

the property label

-> ResultId

the property identifier

-> (a -> b)

get the specified data from the container

-> ResultProperty 

Create a constant property by the specified container.

resultContainerIntegProperty Source #

Arguments

:: ResultItemable (ResultValue b) 
=> ResultContainer a

the container

-> ResultName

the property label

-> ResultId

the property identifier

-> (a -> Event b)

get the specified data from the container

-> ResultProperty 

Create by the specified container a property that changes in the integration time points, or it is supposed to be such one.

resultContainerProperty Source #

Arguments

:: ResultItemable (ResultValue b) 
=> ResultContainer a

the container

-> ResultName

the property label

-> ResultId

the property identifier

-> (a -> Event b)

get the specified data from the container

-> (a -> Signal ())

get a signal triggered when changing data.

-> ResultProperty 

Create a property by the specified container.

resultContainerMapProperty Source #

Arguments

:: ResultItemable (ResultValue b) 
=> ResultContainer (ResultData a)

the container

-> ResultName

the property label

-> ResultId

the property identifier

-> (a -> b)

recompute the specified data

-> ResultProperty 

Create by the specified container a mapped property which is recomputed each time again and again.

resultValueToContainer :: ResultValue a -> ResultContainer (ResultData a) Source #

Convert the result value to a container with the specified object identifier.

resultContainerToValue :: ResultContainer (ResultData a) -> ResultValue a Source #

Convert the result container to a value.

type ResultData e = Event e Source #

Represents the very simulation results.

data ResultSignal Source #

Whether an object containing the results emits a signal notifying about change of data.

Constructors

EmptyResultSignal

There is no signal at all.

UnknownResultSignal

The signal is unknown, but the entity probably changes.

ResultSignal (Signal ())

When the signal is precisely specified.

ResultSignalMix (Signal ())

When the specified signal was combined with unknown signal.

maybeResultSignal :: Maybe (Signal ()) -> ResultSignal Source #

Construct a new result signal by the specified optional pure signal.

textResultSource :: String -> ResultSource Source #

Return an arbitrary text as a separator source.

timeResultSource :: ResultSource Source #

Return the source of the modeling time.

resultSourceToIntValues :: ResultSource -> [ResultValue Int] Source #

Represent the result source as integer numbers.

resultSourceToIntListValues :: ResultSource -> [ResultValue [Int]] Source #

Represent the result source as lists of integer numbers.

resultSourceToIntStatsValues :: ResultSource -> [ResultValue (SamplingStats Int)] Source #

Represent the result source as statistics based on integer numbers.

resultSourceToIntStatsEitherValues :: ResultSource -> [ResultValue (Either Int (SamplingStats Int))] Source #

Represent the result source as statistics based on integer numbers and optimised for fast aggregation.

resultSourceToIntTimingStatsValues :: ResultSource -> [ResultValue (TimingStats Int)] Source #

Represent the result source as timing statistics based on integer numbers.

resultSourceToDoubleValues :: ResultSource -> [ResultValue Double] Source #

Represent the result source as double floating point numbers.

resultSourceToDoubleListValues :: ResultSource -> [ResultValue [Double]] Source #

Represent the result source as lists of double floating point numbers.

resultSourceToDoubleStatsValues :: ResultSource -> [ResultValue (SamplingStats Double)] Source #

Represent the result source as statistics based on double floating point numbers.

resultSourceToDoubleStatsEitherValues :: ResultSource -> [ResultValue (Either Double (SamplingStats Double))] Source #

Represent the result source as statistics based on double floating point numbers and optimised for fast aggregation.

resultSourceToDoubleTimingStatsValues :: ResultSource -> [ResultValue (TimingStats Double)] Source #

Represent the result source as timing statistics based on double floating point numbers.

resultSourceToStringValues :: ResultSource -> [ResultValue String] Source #

Represent the result source as string values.

resultSourceMap :: Results -> ResultSourceMap Source #

The sources of simulation results as a map of associated names.

resultSourceList :: Results -> [ResultSource] Source #

The sources of simulation results as an ordered list.

composeResults :: (ResultSource -> [ResultSource]) -> ResultTransform Source #

Compose the results using the specified transformation function.

computeResultValue Source #

Arguments

:: ResultComputing m 
=> ResultName

the result name

-> [ResultName]

the result name path

-> ResultId

the result identifier

-> [ResultId]

the result identifier path

-> m a

the result computation

-> ResultValue a 

Return a new result value by the specified name, identifier and computation.