Return to Home

Here are some example optimization problems......

1. This is the shelf problem from class. We are trying to choose the angle θ that maximizes the load capacity P of the shelf, noting that the length of the shelf (d) is fixed and the diagnoal support is prone to failure by buckling.

Here is a matlab script, which plots the function, uses the Max command to optimize, and also proves that this works using calculus.

Here is the same problem solved in excel. First, look at the unoptimized file. Here's the optimized file after running the solver.


2. This is a simple example illustrating how to minimize the surface area of a soda can, subject to a volume constraint. The two parameters are height and radius. We encode them in a 2D vector x, with the convention that height=x(1) and radius=x(2).

area(x) computes the surface area of a can. (area.m can be found here)
volume(x) computes the volume of a can. (volume.m can be found here)

To find the best can with a volume of 350cm^3 you can run:
>> [x,fval] = minc(@area,[5 2],@volume,'=',350);

(You'll need minc. Minc is here!)

The solution has height=7.6cm and radius=3.8cm.

The excel file for this same problem can be found here - try running the solver, and you should get the following optimized excel file.

3. Now try optimizing the volume of aluminum needed for a soda can, subject to three constraints:

The can must hold 12oz. (355cm3) of soda: πr^2h = 355cm3
The empty can must withstand a 900N axial load: t >= 0.006cm
The can must withstand 300kPa of pressurization: t >= rx10^(-3)

Our optimization function is:

Valum=2πr^2*2t + 2πrht = 2πtr(2r+h)

Here is a matlab script, where the functions are all contained in one script.

Here is the same problem solved using excel. Try running the solver and see if your answer matches that found using excel!

Your solution should be:   t=0.006cm, r=3.0456cm, h=12.1824cm.

4. Here is an overview of the email path optimization problem that we set up in class. Try running this excel spreadsheet with the solver, knowing that the y-locations can vary to find the optimal (min) time. You should also constrain the beginning and endpoints to (0,0) and (800,600) miles, respectively.