Simulation in the Dairy Industry
- a case study using SIMUL8
by Christine Campbell and Norman Thomson
High software costs have been a barrier to the wider use of simulation
in British industry. A number of packages have been created with the explicit
goal of providing on PCs something akin to the power of larger products,
only at an affordable cost. The following article describes how SIMUL8 was
used to analyse vehicle congestion in an industry with rapidly perishable
raw materials, and outlines some of its underlying concepts.
-oo0oo-
Current barriers to simulation
Many pages have been written in the Operational Research and other journals
extolling the merits of simulation, and deploring the absence of its wider
use in industry and commerce as a whole. Much of the reason for this can be
attributed to the hesitation of companies to pay large sums to invest in software
which, at the least, requires skills to operate beyond those likely to be found
within company resources, and over which there is bound to be doubt as to whether
the investment can be recouped. Currently, most of the twenty or so simulation
packages available in the market-place can be installed on desktop computers,
yet companies selling into the simulation market are still organised to sell
individually through high-cost sales people. While price is not the only issue
of concern, it is undoubtedly an important factor which must be addressed if
knowledge is to be spread and momentum created in this sphere. Readers of the
Operational Society Newsletter may already have read an item in the October
1997 issue in which Nigel Cummings compares SIMUL8 with WITNESS and MODSIM
III. This article relates how SIMUL8, which is the most recent of the three,
was purchased by a client, and used to simulate vehicle movements in the receiving
area of a Scottish dairy company, thereby helping the client to focus on the
fundamental causes of what was increasingly perceived as a matter of some irritation
in day-to-day operations.
A modelling scenario
It takes appreciable time to observe and understand by questioning and discussion
the workings of any large company. In the present case, the company’s products
are highly perishable, and a significant part of the core operation consists
of the movements of a variety of vehicles performing different functions with
intensities varying on both a daily and a weekly cycle. For simulation purposes,
an essential step following the initial observation period was to abstract
a skeletal process description such as the following which served as the basis
for subsequent modelling and experimentation.
Milk is delivered to the dairy each day by two different methods. The first
method is by the company’s own tankers who collect milk from farms with which
the company has a supply contract. This amount fluctuates broadly with the
time of year, but very little on a day by day basis. The second source is by
deliveries from an external company, the nature of which are determined by
a monthly contract. The ratio of milk supplied from these two sources is about
5:7. In addition, the dairy acts as a buffer, sometimes calling for milk from
other dairies, and at other times sending them excess milk.
There are four different sizes of tankers of capacities 9,000 litres, 14,700
litres, 21,700 litres, and 23,000 litres, of which the largest is not used
by the external contractor. Tankers arriving at the yard are allowed to enter
only if there is parking space available in the yard, which can accommodate
a maximum of 18 tankers. They enter via a weighbridge, and must then wait for
their cargo to be sampled and passed before being allowed to off-load. Sampling
is carried out by laboratory staff as soon as practicable after the tanker
arrives in the yard. After a sample has been passed as satisfactory, the tanker
proceeds to one of six off-load points, providing one is vacant. The time to
off-load varies from 30 minutes to an hour, depending on the amount of milk
which the tanker is carrying. (Not all tankers are fully loaded.) After off-loading,
the tanker either leaves the yard to pick up another load of milk, or it is
washed inside and outside at one of four washing bays when one becomes available.
Tankers only wash after their last run of the day, and so the washing facilities
are generally used only in the afternoon. After washing, the tankers leave
yard after being reweighed on the weighbridge. Figure 1 shows a diagrammatic
representation of the yard as rendered by SIMUL8, with obvious abbreviations
such as COY for Company and EXT for External.

