How to solve an optimization problem with the objective function is a matrix ?

24 ビュー (過去 30 日間)
Majid
Majid 2022 年 9 月 21 日
コメント済み: Majid 2022 年 9 月 23 日
Hello everyone!
I have no idea how to solve optimization problems.
I have an objective function which is a binary matrix, should this matrix be defined (known) or not?
knowing that I looked for examples but I didn't find the relevant one with my problem.
I would be grateful if you could help me!
  2 件のコメント
Torsten
Torsten 2022 年 9 月 21 日
編集済み: Torsten 2022 年 9 月 21 日
The objective function of a usual optimization problem returns a scalar value that is attempted to be made as small or as large as possible.
So what is this scalar value for your binary matrix ?
Majid
Majid 2022 年 9 月 21 日
sorry! i didn't understand your question. could you please explain more!

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

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 9 月 21 日
Each element of the matrix is effectively a separate objective, so in order to do this you would need to use a multi-objective optimizer.
You can use Problem Based Optimization https://www.mathworks.com/help/optim/problem-based-approach.html . You would probably create optimization variables that are marked as integers with lower bound 0 and upper bound 1. You would set up whatever constraints are appropriate. You would set up a matrix objective . solve() should then notice that gamultiobj() is needed to minimize the problem.
Note that there is a difference between a problem in which the best location is a binary matrix, compared to a problem in which the objective is a binary matrix. If the inputs are all binary and a matrix, but the output were scalar (for example an economic dispatch cost) then there are a number of different minimizers, but there are only a quite small number that can deal with there being multiple objectives (each element of the output matrix being a different objective.)
  53 件のコメント
Torsten
Torsten 2022 年 9 月 23 日
編集済み: Torsten 2022 年 9 月 23 日
Then replace
for i = 1:n
for j = 1:m
icount = icount + 1;
Aineq(icount,(i-1)*m+j) = D(i,j);
bineq(icount) = w;
icount = icount + 1;
Aineq(icount,(i-1)*m+j) = E_pi(i,j);
bineq(icount) = E_total - E_zi;
end
end
by
for i = 1:n
for j = 1:m
if D(i,j) > 0
icount = icount + 1;
Aineq(icount,(i-1)*m+j) = D(i,j);
bineq(icount) = w;
end
if E_pi(i,j) > 0
icount = icount + 1;
Aineq(icount,(i-1)*m+j) = E_pi(i,j);
bineq(icount) = E_total - E_zi;
end
end
end
Aineq = Aineq(1:icount,:);
bineq = bineq(1:icount);
Majid
Majid 2022 年 9 月 23 日
@Torsten nothing was change, i didn't understand where is the problem?

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

カテゴリ

Help Center および File ExchangeLinear Programming and Mixed-Integer Linear Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by