GA optimization inequality constraints
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello community,
I have been trying to solve a optimization problem for which my inequality constrains are as follows:
Say if X is the solution (1*2000 matrix), my constraint is that every next value for the X matrix should be higher than the previous value. Lets say a is value of X at 1st position (X1) and b is the value at second X2. So constraint is b-a >= 0.01; To write it in terms of less than, since ga takes constraints as A.X<=b, we have (a-b <= -0.01).
But when iam trying to build A matrix and B matrix, when i give negative inputs in B matrix i always get the error: Could not find a feasible initial point.
Can someone help me in - how to define this constraint without using a negative constant value? or is there any other way to do the same? I have been struck in this problem for quite sometime. Please give me any siggestions.
Thanks.
댓글 수: 0
채택된 답변
Matt J
2019년 8월 30일
편집: Matt J
2019년 8월 30일
The construction of the A and b matrices should be,
A=-diff(speye(2000));
b=-0.01*ones(2000,1);
If you have done this, then there is nothing incorrect about the way you have built the constraints, assuming X(i+1)-X(i)>=0.01 are indeed the conditions you want. You should investigate whether the problem truly does have a feasible solution under these constraints and whatever other constraints you have imposed.
댓글 수: 6
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Nonlinear Control에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!