Genetic algorithm takes too much time to solve _ only linear objective and constraints
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I am working on a problem and i am trying to solve it with genetic algorithm. my objective function is linear. here is my variables and constraints. ı have 2 different variables: x and y. x: 1296, y:36.
I am using problem based approach to solve it.
I did a test run with only some of the constraints and it took 4 hours to iterate 100 times. Now i have all may constraints and each iteration takes approx. 10 mins. for 100 iterations it will be 16 hours. I am not that patient. I aso lo9oked through the community questions and saw that this is common for nonlinear inequalities and such but i do not have any nonlinear. I am working on a capacitated maximal covering location problem(CMCLP).
Is there a way where i can optimize this time?
0 Commenti
Risposte (1)
Alan Weiss
il 11 Apr 2022
You say that you have a linear objective function and linear and integer constraints.
In that case, you should not use the genetic algorithm. You should use intlinprog. Really, don't use ga for this problem.
Alan Weiss
MATLAB mathematical toolbox documentation
1 Commento
Matt J
il 11 Apr 2022
And, as shown here,
intlinprog does indeed solve the problem very quickly.
Vedere anche
Categorie
Scopri di più su Genetic Algorithm in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!