Professional Documents
Culture Documents
Ice Cream
Cola
Cheese Cake
400
200
150
500
Chocolate
Sugar
Fat
Cost
$0.50
$0.20
$0.30
$0.80
Calories
The objective is to find a minimum-cost diet that contains at least 500 calories, at least
6 grams of chocolate, at least 10 grams of sugar, and at least 8 grams of fat.
Brownies
Ice Cream
Cola
Cheese Cake
DECISION VARIABLES
2
3
Eaten
Brownies
Ice Cream
Cola
Cheese Cake
Brownies
Ice Cream
Cola
Cheese Cake
DECISION VARIABLES
2
3
Eaten
4
5
OBJECTIVE FUNCTION
6
7
Eaten
=B3
=C3
=D3
=E3
Cost
50
20
30
80
10 Total
740
12 CONSTRAINTS
13
14 Calories
10
Totals
Required
400
200
150
500
=SUMPRODUCT($B$7:$E$7,B14:E14) >=
500
15 Chocolate
=SUMPRODUCT($B$7:$E$7,B15:E15) >=
16 Sugar
=SUMPRODUCT($B$7:$E$7,B16:E16) >=
10
17 Fat
=SUMPRODUCT($B$7:$E$7,B17:E17) >=
Cola
Cheese Cake
Totals
12 CONSTRAINTS
13
14 Calories
11
Required
400
200
150
500
4850
>=
500
15 Chocolate
>=
16 Sugar
38
>=
10
17 Fat
42
>=
Ice Cream
0
Cola
1
Cheese Cake
7
Ice Cream
0
20
Cola
1
30
Cheese Cake
7
80
Ice Cream
200
2
2
4
Cola
150
0
4
1
Cheese Cake
500
0
4
5
Totals
4850
9
38
42
>=
>=
>=
>=
Required
500
6
10
8
13
14
15
16
17
-OR-
The Change button allows you to modify a constraint already entered and Delete
allows you to delete a previously entered constraint. If you need to add more
constraints, choose Add.
18
Ice Cream
3
Cola
1
Cheese Cake
0
Ice Cream
3
20
Cola
1
30
Cheese Cake
0
80
Ice Cream
200
2
2
4
Cola
150
0
4
1
Cheese Cake
500
0
4
5
Totals
750
6
10
13
>=
>=
>=
>=
Required
500
6
10
8
<=
<=
<=
<=
<=
<=
Maximum
4
2
2
20
10
30
Tabouleh
30
Tabouleh
30
4.5
Tabouleh
0.067
0.040
0.033
Totals
4.000
2.000
1.667
8
6
30
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.