Prev | Next |
Car Repair Process
This example simulates the process flow of a Car Repair shop. The BPSim configuration:
- Uses a property parameter initialized by distribution to generate a random number of issues for each customer
- Applies probability to simulate:
- Acceptance of the initial estimate or not
- Whether new issues will be found during repair
- Increments or decrements the property parameter's value in each task
- Uses the property parameter's value on conditions of Sequences outgoing from Gateways
- Simulates the customer arrivals for a given start and duration
Create BPMN Model
Create the main process
- Create a Start Event Customer Arrives
- Add a Sequence Flow to a target abstract task Activity Make Estimate
- Add a Sequence Flow to a target Exclusive Gateway Accepted?
- Add Sequence Flows to:
- A target End Event Initial Estimate Not Accepted
- A target subProcess Repair Car
- From Repair Car, add a Sequence Flow to a target abstract task Activity Accept Payment
- Add a Sequence Flow to a target End Event Customer Leaves Shop
Create the sub process Repair Car
- Create a Start Event Start Repairs
- Add a Sequence Flow to a target Exclusive Gateway converge Gateway1
- Add a Sequence Flow to an abstract task Activity Inspect for Issue
- Add a Sequence Flow to an Exclusive Gateway converge Gateway2
- Add a Sequence Flow to an Exclusive Gateway New Issue Found?
- Add Sequence Flows to:
- A target abstract task Activity Handle New Found Issue, then add a Sequence Flow back to
converge Gateway2
- A target abstract task Repair Issue, then add a Sequence Flow to a target Exclusive Gateway
Have further issues?
- From the Gateway Have further issues? add Sequence Flows to:
- A target End Event Repairs Completed
- converge Gateway1
Configure BPSim
Task |
Description |
---|---|
Artifact and Package |
All of the BPMN elements will be loaded in to the Configure BPSim window. |
Start and Duration |
We will simulate the processes in a car repair shop whose opening hours are from 9:00 am to 5:00 pm, which is a period of 8 hours. We also suppose that a customer walking in after 4:50 pm will not be served on that day. Therefore the simulation Start time is 9:00 am and the duration is 7 hours and 50 minutes. On the left hand panel of the 'Configure BPSim' dialog, click on the 'Scenario' item in the tree; the 'Scenario' tab is activated.
|
Customer Arrives |
We will simulate a customer arriving every 24 minutes. The first customer arrives at 9:00 AM and the last arrives at 4:36 PM (the customer arriving at 5:00 PM will not be served today because that is constrained by the 'Duration' setting). With a pen and paper, we can calculate that there are 20 customers served (9:00 AM to 4:36PM = 456 minutes, number of customers: 456/24 + 1 = 19 + 1 = 20). We will verify this with the simulation result later. Expand the 'StartEvent' group and select Customer Arrives. Click on the 'Control' tab and the 'New Parameter' drop-down arrow, and select 'InterTriggerTimer'. In the 'Value' and 'Unit' fields type 24 and select 'min' (for '24 minutes'). |
Property Parameters |
We suppose each customer's car might initially have a different number of issues. This could be reflected using a random number generator. BPSim provides a number of distributions to suit your needs. In this example, we use a TruncatedNormal distribution to initialize the property noOfIssues. Tasks Repair Issue and Handle New Found Issue will decrement and increment the value of noOfIssues respectively.
Important Note: Some distributions, such as 'TruncatedNormal', return a floating point value but the property is used as an integer. Setting the property's type is important, especially in condition expressions when testing with equality. For example, the condition expression getProperty('noOfIssues') = 0 will almost never be satisfied because noOfIssues was initialized by a floating point distribution. Tip: How to customize the type for a property After you create the property and set a value, click on the on the toolbar so that the created property name is shown in the bottom panel of the 'Property' tab; click on the 'Value Type' drop-down arrow and select the value 'int' instead of the default 'double'.
|
Probability on Sequence Flows |
We assume that 1/3 of the customers will not accept the initial estimate for repairs and 2/3 will accept it. We also assume that for 1/4 of the repairs new issues will be found, and for 3/4 of the repairs no new issues will be found. Expand the 'Gateway' group in the left-hand tree, and expand the Accepted? element. For the:
In the 'Gateway' group, expand the New Issue Found? element. For the:
|
Condition on Sequence flows |
We use an expression to return a boolean value as a Sequence Flow's condition, which plays a key role in the flow's logic. In the 'Gateway' group, expand the Have Further Issues? element. For the:
Note: All the outgoing transitions from a Gateway should include 100% of the logic; for example, you would not enter {noOfIssues} > 10 and {noOfIssues} < 5 as condition expressions, because values in the range [5, 10] will not be handled by any outgoing Sequence Flows. |
Run Simulation
Token Analysis
- 20 customers arrived, matching the number we calculated manually (see Customer Arrives in the Configure BPSim table)
- 8 customers out of the 20 did not accept the initial estimate, whilst 12 of the 20 accepted and had their car repaired; these figures roughly match the 1/3 and 2/3 probabilities
- 64 tokens passed the Gateway New Issue Found?, of which19 had new issues and 45 did not; these figures roughly match the 1/4 and 3/4 probabilities
Analysis on individual customers
Click on the button on the toolbar to open the 'BPSim PropertyParameter Values' dialog. As there are 20 customers (tokens), you can input a value between 0 and 19 in the 'Token Number' field and click on the to do some analysis:
- This customer did not accept the initial estimate, as shown on the 'Group by Property' tab:
- This customer's car had only one issue, which was fixed:
- This customer's car had three known issues and three other issues were found during repair, so in total six issues got fixed (perhaps this is a really old car); switching to the 'Group by Element' tab: