Dynamic Programming Deterministic Model: Workers Precinct
Dynamic Programming Deterministic Model: Workers Precinct
A country chairwoman of a certain political party is making plans for an upcoming presidential
election. She has received the services of six volunteer workers for precinct work and she wants to
assign them to four precincts in such a way as to maximize their effectiveness. She feels that it would
be inefficient to assign a worker to more than one precinct, but she is willing to assign no workers to
any one of the precincts if they can accomplish more in other precincts.
The following table gives the estimated increase in the number of votes for the party’s candidate in
each precinct if it were allocated various numbers of workers:
Precinct
Workers 1 2 3 4
0 0 0 0 0
1 4 7 5 6
2 9 11 10 11
3 15 16 15 14
4 18 18 18 16
5 22 20 21 17
6 24 21 22 18
Find optimal solutions for how many of the six workers should be assigned to each of the four
precincts to maximize the total estimated increase in the plurality of the party’s candidate. Use
dynamic programming to find all of them so that the chairwoman can take a decision on other
factors.
Solution:
Precinct 2
Workers 0 1 2 3 4 5 6
0 0 7 11 16 18 20 21
1 4 11 15 20 22 24
2 9 16 20 25 27
Precinct 1 3 15 22 26 31
4 18 25 29
5 22 29
6 24
Worker Increase in
s votes
0 0
1 7
2 11
Precinc
t 1&2 3 16
4 22
5 26
6 31
Precinct 4
Worker 0 1 2 3 4 5 6
0 0 6 11 14 16 17 18
1 5 11 16 19 21 22
2 10 16 21 24 26
Precinct 3 3 15 21 26 29
4 18 24 29
5 21 27
6 22
0 0
1 6
2 11
Precinct 3 3 16
&4
4 21
5 26
29
6
Precinct
1&2
Worker
s 0 1 2 3 4 5 6
0 0 7 11 16 22 26 31
1 6 13 17 22 28 32
Precinct 2 11 18 22 27 33
3&4 3 16 23 27 32
4 21 28 32
5 26 33
6 29
SOLUTION
Precincts
1 2 3 4
0 1 3 2
Combination
3 1 1 1
s
3 1 0 2
Linear Programming
Question 1. Services
1 6 a.m. – 10 a.m. 2
2 10 a.m. – 2 p.m. 7
3 2 p.m. – 6 p.m. 15
4 6 p.m. – 10 p.m. 8
5 10 p.m. – 2 a.m. 20
6 2 a.m. – 6 a.m. 6
Nurses report at the hospital at the beginning of each period and work
for 8 consecutive hours. The hospital wants to determine the minimal
number of nurses to be employed so that there will be a sufficient
number of nurses available for each period. Formulate this as a linear
programming problem by setting up appropriate constraints and
objective function.
Solution:
Let X1, X2, X3, X4, X5 and X6 be the number of nurses joining duty at
the beginning of periods 1, 2, 3, 4, 5 and 6 respectively.
Minimize Z = X1 + X2 + X3 + X4 + X5 + X6
Constraints:
X1 + X2 ≥ 7
X2 + X3 ≥ 15
X3 + X4 ≥ 8
X4 + X5 ≥ 20
X5 + X6 ≥ 6
X6 + X1 ≥ 2
Question 2: Manufacturing
A Gold processor has two sources of gold ore, source A and source B. In
order to keep his plant running, at least three tons of ore must be
processed each day. Ore from source A costs $20 per ton to process,
and ore from source B costs $10 per ton to process. Costs must be kept
to less than $80 per day. Moreover, Federal Regulations require that
the amount of ore from source B cannot exceed twice the amount of
ore from source A. If ore from source A yields 2 oz. of gold per ton, and
ore from source B yields 3 oz. of gold per ton, how many tons of ore
from both sources must be processed each day to maximize the
amount of gold extracted subject to the above constraints?
Solution:
X1 + X2 >= 3
Product 1 Product 2
Labour required 4 hours 2 hours
Contribution to profit $4 $2
The company has a goal of $48 in profits and incurs a $1 penalty for each dollar it falls short of this
goal. A total of 32 hours of labour are available. A $2 penalty is incurred for each hour of overtime
(labour over 32 hours) used, and a $1 penalty is incurred for each hour of available labour that is
unused. Marketing considerations require that at least 7 units of product 1 be produced and at least
10 units of product 2 be produced. For each unit (of either product) by which production falls short
of demand, a penalty of $5 is assessed.
Formulate an LP than can be used to minimize the total penalty incurred by the company.
Solution:
Let:
x
id
The Quality Creamery Co. produces ice-cream bars for vending machines and has an
annual demand for 72000 bars. The Co. has the capacity to produce 400 bars per day. It takes
only a few minutes to adjust the production set-up cost estimated at Rs.7.50 per set up for the
bars, and the firm is reluctant to produce too many at one time because the storage cost
(refrigeration) is relatively high at Rs.1.50 /bar/year. The shortage cost of one bar is Rs 3. The
firm supplies vending machines with its “Quality bars ” on 360 days of the year.
Determine the optimum manufacturing quantity and the number of shortages. Also determine the
manufacturing time and the time between set-ups.
a) What is the most economical number of bars to produce during any one production
run and the number of shortages?
b) Also determine the manufacturing time and the time between set-ups.
Deman
d 72000
Co 7.5
Cs 3
Ch 1.5
p 400
d 200
1469.693
Q = units
K= p–d
p
M = Cs *Q* K
Cs + Ch
489.897
M= units
R = (Q * K) – M
244.948
R= units
= T2+ T3
= M/ d + R/d
3.674
Time btw setups days
=Manufacturing Time
= T1 + T4
= M/ (p-d) + R/ (p-d)
Manufacturing 3.674
Time days
A large hotel serves banquets and several restaurants from central kitchen in which labour is
shifted among various stations and jobs. Salad consumption (demand) is virtually constant
and known to be 30 000 Salads/year. Salads cost Rs.10.0 each and it costs Rs.5 to order the
materials required for the salad line. Assume salads can be produced instantaneously.
Carrying costs of salads are high because of spoilage, are estimated to be 90% of the cost of a
salad.
Deman
d 30000
Co 4
Cs 5
Ch 9
Q= 273.252
M = Cs *Q
Cs + Ch
97.5900
M= 1
R= Q –M
R= 175.662
ATC = D * Co + M2 * Ch + R2 * Cs
Q 2Q 2Q
ATC = 439.155 + 156.841 + 282.313
ATC = 878.310