How to discard solutions from simulated annealing algorithm?
Show older comments
I try to implement the simulated annealing function using Global Optimization Toolbox.
The objective function to minimize depends on several parameters (about 10) and for some combinations of them, the objective function cannot be evaluated. In these cases I take as an output of the objective function a fixed integer value (sufficiently greater than the average evaluations of the objective function).
In this way, however, I'm afraid of influencing the optimization in a negative way. I ask this because it can happen that the objective function could not be evaluated for many iterations and consequently the "Best Function Value" plot remains fixed and does not decrease. The main consequence is that the variation in the acceptance probability does not happen.
The question is the following:
1) How could I discard a solution (set of parameters) without it affect the progress of the minimization?
I hope I've been sufficiently clear. Thank you.
Answers (2)
Alan Weiss
on 24 Oct 2018
0 votes
I think that the real question is why are you doing this? If the answer is to optimize something, then you are doing yourself a grave disservice by using simulated annealing.
If your objective function is smooth, then you should be using fmincon or MultiStart. Feel free to return NaN for points that cannot be evaluated, instead of an arbitrary value.
If your objective function is not smooth, then you should be using patternsearch, as suggested in the Table for Choosing a Solver.
However, if the reason you are doing this is to experiment with the simulated annealing algorithm, then I am afraid that I do not have any advice for you.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Fabiom
on 24 Oct 2018
0 votes
1 Comment
Alan Weiss
on 24 Oct 2018
If your initial point is feasible and you are using the default fmincon 'interior-point' algorithm, then you can use NaN for infeasible points. The same with patternsearch or MultiStart.
As I said before, I have no advice for simulannealbnd, and believe strongly that you are making a mistake in trying to use it.
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Simulated Annealing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!