You are on page 1of 12

# Computer Scheduling of Vehicles from

## One or More Depots to a Number of

Delivery Points
ANTHONY WREN and ALAN HOLLIDAYt
Operational Research Unit, University of Leeds

## The problem of scheduling delivery vehicles from a number of depots to customers,

subject to constraints on load and distance or time, is considered. A new algorithm
is presented; this allows routes from several depots to be constructed simul-
taneously, subject to restrictions on numbers of vehicles at individual depots.
Where too many customers require service, a flexible priority rule will select
those to be served. Results for the single depot case are compared with other
known algorithms; further results are given and discussed for cases of several
depots.

INTRODUCTION
Single depot
THE PROBLEM of producing routes for vehicles servicing a number of customers
from a single depot has aroused much interest. The objective is generally to
produce a set of routes which minimize the total cost of delivery, subject to
restrictions on the loads of vehicles and the distance or elapsed time for any
route. Further restrictions often exist in practice, but these have not been con-
sidered to any great extent in the literature, and a discussion of them will be
omitted at this stage. The cost factors generally considered are the number of
trucks, and the total distance travelled. There may be a conflict of objectives
here; such conflict has not been fully resolved in the past. Experience with the
current program indicates that no conflict in fact exists.
The above problem may be formulated in integer linear programming terms,
but the number of variables precludes the solution of such a model. Several
heuristic methods have been developed in attempts to find near-optimal
solutions to the problem. An early method is that of Dantzig and Ramser; 1
this gives priority to filling trucks to capacity and does not attempt to minimize
total distance travelled. The method of Clarke and Wright2 and variations on
it are commonly used in computer programs marketed for the problem.
Solutions obtained by these programs can be found to contain certain unsatis-
factory features, and are often far from optimal as has been shown by Gaskell, 3
who discusses several variations of the method, and gives six test problems to
t Now with United Glass Ltd.

333

Operational Research Society is collaborating with JSTOR to digitize, preserve, and extend access to
Operational Research Quarterly (1970-1977). ®
www.jstor.org
Operational Research Quarterly Vol. 23 No. 3
which he applies each variation; he concludes that no method is inherently
superior. Implementations of the Clarke and Wright method have been dis-
cussed by Norman4 and by the National Computing Centre. 5
Christofides and Eilon6 have developed a new method and the results com-
pare very favourably with the Clarke and Wright approach in all the ten test
cases presented, although there is no evidence of its suitability in terms either
of distance or of computer time for really large problems. The method starts
with an arbitrary random route structure and each route is examined to see
whether mileage can be reduced by rearranging the customers of that route
according to given rules. The method is then repeated using different initial
solutions. It does not reduce the number of trucks below that required in the
particular randomly constructed solution, and does not appear to change the
allocation of customers to routes from that of the initial solution. For a saving
to be shown in the number of trucks used, a large number of random tours
may have to be generated and examined, and it is not specified how a good
solution is recognized when there is no target to achieve. For two of Gaskell's
problems involving 21 and 29 customers, the total computer time required was
respectively 60 and 40 times that of the Clarke and Wright approach, the
solutions chosen being the best of ten runs.
Several depots
All the above methods are dependent on the existence of a unique depot,
and cannot properly be extended to deal with the case where any individual
customer may be served by one of several depots. In practice the customers
may be allocated to individual depots, where necessary, by the solution of a
standard transportation problem. This is, however, unrealistic, since the costs
are not proportional to the number of units delivered to a customer, and the
decision as to which depot should supply a particular customer should depend
on the relative positions of neighbouring customers and on the best depots to
serve these customers and others which may conveniently be linked with them.
By considering all depots together, a better solution will generally be obtained
than by breaking the problem into a number of subproblems and solving each
one separately.
The problem of vehicle routing for many depots first came to the notice of
the authors in 1966 in connection with the problem of depot siting. In the
particular case considered the depots were small, each having one truck, and
very little cost would have been involved in re-siting. There were in fact fifteen
to twenty depots scattered over the country, and it was intended that a vehicle-
routing program should be used to assess the delivery costs associated with
any re-siting policy. It was assumed throughout that all vehicles would return
to their home depot at the end of a day. Heuristics were developed at that time
which produced a good set of routes for this problem and compared favourably
with the Clarke and Wright variations on Gaskell's test problems. Later versions
334
A. Wren and A. Holliday- Computer Scheduling of Vehicles
of these heuristics have been discussed briefly by Wren. 7 The success of this
work encouraged the authors to develop the heuristics further and to apply
them to other problems; the program developed is described here, together
with some applications.

