Package 

Class SAPEREGradient

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

    
    public final class SAPEREGradient<P extends Position<P>>
    extends AbstractReaction<List<ILsaMolecule>>
                        

    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> env, ILsaNode n, TimeDistribution<List<ILsaMolecule>> td, String sourceTemplate, String gradientTemplate, int valuePosition, String expression, String contextTemplate, double gradThreshold)
        Builds a new SAPERE Gradient.
        Parameters:
        env - the current environment
        n - the node where this reaction is scheduled
        td - 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