Figure 1: Schematic diagram of yard
After off-loading from the tankers, milk proceeds into one of two storage
tanks, and is then pumped into one of eight raw milk silos feeding two pasteurisers,
which carry out the first of the production processes.
The above is a description of ‘normal’ operation. Problems can develop within
the yard when the silos become full due to subsequent blockages in production
and packaging, and so a first model was constructed which followed matters
through to the stages of pasteurisation, separation and homogenisation. This
model had unsatisfactorily long execution times, and some of the detail covering
possible exceptions clearly had to go. Comparison with a model representing
just the yard
and the associated off-load and wash areas suggested that an adequate representation
of what went on there could be achieved by assuming that the silos provided
a sufficient reserve so that any bottle-necks further down the line did not
affect the vehicle situation in the yard itself. This was the situation which
prevailed anyway under normal conditions.
Tanker flow problems and possible changes
Most company tankers make two runs a day corresponding to the two milkings
which are common practice at the farms. This results in two busy periods each
day at approximately 10 am and 3 pm when there are a large number of tankers
in the yard. The problem is particularly acute in the afternoon when most tankers
use the washing facilities, thereby contributing further to congestion in the
yard. The main changes which were investigated in the simulation were :
- Not allowing external tankers to wash in the yard.
- Moving all washing facilities, both company and external, to another
yard.
- Negotiating collection arrangements with the farmers to bring about a more
even distribution of company tankers throughout the day.
- Negotiating for a more even distribution of external tankers throughout
the day.
Table 1 : Parameters and D statistics for distributions
tested for normality
| Distribution |
Mean |
St. Devn. |
# observns. |
D statistic |
a0.05 = |
a0.01 = |
| Weighout |
2.1 |
0.61 |
42 |
0.16 |
0.21 |
0.25 |
| Cweighin |
1.64 |
0.83 |
23 |
0.15 |
0.27 |
0.33 |
| Eweighin |
0.74 |
0.21 |
28 |
0.1 |
0.25 |
0.3 |
| Sample |
24.9 |
6.41 |
9 |
0.2 |
0.43 |
0.51 |
| Wash |
21.2 |
6.18 |
9 |
0.29 |
0.43 |
0.51 |
| Coffload1 |
15.6 |
3.16 |
92 |
0.18 |
0.14 |
0.17 |
| Coffload2 |
27.4 |
4.4 |
79 |
0.21 |
0.15 |
0.18 |
| Coffload3 |
39.4 |
4.78 |
39 |
0.28 |
0.21 |
0.26 |
| Coffload4 |
48.3 |
1.88 |
25 |
0.31 |
0.26 |
0.32 |
| Eoffload1 |
15.5 |
3.56 |
61 |
0.15 |
0.17 |
0.21 |
| Eoffload2 |
25.9 |
5.12 |
78 |
0.23 |
0.15 |
0.18 |
| Eoffload3 |
44.3 |
2.98 |
24 |
0.17 |
0.27 |
0.32 |
Table 2 : Parameters and D statistics for distributions tested for
exponential
| Distribution |
Time of day |
Mean |
#observns |
D statistic |
a0.05 = |
a0.01 = |
| Ctime1 |
09:00-10:00 |
12.4 |
194 |
0.12 |
0.1 |
0.12 |
| Ctime2 |
10:00-13:00 |
28 |
331 |
0.09 |
0.05 |
0.09 |
| Ctime3 |
13:00-15:30 |
13.4 |
291 |
0.07 |
0.06 |
0.1 |
| Ctime4 |
15:30-19:30 |
45.6 |
172 |
0.21 |
0.08 |
0.12 |
| Etime1 |
04:30-09:30 |
34.4 |
343 |
0.21 |
0.05 |
0.09 |
| Etime2 |
09:30-12:00 |
15.8 |
459 |
0.07 |
0.05 |
0.08 |
| Etime3 |
12:00-17:00 |
19.6 |
224 |
0.08 |
0.07 |
0.11 |
Table 3 : Part of model description
| Work Centre |
In |
Output Rule |
Out |
Resources |
| OFFLOAD1-6 |
OFFLOAD QUEUE |
Percent |
50 MILK1-6
50 TANKER1-6 |
YARDSPACE |
| Timing |
Attributes |
... set to |
Batching |
Replicates |
Attribute
UNLOADTIME |
|
|
Batch Size:
Fixed 2 |
1 |
| Work Centre |
In |
Output Rule |
Out |
Resources |
| CTANKERS |
CTankers |
Percent |
37 CSIZE1
40 CSIZE2
17 CSIZE3
6 CSIZE4 |
GATEMAN |
| Timing |
Attributes |
... set to |
Batching |
Replicates |
Fixed
0 |
WASH
TANKER TYPE
DIRECTION |
WASH/NOTWASH
1
CWEIGHIN |
- |
1 |
| Storage Bin |
In |
Out |
Capacity |
| WEIGHBRIDGE QUEUE OUT |
WASH1-4
TANKER1-6 |
WEIGHOUT |
3 |
| Resource |
Number |
Shift Dependent |
| YARDSPACE |
18 |
- |
| GATEMAN |
1 |
Available 09:00 - 19:30 |
Table 4 : Extract from results tables
| |
Low 95% range |
Average Result |
High 95% Range |
ENTRY QUEUE:
Average Queueing Time
Max Queueing Time
St. Devn. Queueing Time
No. non-zero Queueing Time
Average Queue Size
Maximum Queue Size |
0.35
3.64
0.77
16.5
0.02
1.9 |
0.45
4.61
0.97
17.8
0.03
2.06 |
0.54
5.59
1.16
19.0
0.03
2.22 |
WASH QUEUE
Average Usage
Maximum Usage |
0.02
1.54 |
0.02
1.70 |
0.03
1.86 |
CTANKERS OUT(WASH)
Number Completed
Minimum Time in System
Average Time in System
Maximum Time in System
St. Devn. of Time in System |
15.9
53.4
79.9
108
15.3 |
16.7
54.6
81.6
111
16.0 |
17.6
55.9
83.3
114
16.8 |
centres. The time spent by work items in these work centres is usually zero,
and they would not normally be represented in a Visual Interactive
display.
In the model illustrated in Figure 1, alongside the entry queues there are
dummy work centres CTANKERS (see Table 3) and ETANKERS whose
purpose is to set the initial attributes of wash, tanker type and direction.
The value of the attribute wash determines the direction which
a tanker takes when it finishes off-loading. The attribute direction is
set to xweighin (as opposed to xweighout ),
and tanker type is set to 1 or 2 to indicate company/external
tanker.
Storage Bins are objects corresponding to queueing spaces
where work items can wait prior to a forthcoming processing stage. In normal
modelling practice a storage bin is often provided immediately prior to each
‘non-fictitious’ work-centre. Storage bins may have a maximum capacity, for
example WEIGHBRIDGE QUEUE OUT (see Table 3) has a capacity
of three because that is the maximum number of tankers which can queue for
exit.
Resources typically model operators or high value tools,
but dummy resources can also be employed in order to impose shift or other
time availability patterns, which are also objects. (Work centres themselves
are assumed to be available throughout the entire simulated time.) In the dairy
model there is a GATEMAN resource which is used to restrict
the arrival of company tankers until after 9am by
which time they have made their first collections from the farms. The model
starts running daily at 4.30 am which is the time at which external tankers
start arriving. There is a further dummy resource YARDSPACE which
is used to give a running count of the number of spaces used within the yard.
Work entry points are where work items enter and leave the
model. Each work entry point requires an inter-arrival distribution. Work
exit points are suitable gathering points for statistics about throughput
and time in system. In Figure 1 separate work exit points COY TANKERS
OUT and EXT TANKERS OUT are used to gather statistics
about company and external vehicles.
Results gathering
A wide variety of results are available for recording at work centers, storage
bins and work exit points. These can be displayed both as tables and as graphs.
Table 4, for example, is an extract from a table of results following a run
of the dairy model.
The most effective way of demonstrating to the client the effects of the various
proposed changes was firstly to have him watch visual displays of various runs
as they progress, and secondly to present graphs of YARDSPACE occupancy during
the course of a specimen working day from 04:30 to 22:30. The initial situation
was as shown in Figure 2. The horizontal axis measures time in minutes, and
the dotted line represents the mean occupancy.
Data collection
A large amount of time was spent collecting and analysing data within the
yard, with a view to fitting distributions. Record sheets were available for
the arrival times of tankers, their sizes, and the amount of milk unloaded,
from which the time to unload could be derived reasonably accurately. However
there was no information available on sampling times, washing times, and time
spent at the weighbridge, all of which had to be observed with a stopwatch.
The Kolmogorov-Smirnov test was used to validate the fitted distributions
used within the model. This test has considerable simplicity in use, since
it requires only that a few functions, one for each distribution to be considered
for fitting, be set up on a spreadsheet or other computing system. Following
data entry, a single set of numbers giving the results which can then be compared
with tables of the D statistic. Given the relative straightforwardness of such
procedures, it seems unfortunate that to the writers’ knowledge this facility
is not provided within any of the existing simulation packages.
The D statistics for each of the distributions of times (in minutes) which
were expected to be Normal and negative exponential are given in Tables 1 and
2 respectively. In each case other distributional possibilities were explored,
but none gave a better overall fit. Prefixes C and E refer to Company and External
tankers respectively. The final columns give the 5% and 1% critical values
for the Kolmogorov-Smirnov statistic, that is the values which, if the underlying
distribution was as postulated (that is Normal or exponential) would be exceeded
only 5% or 1% of the time in long run random sampling.
Table 2 reflects the fact that the inter-arrival times for tankers varies
throughout the day. It was judged by observation of the records that there
were essentially four identifiable time periods appropriate to the company
tankers, and three for external tankers. This is modelled as a time-dependent
distribution, that is as a distribution of distributions for which time-of-day
is the primary parameter.
The perceptive reader will observe that the data tested for the Normal distribution
fitted it much more comfortably than the data tested for the negative exponential.
Pragmatically, there is no compelling theoretical reason why the behaviour
of any particular sets of drivers should fulfil the underlying ‘independence
of consecutive arrivals’ assumption of the negative exponential distribution.
In any case the only times when the negative exponential assumption was totally
unsustainable were when the mean inter-arrival time was high, that is in the
night and early morning when there was no congestion anyway. It therefore did
not matter too much which distribution was used to draw random arrival times
from for such periods.
Model construction
Whereas an analysis of this situation could have been achieved using any of
the modern software packages, SIMUL8 is the only one for which the client would
have been prepared to pay for what is in his perception speculative
software. Further, although SIMUL8 is not in itself object-oriented software,
the object-oriented style of thinking which it imposes is both distinctive
and influential in the rapid achievement of comprehensible models. Although
a full technical description of the present model and its variants is not appropriate,
Table 3 contains some fragments of the initial model, followed by some notes
to support the above contention.
A model is conceived as an aggregate of objects such as Work Centres, Storage
Bins, Distributions, Attributes etc, some of which are bound together as nodes
in a routing network which is not normally shown as part of a Visual Interactive
display. A work centre is an object where transformations
are effected on work items, the time to do so being drawn
from a distribution object. A work centre can batch work items
together, or change them into another work item. It is possible that a resource object
is required before any work can be carried out, and the work item may have
to wait if one is not immediately available. Work centres can also assign or
modify the values of attributes.
For Visual Interaction purposes work centres which correspond to major physical
realities such as OFFLOAD stations (see Table 3) would be
expected to appear in a simulation window. Some work centres might not correspond
to any physical reality, for example if their role was simply to batch items
or change attributes. Work centres of this sort can be thought of as dummy
or ‘fictitious’ work Figures 3 to 8 show the effect of implementing the changes
proposed earlier, singly and in combination.

