Package org.oristool.simulator.rewards
Class RewardEvaluatorTimeout
java.lang.Object
org.oristool.simulator.rewards.RewardEvaluatorTimeout
- All Implemented Interfaces:
RewardObserver
Evaluator collecting the values of a reward over multiple runs with given total duration.
-
Constructor Summary
ConstructorsConstructorDescriptionRewardEvaluatorTimeout(Reward reward, long timeout) Builds an evaluator for a given reward and duration (expressed in seconds). -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObserver(RewardEvaluatorObserver observer) Adds an observer to this evaluator.longvoidremoveObserver(RewardEvaluatorObserver observer) voidupdate(Reward.RewardEvent event)
-
Constructor Details
-
RewardEvaluatorTimeout
Builds an evaluator for a given reward and duration (expressed in seconds).- Parameters:
reward- target rewardtimeout- total duration of runs
-
-
Method Details
-
getTimeout
public long getTimeout() -
getReward
-
getResult
-
update
- Specified by:
updatein interfaceRewardObserver
-
addObserver
Adds an observer to this evaluator.- Parameters:
observer- input observer
-
removeObserver
-