Class RunInfo


  • public class RunInfo
    extends Object
    A class that contains information on a simulation run.
    Version:
    $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
    Author:
    Jerry Vos
    • Constructor Summary

      Constructors 
      Constructor Description
      RunInfo​(String modelName, int batchNumber, int runNumber)
      Creates this run info with the specified model name, batch run number number, and run number and default value of false for isBatch.
      RunInfo​(String modelName, int batchNumber, int runNumber, boolean isBatch)
      Creates this run info with the specified model name, batch run number number, run number, and whether or not this is a run in a true batch run.
      RunInfo​(RunInfo base)  
    • Constructor Detail

      • RunInfo

        public RunInfo​(String modelName,
                       int batchNumber,
                       int runNumber)
        Creates this run info with the specified model name, batch run number number, and run number and default value of false for isBatch.
        Parameters:
        modelName - the name of the model
        batchNumber - the batch number of the simulation
        runNumber - the run number of the simulation
      • RunInfo

        public RunInfo​(String modelName,
                       int batchNumber,
                       int runNumber,
                       boolean isBatch)
        Creates this run info with the specified model name, batch run number number, run number, and whether or not this is a run in a true batch run.
        Parameters:
        modelName - the name of the model
        batchNumber - the batch number of the simulation
        runNumber - the run number of the simulation
      • RunInfo

        public RunInfo​(RunInfo base)
    • Method Detail

      • setRunNumber

        public void setRunNumber​(int runNumber)
      • setBatchNumber

        public void setBatchNumber​(int batchNumber)
      • getModelName

        public String getModelName()
        Retrieves the name of the rootContext the logging is running for
        Returns:
        the name of the rootContext the logging is running for
      • getBatchNumber

        public int getBatchNumber()
        Retrieves the current batch number
        Returns:
        the current batch number
      • isBatch

        public boolean isBatch()
        Returns:
        true if the current run is one of series of runs in a "true" batch run.
      • getRunNumber

        public int getRunNumber()
        Retrieves the current run number. During a batch run the batch number would be the number associated with a set of batch runs, while the run number is the actual run in a set of batch runs.

          Batch number (1):
          ->run(1)
          ->run(2)
          Batch Run (2): 
          ->run(2)
          ->run(3)
          ...
          
        Returns:
        the current sub-run number
      • equals

        public boolean equals​(Object obj)
        Compares run info objects based on their publicly accessible attributes.
        Overrides:
        equals in class Object
        Parameters:
        obj - a run info object
        Returns:
        true if the objects are equal according to the getters, false if the object is not a run info object or if the attributes are not equal
      • hashCode

        public int hashCode()
        Returns a hashcode of the rootContext's properties.
        Overrides:
        hashCode in class Object
        Returns:
        rootContext.hashCode() ^ modelName.hashCode() ^ batchNumber ^ runNumber