Figure 2 : Graph of initial situation

Figure 3: Change 1 (no ext tanker wash)

Figure 4: Change 2 (stop all washing)

Figure 5 : Change 3 (even out ext i/a times)

Figure 6: Change 4 (even out all i/a times)

Figure 7 : Changes 1 and 3 combined

Figure 8: Changes 2 and 4 combined
The message of these graphs can be summarised by saying that whereas restricting
washing facilities would make little difference to congestion, making tanker
arrivals more equally spaced throughout the day would have a much larger effect,
potentially halving the maximum number of tankers in the yard. The first of
these observations was very pertinent to the company management, since it demonstrated
that one of the proposed actions, namely that of denying washing facilities
to the external tankers, would have done little or nothing to address the congestion
problem but would have almost certainly cost some goodwill with the company’s
contractors. The real way of addressing the problem would be to tackle the
second issue, namely that of spacing out tanker arrivals more equally equal
through the day. That this could be achieved by management directive is not
at all obvious given the factor of driver culture, and such a goal could probably
only be addressed by more subtle and less direct means.
Project summary
We do not claim in the above to present any significant new developments in
simulation theory or practice in the research sense. What we believe we have
demonstrated is that it is possible to obtain substantial simulation results
within a 15 week time frame which included purchasing the software, observing
company operations and abstracting what was important, selecting and statistically
verifying best fitting distributions, constructing and modifying models, running
these an extensive number of times, and producing a professionally polished
report showing in words and graphs that what at the outset was a plausible
solution to the problem would have made very little difference but possibly
at a human relations cost. The growing power of PCs and the skill of software
designers have made this sort of simulation affordable and practicable, thereby
confounding previous perceptions of high initial outlay and costly model development
times.
CHRISTINE CAMPBELL holds a BEng in Environmental Engineering
from Strathclyde University and currently works in the OR Department of the
Royal Bank of Scotland in Edinburgh. The case study described was conducted
in the course of post-graduate studies at Strathclyde and Glasgow Caledonian
Universities.
NORMAN THOMSON is an Honorary Lecturer at Strathclyde University,
and prior to retirement worked as a staff statistician for IBM UK Hursley Laboratories
and IBM UK manufacturing plant at Greenock
First published to members of the Operational Research Society in OR
Insight July- September 1998