AbstractReaction

abstract class AbstractReaction<T> : Reaction<T>

The type which describes the concentration of a molecule. This class offers a partial implementation of Reaction. In particular, it allows writing new reaction specifying only which distribution time to adopt

Parameters

<T>

concentration type

Inheritors

Constructors

Link copied to clipboard
constructor(node: Node<T>, timeDistribution: TimeDistribution<T>)
Builds a new reaction, starting at time t.

Properties

Link copied to clipboard
@get:Nonnull
val node: Node<T>
Link copied to clipboard

Functions

Link copied to clipboard
open fun canExecute(): Boolean
The default implementation verifies if all the conditions are valid.
Link copied to clipboard
abstract fun cloneOnNewNode(node: Node<T>, currentTime: Time): Reaction<T>

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.

Link copied to clipboard
Link copied to clipboard
fun equals(o: Any): Boolean
Link copied to clipboard
open fun execute()
The default execution iterates all the actions in order and executes them.
Link copied to clipboard
Override only if you need to implement extremely tricky behaviors.
Link copied to clipboard
Override only if you need to implement extremely tricky behaviors.
Link copied to clipboard
Link copied to clipboard
The widest Context among Conditions, namely the smallest Context in which the Reaction can read informations.
Link copied to clipboard
abstract fun getNode(): Node<T>
Link copied to clipboard
Link copied to clipboard
The widest Context among Actions, namely the smallest context in which the Reaction can do modifications.
Link copied to clipboard
open fun getRate(): Double

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun hashCode(): Int
Link copied to clipboard
open fun initializationComplete(@Nonnull atTime: Time, @Nonnull environment: Environment<T, out Any>)
This method is called when the environment has completed its initialization.
Link copied to clipboard
open fun setActions(@Nonnull actions: List<out Action<T>>)
This should get overridden only if very tricky behaviors are implemented, such that the default Alchemist action addition model is no longer usable.
Link copied to clipboard
open fun setConditions(@Nonnull conditions: List<out Condition<T>>)
This should get overridden only if very tricky behaviors are implemented, such that the default Alchemist condition addition model is no longer usable.
Link copied to clipboard
Link copied to clipboard
open fun toString(): String
Link copied to clipboard
fun update(@Nonnull currentTime: Time, hasBeenExecuted: Boolean, @Nonnull environment: Environment<T, out Any>)
Updates the scheduling of this reaction.