ga question_error "Could not find a feasible initial point"
이전 댓글 표시
I'm coding a small example of a huge problem. I think I did all the steps correctly but I get this error: "Could not find a feasible initial point" I searched and I saw I should check to not have linear constraints, and if the way I'm using ga is correct. I checked both of those things but they seem correct, is there anyone who knows what else should I check? or what else can make the problem? This is a part of my codes:
Aeq=[];
Beq=[];
nonlcon=@nlcon;
UB=[1;1;1;1;1; inf(40,1); 1;1; 1;1;1;1;1;1;1;
inf(40,1); 1;1; 1;1;1;1;1;1;1];%vector with upper bound
LB=zeros(54+49,1);%vector with lower bound
nvars=5+((8*5)+2+7)*2;
IntCon=[1,2,3,4,5, 46,47, 48,49,50,51,52,53,54, 95,96, 97,98,99,100,101,102,103];
x=ga(@obj_function,nvars,A,B,Aeq,Beq,LB,UB,nonlcon,IntCon);
댓글 수: 7
Stephan
2018년 9월 11일
Can you show us
A
b
@nlcon
?
Azam Boskabadi
2018년 9월 11일
편집: Walter Roberson
2018년 9월 11일
Walter Roberson
2018년 9월 11일
To check: you have 80 variables with lower bound 0 and upper bound infinity, and you have 23 decision variables that are either 0 or 1 ?
You might be better off running all 2^23 combinations as separate problems, each with the value of the decision variables fixed, so that you get away from using intcon.
Stephan
2018년 9월 12일
Im not very sure if it works, but maybe it is worth a try:
If you know at least on feasible constellation for your problem you could use the InitialPopulationMatrix option. This has as many columns as decision variables and as much lines as possible feasible States you know. Max number of lines is population size but also one line is possible. Then ga should have a feasible initial point in search space.
The only question is:
Do you have such a point?
Walter Roberson
2018년 9월 12일
The InitialPopulationMatrix should have as many columns as you have variables (103), not as your decision variables (23). "decision variables" refers to binary variables, 0 for No, 1 for Yes.
Stephan
2018년 9월 12일
Thanks for the clarification Walter.
Azam Boskabadi
2018년 9월 12일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!