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?

回答(1 个)

Alan Weiss
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

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by