Overview of Optimization Models: Handout #2
Overview of Optimization Models: Handout #2
Mathematical Models
Planes can carry a total volume for supplies that does not exceed
6000 cubic feet. Each water bottle is 1 cubic foot and each medical Summary of the model:
kit also has a volume of 1 cubic foot. With x still representing the
number of water bottles and y the number of medical kits, write an
inequality that describes this constraint. Max z =10x+ 6y
Subject to: 20x+ 10y ≤ 80000
Solution: Because each plane can carry a volume of supplies
that does not exceed 6000 cubic feet, we have x+ y ≤ 6000
The total volume of The total volume of must be less than 6000 x ≥ 0 and y ≥ 0
the water bottles plus the medical kits or equal to cubic feet.
lx + ly < 6000.
Each bottle is Each kit is
1 cubic foot. 1 cubic foot.
Constraint 1 Each week, no more than 100 hours of The coefficients of the constraints are often called the
finishing time may be used. technological coefficients.
If a decision variable xi can only assume a nonnegative values, we 2 x1 + x2 ≤ 100 (finishing constraint)
Example 4:
Solution:
How many tonnes of regular and premium gas to
produce in order to maximize weekly profit? Let x1 = 1 tonne of regular gas
x2 = 1 tonne of premium gas
Products
Resource Regular Premium Resource Maximize Z = 150x1 + 175x2
Availability subject to
Raw gas 7 m3/tonne 11 m3/tonne 77 m3/week 7x1 + 11x2 ≤ 77 (material constraint) (1)
Production 10 hr/tonne 8 hr/tonne 80 hr/week 10x1 + 8x2 ≤ 80 (time constraint) (2)
time x1 ≤ 9 (regular gas storage) (3)
Storage 9 tonne 6 tonne x2 ≤ 6 (premium gas storage) (4)
x1, x2 ≥ 0 (positivity) (5, 6)
Profit $150/tonne $175/tonne
6x1 + 4x2 < 24 (raw material M1) Maximize z = 5 x1 + 4 x2 (total daily profit)
- Variables x1 and x2 cannot assume negative - Objective and the constraints are all linear functions in this
values, example.
so x1 > 0 , x2 > 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
49 50
Example 7:
Suppose that a farmer has a piece of farm land, say A square If we denote the area planted with wheat and barley
kilometers large, to be planted with either wheat or barley or
with x1 and x2 respectively, then the optimal number
some combination of the two. The farmer has a limited
of square kilometers to plant with wheat vs. barley
permissible amount F of fertilizer and P of insecticide which
can be expressed as a linear programming problem:
can be used, each of which is required in different amounts per
unit area for wheat (F1, P1) and barley (F2, P2). Let S1 be the
selling price of wheat, and S2 the price of barley.
To define the decision variables that determine product maximize the total contribution that the two products
Example 9:
We can now state the entire model, made complete with the The Crandon Manufacturing Company produces two principal product
lines, a portable circular saw and a precision table saw. There are two
definitions of variables. crucial operations: fabrication and assembly. Maximum market demand
next year is 3500 saws per month for both products. The average
Maximize: Z= 34x1 + 40x2 contribution to profits and overhead is $900 for each circular saw and $600
for each table saw.
4x1 + 6x2 ≤ 48 Management wants to determine the best product mix for the next year so
2x1 + 2x2 ≤ 18 as to maximize contribution to profits and overhead. Also, it is interested in
Subject to:
2x1 + x2 ≤ 16 the payoff of expanding capacity or increasing market share.
x1 ≥ 0 and x2 ≥ 0
Resource Circular Saw Table Saw Maximum Capacity
where
Fabrication 2 hrs/month 1 hrs/month 4,000 hrs/month
x1 = amount of type 1 pipe to be produced and sold next week, measured in
100-foot increments Assembly 1 hrs/month 2 hrs/month 5,000 hrs/month
x2 = amount of type 2 pipe to be produced and sold next week, measured in
100-foot increments
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
59 60
Solution: Example 10: Product Mix Problem
Definition of Decision Variables
Fertilizer manufacturing company, 2 types of fertilizer
x1 = number of circular saws produced and sold per month Type A: high phosphorus
x2 = number of table saws produced and sold per month
Type B: low phosphorus
Formulation Tons Required/ ton of Fertilizer Maximum amount
Maximize: Z=900x1 + 600x2 Item available per day
Type A Type B
Subject to: Urea 2 1 1500
2x1 + 1x2 ≤ 4,000 (Fabrication)
Potash 1 1 1200
1x1 + 2x2 ≤ 5,000 (Assembly)
1x1 + 1x2 ≤ 3,500 (Demand) Rock Phosphate 1 0 500
x1, x2 ≥0 (Nonnegativity)
Net profit per ton 15 10
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
61 62
Solution:
Daily production of Type A: x tons Limited supply of raw materials per day:
Type B: y tons
Urea: 2x + y ≤ 1500
Solution:
A Product Mix Example Data Decision variables:
x1 = sweatshirts, front printing
x2 = sweatshirts, back and front printing
Processing Cost Profit x3 = T-shirts, front printing
Time (hr) ($) ($) x4 = T-shirts, back and front printing
Per dozen per dozen per dozen
Objective function:
Sweatshirt - F 0.10 36 90 maximize Z = $90x1 + 125x2 + 45x3 + 65x4
Model constraints:
Sweatshirt – 0.25 48 125
B/F 0.10x1 + 0.25x2+ 0.08x3 + 0.21x4 72 hr
3x1 + 3x2 + x3 + x4 1,200 boxes
T-shirt - F 0.08 25 45
$36x1 + 48x2 + 25x3 + 35x4 $25,000
- Canned catfood, Meow Chow; dogfood, Bow Chow. c (cereal), and j = m (Meow chow) and b (Bow Chow).
Step 2: Formulate the Objective Function
- Ingredients/week: 600 lb horse meat; 800 lb fish; 1000 lb cereal. maximize Z = $0.05(xhm + xfm + xcm) + 0.06(xhb + xfb + xcb)
- Recipe requirement: Meow Chow at least half fish; Bow Chow Step 3: Formulate the Model Constraints
at least half horse meat. Amount of each ingredient available each week:
xhm + xhb 9,600 ounces of horse meat
- 2,250 sixteen-ounce cans available each week. xfm + xfb 12,800 ounces of fish
-Profit /can: Meow Chow $0.80; Bow Chow $0.96. xcm + xcb 16,000 ounces of cereal additive
Recipe requirements:
- How many cans of Bow Chow and Meow Chow should be Meow Chow xfm/(xhm + xfm + xcm) 1/2, or, - xhm + xfm- xcm 0
produced each week in order to maximize profit? Bow Chow xhb/(xhb + xfb + xcb) 1/2, or, xhb- xfb - xcb 0
Can content constraint: xhm + xfm + xcm + xhb + xfb+ xcb 36,000 ounces
maximize Z = $0.05 xhm+ 0.05 xfm+ 0.05 xcm + 0.06 xhb + 0.06 xfb + 0.06 xcb Background: Petroleum Refinery
Objective: best product mix [how much of each petrol, oil to sell]
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
71 72
The data for the Blending Problem Solution:
Step 1: The decision variables
Raw OcR Available amount Cost/barrel Sale price
oil (barrels/day) xij = barrels/day of oil i ( i = 1, 2, 3, or 4)
to make petrol j (j = 1, 2, or 3)
1 68 4000 31.02 36.85
2 86 5050 33.15 36.85
3 91 7100 36.35 38.95
4 99 4300 38.75 38.95
Total premium petrol per day = x11 + x21 + x31 + x41
Petrol Type Min OcR Selling Price Demand
(barrels/day) 68x11 + 86x21 + 91x31 + 99x41
Its Octane Rating: ≥ 95,
1 (Premium) 95 45.15 ≤ 10,000 x11 + x21 + x31 + x41
b) Can’t use more oil than we have: (c) The demand constraints:
Complete model
Example 14: A Transportation Example
Maximize:
45.15(x11 + x21 + x31 + x41) + 42.95(x12 + x22 + x32 + x42) + 40.99(x13 + x23 + x33 + x43) +
Warehouse supply of televisions sets: Retail store demand for television sets:
36.85(4000 – (x11 + x12 + x13)) + 36.85 (5050 – (x21 + x22 + x23)) +
1- Cincinnati 300 A - New York 150
38.95 (7100 –(x31 + x32 + x33)) + 38.95 (4300 – (x41 + x42 + x43))
2- Atlanta 200 B - Dallas 250
Subject to:
3- Pittsburgh 200 C - Detroit 200
68x11 + 86x21 + 91x31 + 99x41 - 95(x11 + x21 + x31 + x41) ≥ 0
Octane total 700 total 600
68x12 + 86x22 + 91x32 + 99x42 - 90(x12 + x22 + x32 + x42) ≥ 0
68x13 + 86x23 + 91x33 + 99x43 - 85(x13 + x23 + x33 + x43) ≥ 0 rating
From To Store
x11 + x12 + x13 ≤ 4000
Warehouse
A B C
x21 + x22 + x23 ≤ 5050 (New. York) (Dallas) (Detroit)
Supply
x31 + x32 + x33 ≤ 7100 1 (Cin.) $16 $18 $11
2 (Atl.) 14 12 13
x41 + x42 + x43 ≤ 4300
3 (Pitt.) 13 15 17
x11 + x21 + x31 + x41 ≤ 10,000
Demand
x13 + x23 + x33 + x43 ≥ 15,000
xij ≥ 0 for I = 1, 2, 3, 4, and j = 1, 2, 3. EE 477 Dr. Mohamed Zribi
EE 477 Dr. Mohamed Zribi 79 80
Model Summary Example 15: A Marketing Example
Minimize Z = $16x1A + 18x1B + 11x1C + 14x2A + 12x2B + 13x2C + 13x3A + 15x3B + 17x3C Data and Problem Definition
Exposure Cost
subject to (people/ad or
commercial)
x1A + x1B+ x1 300
x2A+ x2B + x2C 200
Television 20,000 $15,000
commercial
x3A+ x3B + x3C 200 Radio commercial 12,000 6,000
x1A + x2A + x3A = 150
Newspaper ad 9,000 4,000
x1B + x2B + x3B = 250
x1C + x2C + x3C = 200
xij 0 - Budget limit $100,000
- Television time for four commercials
- Radio time for 10 commercials
- Newspaper space for 7 ads
- Resources for no more than 15 commercials and/or ads.
1 4,500 $12
subject to
2 2,700 10
x1 4
Grade Component Specifications Selling Price ($/bbl)
x2 10
Super At least 50% of 1 $23
x3 7 Not more than 30% of 2
x1s + x1p + x1e 4,500 input 3 = parent education level output 3 = average history SOL score
x2s + x2p + x2e 2,700
x3s + x3p + x3e 3,500 Inputs Outputs
0.50x1s - 0.50x2s - 0.50x3s 0
School 1 2 3 1 2 3
0.70x2s - 0.30x1s - 0.30x3s 0
0.60x1p - 0.40x2p - 0.40x3p 0 Alton .06 $260 11.3 86 75 71
0.75x3p - 0.25x1p - 0.25x2p 0
Beeks .05 320 10.5 82 72 67
0.40x1e- 0.60x2e- - 0.60x3e 0
0.90x2e - 0.10x1e - 0.10x3e 0 Carey .08 340 12.0 81 79 80
x1s + x2s + x3s 3,000
x1p+ x2p + x3p 3,000 Delancey .06 460 13.1 81 73 69
… x1 + x2 + x3 + x4 + x7 19
x1 + x2 + x3 + x4 + x5 14
– Let x3, x4, …, x7 be defined similarly. x2 + x3 + x4 + x5 + x6 16
x3 + x4 + x5 + x6 + x7 11
xj 0 for j = 1 to 7
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
93 94
Suppose that there was a pay differential. The cost of workers who
start work on day j is cj per worker. • Suppose that one can hire part time workers (one day at a time),
xj 0 for j = 1 to 7
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
97 98
Solution:
Requirements of full-time employees day-wise Let xi be the number of full-time employees employed at the
beginning of day i (i = 1, 2, …, 7). Thus our problem is to find xi
Day No. of full-time so as to
Minimize z x1 x2 x3 x4 x5 x6 x7
employees required
Subject to
1 - Monday 10 x1 x4 x5 x6 x7 10 (Mon)
2 - Tuesday 6 x1 x2 x5 x6 x7 6 (Tue)
x1 x2 x3 x6 x7 8 (Wed)
3 - Wednesday 8 x1 x2 x3 x4 x7 12 (Thu)
x1 x2 x3 x4 x5 7 (Fri)
4 - Thursday 12
x2 x3 x4 x5 x6 9 (Sat)
5 - Friday 7 x3 x4 x5 x6 x7 4 (Sun)
6 - Saturday 9
xi 0 (i 1,...7) and integers
7 - Sunday 4
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
99 100
Example 21: A Multi-period Scheduling Decision variables:
Problem Definition and Data rj = regular production of computers per week j (j = 1, 2, 3, 4, 5, 6)
Production capacity : 160 computers per week oj = overtime production of computers per week j (j = 1, 2, 3, 4, 5, 6)
Additional 50 computers with overtime ij = extra computers carried over as inventory in week j (j = 1, 2, 3, 4, 5)
scoop of chocolate ice cream costs 20 cents, each bottle of cola costs 30 cents,
Chocolate ice cream 200 2 2 4
and each piece of pineapple cheesecake costs 80 cents. Each day, I must ingest (1 scoop)
at least 500 calories, 6 oz of chocolate, 10 oz of sugar, and 8 oz of fat. The Cola (1 bottle) 150 0 4 1
nutritional content per unit of each food is shown in the following table.
Pineapple cheesecake 500 0 4 5
Formulate a linear programming model that can be used to satisfy my daily (1piece)
nutritional requirements at minimum costs.
• Constraints: the decision variables must satisfy the following four The four constraints are:
constraints:
Constraint 1: daily calorie intake must be at least 500 calories. 400 x1 + 200 x2 + 150 x3 + 500 x4 500
Constraint 2: daily chocolate intake must be at least 6 oz.
Constraint 3: daily sugar intake must be at least 10 oz. 3 x1 + 2 x2 6
Constraint 4: daily fat intake must be at least 8 oz. 2 x1 + 2 x2 + 4 x3 + 4 x4 10
To express constraint 1 in terms of the decision variables, note that
(daily calorie intake) = (calorie in brownies) + (calories in 2 x1 + 4 x2 + x3 + 5 x4 8
chocolate ice cream) + (calories in cola) + (calories in pineapple
cheesecake)
Therefore,
the daily calorie intake = 400 x1 + 200 x2 + 150 x3 + 500 x4 must be Nonnegativity constraints: it is clear that all decision
greater than 500 ounces
By the same way the other three constraints can be formulated. variables are restricted in sign, i.e., xi 0, for all i = 1,
2, 3, and 4
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
107 108
• Combining the objective function, constraints, and Example 23: A Nutrition Aid Problem
nonnegativity constraints, the LP model is as follows:
• A Nutrition Aid Program is considering two food supplements
The optimal solution to this LP is x1 = x4 = 0, • The problem is to determine the daily quantities of the food
x2 = 1, and z = 90 cents supplements for each person that meet the minimum daily
EE 477 Dr. Mohamed Zribi
109 requirements and entail the least cost. EE 477 Dr. Mohamed Zribi 110
Table. Dietary and Price Data To formulate this problem mathematically, let x i (i = 1,2)
denote the quantity of Si (i = 1,2) needed per person per day.
The cost C (assuming no discounts) is given by
S1 S2 Minimum Daily C = 6x1 + 4x 2 .
To satisfy the.minimum.daily requirements, we must have
(Per Unit) (Per Unit) Requirement
4x1 + 12x 2 > 96
(Per Person) 8x1 + 4x 2 > 112
N1 4 12 96 5x1 + 5x 2 > 100.
Finally, the quantities x i must not be negative, i.e.,
N2 8 4 112 x1 >0, x 2 0.
N3 5 5 100 The problem is expressed formally as follows:
Minimize 6x1 + 4x 2
Price P6 P4 subject to 4x1 + 12x 2 > 96
8x1 + 4x 2 > 112
5x1 + 5x 2 > 100
and x1 >0, x 2 0.
Example 25:
The Swiss Construction Company is building roads on the side of the
minimize Z =0.18x1 + 0.22x2 + 0.10x3 + 0.12x4 + 0.10x5 + 0.09x6+ 0.40x7
Alps. It is necessary to use explosives to blow up the underground
+ 0.16x8 + 0.50x9 0.07x10
boulders to make the surface level. There are three ingredients (A, B,
subject to
and C) in the explosive used. It is known that at least 10 grams of the
90x1 + 110x2 + 100x3 + 90x4 + 75x5 + 35x6 + 65x7 + 100x8 + 120x9 + 65x10 420
explosive must be used to get results. If more than 20 grams are used,
2x2 + 2x3 + 2x4 + 5x5 + 3x6 + 4x8 + x10 20
270x5 + 8x6 + 12x8 30 the explosion will be too damaging. Also, for an explosion, at least 1/4
6x1 + 4x2 + 2x3 + 3x4+ x5 + x7 + x10 5 gram of ingredient C must he used for every gram of ingredient A, and
20x1 + 48x2 + 12x3 + 8x4+ 30x5 + 52x7 + 250x8 + 3x9 + 26x10 400 at least 1 gram of ingredient B must be used for every gram of
3x1 + 4x2 + 5x3 + 6x4 + 7x5 + 2x6 + x7+ 9x8+ x9 + 3x10 20 ingredient C. The costs of ingredients A, B, and C are 6 Swiss francs
5x1 + 2x2 + 3x3 + 4x4+ x7 + 3x10 12 (SFr), 18 SFr, and 20 SFr per gram, respectively. Find the least-cost
xi 0
explosive mix necessary to produce a safe explosion.
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
115 116
Solution:
Example 26:
• (3) x1- 4x3 ≤0
Sun Electric can produce three chips:
• (4) Technical requirement:
• Chip A which costs $6 per unit and sells for $9 per unit.
• x2 ≥ x3 OR x2 - x3 ≥ 0
• Chip B which costs $5 per unit and sells for $6 per unit.
• (5) Non-negative: x1, x2, x3≥0
• Chip C which costs $8 per unit and sells for $9 per unit.
• So: The company’s declared objective is profit maximization. The
(1) x1+ x2+x3 ≥ 10 company is planning a monthly production schedule. The
(2) x1+ x2+x3 ≤ 20 marketing department requires the production of at least 100
(3) x1 -4x3 ≤ 0 units of chip C and no more than 1,000 units of chip A.
(4) x2- x3 ≥ 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
119 120
The production department cannot produce more than 4,000 units of
all chips. Products are made on the "chipping" machine, -which
Decision variables: Quantities of A, B, C to be produced
can produce 20, 30, or 40 units of chips A, B, or C, respectively,
per hour. The machine is available for up to 100 hours each
month. The marketing department also requires that there be at Let :
least twice as many units of B as of C in the monthly schedule. x1, x2, x3 for Quantities of A, B, C.
The finance department has set an upper budget of S $15,000 for Objective: Max: Profit:
the schedule. Coefficients of the profit:
C1=9-6=3, C2=6-5=1, C3=9-8=1
• How many units of A, B, and C should the company produce?
Solution:
Min: Z=x11+x21+x31+x12+x22+x32+2x13+2x23+2x33
TIME
• Decision variables = 9 HOUSE M N E
Subject to:
• Objective function: Single x11 x12 x13
• Min: Total cost
(1)Quota:
50
0.1 0.1 0.5
0.1x11+0.1x12+0.5x13 ≥ 50
M/NC x21 x22 x23
• C11=C12=C21
0.5x21+0.4x22+0.7x23 ≥ 100
=C22=C31=C32=1 100 0.5 0.4 0.7
• C13=C23=C33=2 0.75x31+0.6x32+0.9x33 ≥ 150
M/C x31 x32 x33
150 0.75 0.6 0.9
Where:
∑aij xij = 0.1x11+0.1x12+0.5x13+0.5x21+
• Then :
0.4x22+0.7x23+0.75X31+0.6x32+0.9x33
0.02x11+0.02x12-0.4x13+0.1x21+0.08x22-
0.56x23+0.15X31+0.12x32-0.72x33 < 0
- Machine X is available for maximum 5 hours and 30 minutes during any - Time constraint on machine X,
2x1 + 2x2 < 330 minutes
working day
- Time constraint on machine Y,
3x1 + 2x2 < 480 minutes
- Machine Y is available for maximum 8 hours during any working day - Non-negativity restrictions are,
x1 > 0 and x2 > 0
- Formulate the problem as a LP problem.
3x1 + 2x2 < 480 minutes - Determine optimal mixture of ingredients that will
minimize costs.
x1 > 0
x2 > 0
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
137 138
Solution:
• The company has decided that it wants to maximize its sale
income, which depends on the number of units of product I and II
The total amount of raw material available per day for both products
that it produces.
is 15751b. The total storage space for all products is 1500 ft2, and a
maximum of 7 hours per day can be used for production.
• Therefore, the decision variables, x1 and x2 can be the number of
EE 477 Dr. Mohamed Zribi
141 units of products I and II, respectively, produced per day. 142
Darwin 6 7 6 4
Seeking to maximize the overall effectiveness of the new client
assignment, the firm draws up the following table, in which he
rates the estimated effectiveness (of a scale of 1 to 9) of each
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
lawyer on each new case. 151 152
Solution: Max Z = 6 x11 + 2 x12 + 8 x13 + 5 x14 + 9 x21 + 3 x22 +
5 x23 + 8 x24 + 4 x31 + 8 x32 + 3 x33 + 4 x34 +
Decision variables: 6 x41 +7 x42 + 6 x43 + 4 x44
St.
x11 + x21 + x31 + x41 = 1 (divorce case)
x12 + x22 + x32 + x42 = 1 (merger)
Let xij = 1 if attorney i is assigned to case j x13 + x23 + x33 + x43 = 1 (embezzlement)
0 otherwise x14 + x24 + x34 + x44 = 1 (exhibitionism)
Where : i = 1, 2, 3, 4 stands for Adam, Brook, Carter, and x11 + x12 + x13 + x14 = 1 (Adam)
x21 + x22 + x23 + x24 = 1 (Brook)
Darwin respectively x31 + x32 + x33 + x34 = 1 (Carter)
j = 1, 2, 3, 4 stands for divorce, merger, x41 + x42 + x43 + x44 = 1 (Darwin)
embezzlement, and exhibitionism respectively.
The optimal solution is: X13 = X24 = X32 = X41 = 1. All other variables
are equal to zero.
The LP formulation will be as follows:
Pattern III 10
10 by 10 so as to make 1 top of size 2 and 6 tops of size 1
20
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
169 170
So assume that x1 sheets are cut according to pattern I, x2 according Example 39: Mo’s Programming
to pattern II, x3 according to pattern III Mo's Programming has five idle Programmers and four custom
Programs to develop. The estimated time (in hours) it would take
The problem is to each Programmer to write each Program is listed below. (An 'X' in
the table indicates an unacceptable Programmer-Program
assignment.)
Minimize Z = x1 + x2 + x3 Programmer
Program 1 2 3 4 5
Subject to 10 x1 + 2 x2 + 6 x3 ≥ 20,000 Java 19 23 20 21 18
C++ 11 14 X 12 10
2 x2 + x3 ≥ 15,000 Assembler 12 8 11 X 9
Pascal X 20 20 18 21
x1, x2, x3 ≥ 0, integers
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
171 172
Formulate an integer program for determining the Programmer- Define the decision variables
Program assignments that minimize the total estimated time xij = 1 if Program i is assigned to Programmer j
= 0 otherwise.
spent writing the four Programs. No Programmer is to be
Number of decision variables =
assigned more than one Program and each Program is to be [(number of Programs)(number of Programmers)]
worked on by only one Programmer. - (number of unacceptable assignments)
= [4(5)] - 3 = 17
4 x1 2 x2 1.5 x3 20 Aeq=[];beq=[];
f=[-60;-30;-20];
x2 5
A=[8 6 1;4 2 1.5;2 1.5 0.5;0 1 0];
x1 , x2 , x3 0
[X,FVAL,EXITFLAG,OUTPUT,LAMBDA]=LINPROG(f,A,b,Aeq,beq,LB,UB);
X'
ans =
2.0000 0.0000 8.0000
Example 41: Rappaport Communications
ans =
0.0000 • Rappaport Communications provides cellular phone
10.0000
10.0000 service in several mid-western states.
0.0000
• The want to expand to provide inter-city service between
Optimization terminated successfully.
ans = four cities in northern Ohio.
0.0000 10.0000 10.0000 0.0000
• A new communications tower must be built to handle these
ans =
2.0000 inter-city calls.
0.0000
8.0000
• The tower will have a 40 mile transmission radius.
30
x1 = location of the new tower with respect to the x-axis
Youngstown
Akron
x=12, y=21 x=52, y=21 y1 = location of the new tower with respect to the y-axis
20
10
Canton
x=17, y=5
0
40
X
0 10 20 30 50 60
EE 477 Dr. Mohamed Zribi EE 477 Dr. Mohamed Zribi
183 184
Defining the Objective Function: Defining the Constraints
• Cleveland
• Minimize the total distance from the new tower to the 5-X
2
45 Y
2
40
1 1
2 2 2 2
• Canton
17 - X 5 Y 52 - X 21 Y
1 1 1 1 2 2
17 - X 5 Y 40
1 1
• Youngstown
2 2
52 - X 21 Y 40
1 1