问题
Quoting Wikipedia article about simulated annealing:
It is often used when the search space is discrete (e.g., all tours that visit a given set of cities).
As far as I'm aware the R version of simulated annealing is provided by the package GenSA
, https://cran.r-project.org/web/packages/GenSA/GenSA.pdf .
And yet I can find nothing in the linked docu about discrete parameters; the docs seem to assume continuous parameters (as there is no way to pass step!)
Is there any way to use simulated annealing to minimize a function with discrete parameters?
来源:https://stackoverflow.com/questions/56156168/how-to-use-simulated-annealing-for-a-function-with-discrete-paremeters