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!