genetic algorithm Fitnesss and mean fitness convergence
1 view (last 30 days)
Show older comments
Im using GA tool box
my fitness function is
f=f1+f2
where f1 and f2 are the outputs of a function called obj [f1,f2]=obj(x)
I have a constraint on f1 that it has to be f1>10
and x (design variable vector) is a thickness vector
I also have a mass const..
So i created a non linear constrain code for the mass and f1
however for the code to run fast i set a condition inside obj(x),so that i dont have to go through the code when the solution is already infeasible
[f1,f2]=obj(x)
if mass>massmax
f1=100;
f2=0;%
now my code runs fast but the best fitness and mean fitness curves are not reaching same values at the end of the stall generations
what did i do wrong and how do i fix this?
0 Comments
Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!