operations research by h.a taha solution manual (8th edition)
TRANSCRIPT
Set 9.1d
1. Straightforward formulation: 7777 Let xit = 1 if load i is assigned to trailer t, o otherwise Li = linear feet of load i ri = revenue from load i
10 2
1 1
10
1
2
1
Maximize subject to
36, 1, 2
1, 1, ...,10, (0,1), 1, 2, ...10
i it
i t
i it
i
it it
t
z r x
L x t
x i x i
= =
=
=
=
≤ =
≤ = = =
∑∑
∑
∑
2. Formulation using if-then:
Let xit = feet in trailer t assigned to load i yi = (0, 1), i = 1, 2, …, 10, wit = (0, 1), i = 1, 2, ..., 10, t = 1, 2
10 2
1 1
10
1
1 2
1 2
Maximize subject to
36, 1, 2
, (1 ), 1, 2,...,10
(above constraint is not as efficient as 1, 1, 2,...,10 in formulation 1)
(if 0 then ) translat
i it
i t
it
i
i i i i i i
i i
it it i
z r x
x t
x L y x L y i
x x i
x x L
= =
=
=
≤ =
≤ ≤ − =
+ ≤ =
> =
∑∑
∑
es to
(1 ), , , 1, 2,...,10, 1, 2
, , (0,1), 1, 2,...,10, 1, 2
it it i it it i it it
it it i
x M w L x Mw L x Mw i t
x w y i t
≤ − − ≤ − + ≤ = =
= = =
Solution: z = $7929. Problem has several alternative optima. (See file ampl9.1d-7.txt.)
Solution 1 Solution 2
Trailer Load Feet Load Feet
1 1 5 1 5 5 7 2 11 6 9 6 9 8 14 9 10
Total 35 ft Total 35 ft
2 2 11 4 15 4 15 5 7 9 10 8 14
Total 36 ft Total 36 ft
9-14