SAPEREGradient
Builds a new SAPERE Gradient.
Parameters
the current environment
the node where this reaction is scheduled
a template ILsaMolecule representing the source
a template ILsaMolecule representing the gradient. ALL the variables MUST be the same of sourceTemplate: no un-instanced variables are admitted when inserting tuples into nodes
the point at which the computation of the new values should be inserted. All the data after this position will be considered "additional information" propagated by the source. All the values before this one, instead, will be used to distinct different gradients
the expression to use in order to calculate the new gradient value. #T and #D are admitted, plus every variable present in the gradient before valuePosition, and every variable matched by the contextTemplate
a template ILsaMolecule. It can be used to match some contents of the local node in order to have local information to use in the gradient value computation
if the value of the gradient grows above this threshold, the gradient evaporates
Markovian Rate
Builds a new SAPERE Gradient. This constructor is slower, and is provided for compatibility with the YAML-based Alchemist loader. It should be avoided when possible, by relying on the other constructor instead.
Parameters
the current environment
the node where this reaction is scheduled
a template ILsaMolecule representing the source
a template ILsaMolecule representing the gradient. ALL the variables MUST be the same of sourceTemplate: no un-instanced variables are admitted when inserting tuples into nodes
the point at which the computation of the new values should be inserted. All the data after this position will be considered "additional information" propagated by the source. All the values before this one, instead, will be used to distinct different gradients
the expression to use in order to calculate the new gradient value. #T and #D are admitted, plus every variable present in the gradient before valuePosition, and every variable matched by the contextTemplate
a template ILsaMolecule. It can be used to match some contents of the local node in order to have local information to use in the gradient value computation
if the value of the gradient grows above this threshold, the gradient evaporates
Markovian Rate