Is it possible to implement optimization algorithms, especially particle swarm, with "dynamic bounds" in MATLAB?
2 views (last 30 days)
Mohammad Shojaei Arani on 26 Aug 2022
I have a rather special optimization problem in which I found particle swarm a good solver. I know, roughly, where the optimal parameters
are. But, here is the tricky part. It is not, beforehand, easy to choose 'proper' upper and lower bounds for unknown parameters. If I specify small bounds then algorithm works but it misses much better solutions which live outsive but close to the bounds considered. On the other hand, if I specify bigger bounds then the optimization fails due to the nature of my problem which I explain shortly. My objective function is undefined (or better to say 'punctured') as we departure from the optimum solution: The more we departure from the optimum solution the more punctured the objective function becomes. So, if bounds are big then the algorith gets stocked.
The best idea to fix this problem is to specify 'rather smal' bounds but let the algorithm to enlarge the bounds whenever it hits one of the bound's components. For instance, when the algorithm hits any component of bounds then the algorithm considers to expand this component of bounds by, say, 10% of its current size. But, it seems that we cannot tell particle swarm to consider 'enlarging' the bounds whenever needed?
Or, do you know a way to do this?
Walter Roberson on 26 Aug 2022
Create your ga() with no upper or lower bound. (Linear or nonlinear bounds might sometimes make sense though.)
Then use the options to pass in an Initial Population of values in the initial range.
ga() will increase or decrease the values as needed. Any attempt to head into punctured area will be disfavoured due to having high cost
More Answers (1)
John D'Errico on 26 Aug 2022
Edited: John D'Errico on 26 Aug 2022
The fuzzy bounds you describe are not actually bounds at all, just subtle, vague hints. And code tends not to handle fuzzy hints well. Unless of course, you want to write the code to do so. Yes, you could certainly write anything you want. But to ask an existing piece of code to do what you think makes sense to you is asking far too much of that code.
So start writing. I would first try to define mathematically what such a fuzzy bound means. Until you do that, code is never a good idea. But if you do succeed, then post the result on the file exchange. Others will want to use it, as long as you spend the time to document it, and write high quality, robust code.