MILK TANKER SCHEDULING

Size: px
Start display at page:

Download "MILK TANKER SCHEDULING"

Transcription

1 Proceedings OBSNZ August 1981 MILK TANKER SCHEDULING Selwyn Roper D e p a r t m e n t o f In d u s t r i a l Ma n a g e m e n t a n d En g i n e e r i n g, Ma s s e y Un i v e r s i t y, Pa l m e r s t o n No r t h. Summary Every dairy company in New Zealand operates a fleet of milk tankers to collect the milk from the farms in its area.. The nature of milk collection is outlined, with particular reference to requirements and constraints encountered in the New Zealand situation. Scheduling of milk tankers (grouping farms into individual tanker trips) is usually done manually. The size of the problem makes the finding of efficient schedules a very time consuming task. It is particularly difficult to maintain efficiency during periods of changing milk supply, as this may require frequent rescheduling. A model is developed, using a variation of the simple and well known Clarke and Wright method, to enable the scheduling of milk collection to be done using a computer. This paper concentrates on describing the practical reasons for choosing the method used and particularly on modifications required to overcome the problems, and work within the constraints, of the New.Zealand situation. The resulting computer model of a milk collection system performs favourably compared to manual methods and has significant additional uses. 1. Introduction A broad outline of the milk collection problem is as follows. A set of farm suppliers, each with a known location and a known (approximately) supply of milk, are to be collected daily by a fleet of milk tankers, of known capacities, operating from a single factory. A company's objective would be to collect daily all the supplies of milk, within the time available, at the best possible quality, and at minimum cost. The major costs factors are: (i) The number of tankers required for peak period collection and hence the cost of capital tied up plus the number of drivers required.

2 64 (ii) The total distance travelled, which relates directly to variable travel costs, such as fuel, oil, tyres and roaduser taxes. The number of tankers will be minimised by jointly maximising tanker utilisation (loads as full as possible) and minimising total collection time. Off-road time is constant and as on-road time is directly related to distance travelled, minimising distance travelled will generally minimise travel time. Hence the most important factor in minimising costs is to minimise total collection distance. The aim of the exercise is thus to plan the tanker routes to minimise total collection distance, while also achieving good tanker utilisation. The number of tankers required will be directly related to the quality of this planning. This planning, or scheduling, of milk tanker routes is an example of the broad class of "vehicle scheduling" problems. Many methods, and variations of them, have been presented in the relevant literature. These are well surveyed in [5]. For a realistic sized problem (500 farms), optimal solutions are impractical because of the vast computing time required. Heuristic methods must be used which provide a set of rules that will generate a satisfactory solution to the problem. The best known, and most widely used of these, is the Clarke and Wright heuristic method [1]. Many subsequent methods produce better results but at the expense of disproportionate increases in computing time. As yet, there is no obvious replacement for the Clarke and Wright method which has been used successfully in Germany (see [4]) for milk collection. A variation of this method has been chosen, for reasons described later, and implemented successfully. Work has been carried out with both the Rangitaiki Plains Dairy Company and the New Zealand Co-operative Dairy Company (Waitoa region). The example used in the next section is representative of both situations, as are the problems discussed. 2. Milk Collection Problem This is described in terms of a fictional, but typical, dairy company in New Zealand using 20 tankers, travelling about 3000 km' to collect from 500 supplying farms daily. Total daily milk production has a strong seasonal pattern, rising sharply from the beginning of the season in July, reaching a plateau in October-November of more than per day, and tailing off gradually to finish at the end of April. Milk supply is typically predicted by the previous days collection, modified subjectively by a factor to account for any prevailing trend plus the effects of recent weather. Typically the tanker fleet comprises a range of capacities from a single tanker unit of to large double units (tanker plus trailer) of to Individual farm supplies may vary from up to , averaging Hence each tanker route may comprise any number of farms in the range 1-15.

