You are on page 1of 11

Computing and Optimisation

COMPUTING AND OPTIMISATION Ec 411 Richard Pierse Autumn Semester Lectures 10 hours Classes 10 hours The module introduces a series of computer applications designed to aid in the solution of business and economic problems. Beginning with the planning of large projects and working through problems of optimising production, transportation, location, multiple objectives, inventory management, networks, decision analysis, queuing theory and Markov analysis, we show how solutions can be obtained using appropriate software. Module Outline 1. Project planning and scheduling. Sequential and consecutive activities. Critical paths and PERT. Evaluation of project management software. Production optimisation using Linear Programming. Optimisation subject to resource constraints. The simplex method. Economic valuation of assets. Locations decisions using Integer Programming. Problems involving multiple objectives. The Goal Programming method. Transportation problems involving multiple sources, destinations and routes. Assignment and Networks. Fitting the task to the worker. Maximising flows in a network. Inventory management. Deterministic and probabilistic cases.


3. 4.




Computing and Optimisation 8. Decision theory. Logical (and not so logical) methods for reaching decisions. Queuing models. Why is so much time wasted in waiting for service Markov analysis. In which the future is explored using rates of change and probabilities.



Introduction The course is concerned with the implementation of management science or operations research techniques in economic and business situations. The techniques have a common objective: namely to improve the operation of some business procedure whether production, transportation, or stock control. They all involve rational decision making designed to attain some objective, usually profit maximisation or cost minimisation. All have been analysed extensively from a mathematical point of view, but here we will be concerned to understand their economic significance and will cover only sufficient maths to make the techniques comprehensible. The computer software we use will enable us to tackle problems of reasonable complexity using simple input format. Assessment Coursework Final Exam 25% of final grade 75% of final grade

Selected Reading List 1. Hanna, M. Introduction to Management Science (1996), South Western Press. (Good clear example-driven text) 2. Winston, W.L. Operations Research: applications & algorithms (1994) 3rd Ed. Duxbury Press (Similar to Hanna) 3. Dennis, T.L. & Dennis, L.B. Management Science (1991) (Like Hanna & Winston. Out of print but several copies in library.) 4. Taha, H.A. Operations Research: An Introduction (1997) Prentice Hall. More old-fashioned but still a good text 5. Baumol W.J. Economic Theory and Operations Analysis (1977) Prentice Hall. Old text combining economics & OR

Computing and Optimisation Other good texts exist that cover all the material we look at (plus other topics). They generally have a title including the words Management Science or Operations Research.

Computing and Optimisation CRITICAL PATH ANALYSIS Critical Path Analysis breaks down a complex task into component activities to optimise performance Any task involving more than a single operation can be analysed into sets of component activities. Examples are: building operations, development of space exploration programme, writing a book etc. The common factor is that each consists of many activities or subprojects. Success or failure of the project results from the management and scheduling of these activities. Information on likely activity durations, costs and logically necessary sequences can be used to optimise project performance. Methods of network analysis (Critical Path Analysis, Programme Evaluation and Review Technique etc) were developed in the 1950s in the UK by the ESI for power station construction and in the US for the Polaris programme. They are designed to identify and eliminate bottlenecks by determining critical activities, clarifying responsibility and improving control. Some activities depend on others: they can only begin when other activities have been completed . Other activities can take place concurrently. The whole project is only complete when all activities have been completed. Each activity has a duration: in CPA this is assumed known with certainty in PERT the duration has a probability distribution Some activities in the project will be critical: if these are delayed at all then the whole project is delayed Other activities are non-critical: these can be delayed a certain amount without delaying the whole project

Computing and Optimisation Example: The Optimisers Breakfast Step 1: Make a list of activities, durations and precedence (if any) Activity A Get up B Make tea C Fill kettle D Fetch milk E Boil water F Milk on cereal G Make toast H Cut bread I Eat Precedence D, E A A C D H A B, F, G Duration 30 3 1 1 4 1 4 2 10

Step 2: Develop a simple network which sets out the relationships amongst these activities and distinguishes SEQUENTIAL (e.g. A to C) from CONCURRENT activities (e.g. C D and H). This is the fundamental analysis which enables a rational program to be developed. A network diagram of the optimisers breakfast is shown below:


0 1



In the network diagram, activities are represented by arrows (labelled by letters) while events are represented by nodes (circles) and labelled by numbers. Events are points in time marking the completion of activities and are represented as nodes in the network. Events are numbered serially. Thus event 0 is the node before A and event 1 is the node

Computing and Optimisation after A. No event can be numbered until all preceding events have been numbered. Two nodes can be linked by at most one activity. Thus the following is an incorrect representation: A
6 8

B A correct representation would be given by A

6 8


