Class ArrivalRateGenerator
java.lang.Object
tools.descartes.dlim.exporter.utils.ArrivalRateGenerator
Generates an arrival rate file and chart by sampling a Descartes Load Intensity Model using a
given ModelEvaluator.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<ArrivalRateTuple>
generateArrivalRates
(ModelEvaluator evaluator, double step) Run the ArrivalRateGenerator.static void
writeArrivalRates
(List<ArrivalRateTuple> arrRates, String projectPath, String modelName, String endOfLineCharacter, String fileSuffix) Run the ArrivalRateGenerator and write the results to a .txt file and an arrival rate plot.
-
Method Details
-
generateArrivalRates
Run the ArrivalRateGenerator.- Parameters:
evaluator
- the evaluatorstep
- The width of the sampling interval.- Returns:
- A list of ArrivalRateTuples (Time-stamps and arrival rates) sampled from the model.
-
writeArrivalRates
public static void writeArrivalRates(List<ArrivalRateTuple> arrRates, String projectPath, String modelName, String endOfLineCharacter, String fileSuffix) Run the ArrivalRateGenerator and write the results to a .txt file and an arrival rate plot.- Parameters:
arrRates
- the arr ratesprojectPath
- the project pathmodelName
- the model nameendOfLineCharacter
- The character before the end of a line in the output file. Note: the "\n" is always printed after this character. It does not have to be included here.fileSuffix
- The file suffix ("txt","csv" ...)
-