how to make population pool generated as request in GA
1 view (last 30 days)
Show older comments
Urgent, There are 256 binary variables and I want GA can generate population pool follow these constraints: 1.For variables x(1) to x(256), once these is value "1" of variables, it must be at least 12 continuous. 2.For the variables whose value is "0", it must be at least 8 continuous, except the "0"s before first"1" and the "0"s after last"1". For example, x(1):x(256) is (00111111111111000000001111111111111000000000........1111111111111000) 3. How to limited the numbers of variable whose value is "1"?
The reason why I want to generate population pool like this is there are 2^256 combinations, that's too much, and I just need the solutions that follow the constraints described above. Since that, in my objective function I code those criterion and give a extreme high value,like 10^20, to the dependent variable(y), if the solution is not what I need, to make the GA will not consider this solution when it minimizing the objective function. But the problem is, comparing with the all solution combinations, the solutions that follow the constraints is a very small part of it. So, even the population size is 10000, in every generation, there is no required solution has been generated, the result maintain the extreme high value.
0 Comments
Answers (1)
Alan Weiss
on 22 Jan 2015
I suggest that you help GA by providing a custom initial population. It is not difficult to generate an initial population that satisfies your constraints. Do so, then let GA do the rest. Look at the documentation for the InitialPopulation option.
Alan Weiss
MATLAB mathematical toolbox documentation
See Also
Categories
Find more on Genetic Algorithm 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!