How can I add constraint on variable in genetic algorithm which can take both discrete and continuous values.
Ältere Kommentare anzeigen
Hi everyone,
I am trying to solve an optimization problem using genetic algorithm. I am using the standard function "ga" for this. In the problem, the decision variable can take both discrete and continous values.
For example: Let a be the decision variable, it can take following values
a = {0, 1, 2, 6, 7,} and 45 <= a <= 85.
How can I represent this in [lb <= a <= ub]?
2 Kommentare
Sky Sartorius
am 25 Feb. 2020
Can you tell us more about the application? Does this decision variable represent anything physical in the real world?
Himanshu Nagpal
am 25 Feb. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Genetic Algorithm finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

