Genetic algorithm takes too much time to solve _ only linear objective and constraints
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Alan Weiss
2022-4-11
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 个评论
Matt J
2022-4-11
And, as shown here,
intlinprog does indeed solve the problem very quickly.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!