You are on page 1of 33

Chapter 11

A number of important scheduling problems


. . . require the study of an astronomical
number of arrangements to determine
which one is best. . . . Mathematicians have
been working on improved techniques.-George Dantzig

Integer and Goal


Programming
1

Integer Programming
Consider the following integer program.
Maximize P = 14X1 + 16X2
Subject to:
4X1 + 3X2 < 12 (resource A)
5X1 + 8X2 < 24 (resource B)
where
X1, X2 are non-negative integers
An integer program is just like an LP, but restrict- ting
the solution to integers (whole numbers).
When solved as a linear program (allowing fractional
values), the following is obtained.
LP solution: X1 = 1 5/7 X2 = 1 5/7 P = 51 3/7
The following slide shows graphical solution by finding
the most attractive lattice point.
Integer solution: X1 = 0 X2 = 3 P = 48
2

Graphical Solution
of Integer Program
Rounding the LP solution generally wont
be correct.

Branch-and-Bound Method
Consider a modified Redwood Furniture problem.
Maximize P = 6XT + 8XC
Subject to:
30XT + 20XC < 310 (wood)
5XT + 10XC < 113 (labor)
where
XT, XC are non-negative integers
The above will be solved as a series of LPs.
Problem 1 (fractions okay): XT = 4.2, XC = 9.2, P = 98.8
The above is partitioned into two sub-problems (LPs):

Problem 2: XT < 4
Problem 3: XT > 5
Problem 1 is the parent problem.
XT is the branching variable.
Each child LP has all constraints of parent LP, plus one more.

The value P = 98.8 is the upper bound on profit.

Problem 1 Graphical Solution

Problem Tree

Graphical Solutions to
Problems 2 and 3

The Problem Tree


The problem tree gives the genealogy of the LPs
being solved.
Each child LP is defined by a constraint involving the
branching variable, chosen (arbitrarily) because its
value is non-integer.
One child has constraint:
branching variable < (largest integer < current value)
The sibling has constraint:
branching variable > (smallest integer > current value)
None of the problems have integer restrictions.

Solutions will be found however in which all


variables happen to have integers.
The P of the child LP can never be better than that
of its parent. Do you know why?

Finding New Branching Point


A problem having one or more non-integer
solution values is the next branching point.
It will be the one with greatest P. (Problem 2)

Best-Solution-So-Far
Problem 3 provides an LP solution coincidentally involving all integers, making it an
integer solution and best-solution-so-far.
Its profit of 94 is the current lower bound on P.

But Problem 2 has a greater P. It is the next


parent, with XC as branching variable.
Its 98.4 profit is the current upper bound on P.
Problem 4 has all Problem 2 constraints plus:
XC < 9

Problem 5 has all Problem 2 constraints plus:


10

XC > 10

Solving More LPs

11

The Tree Gets Pruned


Problem 4 has the new best-solution-so-far.
A problem with worse Ps than that of the
best-solution-so-far is pruned from the tree.

12

Optimal Solution Found


The tree cannot grow further. There is no
branching point left. The best-solution-so-far is
optimal.
Cost minimization problems are solved similarly
with reversed orientation. Consider:
Minimize C = 4X1 + 3X2 + 5X3
Subject to:
2X1 2X2 + 4X3 > 7
2X1 + 4X2 2X3 > 4
where X1, X2, X3 are non-negative integers
The C of any child is worse than that of its parent.
The branching point has smallest C. Prune
problems having greater Cs than that of the best13 solution-so-far.

Completed Tree for


Cost Minimization Problem

14

Solving Integer Programs


with QuickQuant
Consider the expanded Redwood Furniture
problem. Here there are three table sizes, XTS
(small), XTR (regular), and XTL (large), two chairs,
XCS (standard) and XCA (armed), and two
bookcases, XBS (short) and XBT (tall).

15

QuickQuant Presents Tree Data


in a Log Form

16

Solution to Expanded
Redwood Furniture Problem

17

