spsannMSSD(points, candidates, x.max, x.min, y.max, y.min, iterations = 10000,
acceptance = list(initial = 0.99, cooling = iterations/10),
stopping = list(max.count = iterations/10), plotit = TRUE, boundary,
progress = TRUE, verbose = TRUE)objMSSD(candidates, points)
poiinitial and
cooling. initial is a numeric value between 0 and 1 defining
the initial acceptance probability. Defaults to initial = 0.99.
cooling is a numeric valmax.count.
max.count is an integer value defining the maximum allowable number
of iterations without improvement of the objective function value. This is
also known as the freezing criterion. Defaultplotit = TRUE.progress = TRUE.objMSSD returns a numeric value: the mean squared shortest distance
between a set of points and all grid cells.spsannMSSD returns a matrix: the optimized sample points with
the evolution of the energy state during the optimization as an attribute.
The current implementation of spatial simulated annealing uses a linear cooling schedule depending upon the number of iterations to control the size of the search graph. The equations are as follows:
where x.max.a and y.max.a are the maximum allowed shift in the
x and y coordinates in the current iteration, x.min and y.min
are the minimum required shift in the x and y coordinates, and x.max.b
and y.max.b are the maximum allowed shift in the x and y coordinates
in the next iteration. iterations is the total number of iterations
and k is the current iteration.
}
Using a low initial acceptance probability turns the spatial simulated
annealing into a greedy algorithm. It will converge in a shorter time,
but the solution found is likely to be a local optimum instead of the global
optimum. Using a high initial acceptance probability (>0.8) usually is
the wisest choice.
An exponential cooling schedule depending upon the number of iterations is used in the current implementation of the spatial simulated annealing to control the acceptance probability. The acceptance probability at each iteration is calculates as follows:
where actual_prob is the acceptance probability at the k-th
iteration, acceptance$initial is the initial acceptance probability,
and acceptance$cooling is the exponential cooling factor.
}
Increasing the initial acceptance probability does not guarantee the
independence from the starting system configuration. The most efficient
option in the current implementation of the spatial simulated annealing
algorithm is to start using the entire spatial domain as search graph. This
is set using the interval of the x and y coodinates to set x.max
and y.max (See above).
An alternative is to start jittering (randomly perturbing) several points at a time and use a cooling schedule to exponentially decrease the number of points jittered at each iteration. The current implementation of the spatial simulated annealing does not explore such alternative. The cooling schedule would be as follows:
where old.size and new.size are the number of points jittered
in the previous and next iterations, size.factor is the cooling
parameter, and k is the number of the current iteration. The larger
the difference between the starting system configuration and the global
optimum, the larger the number of points that would need to be jittered in
the first iterations. This will usually increase the time spent on the first
iterations.
}
The number of possible system configurations increases with:
the MSSD is a bi-dimensional criterion because it explicitly takes into account both y and x coordinates. It aims at the spread of points in the geographic space. This is completely different from the number of points per lag distance class which is an uni-dimensional criterion -- it aims at the spread on points in the variogram space. It is more difficult to calculate the utopia and nadir points of a bi-dimensional criterion.
The utopia ($f^{\circ}_{i}$) point of MSSD is only known to be
larger than zero. It could be approximated using the k-means algorithm, which
is much faster than spatial simulated annealing, but does not guarantee to
return the true utopia point. The nadir ($f^{max}_{i}$) point
is obtained when all sample points are clustered in one of the
One alternative strategy is to first optimize a set of sample points using the MSSD as criterion and then create geographic strata. In the multi-objective optimization one would then have to define an unidimensional criterion aiming at matching the optimal solution obtained by the minimization of the MSSD. One such uni-dimensional criterion would be the difference between the expected distribution and the observed distribution of sample points per geographic strata. This criterion would aim at having at least one point per geographic strata -- this is similar to optimizing sample points using the number of points per lag distance class.
A second uni-dimensional criterion would be the difference between the expected MSSD and the observed MSSD. This criterion would aim at having the points coinciding with the optimal solution obtained by the minimization of the MSSD. In both cases the utopia point would be exactly zero ($f^{\circ}_{i} = 0$). The nadir point could be easily calculated for the first uni-dimensional criterion, but not for the second. }
de Gruijter, J. J.; Brus, D.; Bierkens, M.; Knotters, M. Sampling for natural resource monitoring. Berlin: Springer, p. 332, 2006.
Walvoort, D. J. J.; Brus, D. J.; de Gruijter, J. J. An R package for spatial coverage sampling and random sampling from compact geographical strata by k-means. Computers and Geosciences. v. 36, p. 1261-1267, 2010.
distanceFromPoints, stratify.require(sp)
data(meuse.grid)
meuse.grid <- as.matrix(meuse.grid[, 1:2])
meuse.grid <- matrix(cbind(c(1:dim(meuse.grid)[1]), meuse.grid), ncol = 3)
points <- sample(c(1:dim(meuse.grid)[1]), 155)
points <- meuse.grid[points, ]
objMSSD(meuse.grid, points)Run the code above in your browser using DataLab