3 65 Restrictions on collection can arise due to some units being underpowered for areas or individual farms involving steep climbs, and also because some turning circles on farm tracks are too tight to manoeuvre a double unit. Weight limits on bridges are also a factor. Hence practical limits are imposed on the allocation of different capacity tankers. The collection period is typically restricted to eight hours, from 7.30 a.m. to 3.30 p.m., to avoid clashing with morning or evening milking times. All farm vats have cooling units attached to maintain milk quality. Hence any farmer whose milk is collected early in the day will have lower power costs for cooling. However, there is a significant range in the earliest time that each farmer is prepared to have his milk collected. Therefore, the choice of farms for the first route of each tanker will be limited. A company attempts to be fair to these farmers by imposing the requirement that the same farms should be collected first throughout the season. 3. Computer Scheduling Method The Clarke and Wright method [l] begins with the assumption that each supplier is collected on his own individual route. If any two suppliers, i and j, can be collected on the same route, the resulting "savings" would be s. = (2d. + 2d.) - (d. + d. + d..) ij oi oj' oi oj iy where o denotes the factory, and hence s.. = d, + d. - d... oi oj xj (1) The distance d is the shortest road distance between locations and will obviously depend on the prevailing road network. This savings is then used as the measure of the desirability, or priority, of linking suppliers i and j in the same route. All such possible savings are listed and ranked in decreasing order. Starting at the top of the list, suppliers are successively linked, provided tanker capacity allows it. Thus having j oined two farms i and j, the method looks for the link, containing i or j, which has the highest priority. If this next pair was j and k, the route so far would be i-j-k. Links containing neither i or j would start new routes. The solution to the problem, in the form of a list of tanker routes, is obtained by scanning the entire list in this way. The most desirable links are those between farms which are furthest from the factory and close to each other. The main consequence is that collection starts on the outskirts of the region and works inwards towards the factory. This "start out and work in" idea is likely to agree well with any manual scheduling. Many collection areas in New Zealand include a lot of dead-end roads, including both roads running up a valley, or side roads stopping at a river, range of hills, etc. Hence all that

4 66 is required of a method is to start at the end and work back inward towards the factory. A common modification to the savings priority expressed in (1) above, was first suggested by Gaskell [3] and is to vary the relative importance of distance from the factory, and distance apart. We can express this "priority" as p. = d + d. - Xd.. (2) *ij oi oj xj P = s.. - a d., ij xj where o = X - 1 Note that X = 1 gives Clarke and Wright savings, and X = 2 is Gaskell's suggestion. Considerable discussion in the literature has failed to reveal any X value to be consistently better than others. It may well be however, that a particular value works best in any given practical problem. Regardless of the priority used, actual formation of routes can be applied in two different ways: (a) Simultaneous route formation - as valid links are encountered, a number of different routes can be formed at the same time. There is thus some element of competition between routes and "radial" routes tend to be formed. However, there is no emphasis on efficient utilisation of available vehicle capacity. (b) sequential route formation - only one route at a time is formed, with new routes restarting at the first unused link in the priorit y list. The lack of competition between routes tends,to result in "circumferential" routes. This approach often results in increased total distance. However, there is some emphasis on efficient utilisation by using more of the available tanker capacity and hence requiring less routes. Also Gaskell [3J and others have noted that sequential route formation eliminates the need to generate the entire priority list in advance, w i t h priority only being calculated as required. Overall the two approaches have comparable merit. The latter approach has been used because it allows much easier handling of the constraints of the milk collection problem. This is enhanced by the following modification: Rather than using the farmpair with the largest priority to start each route, the most distant remaining farm is used to initiate a route. Advantages of this are: (i) It emphasises the "start out and work in" idea. (ii) It allows routes with only one supplier. (iii) It avoids the possibility of individual farms being "left behind", something noted in practice, especially when using a priority with X > 1. (iv) All that is required is a sorted list of distances of all farms from the factory. Farms are added to the route by examining only those farms that could connect to either end of this current route and choosing the one with largest priority.