Linear Programming
with Multiple Objectives
Linear programming has a single objective
function. That may be inadequate because:
Two or more goals might apply simultaneously.
Investors try to maximize return and minimize risk.

Objectives can conflict, as with the above.


Each objective may have a different solution.

Consider the original Redwood Furniture


problem, with the following objectives.

18

1. Maximize P = 6XT + 8XC


2. Maximize R = 50XT + 25XC
3. Maximize T = 1XT + 3XC

(profit)
(revenue)
(training time)

Redwood Furniture and


Three Separate Goals

19

Goal Programming
Linear programming may be adapted to treat
multiple goals simultaneously.
The procedure is called goal programming.
It begins with goal targets:
1. Profit
$
2. Sales revenue
3. Training time

90
$ 450
30 hours

For some goals, exceeding the target is


desirable. For others, lying below is better.
And, closeness to target (above or below)
may be important.
20

Goal Programming
Extra goal deviation variables convert the LP to a
goal program. These are weighted according to
their relative importance.
YP+,YP = deviation of profit above, below target
YR+,YR = deviation of revenue above, below target
YT+,YT = deviation of training time above, below target

The goals are incorporated into an omnibus


objective function minimizing collective weighted
deviations from respective targets.
The resulting goal program has the original
constraints and goal deviation constraints.
21

1. 6XT + 8XC (YP+ YP) = 90


2. 50XT + 25XC (YR+ YR) = 450
3. 1XT + 3XC (YT+ YT) = 30

(profit)
(revenue)
(training)

The Redwood Furniture


Goal Program
Redwoods weights are 1, 2, and .5 for falling below the P,
R, and T targets. The resulting goal program is:

22

Solution To Redwood Furniture


Goal Program
Notice that only the negative deviation
variables are weighted in the objective.
But positive deviations could be given weight if
exceeding target was undesirable.

23

The following solution is obtained.


XT = 6
XC = 6
YP+= 0
YP = 6
YR+= 0
YR = 0
YT+= 0
YT = 6
C=9
A goal program is just a special type of
linear program and solved in the same way.

Solving Integer Programs


with Spreadsheets
Spreadsheets can be used to solve integer
programs just like they are used to solve linear
programs.

24

Formulation Table for Redwood


Furniture Co. (Figure 11-9)
The
Theformulation
formulationtable
tablearranges
arrangesthe
theproblem
problemin
inaa
tabular
tabularformat,
format,as
asshown
shownbelow.
below.

Variables
Objective
Wood
Labor

25

XT
6
30
5

XC
8
20
10

Sign
=
<
<

RHS
P(max)
310
113

Linear Programming Spreadsheet


(Figure 11-10)

2.2.This
Thisspreadsheet
spreadsheetyields
yieldsthe
thelinear
linearprogramming
programmingsolution.
solution. Note
Notethat
that
the
theoptimal
optimalvalues
valuesof
ofthe
thedecision
decisionvariables
variablesare
arenot
notintegers.
integers.
A

1.1.The
The
spreadsheet
spreadsheet
contains
containsthe
the
formulas
formulas
necessary
necessaryto
touse
use
Solver.
Solver.

26

1
2
3
4
5
6
7
8
9
10
11

RHS
P(max)
310
113

Profit
Wood used
Labor used

98.8
310
113

Redwood Furniture Company


Variables
Objective
Wood
Labor

XT
6
30
5

XC
8
20
10

Sign
=
<
<

Solution
XT
4.2

XC
9.2

G
4 =SUMPRODUCT(B4:C4,$B$9:$C$9)
5 =SUMPRODUCT(B5:C5,$B$9:$C$9)
6 =SUMPRODUCT(B6:C6,$B$9:$C$9)

3.3.For
Forinteger
integerprogramming,
programming,add
addthe
theinteger
integer
restriction
restrictionin
inthe
theSolver
SolverParameters
Parametersdialog
dialogbox
box
in
inthe
theSubject
Subjectto
tothe
theConstraints
Constraintsbox,
box,as
asshown
shown
next.
next.

