Beruflich Dokumente
Kultur Dokumente
Linear Programming
1
Redwood Furniture
Problem Formulation
Let XT and XC denote the number of tables and
chairs to be made. (Define variables)
Maximize P = 6XT + 8XC (Objective function)
Subject to: (Constraints)
30XT + 20XC < 300 (wood)
5XT + 10XC < 110 (labor)
where XT and XC > 0 (non-negativity conditions)
Letting XT represent the horizontal axis and XC the
vertical, the constraints and non-negativity
conditions define the feasible solution region.
3
Minimizing Cost:
Feed-Mix Problem
Let XB and XS denote pounds of buckwheat
and sunflower in mixture.
Minimize C=.18XB + .10XS
Subject to: .04XB + .06XS > 480 (fat)
.12XB + .10XS > 1,200 (prot.)
.10XB + .15XS < 1,500 (rough.)
where
XB, XS > 0
The optimal solution is:
11
XB = 3,750 pounds
XS = 7,500 pounds
C = .18(3,750) + .10(7,500) = 1,425 dollars
Minimizing Cost:
Feed-Mix Problem
12
XC < 5 (capacity)
XB .5XS < 0
14
15
(objective)
< 300 (wood)
< 110 (labor)
>0
First Step
The Formulas
The first step is to solve the
objective function and each constraint
for one of the variables. In this case,
solving for XC gives
16
XC = (P - 6XT)/8
(objective)
XC = (300 - 30XT)/20
(wood)
XC = (110 - 5XT)/10
(labor)
Second Step
The Spreadsheet (Figure 8-18)
A
R e d w o o d F u rn it u r e C o m p a n y
1
2
3
P ro f it
48
W ood
300
Labor
110
6
7
8
9
C h a irs , X
T a b le s , X
W ood
15
1 3 .5
Labor
11
1 0 .5
W ood
Labor
P r o f it
T a b le s , X
= ($ B $ 4 -3 0 * A 9 ) /2 0
5 .2 5
10
= ($ B $ 4 -3 0 * A 1 0 ) /2 0 = ($ B $ 5 -5 * A 1 0 ) /1 0
= ($ B $ 3 -6 * A 1 0 ) /8
P ro f it
6
= ($ B $ 5 -5 * A 9 ) /1 0
= ( $ B $ 3 - 6 * A 9 ) /8
10
11
12
10
4 .5
11
= ($ B $ 4 -3 0 * A 1 1 ) /2 0 = ($ B $ 5 -5 * A 1 1 ) /1 0
= ($ B $ 3 -6 * A 1 1 ) /8
12
1 0 .5
9 .5
3 .7 5
12
= ($ B $ 4 -3 0 * A 1 2 ) /2 0 = ($ B $ 5 -5 * A 1 2 ) /1 0
= ($ B $ 3 -6 * A 1 2 ) /8
13
13
= ($ B $ 4 -3 0 * A 1 3 ) /2 0 = ($ B $ 5 -5 * A 1 3 ) /1 0
= ($ B $ 3 -6 * A 1 3 ) /8
14
7 .5
8 .5
2 .2 5
14
= ($ B $ 4 -3 0 * A 1 4 ) /2 0 = ($ B $ 5 -5 * A 1 4 ) /1 0
= ($ B $ 3 -6 * A 1 4 ) /8
15
1 .5
15
= ($ B $ 4 -3 0 * A 1 5 ) /2 0 = ($ B $ 5 -5 * A 1 5 ) /1 0
= ($ B $ 3 -6 * A 1 5 ) /8
16
4 .5
7 .5
0 .7 5
16
= ($ B $ 4 -3 0 * A 1 6 ) /2 0 = ($ B $ 5 -5 * A 1 6 ) /1 0
= ($ B $ 3 -6 * A 1 6 ) /8
17
17
= ($ B $ 4 -3 0 * A 1 7 ) /2 0 = ($ B $ 5 -5 * A 1 7 ) /1 0
= ($ B $ 3 -6 * A 1 7 ) /8
18
1 .5
6 .5
-0 .7 5
18
= ($ B $ 4 -3 0 * A 1 8 ) /2 0 = ($ B $ 5 -5 * A 1 8 ) /1 0
= ($ B $ 3 -6 * A 1 8 ) /8
19
10
-1 .5
19
10
= ($ B $ 4 -3 0 * A 1 9 ) /2 0 = ($ B $ 5 -5 * A 1 9 ) /1 0
= ($ B $ 3 -6 * A 1 9 ) /8
For example,
Cell B9: XC = ($B$4 - 30XT)/20 = ($B$4-30*A9)/20
Cell B10: XC = ($B$5 - 5XT)/10 = ($B$5-5*A9)/10
Cell B11: XC = ($B$3 - 30XT)/20 = ($B$3-30*A9)/20
17
Third Step
Graphing with the Chart Wizard
Highlight cells B8:D19 and click on the
chart icon.
Step 1 - Chart Type
Step 2 - Chart Source Data
Step 3 - Chart Options
Step 4 - Chart Location
18
Chart Wizard
Chart Type
Select
SelectLine
Line
as
asthe
theChart
Chart
type
typeand
andpick
pick
the
thefirst
first
Chart
Chartsubsubtype
type(Line)
(Line)
and
andclick
click
Next.
Next.
19
Chart Wizard
Sources of Data, Series Tab
20
Enter
Enterthe
the
horizontal
horizontalaxis
axis
values
valuesby
byclicking
clicking
on
onthe
theSeries
Seriestab
tab
and
andentering
enteringthe
the
range
rangeof
ofnumbers
numbers
to
tobe
beon
onthe
the
horizontal
horizontalaxis,
axis,
cells
cellsA:9:A19,
A:9:A19,in
in
the
theCategory
Category(X)
(X)
axis
axislabels
labelsline.
line.
Alternately,
Alternately,click
click
in
inthe
the Category
Category
(X)
(X)axis
axislabels
labelsline
line
and
andthen
thenhighlight
highlight
cells
cellsA9:A19.
A9:A19.
Click
ClickNext.
Next.
Chart Wizard
Chart Options
In
Inthe
theChart
Charttitle
titleline
linetype
typeRedwood
RedwoodFurniture
Furniture
Company,
Company,in
inthe
theCategory
Category(X)
(X)axis
axisput
putTables,
Tables,T,
T,and
andin
in
the
theValue
Value(Y)
(Y)axis
axisline
linewrite
writeChairs,
Chairs,C.
C. Click
ClickNext.
Next.
21
Chart Wizard
Chart Location
Click
Clickon
onFinish
Finishand
andthe
theChart
Chartshown
shownnext
nextappears.
appears.
22
Step Four
The Final Graph (Figure 8-19)
R
i t u
,
s
i r
a
- 2
- 4
l e
X
T
23
h
C
The
Thefinal
final
graph
graph
(after
(after
making
making
formatting
formatting
changes).
changes).
r o
f i t
i t
X
T
24
Increasing
Increasing
the
thenumber
number
in
incell
cellB3
B3
moves
movesthe
the
objective
objective
function
functionline
line
up
upand
andto
tothe
the
right.
right. This
This
graph
graphshow
show
the
theobjective
objective
function
functionfor
for
PP==96.
96.
r o
f i t
25
i t u
l a
i r
( P
To
Tosee
seewhat
what
happens
happenswhen
whenthe
the
amount
amountof
ofwood
woodor
or
labor
laborvary,
vary,change
change
the
thenumbers
numbersin
in
cells
cellsB4
B4(for
(forwood)
wood)
or
orB5
B5(for
(forlabor)
labor)
and
andthe
the
corresponding
correspondingline
line
will
willmove.
move. This
This
graph
graphshow
showthe
the
result
resultwhen
when80
80is
is
entered
enteredin
incell
cellB5
B5
(and
(andPP==96).
96).
l e
X
T
r o
f i t
Drawing Horizontal
and Vertical Lines
Drawing two types of lines with
Excel require special attention:
horizontal and vertical lines. The
constraint Y = 3 is a horizontal line
and the constraint X = 7 is a vertical
line. Figure 9-21 shows what an
Excel spreadsheet looks like for these
two constraints.
26
Spreadsheet for
Horizontal and Vertical Lines (Figure 8-22)
The
Thevertical
vertical
line
lineequation
equation
has
hasan
anYYintercept
interceptof
of
100,000
100,000and
and
aaslope
slopeof
of-(100,000/7).
(100,000/7).
Thus,
Thus,ititis
is
not
notexactly
exactly
vertical
verticalbut
butitit
is
issufficiently
sufficiently
close
closeto
to
vertical
verticalfor
for
our
our
purposes.
purposes.
27
G r a p h in g H o riz o n ta l a n d V e r tic a l L in e s
1
2
3
Y = 3
X = 7
100000
= 1 0 0 0 0 0 - (1 0 0 0 0 0 /7 ) * A 4
85714
= 1 0 0 0 0 0 - (1 0 0 0 0 0 /7 ) * A 5
71429
= 1 0 0 0 0 0 - (1 0 0 0 0 0 /7 ) * A 6
57143
= 1 0 0 0 0 0 - (1 0 0 0 0 0 /7 ) * A 7
42857
= 1 0 0 0 0 0 - (1 0 0 0 0 0 /7 ) * A 8
28571
= 1 0 0 0 0 0 - (1 0 0 0 0 0 /7 ) * A 9
10
14286
1 0
= 1 0 0 0 0 0 - ( 1 0 0 0 0 0 /7 ) * A 1 0
11
1 1
= 1 0 0 0 0 0 - ( 1 0 0 0 0 0 /7 ) * A 1 1
12
-1 4 2 8 6
1 2
= 1 0 0 0 0 0 - ( 1 0 0 0 0 0 /7 ) * A 1 2
13
-2 8 5 7 1
1 3
= 1 0 0 0 0 0 - ( 1 0 0 0 0 0 /7 ) * A 1 3
14
10
-4 2 8 5 7
1 4
= 1 0 0 0 0 0 - ( 1 0 0 0 0 0 /7 ) * A 1 4
15
Graphing Horizonal
and Vertical Lines (Figure 8-23)
To
Tochange
changethe
the
position
positionof
ofthe
the
vertical
verticalline,
line,
change
changethe
the77in
in
the
the
denominator
denominatorof
of
all
allthe
the
formulas
formulasin
in
column
columnCCto
to
the
thedesired
desired
number.
number.
Y=3
X=7
4
2
0
0
6
X
28
10