Function evaluation in each iteration of pattern search exceeding 2* (number of optimization variable)

* Newbie to global optimization toolbox *
Hi,
I am trying to perform constrained optimization using pattern search.
  • Since the search method in pattern search is specified as GSSPositiveBasisNp1 (see definition of options below), I am expecting the number of function evaluations (FE) at each iteration to be 2 * (number of optimization variables = 45).
  • However, when I perform the optimization, typical number of FE at each iteration is ~300 while it should be 90 (2*45).
The options that I use in pattern search is :
options = psoptimset('Display','iter', 'PlotFcns' , {@psplotfuncount, @psplotbestf}, 'UseParallel', 'always', 'TolFun', 1E-3, ...
'CompletePoll', 'on', 'SearchMethod', 'GSSPositiveBasisNp1', 'OutputFcn', @psoutputfcn );
optimalSol = patternsearch( fHandle, initialGuess, [], [], [], [], lb, ub, [],options);
Can you help me identify the issue here, and fix it?

 Réponse acceptée

jgg
jgg le 29 Jan 2016
Modifié(e) : jgg le 29 Jan 2016
You have 'SearchMethod' enabled. This is an optional step which performs a search prior to the polling, resulting in the large number of extra function evaluations. Searching is different from polling in patternsearch's implementation in Matlab; it's basically like a local-prescreening of the most recent best point to improve convergence performance.
I think the option you actually want is 'PollMethod' instead.

5 commentaires

* FE = Function evaluations *
Since, performing optimization is computationally expensive for me - every FE takes around 40 mins, I am trying to find out how I can differentiate between the number of FE used for searching vs. poll at every iteration.
In other words, given I know the total number of FE in each iteration i.e., FE for performing search prior to polling + FE for polling, is there a way to find out how many FE were actually spent in doing the polling?
One way to find this can be to assume the number of FE during every iteration of polling = 2 * number of optimization variables = 90. But is that a fair assumption?
Thanks jgg!
Whoa, that FE is way too large to do practical optimization, I think. You might want to consider trying to reduce this I suspect. What kind of problem are you working on? Have you profiled your code or tried to improve the speed?
With respect to your problem, I don't know if there's a way to do a breakdown of that. Your assumption is an upper bound on the number of FE used for polling; it will be correct when there's no improvement found, and too many in every other case. It's probably a reasonable approximation though for most cases.
Oddly, sometimes it is faster to not use Parallel; whether it is or not depends a lot on exactly what calculations are being performed and what the matrix sizes are.
If you have UseParallel then do you have Parallel Computing Toolbox? Do you have an NVIDIA GPU?
jgg: The FE is expensive since I am solving nonlinear dynamical system.
Walter: I am running it on a cluster which has 16 cores and 64GB memory.
That might be a situation under which it would be advantageous to add an NVIDIA Tesla GPU

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by