Class ResponseVariableBatchingElement

  • All Implemented Interfaces:
    ObservableIfc, GetNameIfc, IdentityIfc

    public class ResponseVariableBatchingElement
    extends ModelElement
    Controls the batching of ResponseVariables within the Model. Used by StatisticalBatchingElement.
    • Constructor Detail

      • ResponseVariableBatchingElement

        public ResponseVariableBatchingElement​(ModelElement modelElement)
        Creates a time weighted batching element
        Parameters:
        modelElement - the model element
      • ResponseVariableBatchingElement

        public ResponseVariableBatchingElement​(ModelElement modelElement,
                                               java.lang.String name)
        Creates a time weighted batching element
        Parameters:
        modelElement - the model element
        name - a name for the element
    • Method Detail

      • add

        public final BatchStatisticObserver add​(ResponseVariable r)
        Adds the supplied ResponseVariable variable to the batching
        Parameters:
        r - the ResponseVariable variable to add
        Returns:
        the BatchStatisticObserver
      • add

        public final BatchStatisticObserver add​(ResponseVariable r,
                                                java.lang.String name)
        Adds the supplied ResponseVariable variable to the batching
        Parameters:
        r - the ResponseVariable variable to add
        name - name for BatchStatistic
        Returns:
        the BatchStatisticObserver
      • add

        public final BatchStatisticObserver add​(ResponseVariable r,
                                                int minNumBatches,
                                                int minBatchSize,
                                                int maxNBMultiple,
                                                java.lang.String name)
        Adds the supplied ResponseVariable variable to the batching
        Parameters:
        r - the ResponseVariable variable to add
        minNumBatches - minimum number of batches
        minBatchSize - minimum batch size
        maxNBMultiple - batch size multiple
        name - name for BatchStatistic
        Returns:
        the BatchStatisticObserver
      • getBatchStatisticObserver

        public final BatchStatisticObserver getBatchStatisticObserver​(ResponseVariable key)
        Look up the BatchStatisticObserver for the ResponseVariable
        Parameters:
        key - the ResponseVariable to look up
        Returns:
        the BatchStatisticObserver
      • remove

        public final void remove​(ResponseVariable r)
        Removes the supplied ResponseVariable variable from the batching
        Parameters:
        r - the ResponseVariable to be removed
      • removeAll

        public final void removeAll()
        Removes all previously added ResponseVariable from the batching
      • getBatchStatistic

        public final BatchStatistic getBatchStatistic​(ResponseVariable r)
        Returns a statistical summary BatchStatistic on the ResponseVariable variable across the observed batches. This returns a copy of the summary statistics.
        Parameters:
        r - the ResponseVariable to look up
        Returns:
        the returned BatchStatistic
      • getAllBatchStatisitcs

        public final java.util.List<BatchStatistic> getAllBatchStatisitcs()
        Returns a list of summary statistics on all ResponseVariable variables The list is a copy of originals.
        Returns:
        the filled up list
      • getAllBatchStatisticsAsMap

        public final java.util.Map<ResponseVariable,​BatchStatistic> getAllBatchStatisticsAsMap()
        Returns:
        a map of all batch statistics with the ResponseVariable variable as the key
      • asString

        public java.lang.String asString()
        Description copied from class: ModelElement
        Allows sub-classes to provide more detail than toString() to represent the ModelElement as a String
        Overrides:
        asString in class ModelElement
        Returns:
        a detailed String representation
      • getCSVRow

        public java.lang.String getCSVRow​(ResponseVariable r)
        Gets the CSV row for the ResponseVariable
        Parameters:
        r -
        Returns:
        the data as a string
      • getCSVHeader

        public java.lang.String getCSVHeader​(ResponseVariable r)
        Gets the CSV Header for the ResponseVariable
        Parameters:
        r -
        Returns:
        the header