フィルターのクリア

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 Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by