Why does GlobalSearch return different solutions each run?

3 views (last 30 days)
When running the GlobalSearch solver on a nonlinear constrained optimization problem I have, I often get very different solutions each run. For the cases that I have an analytical solution, the numerical results are less dispersed than the non-analytical cases but are still different each run. It would be nice to get the same results at least for these analytical cases so that I know the optimization routine is working properly. Is there a good explanation of this in the Global Optimization Toolbox User Guide that I missed?
Thanks!

Answers (1)

Matt J
Matt J on 11 Jun 2014
Edited: Matt J on 11 Jun 2014
It says here that GlobalSearch uses a scatter search mechanism to generate search points. Based on this link, this process appears to involve random number selection. So, I'm guessing the results are not repeatable due to this randomness and the fact that you have lots of capture basins. You could try using the rng command to seed the random number generator in the same way between runs to see if you get repeatability then. Repeatability does not mean, of course, that you are successfully finding the global solution. There is never any way of guaranteeing of that.

Community Treasure Hunt

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

Start Hunting!