1
00:00:18,140 --> 00:00:26,740
in this class we look at some more aspects
of formulating linear programming problems
2
00:00:26,740 --> 00:00:35,230
we now look at the formulation of manpower
requirement problem the problem is as follows
3
00:00:35,230 --> 00:00:42,290
the daily requirement of nurses in a private
nursing home is given in the following table
4
00:00:42,290 --> 00:00:52,500
now this is given as six time slots in a day
each time slot being for four hours for example
5
00:00:52,500 --> 00:00:59,050
eight am to twelve noon we require twelve
people twelve non to four pm we require fifteen
6
00:00:59,050 --> 00:01:07,560
people and so on the nurses who come to work
can start work at the beginning of any of
7
00:01:07,560 --> 00:01:14,310
these six slots which means they can start
working at eight am or twelve noon or four
8
00:01:14,310 --> 00:01:22,850
pm or eight pm twelve midnight and four am
they can start working on any of these hours
9
00:01:22,850 --> 00:01:26,610
and their work for eight consit continuous
hours
10
00:01:26,610 --> 00:01:34,670
what is a minimum number of people required
to meet the daily demand the also make an
11
00:01:34,670 --> 00:01:42,259
assumption that a person who starts working
at eight am works in the slot eight am to
12
00:01:42,259 --> 00:01:51,329
twelve noon as well as in the slot well noon
to four pm again a person who starts working
13
00:01:51,329 --> 00:01:58,400
at eight pm would work in the eight pm to
twelve midnights slot as well as in the twelve
14
00:01:58,400 --> 00:02:05,360
midnight to four am slot so that is how the
eight consigative hours are coming so the
15
00:02:05,360 --> 00:02:13,220
problem is how many people start working at
the beginning of these six time slots such
16
00:02:13,220 --> 00:02:21,090
that we have minimum total number of people
working and we are able to meet the requirement
17
00:02:21,090 --> 00:02:33,300
or demand of each of these time slots since
there are six times slots we have six variables
18
00:02:33,300 --> 00:02:41,740
and we define this variable as x one to x
six so x one to x six let it be the number
19
00:02:41,740 --> 00:02:47,670
of nurses who start work at the beginning
of the six slots which is eight am twelve
20
00:02:47,670 --> 00:02:54,420
noon and so on
now the objective function will be to minimize
21
00:02:54,420 --> 00:03:00,980
the total number of people who are working
and therefore it is to minimize x one plus
22
00:03:00,980 --> 00:03:08,850
x two plus x three plus x four plus x five
plus x six now that is shown here as the objective
23
00:03:08,850 --> 00:03:18,510
function here x one to x six it's also a shown
in a form of a summation where this sigma
24
00:03:18,510 --> 00:03:25,700
j equal to one to six x j when expanded will
give x one plus x two plus x three plus x
25
00:03:25,700 --> 00:03:32,890
four plus x five plus x six so the objective
function will be minimize the number of people
26
00:03:32,890 --> 00:03:40,330
who are working in who come to work in the
beginning of the six slots now the constraints
27
00:03:40,330 --> 00:03:47,250
are to meet the requirement of this six slots
for example x one plus x two is greater than
28
00:03:47,250 --> 00:03:54,319
or equal to fifteen
now x one plus x two the number of people
29
00:03:54,319 --> 00:04:03,290
who actually work in the slot twelve noon
to four pm if he see twelve noon to four pm
30
00:04:03,290 --> 00:04:11,829
fifteen people are required but we also observed
that people who start working at eight am
31
00:04:11,829 --> 00:04:20,220
work for eight hours and there eight hours
includes twelve noon to four pm people who
32
00:04:20,220 --> 00:04:26,640
start working at twelve noon also work for
eight consigative hours therefore hours between
33
00:04:26,640 --> 00:04:33,140
twelve noon and four pm and another four hours
between four pm and eight pm therefore the
34
00:04:33,140 --> 00:04:39,280
number of people who are working in this slot
which is between twelve noon and four pm are
35
00:04:39,280 --> 00:04:45,710
those who start working at eight am and those
who start working at twelve noon
36
00:04:45,710 --> 00:04:52,110
so x one plus x two are the number of people
who actually work between twelve noon and
37
00:04:52,110 --> 00:04:58,820
four pm and therefore x one plus x two should
be greater than or equal to fifteen and we
38
00:04:58,820 --> 00:05:05,860
should be able to meet the requirement of
period two which is given by fifteen has the
39
00:05:05,860 --> 00:05:13,260
requirement so similarly x two plus x three
the number of people who actually work between
40
00:05:13,260 --> 00:05:19,539
four pm to eight pm that should be greater
than or equal to ten x three plus x four should
41
00:05:19,539 --> 00:05:26,550
be greater than or equal to eight x four plus
x five is greater than or equal to six x five
42
00:05:26,550 --> 00:05:32,550
plus x six is greater than or equal to ten
and x one plus x six is greater than or equal
43
00:05:32,550 --> 00:05:36,849
to twelve because to meet the eight am to
twelve noon
44
00:05:36,849 --> 00:05:43,550
those who come to work from four am to eight
am will be working in this slot people who
45
00:05:43,550 --> 00:05:49,430
come to work at eight am also work in this
slot so this twelve requirement this to be
46
00:05:49,430 --> 00:05:56,990
with x one people who start work at eight
am and x six people who start work at four
47
00:05:56,990 --> 00:06:07,469
am so we have these six constraint which represent
the requirement of the six periods to be met
48
00:06:07,469 --> 00:06:13,970
what is important is to understand that both
x one and x two are the number of people who
49
00:06:13,970 --> 00:06:20,219
are working in the second period x two and
x three work in third period and like that
50
00:06:20,219 --> 00:06:28,099
x six and x one work in the first period now
all this variable x one x two x three x four
51
00:06:28,099 --> 00:06:36,390
x five and x six have to be greater than or
equal to zero of course one may ask that this
52
00:06:36,390 --> 00:06:42,860
x one to x six representing the number of
nurses should also take only integer values
53
00:06:42,860 --> 00:06:51,450
so is it necessary to introduce these variables
also as integer variables now at the moment
54
00:06:51,450 --> 00:06:57,580
we choose not to represent them as integer
variables we are interested in formulating
55
00:06:57,580 --> 00:07:05,080
linear programming problems therefore the
expert and define the variables to take continuous
56
00:07:05,080 --> 00:07:14,430
value if we put explicit integer restriction
on the variables then the formulation become
57
00:07:14,430 --> 00:07:22,390
linear integer programming but at the moment
since we are doing only linear programming
58
00:07:22,390 --> 00:07:30,659
we are defining these variables to be continuous
variables so this simple formulation have
59
00:07:30,659 --> 00:07:35,380
taught as a few things
in this formulation the objective function
60
00:07:35,380 --> 00:07:42,029
is a minimization function unlike the maximization
function in the last example that was done
61
00:07:42,029 --> 00:07:50,570
in the last class here the six constraints
are greater than or equal to in equalities
62
00:07:50,570 --> 00:07:58,090
unlike less than or equal to in qualities
which we saw in the previous example so based
63
00:07:58,090 --> 00:08:04,280
on two examples we will be able to say that
the objective function is either a maximization
64
00:08:04,280 --> 00:08:11,990
function or minimization function the constraints
are either less than or equal to type inequalities
65
00:08:11,990 --> 00:08:19,810
or greater than or equal to type in equalities
they can also be equations there is a non
66
00:08:19,810 --> 00:08:27,330
negative restriction on the variables now
we look at the third formulation where we
67
00:08:27,330 --> 00:08:36,969
look at production planning situation we consider
a single product and company making this product
68
00:08:36,969 --> 00:08:43,750
the demand for two weeks for this product
are eight hundred and thousand respectively
69
00:08:43,750 --> 00:08:51,780
in a week this company can produce up to seven
hundred units using their regular time production
70
00:08:51,780 --> 00:08:59,950
and it cost rupees hundred for product made
as per unit made the company can also employee
71
00:08:59,950 --> 00:09:07,960
overtime and produce up to an extra three
hundred units in a week now the cost of making
72
00:09:07,960 --> 00:09:17,460
that unit through our time is hundred and
twenty per product the company can also produce
73
00:09:17,460 --> 00:09:25,520
a little more in the first month if it is
possible and use the axis from one week to
74
00:09:25,520 --> 00:09:35,860
another and the cost of carrying this excess
inventory from one week to another is rupees
75
00:09:35,860 --> 00:09:42,830
fifteen per product per week
how should they produce to make the demand
76
00:09:42,830 --> 00:09:53,230
the two weeks at minimum cost now we introduce
five variables x one be the number of products
77
00:09:53,230 --> 00:10:00,970
made using regular time in week one x two
be the number of products made using regular
78
00:10:00,970 --> 00:10:11,140
time in week two week is the unit of time
that we are looking at in this example y one
79
00:10:11,140 --> 00:10:19,360
is the number of products made using overtime
in week one and y two be the number of products
80
00:10:19,360 --> 00:10:28,630
made using overtime in week two now z one
is introduced as a number of products carried
81
00:10:28,630 --> 00:10:37,330
from week one two week two after meeting week
ones demand so there are five variable and
82
00:10:37,330 --> 00:10:49,080
this formulation the objective function is
to minimize the total cost hundred x one is
83
00:10:49,080 --> 00:10:58,150
the cost of producing x one units in week
one using regular time hundred x two is the
84
00:10:58,150 --> 00:11:07,310
cost of producing x two in week two using
regular time
85
00:11:07,310 --> 00:11:13,830
y one is the quantity produced in week one
using overtime and therefore cost hundred
86
00:11:13,830 --> 00:11:21,760
and twenty y one similarly hundred and twenty
y two is the cost of producing in week two
87
00:11:21,760 --> 00:11:30,620
using overtime and fifteen z one is the cost
of carrying the z one items from week one
88
00:11:30,620 --> 00:11:37,750
to week two there are five in terms three
district cost regular time cost for two weeks
89
00:11:37,750 --> 00:11:44,900
overtime cost for two week and cost of carrying
the excess inventory from week one to week
90
00:11:44,900 --> 00:11:52,700
two now we look at the constraints the first
constraint to satisfy the demand of the first
91
00:11:52,700 --> 00:12:01,360
week so this is written as x one plus y one
equals a eight hundred plus z one eight hundred
92
00:12:01,360 --> 00:12:09,200
is a demand for the week which is to be satisfied
if we produce more than eight hundred the
93
00:12:09,200 --> 00:12:16,290
quantity z one is carried to the next week
so whatever is produced in the first week
94
00:12:16,290 --> 00:12:23,290
should meet the demand of the week and the
access that is carried to the second week
95
00:12:23,290 --> 00:12:33,700
therefore x one plus y one is equal to eight
hundred plus z one now this is rewritten as
96
00:12:33,700 --> 00:12:43,820
x one plus y one minus z one equals eight
hundred it is customary to write the constant
97
00:12:43,820 --> 00:12:50,590
in the right inside of the equation or the
inequality and the left hand side of the equation
98
00:12:50,590 --> 00:12:58,710
of inequality contains the variable terms
now this particular constraint is an equation
99
00:12:58,710 --> 00:13:09,440
so the actual construction written in a standard
form is shown in different color here now
100
00:13:09,440 --> 00:13:17,890
the constraint for the demand of the second
month or second week is x two plus y two represent
101
00:13:17,890 --> 00:13:27,570
the quantity produced using regular time and
overtime in week two z one is the quantity
102
00:13:27,570 --> 00:13:35,440
carried from week one to week two
therefore what is available to meet the demand
103
00:13:35,440 --> 00:13:42,210
of week two or the two production quantities
x two plus y two and the excess inventory
104
00:13:42,210 --> 00:13:51,180
that is carried which is z one so z one plus
x two plus y two equal to thousand is the
105
00:13:51,180 --> 00:14:00,750
constraint to meet the demand of the second
week we also have capacity restrictions where
106
00:14:00,750 --> 00:14:07,220
x one is restricted to seven hundred s less
than or equal to seven hundred x two is less
107
00:14:07,220 --> 00:14:13,520
than or equal to seven hundred represents
the capacity regular time capacity in the
108
00:14:13,520 --> 00:14:18,540
two weeks
y one less than or equal to three hundred
109
00:14:18,540 --> 00:14:26,570
y two less than or equal to three hundred
represent the over time capacity in the two
110
00:14:26,570 --> 00:14:36,010
weeks so there are six constraints two constraints
to meet the demand of the two weeks which
111
00:14:36,010 --> 00:14:43,150
are a expressed as equations the remaining
four constraints are inequalities less than
112
00:14:43,150 --> 00:14:53,230
or equal to inequalities because they represent
the limit on regular time production and overtime
113
00:14:53,230 --> 00:15:02,589
production in the two weeks there is an explicit
non negativity restriction given by x one
114
00:15:02,589 --> 00:15:09,810
x two y one y two and z one greater than or
equal to zero
115
00:15:09,810 --> 00:15:16,360
so this completes the formulation of this
problem now let us look at the same formulation
116
00:15:16,360 --> 00:15:23,540
in a slightly different way now the objective
of function is once again written in a slightly
117
00:15:23,540 --> 00:15:32,630
different way it's now return as hundred x
one plus x hundred x two plus one twenty y
118
00:15:32,630 --> 00:15:41,940
one plus one twenty y two plus fifteen into
x one plus y one minus eight hundred now z
119
00:15:41,940 --> 00:15:52,740
one has been left out and z one has been replaced
as x one plus y one minus eight hundred from
120
00:15:52,740 --> 00:16:00,029
this equation so i am leaving out or eliminating
the variable z one and writing it has fifteen
121
00:16:00,029 --> 00:16:07,839
into x one plus y one minus eight hundred
now this is obtained from this equation so
122
00:16:07,839 --> 00:16:15,810
this is rewritten on simplification hundred
abd fifteen x one plus hundred x two plus
123
00:16:15,810 --> 00:16:28,149
hundred and thirty five y one plus hundred
and twenty y two minus twelve thousand in
124
00:16:28,149 --> 00:16:36,060
rest of the constrains are x one plus y one
is greater than or equal to eight hundred
125
00:16:36,060 --> 00:16:44,670
what is produced in the first week is either
to eight hundred or more if it is more the
126
00:16:44,670 --> 00:16:51,210
excise carried to the second week so what
is carry to the second week its x one plus
127
00:16:51,210 --> 00:16:59,490
y one minus eight hundred so this z one is
now written as x one plus y one minus eight
128
00:16:59,490 --> 00:17:07,059
hundred and on simplification will give x
one plus x two plus y one plus y two is greater
129
00:17:07,059 --> 00:17:13,059
than or equal to one thousand eight hundred
because the z one is x one plus y one minus
130
00:17:13,059 --> 00:17:16,000
eight hundred
the minus eight hundred goes to the other
131
00:17:16,000 --> 00:17:21,560
side of the equation to give us x one plus
x two plus y one plus y two is greater than
132
00:17:21,560 --> 00:17:28,350
or equal to one thousand eight hundred now
four capacity constraints remain the same
133
00:17:28,350 --> 00:17:34,830
now there are only four variables because
the variable z one has been left out so all
134
00:17:34,830 --> 00:17:43,010
the four variables are greater than or equal
to zero now if we compare this to formulation
135
00:17:43,010 --> 00:17:52,140
we may also wish to say that x one plus x
two y one plus y two could be equal to one
136
00:17:52,140 --> 00:17:58,710
thousand eight hundred or it could be greater
than or equal to one thousand eight hundred
137
00:17:58,710 --> 00:18:08,380
for example if we substitute z one as z one
plus y one minus eight hundred into the second
138
00:18:08,380 --> 00:18:15,960
equation here the second equation would become
an equation instead of an equalities
139
00:18:15,960 --> 00:18:25,100
however since the first constraint is returned
as an inequality we simply maintain the consistency
140
00:18:25,100 --> 00:18:33,270
and write this as greater than or equal to
one thousand eight hundred because x one plus
141
00:18:33,270 --> 00:18:40,559
x two y one plus y two would represent the
total production in the two weeks this represents
142
00:18:40,559 --> 00:18:46,309
the total demand on the two weeks and because
there is no third week in this particular
143
00:18:46,309 --> 00:18:53,930
example we will not end up making more than
one thousand eight hundred if we look at the
144
00:18:53,930 --> 00:19:01,309
production of the two weeks taken together
so it is alright if we write a greater than
145
00:19:01,309 --> 00:19:06,770
or equal to in equality here instead of an
equation
146
00:19:06,770 --> 00:19:13,700
so the new formulation now has eliminated
one variable has four variable and has four
147
00:19:13,700 --> 00:19:20,540
variables which represent the two variables
which are regular time production quantities
148
00:19:20,540 --> 00:19:27,130
in the two weeks and other two variables which
are over time production quantities in the
149
00:19:27,130 --> 00:19:35,880
two weeks now there is also a constant term
in the objective function and when we actually
150
00:19:35,880 --> 00:19:41,920
solve this weekend about the constant both
from the formulation and to begin within the
151
00:19:41,920 --> 00:19:49,610
solution and can add that so this will be
rewritten as minimize hundred and fifteen
152
00:19:49,610 --> 00:19:57,130
x one plus hundred x two plu hundred and thirty
five one plus twenty y two and we can leave
153
00:19:57,130 --> 00:20:01,300
out the minus twelve thousand and add it as
an when required
154
00:20:01,300 --> 00:20:13,120
there are again six constraint to for the
demand constraints and four for the capacity
155
00:20:13,120 --> 00:20:22,330
constraints now when this formulation the
two demand constrain are greater than or equal
156
00:20:22,330 --> 00:20:30,170
to constrain and the four capacity constraints
are less than or equal to constraint so in
157
00:20:30,170 --> 00:20:38,929
second formulation we have one variable less
and the constraints are all inequalities instead
158
00:20:38,929 --> 00:20:48,990
of an equation in the next class we will see
some more examples in formulating linearprogramming
159
00:20:48,990 --> 00:20:49,980
problem