Solver Parameters Dialog Box


(Figure 11-11)
NOTE:
NOTE: Normally
Normallyall
allthese
theseentries
entriesappear
appearin
inthe
theSolver
SolverParameter
Parameterdialog
dialog
box
so
you
only
need
to
click
on
the
Solve
button.
However,
you
should
box so you only need to click on the Solve button. However, you should
always
alwayscheck
checkto
tomake
makesure
surethe
theentries
entriesare
arecorrect
correctfor
forthe
theproblem
problem you
you
are
solving.
are solving.
To
Toadd
addthe
the
integer
integer
restriction,
restriction,
click
clickon
onthe
the
Add
button
Add buttonto
to
obtain
the
Add
obtain the Add
Constraint
Constraint
dialog
dialogbox
box
shown
next.
shown next.

27

The Add Constraints Dialog Box


(Figure 11-12)

1.1.Enter
Enterthe
thecell
cell
locations
locationsof
ofthe
the
variables
variables
required
requiredto
tobe
be
integers
in
the
integers in the
Cell
CellReference
Reference
line,
line,B9:D9
B9:D9or
or
$B$9:$D$9
in
$B$9:$D$9 in
this
thiscase.
case.

Normally,
Normally,all
allthese
these
entries
already
entries already
appear.
appear. You
Youwill
will
need
to
use
this
need to use this
dialog
dialogbox
boxonly
onlyifif
you
youneed
needto
toadd
addaa
constraint.
constraint.

2.2.Select
Selectint
int
(which
(whichisisshort
short
for
forinteger)
integer)for
for
the
sign
the sign

3.3. Click
Clickthe
theOK
OKbutton.
button. The
The
word
wordinteger
integerin
inthe
the
Constraint
Constraintline
linedoes
doesnot
not
need
to
be
entered,
it
need to be entered, itisis
done
doneautomatically.
automatically.

4.4. Click
ClickSolve
Solvein
inthe
theSolver
SolverParameters
Parametersdialog
dialog
box
to
obtain
the
integer
solution
shown
box to obtain the integer solution shownnext.
next.

28

IfIfyou
youneed
needto
tochange
changeaaconstraint,
constraint,the
theChange
ChangeConstraint
Constraintdialog
dialogbox
box
functions
functionsjust
justlike
likethis
thisone.
one.

Integer Programming Spreadsheet


(Figure 11-13)

A
1
2
3
Note
4
Notethat
thatthe
the
optimal
optimalvalues
valuesof
of 5
6
the
thedecision
decision
7
variables
variablesare
are
8
integers.
integers.
9
10
11

RHS
P(max)
310
113

Profit
Wood used
Labor used

96
300
110

Redwood Furniture Company


Variables
Objective
Wood
Labor

XT
6
30
5

XC
8
20
10

Sign
=
<
<

XC
9

G
4 =SUMPRODUCT(B4:C4,$B$9:$C$9)
5 =SUMPRODUCT(B5:C5,$B$9:$C$9)
6 =SUMPRODUCT(B6:C6,$B$9:$C$9)

Solution
XT
4

Bigger
Biggerinteger
integerprograms
programsare
aresolved
solvedin
inthe
thesame
samemanner
manneras
asfor
forlinear
linear
programs,
by
adding
additional
rows
or
columns.
programs, by adding additional rows or columns.

29

Solving Goal Programs


with Spreadsheets
Spreadsheets can be used to solve goal
programs just like they are used to solve
linear programs.

30

Formulation Table for


Maui Miser Car Rentals (Figure 11-16)
The
Theformulation
formulationtable
tablearranges
arrangesthe
theproblem
problemin
inaatabular
tabular
format,
format,as
asshown
shownbelow
belowfor
forMaui
MauiMiser
MiserCar
CarRentals.
Rentals.
+

