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!