Package org.oristool.simulator.rewards
Class BasicReward
java.lang.Object
org.oristool.simulator.rewards.BasicReward
- All Implemented Interfaces:
Reward,SequencerObserver
- Direct Known Subclasses:
SteadyStateMarkingProbability,SymbolicPrefixReward,TransientMarkingConditionProbability,TransientMarkingProbability,TransitionAbsoluteFiringTime
A reward implementation for generic time.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.oristool.simulator.rewards.Reward
Reward.RewardEvent -
Constructor Summary
ConstructorsConstructorDescriptionBasicReward(Sequencer sequencer, RewardTime rewardTime, int samples) Builds a reward instance and adds it as an observer to the simulator. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddObserver(RewardObserver observer) abstract intintvoidremoveObserver(RewardObserver observer) voidupdate(Sequencer.SequencerEvent event)
-
Constructor Details
-
BasicReward
Builds a reward instance and adds it as an observer to the simulator.- Parameters:
sequencer- a simulator instancerewardTime- the reward timesamples- the number of time ticks in each run
-
-
Method Details
-
getCurrentTimeSample
public abstract int getCurrentTimeSample() -
update
- Specified by:
updatein interfaceSequencerObserver
-
addObserver
- Specified by:
addObserverin interfaceReward
-
removeObserver
- Specified by:
removeObserverin interfaceReward
-
getSequencer
- Specified by:
getSequencerin interfaceReward
-
getRewardTime
- Specified by:
getRewardTimein interfaceReward
-
getSamples
public int getSamples()
-