Root LP problem is unbounded
3 ビュー (過去 30 日間)
古いコメントを表示
I've been trying to resolve this error for several hours, but I'm probably missing something. I didn't post the construction of the constraint matrices because I believe the problem concerns the lower bound and upper bound of the variables (also because I should have posted 300 lines of code)
A = [A_P_ch;A_P_disch;A_SOC;A_del_L;A_J_soc;A_J_P_batt;A_P_in];
b = [b_P_ch;b_P_disch;b_SOC;b_del_L;b_J_soc;b_P_batt;B_P_in];
intcon = [2*(Hp+1)+2*Hp:4*(Hp+1)+4*Hp]; %sl1 sl2 zita_ch zita_disch
up=inf*ones(1,(Hp*(8+(2*n)))+n+2);
up(2*(2*Hp+1):4*(2*Hp+1)) = 1; %SL1/2 zit_ch zita_disch
up(4*(2*Hp+1)+2*Hp:4*(2*Hp+1)+3*Hp) = 0.6; %rho
up(2*(Hp+1):2*(Hp+1)+2*Hp) = 0.1; %epsilon e theta
x0=1*ones(size(obj1));
lw = zeros(1,8*Hp+4*(Hp+1));
mat = [];
z = [];
[z,fval,exitflag,output] = intlinprog(obj1,intcon,A,b,A_eq,b_eq,lw,up);
3 件のコメント
Matt J
2024 年 4 月 9 日
It's not what I suggested and it doesn't help. Running the mfile does not generate the matrices, but rather the error message,
Not enough input arguments.
Error in myFun (line 192)
b_soc1 = ones(Hp,1)*(soc_0-0.3);
回答 (1 件)
Catalytic
2024 年 4 月 9 日
編集済み: Catalytic
2024 年 4 月 9 日
Nobody can help you troubleshoot the error, because it is not a coding error. It is an error of problem definition. You have provided an LP that intlinprog cannot solve. Nobody has any way of knowing the actual LP you intended to solve, or if it even has a solution.
The only recommendation that can be made is that you make all your up(k) components finite, even if it means specifying a super-conservative upper bound -
up=min(up, 1e8);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Numerical Integration and Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!