Design optimization of material cost of water tank

조회 수: 3 (최근 30일)
Kondiik
Kondiik 2013년 10월 4일
답변: Walter Roberson 2013년 10월 5일
I tried several ways to address this problem. I failed so would like to ask you guys.
One way to improve engineering designs is by formulating the equations describing the design in the form of a minimization or maximization problem. This approach is called design optimization. Examples of quantities to be minimized are energy consumption and construction materials. Items to be maximized are useful life and capacity such as the vehicle weight that can be supported by a bridge. In this project, we consider the problem of minimizing the material cost associated with building a water tank. The water tank consists of a cylindrical part of radius r and height h, and a hemispherical top. The tank is to be constructed to hold 500 meter cubed when filled. The surface area of the cylindrical part is 2*pi*rh, and its volume is pi*r^2. The surface area of the hemispherical top is given by 2*pi*r^2, and is volume is given by 2*pi*r^3/3. The cost to construct the cylindrical part of the tank is $300 per square meter of surface area;the hemispherical part costs $400 per square meter. Use the fminbnd function to compute the radius that results in the least cost. Compute the corresponding height h.
  댓글 수: 1
Marc
Marc 2013년 10월 4일
Please do not quote homework problems. You need to determine your function that you want to minimize/maximize. Since all of the Matlab functions minimize functions, to maximize, you simply take the negative of your objective function.
Take what you said and formulate it into some mathematical equations that give you cost as a function of radius.
If you can get that far, I'll help you with the rest.
Good luck

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

답변 (2개)

Kondiik
Kondiik 2013년 10월 5일
I got the right answer but it is very chaotic. I created bunch of function. I wonder if I can created one function?... let's name it ONEFUN
function R = findR(x)
h = (1500-2.*pi*x.^3)./(3.*pi.*x.^2);
R = 2.*pi.*x.*(h) + 2.*pi.*x.^2+pi.*x.^2;
function H = findH(x)
H = (1500-2.*pi*x.^3)./(3.*pi.*x.^2);
function [Cc, Chs, Tc] = Costs(r,h) % Cc - Cost of Cylinder, Chs - Cost of Hemishpere,
%Tc - Total Cost
Cc = ((2.*pi.*r.*h) + (pi.*r.^2)).*300;
Chs = (2.*pi.*r.^2).*400;
Tc = Cc+Chc;
I thought of using switch, response but I have no idea how to do it.
function Anwsers
response = input('Type "find r", "find h", "costHS", "costC", "total": ','s');
response = lower(response);
switch response
case 'find r'
Radius = fminsearch(@ONEFUN, [1]);
case 'find h'
Hight = findH(r)
case 'costHS'
case 'costC'
case 'total'
otherwise
disp('You have not entered a proper choice.')
end
I would appreciate and help

Walter Roberson
Walter Roberson 2013년 10월 5일
You need to use either a function or script to call fminbnd and you need to use a function (possibly an anonymous one) that fminbnd will evaluate to determine the cost for any one proposed radius.
The homework problem directs you to always find the radius and corresponding height. It does not ask you to be able to find anything else, so there is no need for asking the user what kind of data they want to solve for.

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by