5 67 The need for a sorted priority list is thus eliminated entirely, with priorities being calculated only as required. 4. Interfarm Distances Regardless of which computer scheduling method is used, the method needs to know the distance between all pairs of farms. Off-road distance travelled will be constant and hence only the actual road distance (i.e. farm gate to farm gate) is needed. There are two basic approaches: (a) Measure the required distances accurately. This may involve a prohibitive amount of work with measurements for 500 farms. (b) Feed in coordinates of each farm gate (i.e. x. and y values for farm i) and let the computer calculate the "straight-line" distance, z. a s an approximation for the distance between each pair of farms i and j. Zij = ^ * i Xj ^ + ** yj ^ ^ ^ Problems arise in using straight-line distances in real problems with naturally occurring barriers such as rivers and hills, in addition to Irregular road networks. This is because farms may be "linked" across a natural barrier, when they are well apart by road. Very poor schedules may result. There are a number of methods (see [2]) which use appropriate factors to convert the straight-line distances into approximations of the real distances. Significant improvements in performance can be obtained. In practice, each farm would only ever be linked directly to a limited number of other farms, comprising nearest neighbours and farms on direct routes to the factory. Hence the idea of forming a file to list, for each farm, only those farms that it is likely to connect to, plus the corresponding distances. This would be useful in association with either the true-distance approach, (a), or the approximate-distance approach, (b), but gives a great boost to approach (a) by reducing the number of distance measurements to a manageable number. An average of five allowable connections per farm has produced satisfactory results in practice. It is apparent that varying levels of accuracy of interfarm distances will significantly effect the performance of any particular heuristic method in generating routes to be applied on the actual road network. In the experience of the author, the true-distance approach performs significantly better. This is supported by findings in the German situation (see [ 4]) and is because this approach accurately reflects the existing road network. This completes discussion of the components of the model of milk collection, which is to allow scheduling by computer. The components are: (i) A heuristic method ( as described in (3)) to perform the scheduling task. This will be converted into a computer program. (ii) A data file containing a list of farms and their expected supplies (see (2)). (iii)a data file containing a list of farms, sorted by their distance from the factory (see (3)).

6 68 (iv) A "master" data file listing allowable connections for each farm (see above), plus any other relevant information such as whether or not the farm can only be collected by a single-unit tanker (see (2))- We could improve performance of this model by using a more sophisticated scheduling method, but with a significant increase in computing time. Alternatively, we can "tune" the model to improve performance by altering the data files. This requires some initial effort, but produces no change in computing time, and is well worth it for a model in such regular use. This tuning largely consists of preventing undesirable connections and encouraging desirable ones, thus influencing the type of route that will result in various areas. This is done by adding or removing allowable connections. Undesirable connections include cases which would represent an excessive detour in the interest of greater utilisation of tanker capacity (i.e. to fill up a load). A useful concept is to identify small groups of farms which should always be on the same route. All farms in such a group would generally be close to each other and distant from the factory. Hence all farmpairs in the group would have a high priority. Connections would be adjusted so that an emerging route would collect farms in the group on an all or nothing basis. Note that connections between farms are allowed on a one-way-only basis and if the reverse connection is also desired it must be specified separately. 5. Implementation of Model (a) Tankers As a general principle, the largest tankers should be assigned to the most distant parts of the collection area, and hence to the first routes formed. This was noted in [3], and results in minimising the number of long trips which is the key to minimising the total collection distance. An exception to this rule would be when an isolated pocket of farms can be completely collected by a smaller tanker and using a larger tanker (to be filled up much closer in to the factory) would represent poor use of a scarce resource. As an independent principle, distant routes should be collected first as much as possible with the nearest routes being left until later in the day. This should minimise the inconvenience caused by a tanker being unable to complete his planned route, either due to breakdown or because his tanker "overflowed". A partially formed route, using a double unit tanker, would bypass any "single-unit only" farm. Conversely, any such farm that starts a route ensures a single-unit tanker is assigned to that route. (b) Constant First Routes A consistent set of first routes for each of the 20 tankers can be

