Class ArrivalRateReader

java.lang.Object
tools.descartes.dlim.reader.ArrivalRateReader

public final class ArrivalRateReader extends Object
Provides utility to get arrival rates from a file.
  • Method Details

    • getArrivalRateAtTimeFromFile

      public static double getArrivalRateAtTimeFromFile(double time, String filePath) throws IOException
      Reads a file and gets the arrival rate at the given point in time. Uses linear interpolation if the exact point in time is not defined in the file. Use only for single arrival rates.
      Parameters:
      time - the time
      filePath - the file path
      Returns:
      the arrival rate at time from file
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • readFileToList

      public static List<ArrivalRateTuple> readFileToList(String filePath, double offset) throws IOException
      Reads an arrival rate file and stores its arrival rate and time-stamp tuples into memory.
      Parameters:
      filePath - the file path
      offset - the offset
      Returns:
      the list
      Throws:
      IOException - Signals that an I/O exception has occurred.