addReaction

abstract fun addReaction(reactionToAdd: Reaction<T>)

Adds a reaction to this node. The reaction is added only in the node, but not in the it.unibo.alchemist.core.Simulation scheduler, so it will never be executed. To add the reaction also in the scheduler (and start to execute it), you have to call also the method it.unibo.alchemist.core.Simulation.reactionAdded.

Parameters

reactionToAdd

the reaction to be added