A problem regarding minimax algorithm

7 Ansichten (letzte 30 Tage)
warkkali
warkkali am 7 Mai 2017
Bearbeitet: Torsten am 8 Mai 2017
I have a problem trying to use fminimax to simultaneously maximize the cylinder volume V and minimize its surface area. So to minimize 2*pi*r*(r+h) while maximizing pi*r^2*h. I have tried the following:
%myFunction
function f = myCylinder(x)
f(2)= 2*pi*x(1)*(x(1)+x(2));
f(1)=-pi*x(1)^2*x(2);
end
%main script
clc;clear all;
nvars=2;
lb=[0.05 0.1 ];
ub=[2 2];
x0 = [2; 2];
[x,fval] = fminimax(@myCylinder,x0,[],[],[],[],lb,ub);
The algorithm just seems to always give the lower bound as the answer to the problem... Can someone help me understand this??
  2 Kommentare
Torsten
Torsten am 8 Mai 2017
Bearbeitet: Torsten am 8 Mai 2017
1. The surface area A of a cylinder is 2*pi*r*h, not 2*pi*r*(r+h).
2. "fminimax" returns the values for r and h for which max{V,A} is minimal. This is the case when r and h are minimal - so the answer that r=0.05 and h=0.1 is correct.
3. The task to minimize surface area while maximizing volume does not make sense. What makes sense is to maximize volume for a given surface area or to minimize surface area for a given volume.
Best wishes
Torsten.
David Goodmanson
David Goodmanson am 8 Mai 2017
The surface area included the end caps.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by