GENERAL METHOD
The program consists of one algorithm which constructs a feasible solution to
the vehicle scheduling problem for one or more depots, and a number of
different refining heuristics which are applied to the solution obtained by the
first algorithm. The whole process is illustrated in Figure 1. The method of
obtaining initial solutions is described in the next section, while details of the

TART

## converging = false 1 deleted = 1J1I.g

Generate four initio! solutions and choose the best

No

converging = false

Deleted = .fg]g_

DISENTANGLE
Yes

## Fro. 1. Flowchart of program.

335
Operational Research Quarterly Vol. 23 No. 3
procedures named in capitals in the figure will be found in the section on
Refining Processes.
Although in theory the program might be allowed to continue until none
of the heuristics could produce an improvement (measured in terms of reduc-
tion of distance or of number of vehicles), in practice it has been found that
after a spectacular initial leap, the rate of improvement often slows down
considerably. It is therefore suggested that the program should generally be
terminated after a specified amount of computer time, or when determined by
a rule given under the heading Computer Time.

INITIAL SOLUTION
The refining heuristics could, of course, be applied to any initial solution,
produced either manually or by computer. Manual initial solutions have not
been considered, since it was desired to develop a program which might ulti-
mately be linked to a broader system. The initial solution could have been
obtained by a variation of the Clarke and Wright method treating each depot
separately, but it was felt that the computer time necessary could not be
justified when it was intended to make substantial improvements to the solution;
the authors also had reservations about the quality of routes produced by the
Clarke and Wright method, and wished to develop solutions which were
totally independent of that method. A new algorithm was therefore developed,
as described below.
The number of vehicles available at each depot must first be specified, in
contrast to the Clarke and Wright method, which allows routes to be built up
irrespective of the number of vehicles available. Customers are then presented
to the algorithm in a predetermined order, each customer being assigned to a
vehicle into which he can be fitted (without violating constraints on load or
distance) for the least increase in distance. The first customer will by this means
be assigned to a route from his nearest depot. The second customer would
either be added to this route or assigned to another depot, whichever involved
least additional distance, although if a constraint were violated by his assign-
ment to the first route he might be assigned to another route from the first
depot. According to this rule customers near a particular depot would be
assigned to a single route until one was presented which violated the constraints.
This might imply that customers on opposite sides of the depot would be
assigned to the same route, so an upper bound is set to the distance to the
nearest customer when a new customer is inserted; if this bound would be
exceeded, a new route is formed if possible, and the customer is only assigned
to the first route if no more vehicles are available.
In the original version of the program the order in which the customers were
presented was random. It was then noticed that the quality of the final solution
after application of the refining heuristics was dependent on the quality of the
336
A. Wren and A. Holliday- Computer Scheduling of Vehicles
first solution, which itself was dependent on this order of presentation; it was
therefore decided that the customers should be presorted. This was done
by assigning each customer provisionally to his nearest depot, and then calcu-
lating the bearing from that depot. The bearings of all customers were then
sorted into a clockwise order, irrespective of depot. This was found to be
consistently better than a random ordering, and also than the clockwise ordering
with all depots treated separately. It should be stressed that the allocation to
depots at this stage was only for the purpose of ordering; when a customer is
actually presented to the algorithm he may be assigned to another depot if a
route from that depot passes near him, or if the first depot is fully loaded.
It was found that even with this ordering of customers a poor initial solution
leading to a poor final solution could occasionally be produced. The present
version of the program therefore sorts the customers as follows. The direction
in which customers are most sparse is determined for each depot. The bearings
of customers are increased by 360° if they are less than the bearing of the most
sparse direction for the appropriate depot, and all customers are then sorted
into order of the modified bearings. Four different initial solutions are obtained
by presenting customers in this order but starting first from the beginning of
the list and then from three other evenly spaced points in the ordered list; in
the latter three cases the last customer in the list is followed by customers
from the beginning of the list. The best of these four solutions is chosen as
input to the next phase of the program. In practice this is usually, but not
always, the first solution.
If some customers cannot be assigned to any route in the initial solution
they are temporarily set aside. After every iteration of the refining process
these customers are reconsidered, since the configuration of routes may have
been altered in such a way that they may now be included without violating
any constraints. This reconsideration is effected by the same procedure as is
used initially to assign the customers to routes. Should this fail, a special
optimization procedure, whose computer name is complain, is called to attempt
to remedy the situation.