Variables
XV
XC
XL Y1 Y1 Y2 Y2
Objective
1
1
1
Vehicle minimum
1
1
1
Van minimum
1
Large car minimum
1
Car minimum
1
1
Car mix
-1
1
Goal 1
15,000 7,600 10,600 -1 1
Goal 2
25,000 15,000 21,000
-1 1
Goal 3
11
-9
1

31

Y3
Y3
10,000

-1

Sign RHS
= C(min)
>
25
>
5
>
5
>
12
<
0
= 300,000
= 500,000
=
0

Goal Programming Spreadsheet for


Maui Miser Rentals (Figure 11-17)
1.1.The
The
spreadsheet
spreadsheet
contains
containsthe
the
formulas
formulas
necessary
necessaryto
to
use
Solver.
use Solver.

A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Maui Miser Car Rentals Managerial Application


XV
XC
XL
Variables
Objective
Vehicle minimum
1
1
1
Van minimum
1
Large car minimum
1
Car minimum
1
1
Car mix
-1
1
Goal 1
15000 7600 10600
Goal 2
25000 15000 21000
Goal 3
11
-9
1
XV
XC
8.923 11.462

XL
5

Y1

-1

Y1
1

Y2 Y2
1 1

Y3
10,000

Y3

-1

1
-1

Solution
+
+
Y1
Y1
Y2 Y2
0 26046.154 0 0

Sign
RHS
=
C(min) Profit
>
25
Vehicle minimum
>
5
Van minimum
>
5
Large car minimum
>
12
Car minimum
<
0
Car mix
=
300000 Goal 1
=
500000 Goal 2
=
0
Goal 3

26046.154
25.38
8.92
5.00
16.46
-6.46
300000.00
500000.00
0.00

Y3
0

Y3
0

= S U M P R O D U C T (B 4 :J 4 ,$ B $ 1 5 :$ J $ 1 5 )

= S U M P R O D U C T (B 5 :J 5 ,$ B $ 1 5 :$ J $ 1 5 )

= S U M P R O D U C T (B 6 :J 6 ,$ B $ 1 5 :$ J $ 1 5 )

= S U M P R O D U C T (B 7 :J 7 ,$ B $ 1 5 :$ J $ 1 5 )

= S U M P R O D U C T (B 8 :J 8 ,$ B $ 1 5 :$ J $ 1 5 )

= S U M P R O D U C T (B 9 :J 9 ,$ B $ 1 5 :$ J $ 1 5 )

1 0

= S U M P R O D U C T (B 1 0 :J 1 0 ,$ B $ 1 5 :$ J $ 1 5 )

1 1

= S U M P R O D U C T (B 1 1 :J 1 1 ,$ B $ 1 5 :$ J $ 1 5 )

1 2

= S U M P R O D U C T (B 1 2 :J 1 2 ,$ B $ 1 5 :$ J $ 1 5 )

2.2. The
TheSolver
SolverParameters
Parametersdialog
dialogbox
boxisisshown
shownnext.
next.

32

Solver Parameters Dialog Box


(Figure 11-18)
NOTE:
NOTE: Normally
Normallyall
allthese
theseentries
entriesappear
appearin
inthe
theSolver
SolverParameter
Parameterdialog
dialog
box
boxso
soyou
youonly
onlyneed
needto
toclick
clickon
onthe
theSolve
Solvebutton.
button. However,
However,you
youshould
should
always
alwayscheck
checkto
tomake
makesure
surethe
theentries
entriesare
arecorrect
correctfor
forthe
theproblem
problem you
you
are
solving.
are solving.
The
TheSolver
Solver
Parameters
Parameters
dialog
dialogbox
box
follows
followsthe
the
same
sameformat
formatas
as
for
linear
and
for linear and
integer
integer
programs.
programs.

33

Bigger
Biggergoal
goalprograms
programsare
aresolved
solvedin
inthe
thesame
samemanner
manneras
asfor
forlinear
linear
programs,
programs,by
byadding
addingadditional
additionalrows
rowsor
orcolumns.
columns.

You might also like