How to avoid repeating variable in genetic algorithm?

2 views (last 30 days)
I am using genetic algorithm for optimizing my problem with 8 variable. Also my answer lies in between 1 to 150.
I am expecting my answer is to be 8 individual integers lies between 1 to 150. But most of the times its give the solution, which has the same integer repeating more than twice.
Someone please help me to avoid this condition. My intrest is to get 8 different integer as a solution.
Note: I am using intcon. Because all my variables are integers.
Thanks.

Answers (0)

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!