REFINING PROCESSES
The routes constructed in the initial solution can be refined by seven special
procedures, inspect, single, pair, complain, delete, combine and disentangle.
Basically, the technique is to use the seven procedures repeatedly until no
improvement results. However, experience has shown that in certain circum-
stances the payoff from some of the procedures does not justify the computer
time involved. The individual procedures will now be described, and there
follows an indication of the sequence in which they are normally used.
Throughout the description it is assumed that no amendments are made to
routes if any constraints would thereby be violated.
337
Operational Research Quarterly Vol. 23 No. 3
inspect. This procedure inspects the individual routes in turn and removes
any loops in them. All pairs of links of adjacent points on the route are
considered, and the links are split and rejoined (the section of route between
them being traversed in the reverse order) if the total distance is thereby
reduced.
single. Each customer is considered in turn and the possibilities of moving
him to all other positions in the same or another route are considered. He is
moved to the first position found for which the total distance is reduced and
no constraints are violated. It should be noted that the route to which the
customer is moved may be from another depot.
pair. A customer from one route is placed in another route, if a customer
from the second route could be inserted elsewhere in the system to reduce
total distance. This procedure was developed because it was felt that in certain
cases some constraint caused single to fail to place a customer in a new route
where this was desirable when room could have been made in the route by
removing another customer from it. In practice pair has proved to be successful
in small problems when single has failed to produce further improvements; in
large problems, probably owing to the greater flexibility available, it does not
appear to be significantly better than single. The computer time for this procedure
varies as the square of the number of customers, so it is only used now in
problems of up to about 80 customers.
complain. This is used when some customers have been omitted from the
initial routes. Each omitted customer is taken in turn and every route is inspected
in order to determine whether by removing another customer, the omitted one
could be accepted; the customer removed is then fitted, if possible, into another
route. If the customer removed cannot be placed elsewhere, an assessment is
made of the two customers, and that with the highest priority is placed in the
route. The present version of the program gives priority to the customer
requiring the greatest load, but provision could be made for any other method
of assessing customer priority.
delete. When the above procedures cease to produce significant improvements,
then if all customers have been fitted this procedure is called to attempt to
delete a route, thereby reducing the number of trucks required. Each route is
investigated in turn, and an attempt is made to redistribute all customers on
that route among the other routes. If this proves possible the fact is noted,
the route is restored, and the next route investigated. When all routes have
been considered that route, if any, is deleted whose redistribution makes the
total mileage least. (This mileage may be greater or less than the mileage before
using this procedure.) It is normal that after the deletion of a route a con-
siderable amount of further refinement is necessary, after which another call
of delete may reduce the number of routes still further. This procedure is
particularly time-consuming, and if at any stage of a computer run it is
unsuccessful it is not called again, since it is unlikely that a further call will be
338
A. Wren and A. Holliday- Computer Scheduling of Vehicles
successful. It is sometimes argued that it may be more important to reduce
distance than the number of trucks, but experience with this algorithm has
shown that the successful deletion of a route has always led to a subsequent
reduction in mileage, indicating that this argument may be irrelevant.
combine. The procedure combine has not yet been programmed, since it has
not been required by any users. It is described here, as it is felt that it would
be of use in some cases, and it fits well into the general scheme of procedures.
Under certain conditions routes may be load-bound, rather than time-bound,
so that some vehicles are scheduled to return to a depot after only a few hours.
It might then be desirable to give a second trip to one or more vehicles, but
there may be no scheduled trip sufficiently short to allocate here. The procedure
combine will examine every pair of routes from the same depot, starting with
the pair whose combined duration is shortest. If the combined duration, after
allowing for time to reload the vehicle, is above the maximum permitted, an
attempt is made, as in the procedure delete, to redistribute customers among
other routes until the combined duration is reduced to the permitted level.
To forestall fruitless investigation of pairs of routes, an upper limit to the com-
bined duration may be specified above which no attempt to combine the routes
is made. If required, a limit may be set to the additional distance which may be
considered worth incurring in order to save a vehicle in this way. It should be
noted that this process does not reduce the number of distinct routes, so that
it would not be expected to save distance in the long run, as would delete.
disentangle. This procedure is designed to rationalize the route structure,
particularly after the procedure delete has redistributed customers from one
area among a number of neighbouring routes. The basic principle is to seek
pairs of routes which are "tangled", and to attempt to redesign them. The
rather crude definition of tangled routes is:
two routes from the same depot are said to be tangled if any straight line
from the depot passes through both routes; two routes from different depots
are said to be tangled if any customer in either of the routes lies nearer to
any other depot than to the depot serving it.
When routes are found to be tangled they are broken down into the individual
customers, and are then reassembled using the same criterion as is used in
building the initial set of routes. The reconstituted routes are then refined
using the procedures inspect and single until no further refinement can be made.
If the resultant pair of routes includes all the customers and is better in distance
than the original pair the new routes are accepted, otherwise the original pair
is restored. It should be noted that it may not be possible to fit all the customers
of the original pair into routes reconstituted in this way; complain is used to
try to fit any customers which have been omitted, after each application of the
refining procedures. If any customers remain unfitted, the new pair is not
accepted.
339
Operational Research Quarterly Vol. 23 No. 3
RESULTS
The current version of the program was first tested using the data of Gaskell's
test cases. The results are displayed in Table 1. In five of the six cases better

