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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • 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)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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 distribution
        randomGenerator - RandomGenerator used internally
      • ExponentialTime

        ExponentialTime(double markovianRate, Time start, RandomGenerator randomGenerator)
        Parameters:
        markovianRate - Markovian rate for this distribution
        start - initial time
        randomGenerator - 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 time
        executed - true if the reaction whose this distribution has been associated has just been executed
        environment - 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