Root LP problem is unbounded

조회 수: 3 (최근 30일)
Daniele Di Lauro
Daniele Di Lauro 2024년 4월 9일
편집: Catalytic 2024년 4월 9일
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
Daniele Di Lauro
Daniele Di Lauro 2024년 4월 9일
I just uploaded the file .m
Matt J
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
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);

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by