7 69 achieved as follows. The sorted list of farm-factory distances is manipulated, so that the first 20 farms represent the starting points of the first 20 routes. This remains constant throughout the season. Note that maximising "dead" travel time outside the 7.30 to 3.30 collection period may be an advantage in terms of maximising use of time and hence minimising the number of tankers required. This is achieved by sending all 20 tankers to outlying areas on their first route. (c) Completion of a Route Because of uncertainty in the supply data P i day old) used for scheduling, a safety margin in the form of a percentage of capacity held in reserve should be used. This is to ensure that all the milk supplied will fit into the planned routes, and is particularly necessary in periods of rapidly increasing milk supplies. The safety margin used would change significantly during a season, depending on how the total daily volume was changing. The resulting maximum available capacity gives the computer a criterion to use in deciding whether a particular farm can be added to a partially formed route. Reduction in computing time is achieved by also having a criterion to decide when a route can be considered complete (i.e. tanker "full"). For example, if all farms have _> supply, it is a waste of time searching for an additional farm when < spare capacity remains. If a poorly loaded route is formed (i.e. tanker not "full", but no allowable connections will fit into remaining capacity), it is simple to check whether a smaller tanker could handle this load. 6. Comparison of Manual and Computer Scheduling The computer model used performs in a very similar way to an experienced manual scheduler. In fact, the set of rules making up the heuristic method used are an attempt to model the manual process. Consequently, the computer model cannot be expected to produce better schedules than an experienced manual scheduler is capable of. The key factor is the time required to manually produce a new schedule. This is typically a lengthy overnight process, and makes regular rescheduling something to be avoided. By contrast, this is now possible and much quicker using a computer, requiring only an updated file of farm supplies. Manual scheduling can be somewhat simplified by reducing the scale of the problem. This can take a number of forms: (a) Subdividing the collection region into areas and scheduling within each. (b) Developing standard routes 'in some areas, to be performed by particular tanker sizes. (c) Having obtained a good schedule, only minor modifications are made to it over long periods. In all cases, the approach may result in particularly efficient schedules at various times. However, constraints imposed and the general lack of

8 70 rescheduling, make it unlikely that this efficiency is maintained. It is worth noting that day to day requirements of operating a given schedule do not allow much consideration of significant changes to schedules. A comparison of manual and computer schedules with the Rangitaiki Plains Dairy Company indicated a 5% reduction in distance could be obtained. This was largely due to redistribution of tanker sizes to use the largest tankers to collect the most distant farms. This is an indication of the effects of a lack of time a manual scheduler has for standing back and questioning some of his long-held assumptions. The advantage of a' computer model for scheduling then, is not better schedules as such, but the ability to maintain efficient schedules through regular rescheduling, and to test out different ideas. It is important to realise however that the computer scheduling should be used with considerable discretion. A complete procedure requires use of both man and computer. For example, computer schedules can often be improved upon by an experienced scheduler. Also, it is unlikely that rescheduling would be done daily, but minor modifications may be needed to accommodate day-to-day variation. This would be done manually, as would handling of on-the-spot problems such as breakdowns and "overflowing" of routes. Clearly a vital role remains for the manual scheduler. Finally, it is worth noting that years of experience cannot be programmed into a set of rules for a computer. Conversely, though, a computer can do routine calculation and numerical comparison at incredible speed. Thus a scheduler and a computer make a very useful combination. 7. Conclusions A model has been developed to enable efficient scheduling of milk tanker collection to be done by computer. This model uses simple rules and performs the scheduling in a similar way to a manual scheduler. This similarity was a great advantage in including constraints that the manual scheduler must work with. A key point to acceptance of the computer model by scheduling staff has been the realisation that the computer handles the problem in a very similar way to what is done manually. This resulted from the ease of explaining the simple rules used. The creation of a computer model does not replace the need for an experienced manual scheduler who still has a vital role to play. It does however, make the system much more robust to changes in scheduling personnel. The main reason for having such a computer model is that it allows major reschedules to be done easily and hence scheduling efficiency should remain high rather than tailing off because of difficulty in manually updating schedules. In addition, the model would find considerable use for planning purposes by being able to answer "What if...?" questions involving milk collection. For example, the effect could be predicted of buying an extra tanker or trailer, or increasing the capacity of an existing tanker.

9 71 References [1] Clarke, G., and J.W. Wright. "Scheduling of Vehicles from a Central Depot to a Number of Delivery Points, Operations Research, Vol. 12, pp (1964). [2] Foulds, L.R., J.P. Tham and L.E. O'Brien, "Computer-Based Milk Tanker Scheduling", New Zealand Journal of Dairy Science and Technology, Vol. 12, pp (1977). [3] Gaskell, T.J-, "Bases for Vehicle Fleet Scheduling", Operational Research Quarterly, Vol. 18, pp (1967). [4] Haish, K.H., J. Betz, and J. Stockl, "Optimisation of Milk Collecting Systems", XX International Dairy Congress, Vol. E, pp (1978). [5] Mole, R.H., "A Survey of Local Delivery Vehicle Routing Methodology", Journal of the Operational Research Society, Vol. 30, pp (1979).

10 72