Interface Condition
-
- All Implemented Interfaces:
-
java.io.Serializable
public interface Condition<T> implements Serializable
-
-
Method Summary
Modifier and Type Method Description abstract Condition<T>
cloneCondition(Node<T> node, Reaction<T> reaction)
This method allows to clone this action on a new node. abstract Context
getContext()
abstract ListSet<out Dependency>
getInboundDependencies()
abstract Node<T>
getNode()
abstract double
getPropensityContribution()
This method is a support for the propensity calculation inside the Reactions. abstract boolean
isValid()
void
reactionReady()
This method is called by the Simulation once the Reaction whose this Condition belongs to is the next one to be executed, and all its conditions passed (namely, the next operation will be the reaction execution). -
-
Method Detail
-
cloneCondition
abstract Condition<T> cloneCondition(Node<T> node, Reaction<T> reaction)
This method allows to clone this action on a new node. It may result useful to support runtime creation of nodes with the same reaction programming, e.g. for morphogenesis.
-
getContext
abstract Context getContext()
- Returns:
The context for this condition.
-
getInboundDependencies
abstract ListSet<out Dependency> getInboundDependencies()
- Returns:
The list of molecules whose concentration may influence the truth value of this condition
-
getPropensityContribution
abstract double getPropensityContribution()
This method is a support for the propensity calculation inside the Reactions. It allows this condition to influence the rate calculation in some way. It's up to the reaction to decide whether to use or not this information, and how.
- Returns:
how this condition may influence the propensity.
-
isValid
abstract boolean isValid()
- Returns:
true if the condition is satisfied in current environment.
-
reactionReady
void reactionReady()
This method is called by the Simulation once the Reaction whose this Condition belongs to is the next one to be executed, and all its conditions passed (namely, the next operation will be the reaction execution). It can be used to perform sanity checks, as well as for registering the status of the simulated world for future comparisons. Defaults to an empty implementation.
-
-
-
-