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

54 views (last 30 days)
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 Comments
Torsten
Torsten on 21 Sep 2022
Edited: Torsten on 21 Sep 2022
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 ?

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 21 Sep 2022
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 Comments
Torsten
Torsten on 23 Sep 2022
Edited: Torsten on 23 Sep 2022
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);

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!