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!