Class MultiTraceFunction

java.lang.Object
microsim.statistics.functions.MultiTraceFunction
All Implemented Interfaces:
EventListener, IDoubleSource, IUpdatableSource
Direct Known Subclasses:
MultiTraceFunction.Double, MultiTraceFunction.Float, MultiTraceFunction.Integer, MultiTraceFunction.Long

@Deprecated(forRemoval=true) public abstract class MultiTraceFunction extends Object implements IDoubleSource, IUpdatableSource, EventListener
Deprecated, for removal: This API element is subject to removal in a future version.
A MixFunction object is to collect data over time, computing some statistics on the fly, without storing the data in memory. It is particularly useful when the user need to compute basic statistics on data sources, without affecting the memory occupancy. The memoryless series computes automatically the statistics using accumulation variables and counters.
This statistic computer should be used when possible, particularly when the simulation model has to run for a long time, condition which implies the growth of the memory occupancy. Moreover the MemorylessSeries objects are much faster than the Series one, because they pre-compute the statistics operation step by step. Trying to compute a mean of a Series object, force the Mean function to sum all the values, every time series is updated.

Title: JAS

Description: Java Agent-based Simulation library

Copyright (C) 2002 Michele Sonnessa

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Author:
Michele Sonnessa and Ross Richardson
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    An implementation of the MemorylessSeries class, which manages double type data sources.
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    An implementation of the MemorylessSeries class, which manages float type data sources.
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    An implementation of the MemorylessSeries class, which manages integer type data sources.
    static class 
    Deprecated, for removal: This API element is subject to removal in a future version.
    An implementation of the MemorylessSeries class, which manages long type data sources.
    static enum 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    double
    getDoubleValue(Enum<?> valueID)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Compute one of the available statistical functions on the collected data.
    abstract double
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    abstract double
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    onEvent(Enum<?> type)
    Deprecated, for removal: This API element is subject to removal in a future version.
    ISimEventListener callback function.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Collect a value from the source.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • count

      protected int count
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • MultiTraceFunction

      public MultiTraceFunction()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • updateSource

      public void updateSource()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Collect a value from the source.
      Specified by:
      updateSource in interface IUpdatableSource
    • getMean

      public abstract double getMean()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getVariance

      public abstract double getVariance()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCount

      public int getCount()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • onEvent

      public void onEvent(Enum<?> type)
      Deprecated, for removal: This API element is subject to removal in a future version.
      ISimEventListener callback function. It supports only jas.engine.Sim.EVENT_UPDATE event.
      Specified by:
      onEvent in interface EventListener
      Throws:
      UnsupportedOperationException - If actionType is not supported.
    • getDoubleValue

      public double getDoubleValue(Enum<?> valueID)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Compute one of the available statistical functions on the collected data.
      Specified by:
      getDoubleValue in interface IDoubleSource
      Parameters:
      valueID - A unique identifier for a variable.
      Returns:
      The current double value of the required variable.