CHAPTER ELEVEN BUSINESS SIMULATION Dr. Rami Gharaibeh 1 CHAPTER ELEVEN benefits simulation is useful for training, persuasion, and analysis. Simulation is also useful for model validation—for finding and fixing errors in a model. Dr. Rami Gharaibeh 2 CHAPTER ELEVEN simulating a business process model Example you seek to enhance customer satisfaction Dr. Rami Gharaibeh 3 CHAPTER ELEVEN simulating a business process model Traditionally Mykonos management has thought about customer satisfaction in terms of the quality of the dishes prepared You intend to use your new responsibility to consider customer satisfaction more broadly. want to look at customer wait times and the impact of waits on satisfaction. Dr. Rami Gharaibeh 4 CHAPTER ELEVEN simulating a business process model Customers have many waitings They wait for a table to be available. They wait for water, and bread. They wait for the staff to take their orders. They wait for their food, and they wait for their bills. You are concerned that all this waiting makes customers dissatisfied Dr. Rami Gharaibeh 5 CHAPTER ELEVEN simulating a business process model You will create two models the customer dining process. how customers arrive, are seated, have their orders taken, and so on customer satisfaction. how food quality, wait times, and other factors contribute to customer satisfaction and how word of mouth and restaurant reviews affect the view of potential customers and, ultimately, a restaurant’s success. Dr. Rami Gharaibeh 6 CHAPTER ELEVEN simulating a business process model Working with the models, you could examine the effect of different policies on wait times. And the two models could help communicate the results to the restaurant general manager, ultimately persuading him to change his policies and reduce the wait times. Dr. Rami Gharaibeh 7 CHAPTER ELEVEN simulating a business process model Working with the models, you could examine the effect of different policies on wait times. And the two models could help communicate the results to the restaurant general manager, ultimately persuading him to change his policies and reduce the wait times. Dr. Rami Gharaibeh 8 CHAPTER ELEVEN simulating a business process model After several sessions with the SME the models were developed The simulation shows that each customer party waits 46 minutes on average. This 46 minutes includes all the waits Dr. Rami Gharaibeh 9 CHAPTER ELEVEN simulating a business process model The following figure shows an initial simulation result, a breakdown of the average times spent by customers, organized by activity Dr. Rami Gharaibeh 10 CHAPTER ELEVEN simulating a business process model Dr. Rami Gharaibeh 11 CHAPTER ELEVEN simulating a business process model Wait times vary over the course of the week. Mondays and Tuesdays see far fewer customers than Fridays and Saturdays, and far shorter waits. Dr. Rami Gharaibeh 12 CHAPTER ELEVEN simulating a business process model Dr. Rami Gharaibeh 13 CHAPTER ELEVEN simulating a business process model Wait times also vary over the course of a single evening. The wait times are shortest both early and late in the evening and longest in the middle of the evening, when the restaurant is busiest. Dr. Rami Gharaibeh 14 CHAPTER ELEVEN simulating a business process model Dr. Rami Gharaibeh 15 CHAPTER ELEVEN simulating a business process model after validating the model, we will start the analysis What happens if the staffing is doubled? What happens on Friday nights if there are two hosts available to greet and seat customers instead of one, twice as many servers waiting tables, twice as many chefs cooking meals, and twice as many bartenders mixing drinks? Dr. Rami Gharaibeh 16 CHAPTER ELEVEN simulating a business process model Dr. Rami Gharaibeh 17 CHAPTER ELEVEN simulating a business process model Why is the reduction in wait times so modest even when the staff is doubled? Dr. Rami Gharaibeh 18 CHAPTER ELEVEN simulating a business process model The law of diminishing returns If we are constrained in one resource, the increase in another resource will bring diminishing returns Dr. Rami Gharaibeh 19 CHAPTER ELEVEN simulating a business process model Dr. Rami Gharaibeh 20 CHAPTER ELEVEN simulating a business process model What happens if the staffing is doubled, and the number of tables is doubled and the kitchen capacity is doubled? Dr. Rami Gharaibeh 21 CHAPTER ELEVEN simulating a business process model Dr. Rami Gharaibeh 22 CHAPTER ELEVEN simulating a business process model Most of the waits have disappeared. the obvious conclusion from this experiment: The restaurant is just not big enough for the demand on busy nights. But, doubling the capacity is not realistic !!! Dr. Rami Gharaibeh 23 CHAPTER ELEVEN simulating a business process model a more realistic alternative is to change our policy What if we ask customers to make reservations on busy nights? Here are the results Dr. Rami Gharaibeh 24 CHAPTER ELEVEN simulating a business process model Dr. Rami Gharaibeh 25 CHAPTER ELEVEN simulating a business process model People are in fact waiting less. But that reduced wait comes at a cost: the restaurant is serving fewer people and the bar is serving far fewer drinks to people who are waiting. Dr. Rami Gharaibeh 26 CHAPTER ELEVEN simulating a business process model Many other experiments are possible. What if the size of the waiting list is no more than three parties at a time? What if we staff a single additional server on Fridays and Saturdays? What if we cross-train the servers, so they could perform as hosts if the host was busy seating people? What if we only seated smaller parties—those of six people or fewer? Dr. Rami Gharaibeh 27 CHAPTER ELEVEN activities, resources, and jobs Preparing a model for simulation requires some additional work beyond what is required to create a static, non-simulated model. But more significantly than the extra work, preparing a process model to be simulated requires additional knowledge. Dr. Rami Gharaibeh 28 CHAPTER ELEVEN activities, resources, and jobs To create a business process simulation you must understand activities, resources, and jobs and the way these three interact with each other. Dr. Rami Gharaibeh 29 CHAPTER ELEVEN activities, resources, and jobs Dr. Rami Gharaibeh 30 CHAPTER ELEVEN activities, resources, and jobs activity is a single step in a larger business process. A resource is a person who performs the activity Server is a role the person plays. A job is something that flows through the process, being worked on by resources and flowing from activity to activity Dr. Rami Gharaibeh 31 CHAPTER ELEVEN Job cycle A job is created at a start event and flows over sequence flows and message flows from activity to activity until an end event is reached. When a job reaches an activity, one of two things can happen. Either a resource is available to work the job or no resource is available and the job must wait until a resource is available Dr. Rami Gharaibeh 32 CHAPTER ELEVEN Job cycle While the resource is performing an activity he is not available to do anything else. When the resource is finished the activity, the job and the resource separate. Dr. Rami Gharaibeh 33 CHAPTER ELEVEN Job cycle The resource is available to do something else: the same activity for another job, another activity for the same job, or another activity in another process. Dr. Rami Gharaibeh 34 CHAPTER ELEVEN Job cycle Dr. Rami Gharaibeh 35 CHAPTER ELEVEN Collecting statistics The simulation engine collects individual statistics as the simulation progresses—statistics about activities, resources, and jobs. These statistics are aggregated into the simulation results Dr. Rami Gharaibeh 36 CHAPTER ELEVEN Collecting statistics The engine collects statistics on each activity, each resource, and each job. Activity statistics include how many times each activity was performed, the average duration of each activity, the total cost of each activity. Dr. Rami Gharaibeh 37 CHAPTER ELEVEN Resource statistics Resource statistics include the utilization of each resource, the total amount of work performed by each resource, Dr. Rami Gharaibeh 38 CHAPTER ELEVEN Job statistics Job statistics include the total cycle time of each job, the total touch time of each job, Job cycle time; for example, some jobs take two weeks to process in the endto-end simulation, but in the real world everything is done within four days Job touch time; for example, some jobs are only worked by resources for 20 minutes, but in the real world every job is worked for at least an hour Dr. Rami Gharaibeh 39 CHAPTER ELEVEN Collecting statistics Dr. Rami Gharaibeh 40 CHAPTER ELEVEN Collecting statistics Dr. Rami Gharaibeh 41 CHAPTER ELEVEN activity durations page 303 To be simulated, activities need additional attributes. Duration is one such attribute. When a job arrives at an activity, how long does the resource work on it? Each activity has a duration attribute that indicates how long jobs need to be worked. duration is a constant value, such as 10 minutes for every job that is worked by this activity. But duration can also vary, and it can vary in three different ways. Dr. Rami Gharaibeh 42 CHAPTER ELEVEN activity durations Activity duration can vary in three different ways. First, duration can vary depending on the details of the job Dr. Rami Gharaibeh 43 CHAPTER ELEVEN activity durations The job that models the party of eight needs to be different from the job that models a party of two. For this simulation, jobs need their own model-custom attribute, party Size. A job representing a party of eight will have a party size value of 8, and a job representing a party of two will have a value of 2. Dr. Rami Gharaibeh 44 CHAPTER ELEVEN activity durations Second, the duration of the activity can vary depending on the details of the resource. A skilled server will serve drinks quicker than a novice because she remembers who ordered which drink. The simulation needs to know that this server is quick, that one is average, and this other one is slow. Dr. Rami Gharaibeh 45 CHAPTER ELEVEN activity durations For this model, resources need a model-custom attribute, skill Level, to keep track of skill. Values of skill level can then be 1 for an average skill, 0.8 for a quick server, and 1.2 for a slow one. Dr. Rami Gharaibeh 46 CHAPTER ELEVEN activity durations Suppose we want the duration of Take Dinner Order to consider both the skill of the server and the size of the party. How do we combine those elements? We need to encode the duration as a formula, perhaps like the duration in the following slide Dr. Rami Gharaibeh 47 CHAPTER ELEVEN activity durations Dr. Rami Gharaibeh 48 CHAPTER ELEVEN activity durations Third, the duration of the activity can vary randomly. Consider the activity Cook Dinner. The duration of Cook Dinner might vary from 20 minutes to 45 minutes, depending on what is ordered. When durations vary randomly, modelers often employ a uniform distribution. Each duration in a uniform distribution within the range is equally likely; 20 minutes is just as likely as 33 minutes and just as likely as 40 or 45. Dr. Rami Gharaibeh 49 CHAPTER ELEVEN activity durations https://samehar.wordpress.com/2010/03/05/distributions/ comment-page-1/ When durations vary randomly, modelers often employ a uniform distribution. Each duration in a uniform distribution within the range is equally likely; 20 minutes is just as likely as 33 minutes and just as likely as 40 or 45. Dr. Rami Gharaibeh 50 CHAPTER ELEVEN activity durations It is also possible to use other distributions: a triangular distribution that peaks somewhere in the middle,. Dr. Rami Gharaibeh 51 CHAPTER ELEVEN activity durations a standard (bell curve) distribution Dr. Rami Gharaibeh 52 CHAPTER ELEVEN activity durations or something more sophisticated. Dr. Rami Gharaibeh 53 CHAPTER ELEVEN activity durations The statistical distributions (e.g., normal, log-normal, exponential, etc.) often lead to higher model fidelity, but they are usually difficult for SMEs to understand. Dr. Rami Gharaibeh 54 CHAPTER ELEVEN work time and delay time The duration of an activity specifies the work time—the time a person is actually working on a job. But a job can also experience a delay while it is at an activity, time when no one is actually working on the job. A resource delay occurs when there is no resource available to work a job. Dr. Rami Gharaibeh 55 CHAPTER ELEVEN work time and delay time What happens if the resource starts working on the job then the resource becomes unavailable? We use the resourceShift attribute resource- Shift indicates that the job should be given to another resource if the original one becomes unavailable. Dr. Rami Gharaibeh 56 CHAPTER ELEVEN work time and delay time In some situations, the resource should be the same as the one used at the prior activity. The job waits until that particular resource is available. The activity attribute consistentResource is used to indicate this situation Dr. Rami Gharaibeh 57 CHAPTER ELEVEN work time and delay time In addition to resource delays, a job can experience an intrinsic delay. An intrinsic delay is a delay that occurs as part of the normal work of the job. It might take 40 minutes to prepare the dinner: 25 minutes of work and 15 minutes of intrinsic delay. Dr. Rami Gharaibeh 58 CHAPTER ELEVEN work time and delay time When working a single activity, a job can experience both a resource delay and an intrinsic delay. Cook Dinner includes an intrinsic delay as part of the nature of preparing food. If many dinner orders arrive at once, the chef might have more work than he can do, and some of the dinners suffer delays—resource delays—until the others are finished. (Or the chef could be limited by the physical resources of the kitchen) Dr. Rami Gharaibeh 59 CHAPTER ELEVEN work time and delay time Intrinsic delays and resource delays are both delays. In both situations, the job is waiting and no work is being performed. But they are modeled differently. If an activity has an intrinsic delay, its intrinsicDelay attribute will indicate the amount of time that the job is delayed. Resource delay is not specified in an activity attribute. Instead it is a job waiting for a resource to work it. Dr. Rami Gharaibeh 60 CHAPTER ELEVEN work time and delay time A delay can also occur in a flow, either in a sequence flow between activities in the same pool or in a message flow between pools. Dr. Rami Gharaibeh 61 CHAPTER ELEVEN simulating exclusive gateways Dr. Rami Gharaibeh 62 CHAPTER ELEVEN simulating exclusive gateways In the midst of a simulation, when a job arrives at an exclusive gateway, how does the simulation engine decide which way to send the job? Does this job represent a party that is ordering drinks or one that will move straight to ordering dinner There are three alternative modeling approaches to this question. Dr. Rami Gharaibeh 63 CHAPTER ELEVEN simulating exclusive gateways The simplest approach is for each of the outgoing sequence flows from the gateway to indicate a percentage of jobs. Each sequence flow has a conditionExpression attribute indicating whether the sequence flow will be taken. One of the sequence flows is a default; it is the flow taken if none of the others is chosen. Dr. Rami Gharaibeh 64 CHAPTER ELEVEN simulating exclusive gateways For example, suppose 60 percent of the parties order drinks before dinner and 40 percent do not. A job that arrives at the gateway will have a 60 percent chance of taking the lower path and a 40 percent chance of taking the upper path. Each job is evaluated differently, so in the midst of a simulation run, it is possible for four jobs in succession to beat the odds and all take the upper path. But over the course of hundreds of jobs, the actual results will be close to 60/40. Dr. Rami Gharaibeh 65 CHAPTER ELEVEN simulating exclusive gateways A second way of modeling how an exclusive gateway determines the outgoing path is to examine an attribute of the job. Suppose that each job in this model had a beforeDinnerDrink attribute, indicating whether the party will order drinks before dinner. For some of the jobs this attribute is true and for others it is false. Then for each job, the outgoing sequence flows from Order Drinks? will examine the value of this attribute. Those with a value of false will be sent along the upper path, and those with a value of true will be sent on the lower path. Dr. Rami Gharaibeh 66 CHAPTER ELEVEN simulating exclusive gateways There are two advantages of driving a gateway using a job attribute instead of probabilities evaluated on the sequence flow. Dr. Rami Gharaibeh 67 CHAPTER ELEVEN simulating exclusive gateways 1 Job statistics can be analyzed and sorted by the job attribute. Dr. Rami Gharaibeh 68 CHAPTER ELEVEN simulating exclusive gateways 2 Attribute-based scenarios can be created. Dr. Rami Gharaibeh 69 CHAPTER ELEVEN simulating exclusive gateways There is also a third way to model an exclusive gateway: combining the two approaches and making the gateway split depend on both an attribute of the job and on a random percentage. Dr. Rami Gharaibeh 70 CHAPTER ELEVEN simulating exclusive gateways the conditionExpression attribute of the lower outgoing sequence flow from the Order Drinks? Dr. Rami Gharaibeh 71