Using ga with integer constraints: Constraints not close to being met.
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello, I am trying to run a fairly simple optimization problem.
The objective is to minimize cost. The program yields results, but does not get close at all to meeting one simple equality constraint. I know that equality constraints can't be used with IntCon, so I have implemented the constraint with two inequality constraints (less than or equal to and more than or equal to).
I have attached the code. The main thing I'm looking at is the vector "Diff" which shows the difference between each element in what would be the b_eq constraint and the sum of the corresponding A_eq element. I would prefer each element in the "Diff" vector to be zero or VERY close to zero. However, in some places the value is as high as +/- 30. This is unacceptable for me.
Is there anything I can do so that the constraint is met much better?
Thanks in advance!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
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!