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
ConstructorDescriptionBasicReward
(Sequencer sequencer, RewardTime rewardTime, int samples) Builds a reward instance and adds it as an observer to the simulator. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObserver
(RewardObserver observer) abstract int
int
void
removeObserver
(RewardObserver observer) void
update
(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:
update
in interfaceSequencerObserver
-
addObserver
- Specified by:
addObserver
in interfaceReward
-
removeObserver
- Specified by:
removeObserver
in interfaceReward
-
getSequencer
- Specified by:
getSequencer
in interfaceReward
-
getRewardTime
- Specified by:
getRewardTime
in interfaceReward
-
getSamples
public int getSamples()
-