Genetic Algorithm fixed variable step in optimization toolbox

5 ビュー (過去 30 日間)
Ricardo Pereira
Ricardo Pereira 2014 年 6 月 6 日
回答済み: Samarth Behura 2016 年 2 月 14 日
I have a problem of optimization of a photovoltaic and thermal system. I have everything running on the optimization tool box and everything seems to be going well. However, I wonder if it is possible to restrict the degree of the variables. ie:
The number of variables:
nvar = 4
Variables:
Vch Ac PCM Lp
My lower bounds (lb) and upper bounds (ub) are:
lb = [0 0.02 0.025 10000] ub = [10 0.10 0:05 50000]
Optimization is being done with decimals which causes an excessively time consuming optimization.
I needed to set the step to the optimization runs. Is it possible?
Something like:
Vch = (0:1:10) Ac = (0.02:0.01:0.10) PCM = (0.025:0.005:0.050) Lp = (10000:1000:50000)
It is possible to define these steps or fixed variables in the optimization by genetic algorithms?
Thanks

回答 (2 件)

Alan Weiss
Alan Weiss 2014 年 6 月 6 日
I am not at all sure that I understand you. What does "Optimization is being done with decimals" mean? What does "I needed to set the step to the optimization runs." mean?
In any case, it seems that your GA runs are taking too long. Have you tried to use patternsearch instead? Take various runs with random start points:
x0 = lb + rand(size(lb)).*(ub - lb);
I am certain that this will give you quicker, more reliable results.
For either solver, you might want to rescale your problem so the variables are basically between 0 and 1 instad of having such large orders of magnitude difference.
One other thing. You could try an exhaustive search, if you only need 5-10 steps in each direction. 10^4 is not such a large number of points to evaluate. Then you could take the best point you find that way and give it to patternsearch to refine.
But still, I recommend that you use patternsearch first, before experimenting with other techniques. You might want to set TolMesh to something larger than the default, perhaps 1e-3 or 1e-4.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Samarth Behura
Samarth Behura 2016 年 2 月 14 日
It actually may be straight forward...I had a similar problem...plz see the link..http://www.mathworks.com/matlabcentral/answers/268031-is-there-a-way-to-define-the-values-for-the-nvars-variables-they-are-incremented-in-steps-instead-o#answer_209737

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by