System Modelling and Simulation
System Modelling and Simulation
Before you change a real system, you can use a simplified representation to predict how it will behave. For example, a packaging team might predict how many parcels remain in a buffer when arrivals change. System modelling and simulation let you compare design choices while making the assumptions behind those predictions visible.
Define a model for a purpose
A system model is a simplified representation of a system's relevant components, relationships, and behaviour. Its purpose determines what you include. To predict a parcel backlog, you may need arrival counts and processing capacity, but not the colour of the conveyor.
Set a boundary around the part you are studying. Then identify the following:
- Inputs: quantities supplied from outside, such as arriving parcels.
- State variables: quantities describing the system's current condition, such as parcels waiting.
- Parameters: values held fixed during a run, such as processing capacity.
- Outputs: results used to answer the design question, such as the backlog after each minute.
A state variable can also be an output. These labels describe a quantity's role in a particular model; a capacity treated as fixed in one run can be varied between design scenarios.
Turn assumptions into update rules
Consider a buffer with no upper storage limit in the model. Divide time into intervals of length Δt. Let Nk be the number of parcels waiting at the start of interval k, Ak the parcels arriving in that interval, and Ck the maximum number that can be processed during it.
Use the timing convention that all interval arrivals are available before processing. Actual departures are limited by both the available parcels and the processing capacity:
All four quantities are parcel counts. If processing capacity is given as a constant rate r, calculate Ck=rΔt using matching time units. For example, 11 parcels/min over 1 min gives capacity for 11 parcels.
With 5 parcels initially waiting and 8 arriving, that capacity leaves 5+8−11=2 parcels. When fewer parcels are available than the capacity, the unused capacity does not create a negative backlog.
Run and inspect a simulation
A simulation applies a model's rules to specified inputs to calculate its behaviour, often over successive time steps. You can run the same model in a spreadsheet, a program, or a hand-calculated table.
Start from a stated initial condition. For each interval, enter the arrivals, calculate departures, and carry the new backlog into the next interval. Keep a table so that you can inspect intermediate states instead of seeing only the final result.
The time step controls when results are reported. A two-minute step can hide a backlog that appears after one minute and clears before the second minute ends. A smaller step provides more timing detail, but it still relies on the model's assumptions and input data.
Check before making a decision
Two checks address different questions.
Check | Main question | Parcel-buffer example |
|---|---|---|
Verification | Are the stated rules implemented correctly? | Check that departures never exceed available parcels. |
Validation | Does the model represent reality adequately for its intended use? | Compare predicted and measured backlogs at matching times. |
Matching measurements in one run supports use under those tested conditions. It does not establish accuracy for every arrival pattern or a different processing rate. If you adjust a parameter using measurements, check the revised model against additional data where possible.
What to remember
- Define the question, boundary, variables, and assumptions before calculating.
- A simulation generates predictions by applying a model's rules.
- Check intermediate results, timing, and units.
- Verify the implementation and validate predictions for the intended decision.
Example: Testing a Packaging Buffer Model
A packaging buffer starts with 3 parcels waiting. Its processor handles at most 10 parcels during each one-minute interval. Assume all arrivals in an interval are available before processing, and departures cannot exceed available parcels. The model has no upper storage limit.
The team wants no more than 5 parcels waiting at the end of any minute during this three-minute run.
Interval | Arrivals | Measured backlog at interval end |
|---|---|---|
First minute | 9 parcels | 2 parcels |
Second minute | 15 parcels | 8 parcels |
Third minute | 6 parcels | 4 parcels |
For this problem, treat the supplied measurements as the comparison values without an additional measurement-uncertainty calculation.
a) Calculate the predicted backlog at the end of each minute using the original processing capacity.
In each interval, calculate available parcels, limit departures by capacity, and carry the ending backlog into the next interval. The update is:
For the first minute:
For the second minute:
For the third minute:
The predicted backlogs are 2, 7, and 3 parcels. The largest minute-boundary backlog is ________, so the original design fails the stated requirement in this simulation.
b) Calculate the mean absolute error of the three predicted backlogs. Use the mean of the absolute differences between predictions and measurements, and report the result to two decimal places.
Compare each prediction with the measurement at the same time. Taking absolute values prevents positive and negative errors from cancelling.
The mean absolute error is 0.67 parcels. A fractional average is valid even though each backlog is a whole-parcel count. This comparison provides validation evidence for the supplied run, but no acceptable error threshold has been specified, so the value alone does not establish adequacy for the design decision.
c) Repeat the simulation with capacity increased to 12 parcels per minute. Keep the initial backlog and arrivals unchanged. Does the revised design meet the requirement in this simulation?
Reset the starting backlog to 3 parcels for the new run. Each one-minute interval now has processing capacity for 12 parcels. Keep all other inputs and assumptions unchanged.
For the first minute:
For the second minute:
For the third minute:
The revised backlogs are 0, 3, and 0 parcels. Their maximum is ________, below the limit of 5, so the revised design meets the requirement for this simulated run. Measurements at the revised capacity would help check whether that prediction represents actual operation adequately.
An engineer builds a simulation of a parcel sorter. Complete the descriptions using the terms calibration and validation, using each term once.
The engineer adjusts the model's average sorting time until its predictions closely match Monday's recorded results. This activity is .
The engineer then freezes the adjusted parameter and compares the model's predictions with Tuesday's previously unused measurements under the same operating conditions. This activity is .
A parcel buffer initially contains 4 parcels. It can process at most 7 parcels during each one-minute interval. There are 10 arrivals in the first interval and 5 in the second. Assume each interval's arrivals are available before processing, and departures cannot exceed the number of available parcels.
How many parcels remain after the second interval? Give your answer in parcels, to one decimal place.