필터 지우기
필터 지우기

Intlinprog returns 0 as the best result

조회 수: 1 (최근 30일)
Mondeep maz
Mondeep maz 2018년 6월 12일
댓글: Mondeep maz 2018년 6월 12일
I have an optimization problem consisting of 48 variables. When used milp or ga it is returning 0 as the best value eventhough i have mentioned the indices for intcon.Is there some sort of tuning that needs to be done ?
  댓글 수: 4
John D'Errico
John D'Errico 2018년 6월 12일
So show what you did. Apparently, you did something wrong. We cannot guess what. Or, maybe you are just interpreting the output incorrectly.
If I had to guess, you have formulated the problem incorrectly, since all solvers seem to generate the same solution. You are solving a different problem than the one you think you are solving. But all we have been told is this is a 48 variable problem, and that at least some variables are constrained to be integer. Could you possibly have set both the lower and upper bounds for your variables to 0? Maybe. How can we read your mind, or see into your computer?
Mondeep maz
Mondeep maz 2018년 6월 12일
lb =zeros(1,48); ub =zeros(1,48); for j=1:length(lb); if T_in(i)==j ub(j:j+P(i))=1; UB(i,:)= ub; end end for m = 1:length(ub) if ub(m)==1 int(m)=m; end end Intcon= int(int~=0); A = 2*ones(1,48); b(i)= round(Ereq(i)); fog = 2*RTP; [s,fval] = intlinprog(fog,[],[],[],A,Ereq(i),lb,UB(i,:));
Here is a part of my code. Just check it if there is anything wrong. The bounds are getting updated at every iteration. So for example for a certain iteration it would look like [0,0,0,0....,1,1,1,1,1...0,0,0]. Tell me if i can do this because without the Intcon part i am getting solutions.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by