Using "fminimax" in Matlab to solve the Max-Min programming problem
Show older comments
Consider the following function defined in the following picture.

Define a finite set of points as follows:

I want to solve the following programing problem:

My idea is the following:

This programing is the first step of a general programing I am studying at. So it should not give trivial solution like 0 or something like this. However, when I attempted it in Matlab, the solution is not desirable.
The following is my code:
fun = @(x)[-log(max(1,0.1037))+x(1)*log(abs(poly1(0.1037)))+x(2)*log(abs(poly2(0.1037)))...
+x(3)*log(abs(poly3(0.1037)))+...
x(4)*log(abs(poly4(0.1037)));
-log(max(1,0.0259))+x(1)*log(abs(poly1(0.0259)))+x(2)*log(abs(poly2(0.0259)))...
+x(3)*log(abs(poly3(0.0259)))+...
x(4)*log(abs(poly4(0.0259)));
-log(max(1,0.2288))+x(1)*log(abs(poly1(0.2288)))+x(2)*log(abs(poly2(0.2288)))...
+x(3)*log(abs(poly3(0.2288)))+...
x(4)*log(abs(poly4(0.2288)));
-log(max(1,0.0938))+x(1)*log(abs(poly1(0.0938)))+x(2)*log(abs(poly2(0.0938)))...
+x(3)*log(abs(poly3(0.0938)))+...
x(4)*log(abs(poly4(0.0938)));
-log(max(1,0.0917))+x(1)*log(abs(poly1(0.0917)))+x(2)*log(abs(poly2(0.0917)))...
+x(3)*log(abs(poly3(0.0917)))+...
x(4)*log(abs(poly4(0.0917)));
-log(max(1,0.2386))+x(1)*log(abs(poly1(0.2386)))+x(2)*log(abs(poly2(0.2386)))...
+x(3)*log(abs(poly3(0.2386)))+...
x(4)*log(abs(poly4(0.2386)));
-log(max(1,0.2003))+x(1)*log(abs(poly1(0.2003)))+x(2)*log(abs(poly2(0.2003)))...
+x(3)*log(abs(poly3(0.2003)))+...
x(4)*log(abs(poly4(0.2003)));];
A= [];
b= [];
Aeq = [];
beq = [];
x0 = [0,0,0,0];
lb = [0,0,0,0];
up = [1000,1000,1000,1000];
[x,fval] = fminimax(fun,x0,A,b,Aeq,beq,lb,ub)
where in the code:

The solution that Matlab provides is the following:

I don't quite understand why this happens. Is there anything wrong in my idea or code? Thank you so much for your help!
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