## TABLE 1. COMPARISON OF METHODS USING GASKELL'S CASES

Computer time
Mileage (min)
cases points A B c D E F G H Ft Gt Ht

## 1 36 923 947 913 857 851 851 851 2·8 0·9

2 30 1427 1427 1434 1500* 1416 1414 1406 1406 0·8 2·2 1·3
3 32 839* 850* 821* 850* 813 810 812 812 0·8 1·7 1·5
4 21 598 648 602 598 585 585 593 593 0·6 0·3 0·2
5 29 963* 1017* 979* 943* 876 875 888 888 0·8 1·7 1·4
6 22 955 949 988 1015* 949 949 954 964 0·5 1·4 0·9

## Total including 1 5705 5838 5737 5763 5490 5504 5514

Total excluding 1 4782 4891 4824 4906 4639 4633 4653 4663

## * One additional vehicle used.

t Each run on IBM 7090.
t Complete solution in KDF9 ALGOL.
Methods:
A Gaskell's Clarke and Wright savings: multiple.
B Gaskell's Clarke and Wright savings: sequential.
F Christofides and Eilon.
G Wren and Holliday, allowing full convergence.
H Wren and Holliday, terminating according to convergence.

results were achieved than by any of the computer methods used by Gaskell;
in the other, only one of the other methods was better. In two of the cases an
improvement was achieved over Gaskell's "visual" solution, which he believed
to be the optimum. The Christofides and Eilon results are also displayed, but
it should be noted that in several cases these were the best of several attempts;
the present method could well have produced better results with other starting
solutions, and indeed experiments with case 1 show that this method can
produce better solutions than that quoted, given different starting points of the
compass, the best such result being 842 miles. Table 2 displays the results of
the program applied to cases 8, 9 and 10 quoted by Christofides and Eilon;
the figures for the Clarke and Wright method are drawn from their paper.
It will be seen that although the Christofides and Eilon results seem to be
better in the small problems of Table 1, the present method is superior in the
340
A. Wren and A. Holliday- Computer Scheduling of Vehicles
larger problems of Table 2, and the rate of increase of computer time with
size of problem is also better for this method.
The next test was undertaken on behalf of a company who were about to
close a depot, A, replacing it by another, B, 30 miles away. They wished to
determine how many trucks should be stationed both at depot B, and at another,

