A problem regarding minimax algorithm

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

Torsten
Torsten 2017년 5월 8일
편집: Torsten 2017년 5월 8일
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 2017년 5월 8일
The surface area included the end caps.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Optimization에 대해 자세히 알아보기

질문:

2017년 5월 7일

편집:

2017년 5월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by