The Starting Point (Vector) generated by Genetic Algorithm doesn't satisfy the nonlinear constraint, why?
Show older comments
Identification of 57 unknow parameter: (I'm using Matlab R2014a)
I have two series of measurement Gm and Vm as a function of wm . Both functions are characterised by the same 57 unknow parameter.
I want to generate a good starting vector with the 57 unknow parameter so that the sum of squares logarithmic
f= sum((log(G(wm))-log(Gm)).^2+10*(log(V(wm))-log(Vm)).^2);
becomes minimal.
-
- There are specific bounds for the parameters
Ginf= x(1); %[0;1]
gi= [x(2:(length(x)-1)/2 +1)]; %[0;1]
taui = [x((length(x)-1)/2 +2:length(x))]; %[0,1E+10]
G0= [Ginf/(1-sum(gi))]; %[in this case >922,15]
-
- And the nonlinear constraint mycon is (what is really important otherwise the G0 is getting negativ)
sum(gi)<1
-
-
My problem is that the nonlinear constraint isn't always statisfied . I tried to change the bounds, so that the sum(gi)is smaller than 1 and I also tried sum(gi)<0.25, but still I'm getting a lot of G0 s, which are negativ. In addition the GA isn't working really efficiently.
-
Also I was wondering about:
- rng(0, 'twister'); the reproducibility. How it works with entering there another number than 0?
- What are good settings for the options of the GA - TolFun, PopulationSize, Generations, ...?
-
See attached the matlab files with the code.
-
I never have programmed a GA, so it would be really great if somebody can help me with this problem. Thank you!
Accepted Answer
More Answers (1)
Sean de Wolski
on 11 Dec 2014
0 votes
The ga solver may not generate points that are feasible with regard to the nonlinear constraints. This doc page explains how it works:
4 Comments
John D'Errico
on 11 Dec 2014
Edited: John D'Errico
on 11 Dec 2014
There is NO assurance that a starting point for an optimization can be found trivially. In fact, just finding a valid starting point may require an optimization itself.
Sabrina Langer
on 12 Dec 2014
Edited: Sabrina Langer
on 12 Dec 2014
Sabrina Langer
on 12 Dec 2014
Edited: Sabrina Langer
on 12 Dec 2014
Sabrina Langer
on 12 Dec 2014
Edited: Sabrina Langer
on 12 Dec 2014
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!