Using Linprog to perform a MaxMin optimization.

5 次查看(过去 30 天)
Hi,
I am trying to solve a MaxMin , 2 player zero-sum game kind of problem using linprog function:
Our Professor, wanted us to use that to come up with the MaxMin solution:
I know how to solve LP using linprog, over single objective functions like this:
Non-matlab compatible form:
max: 2x+5y
s.t : x+y <= 1000
x+5y <= 2000
x>= 0; y >=0;
Change it to a form that linprog likes:
min: -2x-5y
s.t : x+y <= 1000
x+5y <= 2000
x>= 0; y >=0;
f = [-2,-5]
A = [1 1; 1 5]
b = [1000 2000]
xright = linprog(f,A,b)
However, for a MaxMin problem, the objective looks like this:
v = min(-3z1+2z2, z1-z2)
min -v
subject to:
some constraints.
How do I represent V in matlab. There are 2 things under consideration separated by a comma min(-3z1+2z2, z1-z2).
For a normal LP problem, I can do it, without any issues , as there is only onle objective being dealt with.
Thanks
  2 个评论
Whitchurch Muthumani
Yes I did.
I did eventually use linprog, but with the
Problem object. In this object I specified my constraints.
I had to set the optimization objection to V, instead of min(-3z1+2z2, z1-z2), and do linprog on it, with additional constraints over V. As mentioned in the answer which I accepted.

请先登录,再进行评论。

采纳的回答

Torsten
Torsten 2022-2-22
min: -v
v <= -3*z1 + 2*z2
v <= z1 - z2
+ additional constraints
  1 个评论
Whitchurch Muthumani
Thank you.
This is the very same approach I came up with.
As you stated, I set the objective to -v and
used the constraints with it.
Additionaly, I learnt about the cvx solver, and used that one.
It gave me the benefit of not having to change the signs, as is the case with linprog.
Both approaches gave the same answer.
Thank you for your help.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by