## Mileage No. of vehicles Computer time

No. of
Cases points A B c D A B c D A* Bt q Dt

## 8 50 585 556 551 551 6 5 5 5 0·6 2·0 0·4 0·4

9 75 900 876 863 900 10 10 10 10 1·3 4·0 0·9 0·6
10 100 887 863 851 851 8 8 8 8 2·5 10·0 1·3 0·9

## * Complete solution on IBM 7090.

t One run on IBM 7090.
~Complete solution on ICL 1906A (FORTRAN).
Methods:
A Clarke and Wright savings, quoted by Christofides and Eilon.
B Christofides and Eilon.
C Wren and Holliday, allowing full convergence.
D Wren and Holliday, termination according to convergence.

cially available program based on the Clarke and Wright method to schedule
deliveries in the new situation, taking as data the actual deliveries made on
three days under the old configuration. It had been necessary for that exercise
to allocate the customers first between the depots, and then to apply the pro-
gram to each of the depots separately.
The present program was applied to this data, being allowed to choose the
best depot to serve each customer. The exercise was carried out for both the
old and new depot configurations, the results being compared (Table 3,
columns 1-5) with those produced by the company's despatcher in the old
configuration, and with those of the Clarke and Wright method in the new
configuration. It will be seen that the present method used fewer trucks than
the Clarke and Wright method on two occasions, and the same number on the
third, on which occasion there was a significant improvement in distance.
The present method also improved considerably on the manual method.

COMPUTER TIME
The figures for computer time require some explanation. The program was
originally written in ALGOL for KDF9, and has since been directly transcribed
341
TABLE 3. RESULTS FOR TWO-DEPOT PROBLEM
~
~
Present method

-
No. of Clarke and
~
......
Case points Wright Manual Full 5min 10min 15 min 20min 25min Rule B·
::::s
(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) l::l

