-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.TimeDistribution,java.io.Serializable,java.lang.Cloneable
public class ExponentialTime<T> extends AbstractDistribution<T>
Markovian events.
-
-
Field Summary
Fields Modifier and Type Field Description private final doublerate
-
Constructor Summary
Constructors Constructor Description ExponentialTime(double markovianRate, RandomGenerator randomGenerator)ExponentialTime(double markovianRate, Time start, RandomGenerator randomGenerator)
-
Method Summary
Modifier and Type Method Description doublegetRate()final voidupdateStatus(Time currentTime, boolean executed, double newpropensity, Environment<T, out Object> environment)Implement this method to update the distribution's internal status. ExponentialTime<T>cloneOnNewNode(Node<T> destination, Time currentTime)Must be overridden by subclasses returning the correct instance. -
Methods inherited from class it.unibo.alchemist.model.implementations.timedistributions.AbstractDistribution
getNextOccurence, update -
Methods inherited from class it.unibo.alchemist.model.interfaces.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()
-
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(Node<T> destination, Time currentTime)
Must be overridden by subclasses returning the correct instance.
- Parameters:
currentTime- the time at which the time distribution was cloned
-
-
-
-