Linear Programming - Case Studies+Solutions
Linear Programming - Case Studies+Solutions
Vassilis Kostoglou
E-mail: [email protected]
URL: www.it.teithe.gr/~vkostogl
Case study 1
Portfolio selection
Available capital
Companys policy
Return data
Expected annual return of investments
Investment
15.4
19.2
18.7
13.5
Mutual fund E
17.8
Mutual fund Z
16.3
Requirements
Amount in shares with the larger return of a sector less or equal to 80% of sectors
total amount
Solution
Decision variables
x1 = invested amount in share A of the manufacturing sector
x2 = invested amount in share B of the manufacturing sector
x3 = invested amount in share C of the food and beverage sector
x4 = invested amount in share D of the food and beverage sector
x5 = invested amount in mutual fund E
x6 = invested amount in mutual fund Z
x1
x1
-0.8 x1
-0.1 x1
-0.25 x1
+
+
+
+
-
x2
x2
x3
x4
x3
x4
0.2 x3
0.1 x3
0.8 x4
0.1 x4
x5
x6 <=
<=
<=
<=
<=
<=
<=
0.2 x2
0.9 x2
0.25 x2
x5
x6
90.000
45.000
45.000
0
0
0
0
and
xi >= 0, i = 1, 2,, 6
Summary of results
Results of optimal solution
Investment
(1)
Amount invested
(2)
Share A
27900
15.4
4296.6
Share B
8100
19.2
1555.2
Share C
36000
18.7
6732
Share D
9000
13.5
1215
Mutual fund E
9000
Mutual fund Z
Total
90000
17.8
16.3
17.11
1602
0
15400.8
QSB+
|---QSB+-------------- Solution Summary for case study 1--------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
X1
|
27900 |
0 | -.070777 |
.154 | .1764444|
|
2
|
X2
|
8100 |
0 |
.154 |
.192 |
.394|
|
3
|
X3
|
36000 |
0 |
.1638 |
.187 |
M|
|
4
|
X4
|
9000 |
0 | 0.042199 |
.135 |
.187|
|
5
|
X5
|
9000 |
0 |
.163 |
.178 | .2708001|
|
6
|
X6
|
0 |
.015 |
-M |
.163 |
.178|
|----------------------------------------------------------------------------|
|
Maximized OBJ = 15400.8 Iteration = 7 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|----------------------------------------------------------------------------|
|---------------- Constraint Summary for 3.2 ------------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Tight (<)|
.16184 |
0 | 53035.71 |
90000 |
101250 |
|
2
|Loose (<)|
0 |
9000 |
36000 |
45000 |
M |
|
3
|Tight (<)| 0.018560 |
0 |
33750 |
45000 | 76363.63 |
|
4
|Loose (<)|
0 |
20700 |
-20700 |
0 |
M |
|
5
|Tight (<)|
.052 |
0 |
-36000 |
0 |
9000 |
|
6
|Tight (<)|
.038 |
0 |
-8100 |
0 |
20700 |
|
7
|Tight (<)|
.01616 |
0 |
-11250 |
0 | 36964.29 |
|----------------------------------------------------------------------------|
9
10
6
11
ROW
1
2
3
4
5
6
7
CURRENT
RHS
90000.000000
45000.000000
45000.000000
0.000000
0.000000
0.000000
0.000000
13
Solution window
14
Answer report
15
Sensitivity analysis
16
Case Study 2
Financial programming problem
Decision variables
j = amount to be invested in government bonds at the beginning of the month j
Cj = amount to be invested in government bills at the beginning of the month j
Dj= amount to be invested in bank deposits at the beginning of the month j
18
0.03B1
0.03B2
0.03B3
0.03B4
0.065C1
0.065C2
0.065C3
0.065C4
0.01D1
0.01C2
0.01C3
0.01D4
19
Mathematical model
1.
B1
2.
B2
3. - 1.03B1
4. - 1.03B2
5.
1.03B3
6.
B1
7.
B1
8.
B2
9.
B3
10.
C1
11.
C1
12.
C1
13.
C2
+
C1
+
C2
+
B3
+
B4
+ 1.065C1
+
+
+
+
+
+
+
+
D1
1.01D1 +
+
C3 - 1.065C1 +
+ 1.01D4
D2
1.01D2 +
C4 -
D3
1.01D3 +
B2
B3
B4
C2
C2 +
C3 +
C3
C4
=
=
=
D4 =
>=
<=
<=
<=
<=
<=
<=
<=
<=
80000
0
0
0
40000
32000
32000
32000
32000
32000
32000
32000
32000
21
Summarized results
Results of optimal solution
Investment
(1)
B1
B3
B4
C1
C4
D1
D2
D3
D4
Amount invested
(2)
32000.000
19557.842
12442.157
32000.000
32000.000
16000.000
16160.000
29723.750
19658.834
22
23
24
25
QSB+ (1-1)
|------------------ Solution Summary for case study 2------------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
1
|
32000 |
0 | 0.029899 |
.03 |
M|
|
2
|
2
|
0 |
0 | 0.019901 |
.03 |0.03010097|
|
3
|
3
| 19557.84 |
0 | 0.019903 |
.03 |
.0401|
|
4
|
4
| 12442.16 |
0 |
.0199 |
.03 |0.07543910|
|
5
|
1
|
32000 |
0 | 0.029606 |
.065 |
M|
|
6
|
2
|
0 | 0.045348 |
-M |
.065 | .1103485|
|
7
|
3
|
0 | 0.010200 |
-M |
.065 |0.07520001|
|
8
|
4
|
32000 |
0 | 0.054799 |
.065 |
M|
|
9
|
1
|
16000 |
0 |
-M |
.01 |0.01010097|
|
10
|
2
|
16160 |
0 | -9.90E19 |
.01 |0.02009801|
|
11
|
3
| 29723.76 |
0 | 0.009900 |
.01 |0.02009603|
|
12
|
4
| 19658.84 |
0 | -.999996 |
.01 |
.0199|
|----------------------------------------------------------------------------|
| Maximized OBJ = 6895.425 Iteration = 13 Elapsed CPU seconds = .0546875 |
|----------------------------------------------------------------------------|
26
QSB+ (1-2)
|---------------- Constraint Summary for case study 2 -----------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Tight (=)| 0.050909 |
0 | 67805.39 |
80000 | 99168.72 |
|
2
|Tight (=)| .040504 |
0 | -12316.5 |
0 | 19360.4 |
|
3
|Tight (=)| 0.030201 |
0 | -12439.7 |
0 | 19554.01 |
|
4
|Tight (=)| 0.020001 |
0 | -12564.1 |
0 | 19749.54 |
|
5
|Tight (>)| -0.00990 |
0 | 20052.96 |
40000 | 52689.76 |
|
6
|Tight (<)| 0.000100 |
0 | 19559.06 |
32000 |
32000 |
|
7
|Tight (<)| 0.010098 |
0 |
32000 |
32000 | 44565.35 |
|
8
|Loose (<)|
0 | 12442.16 | 19557.84 |
32000 |
M |
|
9
|Tight (<)| 0.009998 |
0 | 12250.46 |
32000 | 44564.12 |
|
10
|Tight (<)|
0 |
0 |
32000 |
32000 |
M |
|
11
|Tight (<)| 0.035393 |
0 |
0 |
32000 |
32000 |
|
12
|Tight (<)|
0 |
0 |
32000 |
32000 |
M |
|
13
|Tight (<)| 0.044998 |
0 | 12250.46 |
32000 | 44564.12 |
|----------------------------------------------------------------------------|
| Maximized OBJ = 6895.425 Iteration = 13 Elapsed CPU seconds = .0546875 |
|----------------------------------------------------------------------------|
27
QSB+ (2-1)
|--------------------- Solution Summary for case study 2---------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
1
|
32000 |
0 | -0.00010 |
0 |
M|
|
2
|
2
|
0 |
0 | -0.01009 |
0 |0.00010097|
|
3
|
3
| 19557.84 |
0 | 1.019904 |
1.03 |
1.0401|
|
4
|
4
| 12442.16 |
0 |
1.0199 |
1.03 | 1.075439|
|
5
|
1
|
32000 |
0 | -0.03539 |
0 |
M|
|
6
|
2
|
0 | 0.045348 |
-M |
1.065 | 1.110349|
|
7
|
3
|
0 | 0.010200 |
-M |
1.065 |
1.0752|
|
8
|
4
|
32000 |
0 |
1.0548 |
1.065 |
M|
|
9
|
1
|
16000 |
0 |
-M |
0 |0.00010097|
|
10
|
2
|
16160 |
0 | -9.90E19 |
0 |0.01009800|
|
11
|
3
| 29723.76 |
0 | -0.00009 |
0 |0.01009602|
|
12
|
4
| 19658.84 |
0 | 0.000001 |
1.01 |
1.0199|
|----------------------------------------------------------------------------|
| Maximized OBJ = 86895.42 Iteration = 13 Elapsed CPU seconds = 0.058593 |
|----------------------------------------------------------------------------|
|----------------------------------------------------------------------------|
28
30
Solution window
31
Answer report
32
Sensitivity analysis
33
Case Study 3
Investment choice problem in a limited capitals status
Inflow data
Cash inflows
Year
Investment
1
38
11
17
25
41
16
24
11
28
3
4
54
-
15
20
29
-
13
19
35
46
35
Outflow data
Cash outflows
Year
Investment
Amount
Available
0
1
34
13
10
5
16
8
9
4
31
10
55
28
2
3
14
17
6
6
10
11
6
7
13
12
30
37
16
30
36
0
1
2
3
4
NPV
Investment
1
-34
25
27
37
38.14
2
-10
6
10
9
12
18.67
3
-16
9
14
18
17.26
4
-9
4
5
6
14
12.83
5
-31
15
15
23
30
32.79
1.000
0.909
30.826
0.751
0.683
37
38
Constraints
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
34x1
13x1
14x1
17 x1
+
+
+
+
x1
+
-
10x2
5x2
6x2
6x 2
8x 2
+
+
+
+
16x3
8x 3
10x3
11x3
+
+
+
+
+
31x4
4x 4
6x4
7x4
5x 4
x2
+
+
+
+
+
31x5
10x5
13x5
12x5
16x5
x5
<=
<=
<=
<=
<=
<=
<=
x3
x4
x5
55
28
30
37
30
1
1
1
1
1
xj >= 0, j = 1, 2, 5
39
Summarized results
Optimal solution results
Variable
(1)
x1
x2
x3
x4
x5
Variable value
(2)
1
1
0.125
1
1
NPV (* 1000)
(3)
38.14
18.67
17.26
12.83
32.79
Total
40
41
QSB+
|-QSB+------------ Solution Summary for case study 3 ------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
X1
|
1 |
0 | 36.6775 |
38.14 |
M|
|
2
|
X2
|
1 |
0 | 10.7875 |
18.67 |
M|
|
3
|
X3
|
.125 |
0 | 16.92387 |
17.26 | 17.94823|
|
4
|
X4
|
1 |
0 | 9.70875 |
12.83 |
M|
|
5
|
X5
|
0 | .6512495 |
-M |
32.79 | 33.44125|
|----------------------------------------------------------------------------|
|
Maximized OBJ = 71.7975 Iteration = 5 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|----------------- Constraint Summary for 3.4 -----------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Tight (<)| 1.07875 |
0 |
53 |
55 |
59.4 |
|
2
|Loose (<)|
0 |
5 |
23 |
28 |
M |
|
3
|Loose (<)|
0 |
2.75 |
27.25 |
30 |
M |
|
4
|Loose (<)|
0 |
5.625 |
31.375 |
37 |
M |
|
5
|Loose (<)|
0 |
17 |
13 |
30 |
M |
|
6
|Tight (<)| 1.462499 |
0 | .6206896 |
1 | 1.058824 |
|
7
|Tight (<)|
7.8825 |
0 |
0 |
1 |
1.2 |
|
8
|Loose (<)|
0 |
.875 |
.125 |
1 |
M |
|
9
|Tight (<)| 3.12125 |
0 |
0 |
1 | 1.222222 |
|
10
|Loose (<)|
0 |
1 |
0 |
1 |
M |
42
43
Solution window
44
Answer window
45
46
Case study 4
Advertising media selection
Problem data
Advertising media
1.
2.
3.
4.
5.
6.
Friday day
Saturday day
Sunday day
Friday night
Saturday night
Sunday - night
47
Goal: Determination of views / records in order to maximize the total audience rate
Decision variables
1 = number of views on Friday (day)
2 = number of views on Saturday (day)
3 = number of views on Sunday (day)
4 = number of views on Friday (night)
5 = number of views on Saturday (night)
6 = number of views on Sunday (night)
49
Mathematical model
Max z = 5000x1 + 5500x2 + 5700x3 + 7500x4 + 8200x5 + 8400x6
with constraints:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
400x1 +
400x1
x1 +
-0.5x1 x1
450x2 + 450x3 +
+
450x2
x2 +
0.5x2 -
x3
0.5x3 +
500x4
500x4
0.5x4
550x5
550x5
0.5x5
550x6
0.5x6
x2
x3
x4
x5
x6
<=
<=
<=
>=
>=
<=
<=
<=
<=
<=
<=
45000
11000
14400
20
0
12
12
12
18
18
18
xj >= 0, j = 1, 2, 5
50
Results
Variable
(1)
x1
x2
x3
x4
x5
x6
Value
(number of views)
(2)
5
10
12
18
18
18
Units of view
Total audience rate
audience rate
of views
(3)
(4) = (2) x (3)
5000
25000
5500
55000
5700
68400
7500
135000
8200
147600
8400
151200
Total
582200
51
52
QSB+
|-QSB+------------ Solution Summary for case study 4 ------------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
X1
|
5 |
0 |
0 |
5000 |
6000|
|
2
|
X2
|
10 |
0 |
0 |
5500 | 6709.091|
|
3
|
X3
|
12 |
0 |
0 |
5700 |
M|
|
4
|
X4
|
18 |
0 |
6250 |
7500 |
M|
|
5
|
X5
|
18 |
0 | 6722.222 |
8200 |
M|
|
6
|
X6
|
18 |
0 |
0 |
8400 |
M|
|----------------------------------------------------------------------------|
|
Maximized OBJ = 582200 Iteration = 8 Elapsed CPU seconds = .0625
|
|----------------------------------------------------------------------------|
|----------------------------------------------------------------------------|
|----------------- Constraint Summary for 3.5 -----------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Loose (<)|
0 |
4300 |
40700 |
45000 |
M |
|
2
|Tight (<)|
12.5 |
0 |
9000 |
11000 |
13800 |
|
3
|Tight (<)| 12.22222 |
0 |
11250 |
14400 |
15300 |
|
4
|Loose (>)|
0 |
7 |
-M |
20 |
27 |
|
5
|Loose (>)|
0 |
13.5 |
-M |
0 |
13.5 |
|
6
|Loose (<)|
0 |
7 |
5 |
12 |
M |
|
7
|Loose (<)|
0 |
2 |
10 |
12 |
M |
|
8
|Tight (<)|
5700 |
0 |
5 |
12 | 21.55556 |
|
9
|Tight (<)|
1250 |
0 |
12.4 |
18 |
22 |
|
10
|Tight (<)| 1477.778 |
0 | 16.36364 |
18 | 23.72727 |
|
11
|Tight (<)|
8400 |
0 |
0 |
18 | 25.81818 |
|----------------------------------------------------------------------------|
53
54
VALUE
5.000000
10.000000
12.000000
18.000000
18.000000
18.000000
ROW
SLACK OR SURPLUS
1)
4300.000000
2)
0.000000
3)
0.000000
4)
7.000000
5)
13.500000
6)
7.000000
7)
2.000000
8)
0.000000
9)
0.000000
10)
0.000000
11)
0.000000
NO. ITERATIONS=
7
REDUCED COST
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
DUAL PRICES
0.000000
12.500000
12.222222
0.000000
0.000000
0.000000
0.000000
5700.000000
1250.000000
1477.777832
8400.000000
55
57
Solution window
58
Answer report
59
Sensitivity analysis
60
Case study 5
Marketing research
At least: 400 with children, 200 without children, 100 of one person
61
Cost elements
Interview cost (in monetary units)
Household category
With children
Without children
One person
Day
1500
1300
1000
Night
1800
1600
1200
62
Decision variables
x11 = Number of interviews to households with children carried out during the day
x12 = Number of interviews to households with children carried out during the night
x21= Number of interviews to households without children carried out during the day
x22 = Number of interviews to households without children carried out during the night
x31 = Number of interviews to households of one person carried out during the day
x32 = Number of interviews to households of one person carried out during the night
63
Mathematical model
Min z = 1.500x11 + 1.800x12 + 1.300x21 + 1.600x22 + 1.000x31 + 1.200x32
with constraints:
1.
x11 +
x12 +
x21
2.
x11 +
x12
3.
x21
4.
5.
-x11 +
x12 x21
6. -0.5x11 + 0.5x12
7.
- 0.6x21
8.
x22 +
x22 +
+
+
x22 -
x31 +
x32
x31 +
x31 +
x32
x32
0.4x22
-
=
>=
>=
>=
>=
>=
>=
>=
800
400
200
100
0
0
0
0
64
Summarized results
Variable
(1)
x11
x12
x21
x22
x31
x32
Total
Number of interviews
(2)
200
200
80
120
60
140
800
Interview cost
(3)
1500
1800
1300
1600
1000
1200
65
66
QSB+
|-------------------- Solution Summary for case study 5 ---------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
x11
|
200 |
0 |
480 |
1500 |
1800|
|
2
|
x12
|
200 |
0 |
1500 |
1800 |
M|
|
3
|
x21
|
80 |
0 |
450 |
1300 |
1600|
|
4
|
x22
|
120 |
0 |
1300 |
1600 |
M|
|
5
|
x31
|
60 |
0 |
-M |
1000 |
1200|
|
6
|
x32
|
140 |
0 |
1000 |
1200 | 1685.714|
|----------------------------------------------------------------------------|
|
Minimized OBJ = 1184000 Iteration = 9 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|----------------- Constraint Summary for 3.6 -----------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Tight (=)|
1140 |
0 |
700 |
800 |
M |
|
2
|Tight (>)|
510 |
0 |
0 |
400 |
500 |
|
3
|Tight (>)|
340 |
0 | 0.000015 |
200 |
300 |
|
4
|Loose (>)|
0 |
100 |
-M |
100 |
200 |
|
5
|Loose (>)|
0 |
120 |
-M |
0 |
120 |
|
6
|Tight (>)|
-300 |
0 |
-60 |
0 |
200 |
|
7
|Tight (>)|
-300 |
0 |
-60 |
0 |
80 |
|
8
|Tight (>)|
-200 |
0 |
-60 |
0 |
60 |
67
68
1184000.
VARIABLE
X11
X12
X21
X22
X31
X32
ROW
1)
2)
3)
4)
5)
6)
7)
8)
VALUE
200.000000
200.000000
80.000000
120.000000
60.000000
140.000000
SLACK OR SURPLUS
0.000000
0.000000
0.000000
100.000000
120.000000
0.000000
0.000000
0.000000
NO. ITERATIONS=
REDUCED COST
0.000000
0.000000
0.000000
0.000000
0.000000
0.000000
DUAL PRICES
-1140.000000
-510.000000
-340.000000
0.000000
0.000000
-300.000000
-300.000000
-200.000000
8
69
VARIABLE
X11
X12
X21
X22
X31
X32
ROW
1
2
3
4
5
6
7
8
CURRENT
COEF
1500.000000
1800.000000
1300.000000
1600.000000
1000.000000
1200.000000
CURRENT
RHS
800.000000
400.000000
200.000000
100.000000
0.000000
0.000000
0.000000
0.000000
71
Solution window
72
Answer report
73
74
Case study 6
Human resources management
Allocation of available human resources to different departments, work centers,
shifts etc.
Recruitment of seasonal staff
Allocation of staff to shifts
Minimizing the number of employees who should work in various time periods
during the day
75
Problems data
Time period
07 a.m. 09 a.m.
09 a.m. 11 a.m.
11 a.m. 13 p.m.
13 p.m. 15 p.m.
15 p.m. 17 p.m.
17 p.m. 19 p.m.
19 p.m. 21 p.m.
21 p.m. 23 p.m.
23 p.m. 07 a.m.
Gross employee cost
per day (in )
1
+
+
+
+
230
2
+
+
+
+
220
Shift
3
+
+
+
+
225
+
+
+
+
240
+
260
Minimum number of
required employees
35
68
60
57
65
63
72
33
12
76
Mathematical model
xj = number of employees starting in shift j
Min z = 230x1 + 220x2 + 225x3 + 240x4 + 260x5
with constraints:
1.
2.
3.
4.
5.
6.
7.
8.
9.
x1
x1
x1
x1
+
+
+
x2
x2
x2
x2
+
+
x3
x3
x3
x3
+
+
+
x4
x4
x4
x4
x5
xj >= 0,
>=
>=
>=
>=
>=
>=
>=
>=
>=
35
68
60
57
65
63
72
33
12
j = 1, 2,,5
77
x1
x1
x1
+
+
x2
x2
x2
+
+
x3
x3
x3
+
+
x4
x4
x4
x5
xj >= 0,
>=
>=
>=
>=
>=
>=
>=
35
68
57
65
72
33
12
j = 1, 2,,5
78
Summarized results
Optimal solution results
Variable
Value
(1)
x1
x2
x3
x4
x5
(2)
35
33
39
33
12
79
80
QSB+
|----------------- Solution Summary for case study 6 ------------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
X1
|
35 |
0 |
220 |
230 |
M|
|
2
|
X2
|
33 |
0 |
0 |
220 |
230|
|
3
|
X3
|
39 |
0 |
0 |
225 |
240|
|
4
|
X4
|
33 |
0 |
225 |
240 |
M|
|
5
|
X5
|
12 |
0 |
0 |
260 |
M|
|----------------------------------------------------------------------------|
|
Minimized OBJ = 35125 Iteration = 7 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|---------------- Constraint Summary for case study 6 -----------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Tight (>)|
10 |
0 |
0 |
35 |
68 |
|
2
|Tight (>)|
220 |
0 |
35 |
68 |
M |
|
3
|Loose (>)|
0 |
50 |
-M |
57 |
107 |
|
4
|Loose (>)|
0 |
40 |
-M |
65 |
105 |
|
5
|Tight (>)|
225 |
0 |
33 |
72 |
M |
|
6
|Tight (>)|
15 |
0 |
0 |
33 |
72 |
|
7
|Tight (>)|
260 |
0 |
0 |
12 |
M |
|----------------------------------------------------------------------------|
81
82
DUAL PRICES
-10.000000
-220.000000
0.000000
0.000000
-225.000000
-15.000000
-260.000000
83
VARIABLE
X1
X2
X3
X4
X5
ROW
1
2
3
4
5
6
7
CURRENT
COEF
230.000000
220.000000
225.000000
240.000000
260.000000
CURRENT
RHS
35.000000
68.000000
57.000000
65.000000
72.000000
33.000000
12.000000
ALLOWABLE
DECREASE
35.000000
33.000000
INFINITY
INFINITY
39.000000
33.000000
12.000000
84
Case study 7
Production planning
Problem: Having a forecast for each periods demand, determine the products
quantities that can be produced with feasible methods in order to satisfy the total
demand with the minimum cost.
For two products and , there are demand forecasts for January, February and
March.
Minimum total required stock: 130 units of product and 110 of product
Maintenance cost per period and per unit: 2% on the unit production cost
85
Demand
Bicycle demand
Month
January
February
March
Total
Bicycle
A
700
900
1000
2600
B
800
600
900
2.300
86
Capacity
Systems capacity
Month
January
February
March
Machine capacity
(machine hours)
3000
2800
3600
Available work
(man-hours)
2500
2300
2400
87
Use of resources
Required resources per product unit
Bicycle
A
B
Machine hours
1.5
1.6
Man-hours
1.1
1.2
88
Decision variables
xIJ = number of units of product I produced during month J,
where I = A, B and J = 1, 2, 3
IIJ = number of units of product I maintained in stock at the end of the month J,
where I = A, B and J = 1, 2, 3
J = 1 January
J = 2 February
J = 3 March
89
Objective function
Min z = 20XA1 + 20XA2 + 20XA3 + 25XB1 + 25XB2 + 25XB3 + 0.41IA1 + 0.41IA2 +
0.41IA3 + 0.5IB1 + 0.5IB2 + 0.5IB3
with the constraints:
Stock (end t-1) + Production (t) = Demand (t) + Reserve (end t)
90
Mathematical model
Min z = 20XA1 + 20XA2 + 20XA3 + 25XB1 + 25XB2 + 25XB3 + 0.41IA1 + 0.41IA2 +
0.41IA3 + 0.5IB1 + 0.5IB2 + 0.5IB3
with constraints:
1.
XA1
- IA1
=
600
January demand
2.
XB1
- IB1
=
680
January demand
3.
XA2
+ IA1
- IA2
=
900
February demand
4.
XB2
+ IB1
- IB2
=
600
February demand
5.
XA3
+ IA2
- IA3
=
1000
March demand
6.
XB3
+ IB2
- IB3
=
900
March demand
7.
IA3 >= 130
Total stock in March
8.
IB3 >= 110
Total stock in March
9.
1.5XA1
+ 1.6XB1
<=
3000
Machine hours
10.
1.5XA2
+ 1.6XB2
<=
2800
Machine hours
11.
1.5XA3
+ 1.6XB3
<=
3600
Machine hours
12.
1.1XA1
+ 1.2XB1
<=
2500
Man-hours
13.
1.1XA2
+ 1.2XB2
<=
2300
Man-hours
14.
1.1XA3
+ 1.2XB3
<=
2400
Man-hours
Xij >= 0,
i = A, B and j = 1,2,3
Iij >= 0,
i = A, B and j = 1,2,3
91
Summary results
Optimal solution results
Variable
Value
XA1
600
XA2
950
XA3
1080
XB1
680
XB2
600
XB3
1010
IA1
0
IA2
50
IA3
130
IB1
0
IB2
0
IB3
110
93
94
QSB+ (1)
|---------------- Solution Summary for case study 7 ------------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
XA1
|
600 |
0 |
19.6 |
20 |
M|
|
2
|
XA2
| 950.0001 |
0 |
19.6 |
20 | 20.05833|
|
3
|
XA3
|
1080 |
0 | 19.94167 |
20 |
20.4|
|
4
|
XB1
|
680 |
0 |
24.5 |
25 |
M|
|
5
|
XB2
|
600 |
0 | 24.93636 |
25 |
25.5|
|
6
|
XB3
|
1010 |
0 | -.936363 |
25 | 25.06364|
|
7
|
IA1
|
0 |
.4 |
0 |
.4 |
M|
|
8
|
IA2
| 50.00007 |
0 | -2.98E-8 |
.4 | .4583333|
|
9
|
IA3
|
130 |
0 |
-20.4 |
.4 |
M|
|
10
|
IB1
|
0 |
.5 |
0 |
.5 |
M|
|
11
|
IB2
|
0 | 0.063636 | .4363636 |
.5 |
M|
|
12
|
IB3
|
110 |
0 | -25.4363 |
.5 |
M|
|----------------------------------------------------------------------------|
|
Minimized OBJ = 109977 Iteration = 10 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|----------------------------------------------------------------------------|
95
QSB+ (2)
|---------------- Constraint Summary for case study 7 -----------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Tight (=)|
20 |
0 |
0 |
600 | 1274.667 |
|
2
|Tight (=)|
25 |
0 |
0 |
680 |
1312.5 |
|
3
|Tight (=)|
20 |
0 | -50.0000 |
900 | 1176.667 |
|
4
|Tight (=)|
25 |
0 |
0 |
600 | 859.3749 |
|
5
|Tight (=)|
20.4 |
0 | 949.9999 |
1000 | 1276.667 |
|
6
|Tight (=)| 25.43636 |
0 | 854.1666 |
900 | 1153.611 |
|
7
|Tight (>)|
20.8 |
0 | 79.99993 |
130 | 406.6666 |
|
8
|Tight (>)| 25.93636 |
0 | 64.16661 |
110 | 363.611 |
|
9
|Loose (<)|
0 |
1012 |
1988 |
3000 |
M |
|
10
|Loose (<)|
0 | 414.9999 |
2385 |
2800 |
M |
|
11
|Loose (<)|
0 | 364.0001 |
3236 |
3600 |
M |
|
12
|Loose (<)|
0 |
1024 |
1476 |
2500 |
M |
|
13
|Loose (<)|
0 | 534.9999 |
1765 |
2300 |
M |
|
14
|Loose (<)|
0 |
1024 | 2095.667 |
2400 |
2455 |
|----------------------------------------------------------------------------|
|
Minimized OBJ = 109977 Iteration = 10 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|
< PageDown >
< PageUp >
< Hardcopy >
< Cancel >
|
|----------------------------------------------------------------------------|
96
DUAL PRICES
-20.000000
-25.000000
-20.000000
-25.000000
-20.400000
-25.436363
-20.799999
-25.936363
0.000000
0.000000
0.000000
0.000000
0.000000
0.363636
97
Case study 8
Diet problem
Identification of a diet or of a prescription meeting specific dietary requirements
Criterion: minimum cost
Xj = the amount of ingredient j for the production of one unit of animal feed
99
Problems data
Required nutritional
ingredient
Vitamin A
Vitamin C
Vitamin E
Proteins
Calories
Unit cost
Nutritional requirement
per animal feed unit
>= 80
>= 100
>= 60
>= 260
<= 2300
100
Mathematical model
Min z = 180x1 + 160x2 + 145x3 + 200x4
with constraints:
1.
2.
80x1 +
110x1 +
115x2 +
90x2 +
100x3 +
85x3 +
90x4 + >=
100x4 + >=
80
100
3.
4.
50x1 +
250x1 +
70x2 +
300x2 +
105x3 +
210x3 +
80x4 + >=
240x4 + >=
60
260
5.
6.
480x1 +
x1 +
510x2 +
x2 +
470x3 +
x3 +
530x4 + >=
x4 + >=
2300
1
xj >=
0,
for
j = 1,2,3,4
101
Summarized results
Optimal solution results
Variable
(1)
x1
x2
x3
x4
Total
Value
(2)
0.537
0.317
0.146
0
1
Unit cost
(3)
180
160
145
200
102
103
QSB+
|----------------- Solution Summary for case study 8 ------------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
X1
| .5365854 |
0 | 151.6667 |
180 |
220|
|
2
|
X2
| .3170732 |
0 |
152 |
160 |
223.75|
|
3
|
X3
| .1463415 |
0 |
-M |
145 |
155|
|
4
|
X4
|
0 | 33.41463 | 166.5854 |
200 |
M|
|----------------------------------------------------------------------------|
|
Minimized OBJ = 168.5366 Iteration = 8 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|----------------- Constraint Summary for 3.9 -----------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Loose (>)|
0 | 14.02439 |
-M |
80 | 94.02439 |
|
2
|Tight (>)| 1.243902 |
0 | 87.77778 |
100 | 102.5352 |
|
3
|Loose (>)|
0 | 4.390244 |
-M |
60 | 64.39024 |
|
4
|Tight (>)| 0.097560 |
0 |
234 |
260 |
275 |
|
5
|Loose (<)|
0 | 1811.951 | 488.0488 |
2300 |
M |
|
6
|Tight (=)| 18.78049 |
0 | .9860031 |
1 | 1.166667 |
|----------------------------------------------------------------------------|
|
Minimized OBJ = 168.5366 Iteration = 8 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
104
SLACK OR SURPLUS
14.024390
0.000000
4.390244
0.000000
1811.951172
0.000000
NO. ITERATIONS=
DUAL PRICES
0.000000
-1.243902
0.000000
-0.097561
0.000000
-18.780487
5
105
ROW
1
2
3
4
5
6
CURRENT
RHS
80.000000
100.000000
60.000000
260.000000
2300.000000
1.000000
Case study 9
Mix problem
Determination of the best mix program of raw material for the production of final
products
Problems data
Main ingredient
Octane number
A
B
C
120
90
130
38
42
105
Maximum daily
available quantity (tones)
1000
1200
700
108
Demand data
Fuel
A
B
C
Octane number
94
92
96
109
Decision variables
Xij = quantity of ingredient i mixed for the production of one tone of product j
for i = A, B, C and j = 1, 2, 3
j = 1 fuel super
j = 2 unleaded fuel
j = 3 super unleaded fuel
110
111
112
Objective function
Z=
Max z = 47XA1 +42XA2 +50XA3 + 43XB1 +38XB2 + 46XB3 20XC1 25XC2 17XC3
113
114
All constraints
1.
2.
3.
26XA1
28XA2
24XA3
- 4XB1
- 2XB2
+ 6XB3
+
+
+
36XC1
38XC2
34XC3
>=
>=
>=
0
0
0
4.
5.
6.
XA1
XB1
XC1
+ XA2
+ XB2
+ XC2
+
+
+
XA3
XB3
XC3
<=
<=
<=
1000
1200
700
7.
8.
9.
XA1
XA2
XA3
+ XB1
+ XB2
+ XB3
+
+
+
XC1
XC2
XC3
>=
>=
>=
800
1100
500
Xij
>= 0,
i = A,B,C and
Minimum number
of octanes
Ingredients
consumption
Products demand
j = 1,2,3
115
Summarized results
Optimal solution results
Variable
Value (tones)
(1)
XA1
(2)
0
500
500
720
480
0
80
120
0
XA2
XA3
XB1
XB2
XB3
XC1
XC2
XC3
117
QSB+ (1)
|---------------- Solution Summary for case study 9 -------------------------|
|----------------------------------------------------------------------------|
| Variable | Variable |
|Opportuni-| Minimum | Current | Maximum |
| Number |
Name
| Solution | ty Cost |Obj. Coef.|Obj. Coef.|Obj. Coef.|
|----------+----------+----------+----------+----------+----------+----------|
|
1
|
XA1
|
0 |
0 |
-M |
47 |
47|
|
2
|
XA2
|
500 |
0 |
42 |
42 |
42|
|
3
|
XA3
|
500 |
0 |
50 |
50 |
67|
|
4
|
XB1
|
720 |
0 |
43 |
43 | 65.22222|
|
5
|
XB2
|
480 |
0 |
38 |
38 |
38|
|
6
|
XB3
|
0 |
0 |
-M |
46 |
46|
|
7
|
XC1
|
80 |
0 |
-20 |
-20 |
-20|
|
8
|
XC2
|
120 |
0 |
-25 |
-25 |
-25|
|
9
|
XC3
|
0 |
0 |
-M |
-17 |
-17|
|----------------------------------------------------------------------------|
|
Maximized OBJ = 90600 Iteration = 7 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
118
QSB+ (2)
|---------------- Constraint Summary for case study 9 -----------------------|
|----------------------------------------------------------------------------|
|Constraint|Constraint| Shadow | Surplus | Minimum | Current | Maximum |
| Number | Status | Price
|
| R. H. S. | R. H. S. | R. H. S. |
|----------+----------+----------+----------+----------+----------+----------|
|
1
|Tight (>)|
0 |
0 |
-3200 |
0 |
4800 |
|
2
|Loose (>)|
0 |
17600 |
-M |
0 |
17600 |
|
3
|Loose (>)|
0 |
12000 |
-M |
0 |
12000 |
|
4
|Tight (<)|
67 |
0 |
500 |
1000 |
1120 |
|
5
|Tight (<)|
63 |
0 |
720 |
1200 |
1320 |
|
6
|Loose (<)|
0 |
500 |
200 |
700 |
M |
|
7
|Tight (>)|
-20 |
0 | 666.6666 |
800 |
1300 |
|
8
|Tight (>)|
-25 |
0 |
980 |
1100 |
1600 |
|
9
|Tight (>)|
-17 |
0 |
380 |
500 |
1000 |
|----------------------------------------------------------------------------|
|
Maximized OBJ = 90600 Iteration = 7 Elapsed CPU seconds = 0
|
|----------------------------------------------------------------------------|
|----------------------------------------------------------------------------|
119