Package 

Interface Reaction

    • Constructor Detail

    • Method Detail

      • cloneOnNewNode

         abstract Reaction<T> cloneOnNewNode(Node<T> node, Time currentTime)

        This method allows to clone this reaction on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.

        Parameters:
        node - The node where to clone this Reaction
        currentTime - the time at which the clone is created (required to correctly clone the TimeDistributions)
      • execute

         abstract void execute()

        Executes the reactions.

      • initializationComplete

         abstract void initializationComplete(Time atTime, Environment<T, out Object> environment)

        This method is called when the environment has completed its initialization. Can be used by this reaction to compute its next execution time - in case such computation requires an inspection of the environment.

        Parameters:
        atTime - the time at which the initialization of this reaction was accomplished
        environment - the environment
      • getRate

         abstract double getRate()

        Returns the speed of this Reaction. It is an average number, and can potentially change during the simulation, depending on the implementation.

      • setActions

         abstract void setActions(List<Action<T>> actions)

        Sets the Actions list. Some implementations may not allow to change it at runtime.

        Parameters:
        actions - the list of actions for this reaction
      • setConditions

         abstract void setConditions(List<Condition<T>> conditions)

        Sets the Conditions list. Some implementations may not allow to change it at runtime.

        Parameters:
        conditions - the list of conditions for this action
      • update

         abstract void update(Time currentTime, boolean hasBeenExecuted, Environment<T, out Object> environment)

        Updates the scheduling of this reaction.

        Parameters:
        currentTime - the current Time of execution.
        hasBeenExecuted - true if the reaction have just been executed.
        environment - the current environment