How to discard solutions from simulated annealing algorithm?

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)

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
My question regards the way how I could discard some solutions for points that cannot be evaluated (these are points that not meet some constraints that have been written inside the objective function). For these points that cannot be evaluated, I still have to output a value of the objective function, so I have assigned an arbitrary value.
In case I assign a NaN value, the algorithm starts but always delivers a value in output: bestfval = fval = NaN for every iteration and the choice of the parameters does not change.
Which value could I assign so that the program starts without problems? Thank you.

1 Comment

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

Sign in to comment.

Products

Release

R2018b

Asked:

on 23 Oct 2018

Commented:

on 24 Oct 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!