GA for Mixed-Integer Nonlinear Programing

조회 수: 2 (최근 30일)
Hoang Trinh
Hoang Trinh 2020년 4월 28일
댓글: Hoang Trinh 2020년 4월 30일
Dear all,
I am having a problem with solving a MINLP with GA solver. It keeps having the message of "Constraint function must return real value". I have double checked all the constraints and they should be fine. But this message still appeared. May I ask whether Matlab 2018b can show the contraint that has a problem? I would really appreciate your help.
Thank you so much,
Kind Regards,
Hoang Trinh,
  댓글 수: 8
Walter Roberson
Walter Roberson 2020년 4월 29일
A(51,55) = 1;
A(51,53) = -1;
That expresses that (1) * x(55) + (-1) * x(53) <= b(51) . b(51) is 0, so you are expressing that x(55)-x(53) <= 0, which is to say that x(55) <= x(53) . But that still allows them to be equal, and when they are equal, you get the division by 0.
Linear constraints are A*x' <= b not A*x' < b.
If you want < then you need to make b(51) negative, even if it is only -realmin()
Hoang Trinh
Hoang Trinh 2020년 4월 30일
I have made some changes like this:
A(51,55) = 1;
A(51,53) = -1;
A(72,56) = 1;
A(72,55) = -1;
with
b(51) = 0.1 ;
b(72) = 0.1 ;
So now, x(55) - x(53) <= 0.1 ; and x(56) - x(55) <= 0.1;
Still, the error has not been fixed. :(

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by