~
-
(t>
183 1604
12
1565
12
1740
12
1566
12
1566
12
1565
12
1566
12
Distance
Trucks "'...,l::l
~

2 168 - 1514 1347 1507 1388 1389 1342 1366 1347 Distance
12 9 11 11 10 10 9 9 Trucks ~
w 3 176 - 1580 1461 1651 1487 1465 1461 1461 1465 Distance ta
12 10 10 10 10 10 10 Trucks t::
.j:>.
IV
- 10 l::l
....,
4 183 1672 1577 1855 1647 1639 1605 1579 1579 Distance ......
12 - 12 13 13 12 12 12 12 Trucks ....,
~

5 168 1384 1400 1544 1417 1439 1420 1400 1400 Distance ~
11 - 9 10 10 9 9 9 9 Trucks
6 176 1568 1472 1744 1532 1518 1495 1489 1495 Distance ~
:-
11 - 10 10 10 10 10 10 10 Trucks IV
w

Cases 1, 2 and 3 refer to depots A and C; cases 4, 5, 6 are the same data for depots Band C. Column 5 shows final results, columns ~
6-10 results after amount of computer time shown, and column 11 results when method is terminated according to the given rule. The com-
w
puter time refers to a slow version of the program written in KDF9 ALGOL, and is included merely to give a comparative scale.
A. Wren and A. Holliday- Computer Scheduling of Vehicles
into FORTRAN. The program at present requires computation of distance
every time this is required, and this is a central feature of all the procedures;
it is also very time-consuming. It would be possible to compute the distance
matrix once only, to store it on a disc, and to organize the procedures so that
the number of disc transfers would be minimized. This alteration has not
proved feasible owing to lack of available programming effort, but it is antici-
pated that it would drastically reduce the computer time required.
Despite the fact that it is probable, taking into account the above factors,
that a revised program based on these heuristics could be competitive in com-
puter time with other programs, it is useful to consider ways of curtailing the
program. Since the general method is to contruct an initial set of routes, and
then to refine them, the program can be terminated at any time, and the
current state of the routes output. Two alternative methods of termination
may be considered;
(i) termination after a specified amount of computer time has been used
(this could be made dependent on the number of customers);
(ii) termination by some rule based on convergence of the results.
A rule based on convergence which has been found to be sensible on a number
of occasions is to terminate following the use of disentangle following the
first unsuccessful use of delete. The results obtained using this rule are displayed
in Tables 1 and 2 while those obtained in the other cases mentioned above,
using both this rule (column 11) and method (i) for termination after various
time intervals (columns 6-10), are displayed in Table 3.

EXPERIENCE
The exercise, the results of which are summarized in Table 3, was intended to
assist in the definition of areas to be served by the two depots, and by individual
trucks from these depots, which would continue to be scheduled manually on
a day-to-day basis. After inspecting the results it was agreed by the company
that the routes produced could be operated in practice, and it was decided to
serve one town from depot B instead of depot C, and to station three trucks
at the new depot B. The system has now been in operation for a year and has
proved satisfactory.
The same company has since used the program to assist in the evaluation of
possible configurations of depots in other parts of the country, and to determine
the number of trucks to be held in certain depots. The largest problems con-
sidered to date have had four depots and 320 locations, each location having
several customers.
Several modifications have been made to the program to deal with specific
problems arising in another company, where a vehicle scheduling program was
required in order to evaluate alternative policies with regard to average allowed
speed, size of vehicle and customer priority. It is easy to stipulate numbers of
343
Operational Research Quarterly Vol. 23 No.3
vehicles of various sizes available at depots; slight amendments to the order in
which customers are presented, and to the rules used to insert customers in
the initial routes, enable routes to be built up taking most advantage of the
different vehicle sizes. The refining procedures then ensure that the correct mix
of vehicles is used throughout.

The familiar vehicle scheduling constraints relating to times at which customers
may take deliveries may perhaps be more readily tackled by means of this
algorithm than by that of Clarke and Wright. As routes are built up, a record
may be kept of the earliest and latest times at which the various customers
might be reached, and care may be taken that new customers are not inserted
if this would lead to the constraints for any customer being violated. Since both
the initial routine and the refining procedures allow customers to be inserted
in the middle of a route as well as at the ends, it is felt that the optimality of the
ultimate solution is less likely to be affected by these constraints than in the
Clarke and Wright method.
The pattern of routes developed by this program is generally more satis-
factory than that developed by the Clarke and Wright method, as it is petal-
shaped. This allows the program to be used for long-term planning, where it is
important to define sectors to be served by the trucks, as well as for daily
scheduling.
It is possible to cater easily for cases where the number of available vehicles
is insufficient to meet the demand, since the total capacity of the system is never
exceeded, and the procedure complain can ensure that the most important
customers are served.

ACKNOWLEDGEMENTS
The authors wish to express their gratitude to Dr. D. Nash who drew their attention to
the problem, to Messrs. B. Shearey and G. Bragg who investigated some extensions and
applications of the method, to Mr. J. D. Carr who rewrote the program in FORTRAN
and suggested several improvements and to Philips Industries Ltd., and London Carriers
Ltd., who supplied much of the data used, and whose comments on the quality of the
results led to the development of new refining procedures.

REFERENCES
1 G. B. DANTZIG and J. H. RAMSER (1959) The truck dispatching problem. Mgmt. Sci. 6, 8.
2 G. CLARKE and J. W. WRIGHT (1964) Scheduling of vehicles from a central depot to a
number of delivery points. Ops Res. 12, 568.
3 T. J. GASKELL (1967) Bases for vehicle fleet scheduling. Opl Res. Q. 18, 281.
4 W. E. NORMAN (1969) The Impact of Computer Techniques on Road Transport Planning.
National Computing Centre, Manchester.
5 National Computing Centre (1969) Computers in Vehicle Scheduling. Manchester.
6 N. CHRISTOFIDES and S. EILON (1969) An algorithm for the vehicle-dispatching problem.
Opl Res. Q. 20, 309.
7 A. WREN (1971) Computers in Transport Planning and Operation. Ian Allan, Shepperton.

344