How is Custom Population Creation Function Evaluated by Genetic Algorithm
3 views (last 30 days)
Show older comments
In my work I am using a custom population Creation Function in Genetic Algorithm using a Double Vector Population. The created population is always a nice whole number.
Now, when i run the creation function by hand i am able to see nice figures but when i run it in GA it produces values which are of decimal value.
Furthermore the values which are created are way beyond what the creation function can provide, say the biggest value i can create in the function is 200.. What appears in GA's iterations are populations are of values 350 - 400 and even larger.
This may be possible due to the crossover, mutation, etc. But how could i control the created values to stay within the limits i have set within my creation function?
I have tried adding Upper & Lower Bounds to the problem but the bounds seem to be disregarded as well...
How could i now enforce my constraints? any suggestions please?
P.S. I am using custom population as it really is customized as each variable created relies on another variable and will have to conform to a certain value when certain variables are added together.
0 Comments
Accepted Answer
Alan Weiss
on 20 Feb 2014
Edited: Alan Weiss
on 20 Feb 2014
Basically, if you have a custom population, then you are responsible for making sure your mutation and crossover functions lead to a population that satisfies any constraints you have. If you use the usual double population type, then you can set bounds, linear constraints, and nonlinear constraints, and ga will make sure they are satisfied. So I strongly recommend that you try to fit your problem into the usual framework. I am reasonably certain that you can, and it will make your life much easier if you use our tools rather than programming everything yourself.
Alan Weiss
MATLAB mathematical toolbox documentation
0 Comments
More 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!