Class GSAAnnealingFunction

  • All Implemented Interfaces:
    AnnealingFunction

    public class GSAAnnealingFunction
    extends Object
    implements AnnealingFunction
    The GSA proposal/annealing function.
    See Also:
    "R's package GenSA, Engine.cpp"
    • Constructor Detail

      • GSAAnnealingFunction

        public GSAAnnealingFunction​(double qv,
                                    RandomLongGenerator rlg,
                                    RandomStandardNormalGenerator rnorm)
        Constructs a GSA annealing function.
        Parameters:
        qv - the visiting parameter
        rlg - a uniform random number generator
        rnorm - a standard random Normal number generator
    • Method Detail

      • GSAMarkovLength

        public static int GSAMarkovLength​(int dim)
        The Markov length for GSA, i.e. the number of state transition attempts per temperature, is assumed to be 2 * dim. If we change this assumption, we must change also the annealing function.
        Parameters:
        dim - the problem dimension
        Returns:
        the Markov length that is assumed by nextProposal(dev.nm.algebra.linear.vector.doubles.Vector, double)
      • nextProposal

        public Vector nextProposal​(Vector currentState,
                                   double temperature)
        Description copied from interface: AnnealingFunction
        Gets the next proposal, given the current state and the temperature.
        Specified by:
        nextProposal in interface AnnealingFunction
        Parameters:
        currentState - the current state of the system
        temperature - the current temperature of the system
        Returns:
        the next proposal