ChemicalReaction

Parameters

<T>

concentration type

Inheritors

Constructors

Link copied to clipboard
constructor(n: Node<T>, pd: TimeDistribution<T>)

Properties

Link copied to clipboard
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
open fun cloneOnNewNode(node: Node<T>, currentTime: Time): ChemicalReaction<T>
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.

open fun getActions(): List<Action<T>>
Override only if you need to implement extremely tricky behaviours.
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 behaviours.
Link copied to clipboard
abstract fun getInboundDependencies(): NonExistentClass
fun getInboundDependencies(): ListSet<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(): NonExistentClass
fun getOutboundDependencies(): ListSet<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
Returns the speed of this Reaction.
Link copied to clipboard
open fun getTau(): Time
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(atTime: Time, 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(actions: List<out Action<T>>)
This should get overridden only if very tricky behaviours 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(conditions: List<out Condition<T>>)
This should get overridden only if very tricky behaviours are implemented, such that the default Alchemist condition addition model is no longer usable.
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(currentTime: Time, hasBeenExecuted: Boolean, environment: Environment<T, out Any>)
Updates the scheduling of this reaction.