Class SAPEREGradient

  • All Implemented Interfaces:
    it.unibo.alchemist.model.Actionable , it.unibo.alchemist.model.Reaction , java.io.Serializable , java.lang.Comparable

    
    public final class SAPEREGradient<P extends Position<P>>
    extends AbstractReaction<T>
                        

    This class provides a fast and stable gradient implementation, inspired on the NBR construct used in Proto.

    • Constructor Detail

      • SAPEREGradient

        SAPEREGradient(Environment<List<ILsaMolecule>, P> environment, ILsaNode node, ILsaMolecule sourceTemplate, ILsaMolecule gradientTemplate, int valuePosition, String expression, ILsaMolecule contextTemplate, double gradThreshold, TimeDistribution<List<ILsaMolecule>> timeDistribution)
        Builds a new SAPERE Gradient.
        Parameters:
        environment - the current environment
        node - the node where this reaction is scheduled
        sourceTemplate - a template ILsaMolecule representing the source
        gradientTemplate - a template ILsaMolecule representing the gradient.
        valuePosition - the point at which the computation of the new values should be inserted.
        expression - the expression to use in order to calculate the new gradient value.
        contextTemplate - a template ILsaMolecule.
        gradThreshold - if the value of the gradient grows above this threshold, the gradient evaporates
        timeDistribution - Markovian Rate
      • SAPEREGradient

        SAPEREGradient(Environment<List<ILsaMolecule>, P> environment, ILsaNode node, TimeDistribution<List<ILsaMolecule>> timeDistribution, String sourceTemplate, String gradientTemplate, int valuePosition, String expression, String contextTemplate, double gradThreshold)
        Builds a new SAPERE Gradient.
        Parameters:
        environment - the current environment
        node - the node where this reaction is scheduled
        timeDistribution - Markovian Rate
        sourceTemplate - a template ILsaMolecule representing the source
        gradientTemplate - a template ILsaMolecule representing the gradient.
        valuePosition - the point at which the computation of the new values should be inserted.
        expression - the expression to use in order to calculate the new gradient value.
        contextTemplate - a template ILsaMolecule.
        gradThreshold - if the value of the gradient grows above this threshold, the gradient evaporates