How to define discrete variables in GA
Show older comments
Hi
I need to optimize a function which has 8 variables by GA tool (genetic algorithm): beta(i) and psi(i) where i:1:4

How can i define discrete variables in GA (genetic algorithm).
I use GA tool.
Answers (1)
Alan Weiss
on 29 Apr 2021
1 vote
Take a look at the Mixed Integer ga Optimization topic, and in particular the example Solving a Mixed Integer Engineering Design Problem Using the Genetic Algorithm, which shows how to use discrete non-integer variable constraints.
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!