Length of lower bounds is < length(x); filling in missing lower bounds with -Inf. Problem is unbounded

29 ビュー (過去 30 日間)
Hi,
I am trying to estimate $a_{j}$ that maximize the following objective function
where ; is unknown vector of 1 X p , is a matrix of p X t
p = 4 , t= 249 observations.
Update the question ::::
The idea is to sum the rows in $A_t $ then maximize the sum over the vector of a_j.
I used the following code :
A=readtable('4times6249datacsv');
A=table2array(A);
Aeq =ones(4,996);
lb = zeros(1,4) ;
beq =ones(1,4);
x = linprog(-A, [], [], Aeq, beq, lb, []);
I received the following :
Warning: Length of lower bounds is < length(x); filling in missing lower bounds with -Inf.
> In checkbounds (line 33)
In linprog (line 241)
Problem is unbounded. what does that mean ? Any suggestion to improve the code will be appreciated
  2 件のコメント
Torsten
Torsten 2023 年 2 月 2 日
Your problem formulation is weird.
Multiplying a vector of dimension 1xp with a matrix of dimension pxt gives a vector of dimension 1xt.
So what do you mean by "maximize" if the object you want to maximize is a vector ?
Az.Sa
Az.Sa 2023 年 2 月 3 日
編集済み: Az.Sa 2023 年 2 月 3 日
The idea is to maximize the sum of the rows in $A_t$ .So we sum the rows then maximize the sum over the vector of a_j. I hope this is clear now

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

採用された回答

Matt J
Matt J 2023 年 2 月 2 日
編集済み: Matt J 2023 年 2 月 2 日
A=readtable('4times6249datacsv');
A=table2array(A);
f=sum(A,2);
Aeq =ones(1,4); beq = 1;
lb = zeros(4,1) ;
a = linprog(-f, [], [], Aeq, beq, lb);
  11 件のコメント
Az.Sa
Az.Sa 2023 年 2 月 3 日
編集済み: Az.Sa 2023 年 2 月 3 日
Thank you,
if I want to remove and keep , so the change in my code will be : removing lb = zeros(4,1) only ? I tried to do that but the broblem will be unbounded. I am looking to rule out the corner solution
Matt J
Matt J 2023 年 2 月 3 日
You can't rule out the corner solution, because it is the only solution, assuming the f(j) have a unique maximal element f(jmax). The only reason to expect a different solution is if there are further requirements on a(j) that you haven't yet put in your constraints.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by