フィルターのクリア

Error using linprog (line 369)

3 ビュー (過去 30 日間)
Duy Dang
Duy Dang 2023 年 12 月 6 日
コメント済み: Duy Dang 2023 年 12 月 7 日
Dear all,
I tried to run the linear optimization on my computer (Matlab 2021a) and receive the following error message. Hope someone can help. Many thanks in advanced.
Error using linprog (line 369)
LINPROG has stopped because it encountered an internal error. We are sorry for the inconvenience.
Please contact technical support for assistance with your problem, quoting the code "-1000@-1000".
I use the same code and run on onother computer (Matlab 2023b) and receive another error message
Linprog stopped because it exceeded its allocated memory.
My code is basically like that:
A_s is matrix size 14844 x 14854 double
I_s is matrix of 1 and 0, same size as A_s
f_s is vector size 14844 x 1 double
e_s is row vector size 14854 x 1 double
n = 14839
n = 14839
e_s = ones(1,14854);
I_s = zeros(n+5,n+15);
I_s(1:n,1:n) = eye(n);
for i=1:5
I_s(n+i,n+3*(i-1)+1)= 1;
I_s(n+i,n+3*(i-1)+2)= 1;
I_s(n+i,n+3*(i-1)+3)= 1;
end
lb = zeros(14854,1);
Aieq = zeros(2,14854);
Aieq(1,14840:14842) = [-1 -1 -1]*(1/(16691*365));
Aieq(2,14840:14842) = [-1 -1 -1]*(6/16691);
Aieq(2,14852:14854) = [1 1 1]*(1/17605);
Bieq = zeros(2,1);
Bieq(1,1) = -1.48;
x_s = linprog(e_s,Aieq,Bieq,(I_s - A_s),f_s,lb,[]);
Unrecognized function or variable 'A_s'.

採用された回答

Torsten
Torsten 2023 年 12 月 6 日
編集済み: Torsten 2023 年 12 月 6 日
A_s and f_s are not specified in your code.
But without running your code, I think your problem exceeds your available computer RAM.
I don't know if linprog accepts sparse matrices as input. Read about it in the documentation.
  1 件のコメント
Duy Dang
Duy Dang 2023 年 12 月 7 日
Thanks Torsten, I think you are right. I am trying to reformulate to reduce the size of the matrix

サインインしてコメントする。

その他の回答 (1 件)

Steven Lord
Steven Lord 2023 年 12 月 6 日
Please send your code and data to Technical Support directly using this link so the development staff can determine the cause of this internal error. You can either directly include a link to this thread in your message to Support or you can quote the code "-1000@-1000" as the error message requested.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by