ChE 356
Homework #2
due 2/2/07
1.In order to deal with chronic knee pain after a challenging round of golf, Dr. Edgar takes special pills (reddies-R and greenies-G) supplied by his personal trainer (?). The ingredients in each pill (R&G) and the minimum grains required to relieve knee pain are as follows:
RGminimum grains to relieve pain
grains aspirin21020
grains codeine3212
grains glucosamine4624
The goal is to decide how many R and G pills must be taken to reach the “feel good” state, by minimizing the total number of pills (R+G) and avoiding an overdose. Set up the objective function and constraints to solve this optimization problem and try to solve it. Note R and G are integers.
The optimization function may be formulated as follows:
Subject to
Alternatively, the problem may be formulated without using additional variables as follows:
Subject to
The two problem formulations are algebraically equivalent.
We can easily set up an Excel spreadsheet to solve this problem using simple trial and error. The feasible region is given in the Excel spreadsheet. We choose a feasible solution (say 4 reddies and 3 greenies) and systematically reduce the reddies and greenies until we meet a constraint on the number of grains. In doing this, we find there are two solutions which minimize the total number of pills at 5. We can choose 3 reddies and 2 greenies (giving 26 aspirin, 13 codeine, and 24 glucosamine grains) or 2 reddies and 3 greenies (giving 34 aspirin, 12 codeine, and 26 glucosamine grains). In the first solution, the limiting constraint is the number of glucosamine grains, while in the second solution, the limiting constraint is the number of codeine grains.
2.2.7 a, b, c. Check log-log and semi-log correlations as well as polynomials.
The model fits are given in the Excel spreadsheet. My suggestion as to the best fit is given below. Note that my answers are not based on the best R2 value, as we could fit an nth degree polynomial (where n is the number of data points) to the data and get a perfect fit. Rather, I based my answers on the simplest model that gave the best fit.
a. Linear model
b. Exponential model
c. Power law model
3.2.13.
The procedure for finding the coefficients is as follows:
Step 1: Apply least squares as the objective function to get the following problem:
Subject to:
Step 2: Use a nonlinear programming code to solve the problem.
The solution to the optimization problem is given in the Excel spreadsheet, though it was not necessary to solve for the coefficients to get full credit.