Class ExponentialTime
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.TimeDistribution
,java.io.Serializable
,java.lang.Cloneable
public class ExponentialTime<T> extends AbstractDistribution<T>
Markovian events.
-
-
Field Summary
Fields Modifier and Type Field Description public final double
rate
-
Constructor Summary
Constructors Constructor Description ExponentialTime(double markovianRate, RandomGenerator randomGenerator)
ExponentialTime(double markovianRate, Time start, RandomGenerator randomGenerator)
-
Method Summary
Modifier and Type Method Description double
getRate()
final void
updateStatus(Time currentTime, boolean executed, double newpropensity, Environment<T, out Object> environment)
Implement this method to update the distribution's internal status. ExponentialTime<T>
cloneOnNewNode(@Nonnull() Node<T> destination, @Nonnull() Time currentTime)
Must be overridden by subclasses returning the correct instance. -
Methods inherited from class it.unibo.alchemist.model.timedistributions.AbstractDistribution
getNextOccurence, update
-
Methods inherited from class it.unibo.alchemist.model.TimeDistribution
cloneOnNewNode, getNextOccurence, getRate, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ExponentialTime
ExponentialTime(double markovianRate, RandomGenerator randomGenerator)
- Parameters:
markovianRate
- Markovian rate for this distributionrandomGenerator
- RandomGenerator used internally
-
ExponentialTime
ExponentialTime(double markovianRate, Time start, RandomGenerator randomGenerator)
- Parameters:
markovianRate
- Markovian rate for this distributionstart
- initial timerandomGenerator
- RandomGenerator used internally
-
-
Method Detail
-
getRate
double getRate()
- Returns:
the rate of the reaction
-
updateStatus
final void updateStatus(Time currentTime, boolean executed, double newpropensity, Environment<T, out Object> environment)
Implement this method to update the distribution's internal status.
- Parameters:
currentTime
- current timeexecuted
- true if the reaction whose this distribution has been associated has just been executedenvironment
- the current environment
-
cloneOnNewNode
ExponentialTime<T> cloneOnNewNode(@Nonnull() Node<T> destination, @Nonnull() Time currentTime)
Must be overridden by subclasses returning the correct instance.
- Parameters:
currentTime
- the time at which the time distribution was cloned- Returns:
a new ExponentialTime
-
-
-
-