BiochemicalReaction

A biochemical Reaction.

Constructors

Link copied to clipboard
constructor(node: Node<Double>, timeDistribution: TimeDistribution<Double>, environment: Environment<Double, out Any>, randomGenerator: RandomGenerator)

Properties

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

Functions

Link copied to clipboard
abstract fun canExecute(): Boolean

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.

This method allows to clone this reaction on a new node.
Link copied to clipboard
abstract fun compareTo(p: T): Int
Link copied to clipboard
fun equals(o: Any): Boolean
Link copied to clipboard
abstract fun execute()

Executes the reactions.

open fun execute()
The default execution iterates all the actions in order and executes them.
Link copied to clipboard
abstract fun getActions(): List<Action<T>>

The list of Actions of the Reaction. Please be careful when you modify this list.

Override only if you need to implement extremely tricky behaviors.
Link copied to clipboard
abstract fun getConditions(): List<Condition<T>>

The list of Conditions of the Reaction. Please be careful when you modify this list.

Override only if you need to implement extremely tricky behaviors.
Link copied to clipboard
abstract fun getInboundDependencies(): ListSet<? extends Dependency>
Link copied to clipboard
abstract fun getInputContext(): Context

The widest Context among Conditions, namely the smallest Context in which the Reaction can read informations.

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
abstract fun getOutboundDependencies(): ListSet<? extends Dependency>
Link copied to clipboard
abstract fun getOutputContext(): Context

The widest Context among Actions, namely the smallest context in which the Reaction can do modifications.

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.

Returns the speed of this Reaction.
Link copied to clipboard
open fun getTau(): Time
Link copied to clipboard
Link copied to clipboard
fun hashCode(): Int
Link copied to clipboard
abstract fun initializationComplete(atTime: Time, environment: Environment<T, out Any>)

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.

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
abstract fun setActions(<set-?>: List<out Action<T>>)

The list of Actions of the Reaction. Please be careful when you modify this list.

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
abstract fun setConditions(<set-?>: List<out Condition<T>>)

The list of Conditions of the Reaction. Please be careful when you modify this list.

open fun setConditions(@Nonnull conditions: List<out Condition<Double>>)
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
abstract fun update(currentTime: Time, hasBeenExecuted: Boolean, environment: Environment<T, out Any>)

Updates the scheduling of this reaction.

fun update(@Nonnull currentTime: Time, hasBeenExecuted: Boolean, @Nonnull environment: Environment<T, out Any>)
Updates the scheduling of this reaction.