Package it.unibo.alchemist.model
Interface TimeDistribution
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
public interface TimeDistribution<T> implements Cloneable, Serializable
This interface represents a temporal distribution for any event.
-
-
Method Summary
Modifier and Type Method Description abstract void
update(@Nonnull() Time currentTime, boolean executed, double param, @Nonnull() Environment<T, out Object> environment)
Updates the internal status. abstract Time
getNextOccurence()
abstract double
getRate()
abstract TimeDistribution<T>
cloneOnNewNode(@Nonnull() Node<T> destination, @Nonnull() Time currentTime)
-
-
Method Detail
-
update
abstract void update(@Nonnull() Time currentTime, boolean executed, double param, @Nonnull() Environment<T, out Object> environment)
Updates the internal status.
- Parameters:
currentTime
- current timeexecuted
- true if the reaction has just been executedparam
- a parameter passed by the reactionenvironment
- the current environment
-
getNextOccurence
abstract Time getNextOccurence()
- Returns:
the next time at which the event will occur
-
getRate
abstract double getRate()
- Returns:
how many times per time unit the event will happen on average
-
cloneOnNewNode
abstract TimeDistribution<T> cloneOnNewNode(@Nonnull() Node<T> destination, @Nonnull() Time currentTime)
- Parameters:
destination
- the node where the newly created time distribution will be placedcurrentTime
- the time at which the cloning operation happened- Returns:
an exact copy of this TimeDistribution
-
-
-
-