Class ConcurrentModelEvaluator
java.lang.Object
tools.descartes.dlim.generator.util.ConcurrentModelEvaluator
Class for creating arrival rate lists from a DLIM instance by concurrently evaluating
multiple regions of the model.
-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentModelEvaluator
(ModelEvaluator evaluator) Creates a new ConcurrentModelEvaluator.ConcurrentModelEvaluator
(ModelEvaluator evaluator, int threadCount) Creates a new ConcurrentModelEvaluator. -
Method Summary
Modifier and TypeMethodDescriptionevaluateForTimeStamps
(double startTime, double endTime, double step) Evaluates the model for the specified time interval and stores the result in a list.evaluateForTimeStampsSequentially
(double startTime, double endTime, double step) Evaluates the model for the specified time interval and stores the result in a list, forces sequential execution.double
getMax()
Returns the maximum arrival rate, as determined during the last call of evaluateForTimeStamps().
-
Constructor Details
-
ConcurrentModelEvaluator
Creates a new ConcurrentModelEvaluator.- Parameters:
evaluator
- The default evaluator, characterizing the model.
-
ConcurrentModelEvaluator
Creates a new ConcurrentModelEvaluator.- Parameters:
evaluator
- The default evaluator, characterizing the model.threadCount
- The amount of threads to be used.
-
-
Method Details
-
evaluateForTimeStamps
public ArrayList<ArrivalRateTuple> evaluateForTimeStamps(double startTime, double endTime, double step) Evaluates the model for the specified time interval and stores the result in a list.- Parameters:
startTime
- The time to start evaluation (inclusive).endTime
- The time to end evaluation (exclusive).step
- The sampling steps.- Returns:
- A list with the arrival rate tuples.
-
evaluateForTimeStampsSequentially
public ArrayList<ArrivalRateTuple> evaluateForTimeStampsSequentially(double startTime, double endTime, double step) Evaluates the model for the specified time interval and stores the result in a list, forces sequential execution.- Parameters:
startTime
- The time to start evaluation (inclusive).endTime
- The time to end evaluation (exclusive).step
- The sampling steps.- Returns:
- A list with the arrival rate tuples.
-
getMax
public double getMax()Returns the maximum arrival rate, as determined during the last call of evaluateForTimeStamps().- Returns:
- The maximum arrival rate.
-