which introduces a new node (7) and a dummy activity C linking nodes 7 and 8. Dummy Activities are inserted where precedence needs to be indicated but no time or other resources are consumed. For example, before tea can be made (B), water must be boiled (E) and milk fetched (D). To indicate this on the diagram a dummy activity needs to be introduced between nodes 3 and 5. This activity (J) has zero duration. Duration. In order to optimise the project, information on time duration of activities is required. This time is likely to be inversely related to the level of resources input. Initially we will make an estimate based on a current resource input. Later we will allow for potential uncertainty in duration estimates. The Critical Path is the longest path of necessarily sequential activities within the project. In the example there are four paths: AC-E-B-I, A-D-J-B-I, A-D-F-I and A-H-G-I. The problem is how to determine the lengths of the paths. The following concepts are useful: Earliest Starting and Finishing Times The earliest starting time for activity i, ESi. In the example ESa=0, ESc = ESd = ESh = 30 etc. The earliest finishing time for activity i, EFi, is linked to ESi by EFi = ESi + Ti where Ti is estimated time of completion of activity i.

Computing and Optimisation ESi and EFi are determined by a forward pass through the network. Where more than one activity ends in a node, the ESi for activities emanating from this node is the largest EFi of the activities ending in the node. Latest Starting and Finishing Times The latest starting time for activity i, LSi is the latest time at which activity i can be started without delaying the project. The latest finishing time for activity i, LFi, is the latest time that an activity can be completed without delaying the project. LSi = LFi - Ti. LSi and LFi are determined by a backward pass through the network. Where more than one activity begins in the same node, the smaller of the LSis will determine the LFi of activities terminating in the node. Activity Slack, Si, is the time available for fine tuning the project. On any activity i it is equal to LFi - EFi which is the same as LSi ESi. Critical Path The critical path is the path (or paths) along which the slack on all activities is zero, i.e. it is the longest necessary path through the network. To see the relationships it is helpful to set up the problem in a tableau with columns for activities, preceding activities and durations. Then the various statistics can easily be evaluated: Act A B C D E F G H I Prec D, E A A C D H A B, F,G Ti 30 3 1 1 4 1 4 2 10 ESi 0 35 30 30 31 31 32 30 38 LSi 0 35 30 34 31 37 34 32 38 EFi 30 38 31 31 35 32 36 32 48 LFi 30 38 31 35 35 38 38 34 48 Si 0 0 0 4 0 6 2 2 0 Critical Path Yes Yes Yes No Yes No No No Yes


Computing and Optimisation PROGRAM EVALUATION & REVIEW Handling Uncertainty In the simple model developed above we have assumed certainty in activity lengths. However, once uncertainty is introduced, the critical path length will depend in some way on combined uncertainty in the activities. If we know the individual activity variances and can assume they are independent of each other, then the variance of the project is simply the sum of the variances along the critical path. However, if the variances are large it is conceivable that some other path could become critical and the whole uncertainty analysis would become intractable. The most common assumption is that uncertainty follows the beta distribution. This makes the uncertainty of duration of each activity a function of three estimates (guesses) : the most likely duration, an optimistic estimate of duration and a pessimistic estimate of duration. The beta distribution is unimodal and has fixed end points. The critical path variance is calculated and for big enough problems the normal distribution can be used to find the probability of completing the project in a specified time. Assumptions of PERT (1) The uncertainties in duration of events are all independent This assumption implies (a) (b) Expected duration of path is sum of expected duration of all activities along the path Variance of path is sum of variances of all activities along the path


The distribution of the path duration is normal This will follow from invoking a central limit theorem but this requires the number of activities to be large enough Critical path remains critical despite uncertainty Without this assumption the variance is very difficult to calculate.


Computing and Optimisation The Beta Distribution The Beta distribution is a probability distribution f(x). It is unimodal and assymetric It can be expressed as a function of 3 parameters: m, a and b m a b most likely completion time optimistic completion time pessimistic completion time

Expected completion time is given by: E(x) = ( a + 4m + b ) / 6 Variance of completion time is given by: Var(x) = [ ( b - a ) / 6 ] 2 The Beta Distribution Prob

Computing and Optimisation Costs The duration of each activity in a project is likely to be a function of the resources that are put into that activity. By putting in more resources, the duration can be reduced but at increased cost. One common question is how can a project be shortened to a specified length at minimum cost. This involves calculating the marginal cost of shortening each activity, and then reducing the lowest MC activity on the critical path until its MC exceeds the next lowest MC activity and so on until the target reduction is achieved, bearing in mind any constraints on the extent of reductions and the lengths of non critical paths which may become critical if the existing path is reduced far enough. This is not a trivial exercise.

Computing and Optimisation Downloading Class Software The software we will be using in the classes for this module is available for downloading from my web site at address: Step 1. Go to this page and follow the instructions to download the file mdm.exe to your own home drive H: on the network. Step 2. Run the file mdm.exe to extract all the files. Step 3. Start the software by running the file start.exe. Note you will need to use your password to log on to the machines in the Austin Pearce lab. If you have forgotten it you will need to have it reset by computer reception.