joint optimization in genetic algorithm
Show older comments
I'm trying to use ga for optimizing 3 parameters simultaneously. I have to create a chromosome that consist of 3 section, first for the first parameters, second for second & third for third. My chromosome consist of 96 gene, 40 genes for the first parametrs, 40 genes for the second & 16 for the third. So create & cross over & mutate functions must work on each of these three section separately. Is my assumption true? & I don't know how to change my these 3 function so the ga converge.
Answers (1)
Alan Weiss
on 2 Aug 2016
Are you using ga from Global Optimization Toolbox? Or do you have a different genetic algorithm solver?
For Global Optimization Toolbox, your control variables (the things that ga alters to look for an optimum) must all be in one row vector. For example, if x has 40 components, y has 45 components, and z has 18 components, then you can write the indices of the components as
ix = 1:40;
iy = 41:85;
iz = 86:103;
Then if sol is your solution vector,
x = sol(ix);
y = sol(iy);
z = sol(iz);
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
2 Comments
liz
on 2 Aug 2016
Alan Weiss
on 2 Aug 2016
You can read about the mutation and crossover functions here. Basically, mutation functions work on one component at a time, so I don't think it should matter to you exactly which component is selected. Crossover functions work on a pair of parents, but separate their influence by component, so they don't mix up unlike components.
In other words, both mutation and crossover work differently on what you call the different sections.
Alan Weiss
MATLAB mathematical toolbox documentation
Categories
Find more on Problem-Based Optimization Setup 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!