Human Mobility Network, Travel Restrictions and Global Spreading of H1N1 pandemic
Network Analysis - Resource Restrictions
-
Upload
virajthepower -
Category
Documents
-
view
218 -
download
0
Transcript of Network Analysis - Resource Restrictions
-
8/14/2019 Network Analysis - Resource Restrictions
1/35
Network analysis - resource restrictions
One important extensions to the basic network analysis technique relates to resource
restrictions.
Typically, in real-world network analysis, each activity has associated with it someresources (such as men, machinery, materials, etc). We mentioned before that, in
calculating the minimum overall project completion time, we took no account of any
resource restrictions. To illustrate how network analysis can be extended to deal with
resource restrictions consider the activity on node network as shown below.
The Gantt chart below illustrates when each activity can take place. To meet the
minimum project completion time of 24 weeks for the above project critical activities
must take place at fixed points in time. For non-critical activities however we have
flexibility (within limits) as to precisely when these activities take place.
The interpretation of the Gantt chart below the package displays both the earliest and
latest times for each activity and the critical path for the project (using suitable
colours). Each activity has two horizontal bars. The first bar represents when it willtake place if it is started at its earliest start time. The second bar represents when it
will take place if it is started at its latest start time. Obviously for critical activities the
two bars are identical.
-
8/14/2019 Network Analysis - Resource Restrictions
2/35
Hence for this project the critical activities are 1,3,5,7,8,9 and 11 and the non-criticalactivities are 2,4,6 and 10.
We consider two different types of resource restricted problem:
resource smoothing (also known as resource levelling) problems
resource constrained (also known as resource allocation) problems
Note here that dealing effectively with resource restrictions is hard (both
computationally and theoretically). Resource constrained problems are very hard to
solve and resource smoothing problems, although easier, are also hard to solve.
The word resource here is used to denote any item (e.g. men, machinery, materials,
cash) needed to ensure activities take place. Resources can essentially be classified as:
renewable per time period (e.g. we have a certain number of men that are
available each and every time period); or
non-renewable over the lifetime of the project (e.g. we might have a certain
budget for the project and each sum of money that is spent eats into this
budget).
-
8/14/2019 Network Analysis - Resource Restrictions
3/35
Resource smoothing
Suppose now that we have just one resource (men) associated with each activity and
that the number of men required are:
2 men for activity 1 1 man all the other activities (activities 2 to 11 inclusive)
The spreadsheet is shown (in part) below. Column B in that spreadsheet gives the
resource usage for each activity, column C a suggested start time (if we wish to
impose our own suggested start time for each activity). Columns D and E show the
start and finish time for each activity. The values for the cells in these columns are set
using the underlying precedence relationships in the network seen above. Cell D13
shows the end time (when all activities have been completed, i.e. the project
completion time).
Suppose now that we decide:
we wish to meet the minimum overall project completion time of 24 weeks
(hence implying that the times at which critical activities occur are fixed)
we wish to start all non-critical activities at their earliest possible start times
then in the light of these decisions what does the plot (profile) of resource usage(number of men used) against time look like?
Using our spreadsheet we can see that the plot of resource usage against time is as
below.
-
8/14/2019 Network Analysis - Resource Restrictions
4/35
The peak of the resource profile is associated with the start of the project, when
activity 1 requires 2 men and the other activities, which are being performedsimultaneously with activity 1, require one man.
A key question is:
What resource usage profile would we have most liked to have seen here?
Clearly what we would have most liked to have seen here is a constant profile of
resource against time, i.e. a constant usage of resource over time. This is because
variations from a constant (straight line) profile most likely cost us extra money -
either in terms of hiring extra resource to cover peaks in the resource profile, or interms of unutilized resources when we have troughs in the resource profile. Whilst it
may not be possible to achieve an ideal resource profile we should keep this ideal in
mind.
Now another key question is:
Is the resource profile that we see fixed or can it be altered?
The simple answer is that the resource profile is not fixed. It can be altered. Simply
put changing the start time for an activity changes the resource profile. This isillustrated below where we have changed the start time for activity 2 to time 2. It can
be seen that the project still completes in 24 weeks, but the resource profile is
different.
-
8/14/2019 Network Analysis - Resource Restrictions
5/35
So is our current usage of resource ideal? Plainly not, but what flexibility do we have?
If we still wish to complete in 24 weeks we can do NOTHING with regard to the
critical activities.
However we have some choice for the non-critical activities. Recall that such
activities have an associated float (slack) time. We could artificially delay starting
some of these activities. If we do so the resource profile will change, maybe for the
better. Indeed this is what we did implicitly above. There, in delaying the start of
activity 2 until time 2, we still completed the project on time, but had a different
resource profile. In fact for this particular example it is easy to see that delaying
starting activity 2 until time 6 leads to a better resource profile, and is still feasible in
terms of the 24 weeks completion time. Delay starting activity 2 until time 6, when
activity 1 will have finished we have:
-
8/14/2019 Network Analysis - Resource Restrictions
6/35
Here we clearly have a resource profile more in line with our ideal of a constant
resource usage.
It is important to note however that artificially delaying the start of non-critical
activities in order to improve a resource profile is not free. Rather it costs us. Simply
put time lost by delaying the start of an activity cannot later be regained (if things do
not turn out as planned) given the desired fixed completion time for the overall
project.
This has illustrated the resource smoothingorresource levellingproblem, which canbe stated as:
Given afixedoverall project completion time (which we know is feasible with
respect to the resource constraints) "smooth" the usage of resources over the
timescale of the project (so that, for example, we do not get large changes
between one week and the next in the number of men we need).
-
8/14/2019 Network Analysis - Resource Restrictions
7/35
This smoothing process makes creative use of floatto artificially delay activities inorder to smooth resource usage.
There are two disadvantages to smoothing:
if we have multiple resources then we may well find that smoothing oneresource makes another resource less smooth, hence we have to make tradeoffs
between resource profiles. We will consider a problem with multiple resources
later below.
time lost cannot be regained, once we have delayed an activity to smooth a
resource profile then, if things go wrong later (e.g. some activities take longer
than we planned) we cannot regain the time we have lost
Extending the example
You may have noticed that in the above example the resource used per time period
never went above the desired resource level of 2. This, in fact, was purely
coincidental, nothing in the Solver model for resource smoothing prevented the
resource used in any time period exceeding this level.
To illustrate this, and to give an example that is less easy to smooth by eye consider
the same network as before but now with a different resource usage for each activity,
as seen in the spreadsheet below.
-
8/14/2019 Network Analysis - Resource Restrictions
8/35
-
8/14/2019 Network Analysis - Resource Restrictions
9/35
Note that for this example we do exceed the desired resource level of 7 at times, and
also (unlike our previous example) there is a "gap" between the end of activity 2 and
the start of activity 4.
-
8/14/2019 Network Analysis - Resource Restrictions
10/35
Now it may be that we consider the above resource profile is not smooth enough. We
could however investigate the effect of increasing the project duration. This may
enable us to produce a better resource profile. It certainly has one important effect -
whereas before critical activities were fixed in time to meet the overall minimum
project completion time, now if we are prepared to see an increase in project duration
these are not fixed in time but their start times can be varied, with consequently
potential beneficial effects upon the resource profile.
Considering, for example, a completion time of 25 weeks the changes necessary to
Solver are shown below.
It can be seen that the only change relates to the constraint for the project completion
time, which is now constrained to be exactly equal to 25. Note in passing that now wecan genuinely adjust the start times for all activities (cells C2 to C12 inclusive). This
is because some critical activities can perhaps be delayed in meeting the completion
time of 25 weeks.
After a number of random starts with Solver we have the solution below
-
8/14/2019 Network Analysis - Resource Restrictions
11/35
with the resource profile and Gantt chart being
-
8/14/2019 Network Analysis - Resource Restrictions
12/35
Here the Gantt chart shows that activity 6 has been inserted between the previously
successive critical activities of 5 and 7. Visually the resource profile seems smoother
for this 25 week solution than for the 24 week solution - yet the objective value of 171
is larger than the previous objective value of 168. How then can we explain this?
The answer lies in the way we defined our objective - as the sum of the squared
deviations from the desired resource level over the time period. Hence the 171 relates
to a 25 week period, and the 168 to a 24 week period. Comparing them on a weekly
basis (mean squared deviation from desired level per week) the 25 week solution has a
weekly value of 171/25 = 6.84 and the 24 week solution has a weekly value of 168/24
= 7.00. Hence on a weekly basis the 25 week solution is indeed "more smooth" than
the 24 week solution (as we would expect from a visual comparison).
Continuing in this vein the best solution I can manage to produce for a 26 week
completion using Solver is shown below.
-
8/14/2019 Network Analysis - Resource Restrictions
13/35
On a weekly evaluation this has a smoothness of 196/26 = 7.54, so less smooth than
either the 24 week or the 25 week solution.
Note here because of the inherent mathematical difficulties in solving a nonlinear
optimisation problem alluded to before we can never be sure whether ANY
solution is the best solution (i.e. optimal) that can EVER be found (logically there
must be a set of start times that yield the minimum value for the smoothing
objective we have adopted) or not.
However, the solutions we have are the best we can get (optimal or not!) and we now
have a decision problem - given possible completion times:
24 weeks, smoothness value 7.00
25 weeks, smoothness value 6.84
26 weeks, smoothness value 7.54
which completion time would you choose?
The situation here is exactly analogous to the one that occurred when we
considered cost/time tradeoff. The package gives you information as to the effect of
trading off completion time against smoothness. The actual decision as to the
completion time to choose is one that must be taken by a human decision-maker.
http://people.brunel.ac.uk/~mastjjb/jeb/or/netcpm.htmlhttp://people.brunel.ac.uk/~mastjjb/jeb/or/netcpm.html -
8/14/2019 Network Analysis - Resource Restrictions
14/35
Two resource smoothing
To expand our example suppose that we now have two resources associated with each
activity. If you clickhere you will be able to download an Excel 97 spreadsheet called
res2.xls with which you can explore using two resources in the network above. The
examples given below are produced using this spreadsheet.
In this spreadsheet the data for Resource 1 can be found under theResource 1 data taband the data for resource 2 can be found under theResource 2 data tab. The data for
resource 1 is
and the data for resource 2 is
http://people.brunel.ac.uk/~mastjjb/jeb/or/res2.xlshttp://people.brunel.ac.uk/~mastjjb/jeb/or/res2.xls -
8/14/2019 Network Analysis - Resource Restrictions
15/35
-
8/14/2019 Network Analysis - Resource Restrictions
16/35
Now if we wish to smooth this profile, for the desired resource level of 2 for resource
1 and the desired resource level of 7 for resource 2 we can simply add together the
squared deviations from desired resource level for each resource in order to generate a
single objective to be minimised. Note here that this assumes that each resource is
equally important. Whilst we could weight our objective to place differing importance
on each resource this is an unnecessary complication here.
In the spreadsheet the objective value shown in theResource 2 data tab sheet is the
total squared deviations from desired level for resource 2. The objective value shown
in theResource 1 data tab sheet is the total squared deviations from desired level forresources 1 and 2 combined. We can now carry out the same procedure as before. The
Solver parameters are set in theResource 1 data tab sheet and are as before (seebelow) for a completion time of 24 weeks.
After a number of tries using Solver the best solution I can obtain is shown below.
-
8/14/2019 Network Analysis - Resource Restrictions
17/35
The corresponding resource profile and Gantt chart are shown below.
-
8/14/2019 Network Analysis - Resource Restrictions
18/35
It can be seen that in this case activity 6 is delayed until some time after the end of
activity 4.
On a weekly evaluation this solution has a smoothness of 204/24 = 8.5. Continuing as
we did for the single resource example above, the best solution I can find for a
completion time of 25 weeks is:
-
8/14/2019 Network Analysis - Resource Restrictions
19/35
which has a weekly smoothness value of 185/25 =7.4, and the best solution I can find
for a completion time of 26 weeks is:
which has a weekly smoothness value of 212/26 = 8.15.
-
8/14/2019 Network Analysis - Resource Restrictions
20/35
Hence, as we did before for a single resource, we have the information to make an
informed decision as to which completion time to have:
24 weeks with a (weekly) smoothness value of 8.5,
25 weeks with a smoothness value of 7.4, or
26 weeks with a smoothness value of 8.15.
For interest the resource profile for the lowest smoothness value of 7.4 found is shown
below.
Resource constrained problems
So far in smoothing a resource profile we have been prepared to accept resource usage
above our desired resource level. In some circumstances however we have an absolute
constraint upon the maximum level of resource that can be used in any time period.
To illustrate this if you clickhere you will be able to download an Excel 97
spreadsheet called res3.xls with which you can explore resource constrained problemsin the network we are considering. The examples given below are produced using this
spreadsheet.
To remind you of it the network for the project we are considering is
http://people.brunel.ac.uk/~mastjjb/jeb/or/res3.xlshttp://people.brunel.ac.uk/~mastjjb/jeb/or/res3.xls -
8/14/2019 Network Analysis - Resource Restrictions
21/35
The spreadsheet is shown below.
The resource profile for the start times shown above is as below.
-
8/14/2019 Network Analysis - Resource Restrictions
22/35
Here we have assumed that we wish to impose an absolute limit of 8 on the usage of
our single resource in any time period. The current resource profile violates this
constraint and this is indicated by cell C13 in the spreadsheet saying "Infeasible".
Whilst we know that from the time point of view the minimum project completion
time is 24 weeks a key question is: can we still achieve the same minimum project
completion time when a resource constraint is added?
The answer to this question is that sometimes it is impossible to achieve the same
completion time. For this problem, for example, activities 9 and 10 are performed
simultaneously in achieving the minimum overall project completion time of 24
weeks (e.g. consider the network diagram shown above). Activity 9 requires 6
resource units, activity 10 requires 6 resource units. It is clear therefore that, in the
presence of a resource constraint of 8 units these two activities cannot be performed
simultaneously. Hence for this network we immediately know that the original
completion time of 24 weeks is no longer feasible.
The question therefore arises as to what is the minimum overall project completiontime for this project when resource constraints are taken into account.
This has illustrated the resource constrainedorresource allocationproblem, which
can be stated as:
Given the activities, their associated resource usage, precedence relationships
and resource restrictions (typically expressed as the amount of each resource
-
8/14/2019 Network Analysis - Resource Restrictions
23/35
available per time period) find the minimum overall project completion time
(which satisfies both the precedence relationships and the resource restrictions).
Note here that resource constrained problems are much harder (both theoretically and
computationally) to solve than resource smoothing problems. This will become
apparent computationally below if you use the spreadsheet to attempt to solve aresource constrained problem. Whilst for our small example we might well be able to
see using our eyes/brain what is the minimum overall project completion time (which
satisfies both the precedence relationships and the resource restrictions) for
larger/more complex examples this is impossible.
Estimating the minimum project completion time
In order to gain some insight into how we might go about estimating the minimum
project completion time when we have a resource constraint of 8 we can start from theresource unconstrained solution. This is shown below together with the resource
profile and Gantt chart.
-
8/14/2019 Network Analysis - Resource Restrictions
24/35
Examining the resource profile the first point at which we exceed the resource
constraint of 8 is at time 4-5. Examining the Gantt chart this is associated with activity6 (requiring 5 resource units) being performed simultaneously with activity 1 (which
requires 4 resource units).
This illustrates a general truth: increases in the resource profile can only be caused
by one (or more) activities starting
-
8/14/2019 Network Analysis - Resource Restrictions
25/35
-
8/14/2019 Network Analysis - Resource Restrictions
26/35
Examining the resource profile above the first point at which we now exceed the
resource constraint of 8 is at time 20-21. Examining the Gantt chart above this is
associated with activity 9 (requiring 6 resource units) being performed simultaneously
with activity 10 (which requires 6 resource units). Plainly one (or other) of these
activities needs to be delayed. Here, we choose to delay the activity with the smallest
completion time (activity 10) until activity 9 has finished. (More logically we
typically choose to delay activities which are non-critical in the unconstrained case,
and if there are more than one such activity choose the one with the smallest
completion time). Hence we have a suggested start time for activity 10 of 23. Enteringthis into the spreadsheet we get:
which we can see is declared to be feasible (cell C13 above, i.e. it satisfies the
resource constraint), with a resource profile of:
-
8/14/2019 Network Analysis - Resource Restrictions
27/35
Hence we have a feasible solution to the problem of determining the start time for
each activity so as to respect the resource constraints and the network precedence
relationships. This solution involves completing the project in 25 weeks. This may, or
may not, be the optimal (minimum) project completion time when we have our
resource constraint of 8 present.
Hence we can suggest a general procedure (algorithm) for estimating the minimum
possible project completion time in the presence of resource constraints as follow:
take the start times associated with the resource unconstrained project
Then repeat the following until the resource constraints are satisfied:
examine the resource profile
take the first point at which a resource constraint is violated and examine the
activities associated with that violation. This violation must be associated with
one (or more) activities starting.
from the activities which were starting choose the activity (which is non-criticalin the resource unconstrained case) with the smallest completion time
attempt to remove the violation by preventing the chosen activity from starting
until the next time at which an activity ends
-
8/14/2019 Network Analysis - Resource Restrictions
28/35
Although we did not phrase our approach above in these terms you should be able to
see that if we had set out this general approach first, and then applied it to the above
example, we would have ended up with exactly the same solution.
Minimum resource constrained project completion time
Now we might expect that instead of estimating the minimum possible project
completion time we could estimate it directly using our Excel spreadsheet and Solver.
Even though we cannot guarantee to find the minimum possible project completion
time we might perhaps expect (certainly for this small example) Solver to perform
well. The Solver input parameters for this example, in order to estimate the minimum
resource constrained project completion time, are as below.
The target cell to be minimised is cell D13, which contains the project completion
time. The constraint forcing D13 (the project completion time) to be
-
8/14/2019 Network Analysis - Resource Restrictions
29/35
indicating that Solver could not find a solution which satisfied the constraints of the
problem. The difficulty here is in ensuring that the resource constraints for each and
every period are satisfied.
Hence again we need to provide Solver with a starting solution. My experience here
has been that Solver works better if it is provided with a starting solution which isalready feasible rather than a starting solution which is infeasible. One way of doing
this, for this particular example, is to set the suggested start time for the first activity
to 0 and the suggested start time for all other activities i equal to the finish time of
activity (i-1). Doing this gives the feasible starting solution:
Unfortunately Solver fails to improve on this solution - which is disappointing given
that we know that we have estimated the minimum project completion time as 25.Indeed it is especially disappointing since changing the suggested start time for
activity 2 in the spreadsheet above immediately gives:
which is a better feasible solution, which again Solver fails to improve on.
-
8/14/2019 Network Analysis - Resource Restrictions
30/35
-
8/14/2019 Network Analysis - Resource Restrictions
31/35
Consider now the Solver input parameters shown below. Here we have a similarmodel as before, but now we are minimising cell D14 (which contains the project
completion time plus a resource based term, as discussed above). Also we no longer
need a constraint relating to resource in Solver - if when we solve the solution has
value less than 100 it is automatically feasible, if the solution has value more than 100
it is infeasible.
Technically this incorporation into the Solver objective function of the resourceconstraint is known as a penalty based (penalty function) approach.
Starting from the solution below (see the discussion previously)
-
8/14/2019 Network Analysis - Resource Restrictions
32/35
and using Solver we get
which is equal to the (feasible) solution we found before. This example illustrates that
thinking laterally when faced with a system like Solver (which prefers fewer
constraints) can pay substantial benefits.
Combining resource smoothing and resource constraints
Clearly it is possible to combine resource smoothing and resource constraints. To
illustrate this suppose we take the resource constrained problem considered above and
seek to smooth the project within our 25 week deadline with a desired resource level
of 7 (note here that the desired resource level need not be equal to the maximum
resource level, 8 in this case). Using Solver to achieve this we will use the
spreadsheet res4.xls we used above. The spreadsheet (starting from the starting
solution discussed above) and Solver parameters will be:
http://people.brunel.ac.uk/~mastjjb/jeb/or/res4.xlshttp://people.brunel.ac.uk/~mastjjb/jeb/or/res4.xls -
8/14/2019 Network Analysis - Resource Restrictions
33/35
where the constraint D14=25 ensures that we stay feasible with a project completion
time of 25. The solution obtained is shown below.
-
8/14/2019 Network Analysis - Resource Restrictions
34/35
with the resource profile and Gantt chart being
-
8/14/2019 Network Analysis - Resource Restrictions
35/35
It can be seen from the start times given above that the smoothing process has made
no difference to the times we had derived previously. However, we did not know this
beforehand and consequently attempting smoothing has told us that the resource
profile is already "as smooth" for a 25 week completion time as we can make it.