Chapter 10 – Modeling Techniques
10.1 – Activity-Related Techniques
10.1.2 – Activity Time Variation
Activity time that varies randomly due to the variable nature of the entity or activity or as a result of the inconsistent behavior of the resource used at the activity.
1. Determine the probability distribution that best fits the activity time (more on probability distributions).
2. Enter the probability distribution in the Time field of the General properties sheet for the activity (alternatively, a TIME statement can be used in the action logic for the activity).
Example: A phone-in order may have a time that is triangularly distributed with a minimum of 2 minutes, a mode of 5 minutes and a maximum of 12 minutes
TO DO: In the Time field of the General properties dialog enter T(2, 5, 12) as shown above. Alternatively you could enter Action Logic for the activity: TIME(T(2, 5, 12) min).
10.1.2 – Processing Entities Concurrently at an Activity
Multiple entities are allowed to enter an activity and be processed concurrently (at the same time at the same activity), independent of other entities.
1. Set the capacity of the activity to the maximum number of entities that can occupy the activity at any one time.
Example: Because a bank uses five tellers, the Bank_Teller activity is able to concurrently and independently handle up to five Customers at any given time.
TO DO: Create the activity with a Capacity of 5.
10.1.3 – Attribute-Dependent Activities
The activity time or some other activity action is based on the value of a particular attribute of the entity.
1. Define an attribute for the entity in the Insert -> Attributes & Variables dialog. Optionally, you may use one of the predefined attributes listed in Chapter 3.12.3.
2. Set the attribute to the desired value in any action logic in the model using the assignment statement.
3. Use an IF…THEN statement in the Action logic of the activity specifying the time or other action statements to be executed based on that attribute.
IF a_Type = REGULAR THEN
Time 8 Min
Time 5 Min
Example: Two types of Orders are processed in a system: Regular and Pre-invoiced . At the Log In activity, Orders which have been previously designated as Regular orders require an invoice to be printed and therefore take 8 minutes to process. Pre-invoiced orders take only 6 minutes to process.
TO DO: Define a descriptive attribute called Type with the descriptors Regular and Pre Invoiced. Assign the appropriate descriptor to the attribute in some Action logic prior to the Log_In activity. Enter the Action Logic (as shown above) to determine the type of order and act accordingly.
If the attribute assignment is based solely on percentage and this is the only activity where the attribute is used to make a decision, use the Percentage-Dependent Activities technique below.
10.1.4 – Percentage-Dependent Activities
The activity time or some other activity action occurring only a percentage of the time.
Suggested Technique for Activity Times
If only the activity time is different based on percentage, the following technique may be used.
1. Select the General tab of the activity’s properties dialog.
2. Enter a Discrete distribution function in the Time field for simple activity time assignment by percentage.
Example: An activity takes 5 minutes 28% of the time, and 7 minutes 72% of the time.
TO DO: Enter the Discrete distribution (as shown above) in the Time field.
To learn more about the Discrete distribution, see Distributions in Chapter-3.12.1.
Suggested Technique for Activity Actions
1. In the Action logic of the activity, use the Percent() function in an IF…THEN statement.
2. Define Action logic for the true and false cases of the Percent() function.
Example: Twenty percent of the time the X_Ray activity requires the use of a Specialist for 30 minutes. The other 80% of the time X_Ray simply takes 15 minutes with no resource required.
TO DO: In X_Ray ’s Action Logic, enter the logic as shown above.
10.1.5 – Assembly Activities
Attach or join one or more entities (e.g. component parts) to a base entity.
Note that in many instances you may not need to model the actual entities being joined but only the time to join them. If it is known, for example, that the components assembled to a base entity are always available when needed, it is sufficient to specify an assembly time for the base part at each assembly station as it moves through the process.
If it is necessary to model the component entities feeding into the assembly activity, do the following:
1. Route the main or base entity into the assembly activity using any routing other than an Attach.
2. Connect each storage or activity holding the entities to be attached to the assembly activity using the Attach routing (each type of component to be assembled must come from a separate storage or activity).
Example: Four Wheels and a Handle are assembled to a Wagon at the Assembly station
TO DO: Route the Wagon by any routing other than an Attach or Pickup. Route the Wheel (quantity of 4) and the Handle using an Attach routing for each as shown above. The time to perform the assembly activity may be defined in the activity’s Time field.
10.1.6 – Disassembly Activities
Detach one or more entities from another entity to which they have been attached.
1. Create an activity where the disassembly is to occur and define the disassembly time.
2. Use a Detach routing for the entities to be detached from the assembly. (Use Name = entity_name in the Condition field to detach only certain entities.)
3. Define a routing (not a Detach) for the entity to which the others were attached (the base or main entity).
If you want to separate one or more entities from another entity and they have not been previously attached to the entity somewhere in the model, use the create routing. See 10.2.2 Creating Entities.
Example: A store rents Skis to Customers for a random period of time and the Customer later returns the Skis to be checked back into the Ski Storage.
TO DO: Attach the Skis to the Customer at the Rental activity. Define the random rental time in the Rental activity, then route the Customer to the Return_Skis activity. Detach the Skis from the Customer using a Detach routing as shown above and route the Customers out of the Return_Skis activity with a 100% routing.
10.1.7 – Recurring Activities
An activity through which the same entity passes multiple times, possibly with a different activity time or routing with each pass.
1. Define an attribute called Pass (or another appropriate name).
2. In the activity Action logic, increment the Pass attribute: INC Pass
3. Use an IF…THEN statement in Action logic to specify a different activity time for each pass through.
4. Use Conditional routings based on the value of Pass, e.g. Pass = 1 , or Pass =2 if the routing is different with each pass.
Example: A machined Part must pass through the same Wash activity twice. The wash cycle and the routing are different for each pass. The first time through the Part is washed for 5 minutes and then it goes to Station5. The second time through, the Part is washed for 3 minutes and then it goes to Station6.
TO DO: Define an attribute called Pass. Define action logic for the Wash activity as shown above. Connect Wash to each station with conditional routings, their condition fields set as shown above. Route the Part from Station5 back to the Wash activity.
10.1.8 – Grouping or Batching After an Activity
Collect two or more entities into a batch or group after an activity in order to move them onto the next activity as a batch. Useful for accumulating a batch of a specified quantity or recreating a batch that had been previously batched.
Suggested Technique (batching a specified quantity)
1. Specify an output queue capacity for the activity that is at least as great as the largest batch size.
2. In the Batching tab, select Batch for After Activity.
3. Specify the quantity to be batched.
Example: In producing TO-DO pads, the printer groups the pads into batches of 50 as they come off the press (after the Printing activity). The pads are then routed to the Padding activity and then to the Cutting activity.
TO DO: Select the Batching tab of the Printing activity and choose Batch for After Activity, then enter a Batch Size of 50. Select the General tab and enter 50 in the Output Queue Cap. field.
10.1.9 – Grouping or Batching a Variable Quantity at a Specific Time
Collect two or more entities into a batch or group after an activity or queue in order to move them onto the next activity as a batch. Useful for holding entities for daily processing.
Suggested Technique (batching a variable quantity)
1. Make the routing prior to batching activity an Attach routing. In place of a quantity to attach, insert the word ALL.
2. Place a new (temporary) entity with an arrival connector to the batching location.
3. Set the arrival type to match your batching pattern. Often a Daily Pattern arrival will provide all the flexibility needed to set batching times.
Example: Product orders arrive throughout the day but are not processed until 4:00 PM
TO DO: Create a new entity that will act as a trigger to cause batching to occur. Create a Daily Pattern arrival for the “trigger” entity. Set the pattern of arrival, for each day, to have a single entity arrive at the time the batch is to occur. Create a queue, or holding location, for the entities that will be batched. Make the routing an Attach routing from the queue to the batch location with a quantity of ALL.
10.1.10 – Ungrouping or Unbatching After an Activity
Separate an entity batch into individual entities after the completion of an activity. It is assumed that entities have been previously batched. To create entities from a single entity that has not been batched, see 10.2.2 Creating Entities.
1. Select Unbatch in the After Activity section of the Batching tab for the activity.
Example: After being painted and dried in batches, Parts are unbatched before moving on. The Parts enter the Dry activity already grouped (in the Paint activity). They are dried as a batch and then unbatched to be routed to the next activity individually.
TO DO: Select the Dry activity’s Batching tab. Choose Unbatch for After Activity. You may need to define an output queue for the activity if you don’t want to block up the paint and dry activities.
To see how the Parts are grouped before the Paint activity, see Grouping or Batching Before an Activity.
All batches or groups are unbatched when the batched entity exits the model in order to complete statistics collection on each entity.
10.1.11 – Grouping or Batching Before an Activity
Collect two or more entities in the input queue of an activity in order to process them together as a batch. Useful for batching a specified quantity or for rebatching a batch of items that had been previously unbatched. To unbatch entities after the operation, see Ungrouping or Unbatching After an Activity.
Suggested Technique (batching a specified quantity)
1. Specify an input queue capacity for the activity that is at least as great as the largest batch size. (Activity input queues are automatically set to 999 as the default capacity.)
2. In the Batching tab, select Batch for Before Activity.
3. Specify the quantity to be batched.
Example: Parts are collected in groups of ten and painted in an automatic painting process. The Parts enter the Paint activity input queue individually, they are grouped in sets of 10, painted, and routed to the Dry activity as a group.
TO DO: Select the Paint activity’s Batching tab. Choose Batch for Before Activity and set the quantity to be batched at 10.
To see how the Parts are ungrouped after the Dry activity, see Ungrouping or Unbatching After an Activity.
10.1.12 – Rebatch to a Previous Quantity
Create a batch that is the same size as a previous batch without specifying a quantity. This allows the batch size to be set in one place and all subsequent batches to be set automatically. To unbatch entities after the operation, see Ungrouping or Unbatching After an Activity.
Suggested Technique (re-creating a batch)
1. Specify an input queue capacity for the activity that is at least as great as the largest batch size. (Activity input queues are automatically set to 999 as the default capacity.)
2. In the Batching tab, select Rebatch for Before Activity
Example: A batch of 48 PC boards must be unpacked (unbatched) at the Receiving activity, individually inspected at the Inspection activity, and then moved individually (on a conveyor) to be rebatched at the Packaging activity.
TO DO: Select Rebatch for Before Activity in the Batching tab of the Packaging activity. Then enter a number greater than or equal to 48 in the Input Queue Cap. field in the General tab.
The Rebatch option may also be used to create a batch for arrivals defined with a quantity greater than one. See Batching.
10.1.13 – Ungrouping or Unbatching Before an Activity
For entities routed to an activity as a batch, it may be desirable to unbatch the entities prior to the activity (in the input queue) for processing each entity individually.
1. Select Unbatch in the Before Activity section of the Batching tab for the activity.
Example: The sales department accumulates a stack of 20 purchase orders, Orders , which move together as a batch to accounting for billing. At the Billing activity, an invoice is created for each purchase order and sent on individually to a data entry activity.
TO DO: Select the Billing activity and select the Batching tab. Now choose Unbatch for Before Activity as shown above.
If you want to accumulate the same entities back into a batch after the activity, select Rebatch for After Activity and make sure an output queue capacity is defined to meet or exceed the quantity that will be rebatched.
10.1.14 – Processing Individual Entities from a Batch
A batched entity enters an activity input queue where each entity in the batch is processed individually. The entities may be rebatched optionally in the output queue.
1. Route the previously batched entity to the activity. Make sure the activity has an input queue capacity greater than zero (the default is 999).
2. In the activity’s properties dialog under the batching tab, select Unbatch for Before Activity. (Optionally select Rebatch for After Activity if you wish to have the entities regrouped in the same quantity as they came in.)
Example: A batch of 48 PC boards must be unpacked (unbatched) and individually inspected at the Inspection activity and then batched together again before they are moved to the Packaging activity. (It is assumed that the PC Boards have been previously batched.)
TO DO: Select Unbatch for Before Activity and Rebatch for After Activity in Batching tab of the Inspection activity. Enter 48 (or a higher number) in the Output Queue Cap. field in the General tab.
If individual entity statistics are unimportant, it is easiest to leave the batch intact at each activity (or let a single entity represent the batch) and specify an activity time equal to the time needed to process the entire batch at the activity. See GroupQty( ) to change the time based on quantity in the batch.
10.1.15 – Scheduling Activities
Normally, if all activities may be performed during the same shift or block of time (e.g. an 8 to 5 shift), it is unnecessary to simulate the activities by shift. In such cases you simply run the simulation for a time equal to the sum of all the time periods. For example, to model a full week of a process that is performed from 9 a.m. to 5 p.m., Monday through Friday, simply run the simulation for 40 hours.
In situations where one or more activities are performed during different shifts or time periods, it may be useful to reflect this difference in a schedule during the simulation. In such instances you must decide whether it makes sense to model full days or consolidate only those portions of each day when work is being done.
1. Define a default schedule for all activities that occur during “normal” hours as follows:
1. In the Simulation -> Options dialog (Files tab), select Default Activity Shift File and click Create Shift… to open the shift editor.
2. Using the Shift Editor , specify a shift to be used as the normal or default shift.
3. After closing the Shift Editor, assign the created shift file as the Default shift.
2. Define a schedule for each activity that has a working period that is different than the normal working period. This is done as follows:
1. Select Create Shift… in the Activity dialog under the Schedule tab. This opens the Shift Editor.
2. Using the Shift Editor, specify a shift to be used for this activity.
3. Enter the name of this shift file in the Shift File field of the Activity dialog.
Example: Orders arriving between 8 a.m. and 5 p.m. are placed in an in-basket. Processing of orders, however, is done at 11 a.m. and 4 p.m.
TO DO: Create a shift file for 8:00 a.m. to 5:00 p.m. and enter it as the default activity shift file in the Options dialog (the in-basket will use this shift). Create another shift file 11:00 a.m. to 11:30 p.m. and 4:00 p.m. to 4:30 p.m. and enter it as the shift file for the Process Order activity.
10.1.16 – Holding Entities Until a Condition is Satisfied
Only allow one part at a time to enter a section of the process.
1. Create a global variable.
2. Increment the variable when a part enters the capacity limited section of the process.
3. Decrement the variable when a part leaves the capacity limited section of the process.
4. Use a Wait Until statement to limit the number of parts that enter the capacity limited section of the process.
Example: To avoid clogging a production system, one part at a time is allowed to enter a section of the process that has recursive loops.
TO DO: Create a global variable named Counter (this can be any name). Increment the counter when the entity enters the section of the process you want to limit. Decrement the counter when the entity leaves the section of the process you want to limit. Use a Wait Until statement to hold entities until the proper condition exists.
To learn more about the Wait Until statement, see WAIT UNTIL.
10.1.17 – Interrupting an Activity
In situations where an activity is scheduled to go off shift or on break, it is sometimes desirable to interrupt the current activity rather than wait until it is finished.
1. Define and assign a shift file as described in Chapter 10, Section 10.1.15, Scheduling Activities.
2. Check the interrupt box in the schedule dialog.
Example: An invoicing activity is actually performed by people who go to lunch at noon even though no resources are assigned to the activity; the resources are assumed since the activity time is the focus of the model. When the assumed people go to lunch and on break, the activity is shut down even if it’s in the middle of processing an invoice.
TO DO: Assign the shift file to the activity. Check Interrupt current activity… as shown above.
10.1.18 – Using an Attribute as Time
In situations where an activity time varies based on the type of entity it is processing, an attribute can be used to define the time value for the activity.
1. Define an attribute called a_Loc1_Time.
2. Based on your entity arrival, assign time to each entity coming into the model using the attribute.
3. Use the attribute in the time feild of the location attribute.
Defining time values using an attribute via scheduled arrivals / Using attribute for time value in the activity time field
TO DO: Define an attribute, update the attribute value via entity arrival or anywhere within the model (before the activity where time needs to be spent). Use the attribute as time value on the activity, as shown in the above picture.
10.2 – Entity-Related Techniques
10.2.1 – Assembling Entities
Attaching one or more entities to a base entity.
1. Use a percentage or conditional routing to the assembly activity for the base entity.
2. Use the Attach routing for each entity to be attached to the base entity.
Example: In the final assembly step of a bicycle assembly line, two pedals and the seat are assembled to each bicycle. Assembly time is four minutes.
TO DO: Create the activity and storages and make the connections as shown above. In the Attach routing for the pedals, enter a quantity of 2 in the properties dialog as shown. Enter 4 in the Time field of the Final Assembly activity.
10.2.2 – Creating Entities
One or more new entities are created or split off from another entity at an activity. (The values of any user-defined attributes are the same as those of the entity that triggered their creation.)
1. Define a routing from the activity where the creation occurs (this is the routing to be used for all entities created by the activity).
2. Select the connection and choose Create from the Type list in the properties dialog.
3. Enter the name of the newly created entity in the Created entity name field.
When you add an additional text label to an entity, place the label on the center of the entity. Otherwise, the entity will appear larger during simulation.
4. In the Entities to be created field, enter the quantity of entities the activity will create for each entity coming into the activity.
5. Define another routing from the activity to route the original incoming entity. (If no other routing is defined, the original entity will exit the model.)
Example: See the example on Chapter 10, Section 10.2.5, Reuniting Entities.
To learn more about creating entities, see Create.
10.2.3 – Creating Entities Under Certain Conditions
Creation of a new entity occurs only under certain conditions. You can control whether or not an entity is created or the quantity of created entities to suit changing conditions.
1. In the create route, replace the quantity created with an attribute, variable, expression or distribution.
Example: A company receives telephone calls, 25 percent of which turn into orders and 75 percent which do not. In either case, calls must be logged and terminated.
TO DO: Place a discrete distribution in the quantity field of the Create routing. See Discrete Distribution.
10.2.4 – Dividing Entities
A single entity is split or divided up into two or more entities.
1. From the activity where the entity is divided, connect one or more Create routings, each specifying the quantity of entities to create for that particular new entity.
2. Don’t create any other output routing connections for the original entity to take. This causes the original entity to exit the system.
Example: A company receives telephone orders from which an invoice and a shipping request are generated. The invoice and shipping request continue on through the model, but the call is ended at the Take Order activity.
TO DO: Create entity graphics for both of the new entities. Change both routings from the Take Order activity to Create routings with the Created entity name: entered as shown above.
10.2.5 – Reuniting Entities
Reunite or join one or more entities to the entity from which they were previously created or detached.
1. Create one or more entities at one or more activities using the Create routing.
2. Reattach the created entities to the creating entity by using an Attach routing and selecting the Attach to: entity that created it in the properties dialog of the connection.
If you desire, you may detach and reattach any reattached entity created originally by a Create routing.
Example: A loan application filled out by the customer is reviewed and a credit report is made. The application is then joined up with the Customer at the interview activity.
TO DO: Create the activities and routings as shown above, changing the connection types as indicated. Enter the entity name for the Create routing as indicated and select Attach to: entity that created it in the Attach routing.
It is a good idea to set the input queue of the Interview activity high enough to handle entities that must wait to be matched with their credit application. This will prevent gridlock.
Alternatively, you could have the originating entity pick up the created entity using the Pickup routing. See Picking Up Entities for more information.
10.2.6 – Picking Up Entities
The entity requesting the pickup is attached to the requested entity.
1. Create a routing for the entity that will trigger the pickup to occur.
2. Create a pickup routing attached to the activity where the entity is to be picked up. Optionally you may designate Pickup: created entity in the properties dialog.
If desirable, picked up entities can later be detached and again reattached.
Example: A clinic processes samples provided by patients and provides results to the patient. Each patient provides a sample (Create a Sample). The patient proceeds to the waiting room to await results. The sample is processed and when ready is the triggering device to signal the patient to move forward and pick the sample up.
TO DO: Create the activities and routings as shown above, changing the connection types as indicated. Enter the entity name for the Created entity to sample and select Pickup: created entity in the Pickup routing.
Also see Pickup for additional information about the Pickup routing.
10.2.7 – Separating Entities
Separating entities that were previously attached or picked up. If the entity never had another entity attached or never picked up another entity, then use the create routing to generate the new entity (see Dividing Entities).
1. Connect the separating activity or storage to another activity or storage using the Detach routing.
2. Optionally enter a condition for detaching the entities in the properties dialog of the Detach routing. (Used when more than one entity has been attached and a specific entity needs to be detached.)
3. Route the main entity (the one from which an entity is to be detached) using any routing other than a Detach routing, i.e., use a 100% routing.
Example: An Invoice has been created by an Order and later attached to the Order for processing. Now the Invoice must be separated from the Order for filing. (Invoices are filed by number and Orders by date.
TO DO: Connect the Separate activity to the filing activities with connection types as shown. Since it may be possible that other entities are attached to the Order, enter the condition as shown above.
10.2.8 – Sorting Entities
An activity that examines the name or some other attribute of an entity to determine how to route the entity for further processing. For example, you want to separate all entities by size (small, medium, and large) into separate storage bins.
1. Define an attribute to be used for sorting purposes.
2. Set the attribute to the desired value in any action logic prior to the sorting activity.
3. At the activity where the sorting takes place create Conditional route connections to each activity or storage where the sorted items go.
4. In the condition field of the routing properties dialog, enter the conditional expression for taking that path (e.g. Type = small). (Be sure that all possibilities are covered or an error occurs.)
Example: The Work_File has been assigned a Size attribute earlier in the model. Now we want to sort the work files into three different working folders (storages) to be processed later by different activities in the model.
TO DO: Connect the sorting activity to the storages with Conditional routings as shown. In the Condition field of each routing (as shown) enter Size = descriptor, where descriptor is either small, medium, or large, assigned previously to the descriptive attribute Size.
10.2.9 – Renaming Entities
Changing the name of an entity at an arrival, activity, or move time (routing). The name is important because statistics are reported by entity name when entities exit the system.
1. Route the entity whose name will change using a Percentage, Conditional, or Renege routing.
2. In the properties dialog of the routing, enter the new name in the New name field.
Example: Callers on hold at the order desk will hang up if they have to wait too long. Some may wait as many as 8 minutes, other as few as 2 minutes, but most will wait around 3½ minutes. We want to rename the calls that hang up (renege) so that we can keep separate statistics on those calls.
TO DO: Create the renege routing and enter the triangular distribution, T(2,3.5,8), and the new name (LostCall) in the appropriate field as shown above.
1. Select the Action tab in the properties dialog of the activity or routing.
2. Enter the following logic: NewName(new_entity_name)
where new_entity_name is the name you want to change it to. Note that the new name must be a name that has already been defined for an entity on the layout. This will change the entity’s name and graphic.
Example: Depending on an attribute named Color , a Part is renamed. If the Color is red, the Part is renamed Reject . If the Color is blue, the Part is renamed GearA . And if the Color is green, the Part is renamed GearB to indicate a quality difference and therefore a different use in the plant.
IF Color = red THEN NewName(Reject)
IF Color = blue THEN NewName(GearA)
IF Color = green THEN NewName(GearB)
TO DO: In the routing’s Action logic, enter the IF…THEN statements shown above to change the entity’s name according to the value of the Color attribute. Place entities on the layout named Reject, GearA and GearB.
To learn more about the NewName function, see NEWNAME.
An entity can be renamed using either the New Name drop down list in a routing Properties Dialog Box, or the NEWNAME statement in action logic. When renaming, all attributes from the original entity are inherited except the system created attributes ID and Name. The system created attributes which are inherited are Cost, CycleStart, and VATime.
10.2.10 – Randomly Assigning Entity Attribute Values
An entity attribute is assigned a different value or descriptor based on a random percentage. This applies to both predefined attributes such as Cost and user-defined attributes that are defined in the Attributes & Variables dialog under the Insert menu.
1. Define the entity attribute.
2. Assign a value or descriptor to the attribute in Action logic using the userdefined distribution function. For example: Color = D2(30, red, 70, blue)
Example: Eighty percent of the time an insurance claim form is for personal injury and 20% of the time for property damage.
TO DO: Define the descriptive attribute called Type in the Attributes & Variables dialog under the Insert menu with PER and PROP as descriptors. Enter the Action logic as shown above in the arrival’s Action logic tab.
10.2.11 – Customer Reneging
A customer waiting for service decides to leave rather than continue waiting.
1. Route the customer to the desired activity.
2. Make sure this activity has sufficient Input queue capacity to hold waiting customers.
3. Create a Renege routing from that activity to another storage or activity, or leave it unconnected so the customer will leave the system entirely.
4. Set the Renege after time for the amount of time the customer will wait before leaving. (This is usually a distribution to indicate variability of a customer’s patience.)
Example: Callers on hold at the order desk will hang up if they have to wait too long. Some may wait as many as 8 minutes, other as few as 2 minutes, but most will wait around 3½ minutes. We want to rename the calls that hang up (renege) in order to keep separate statistics on those calls.
TO DO: Create the renege routing and enter the triangular distribution, T(2, 3.5, 8), and the new name in the appropriate fields as shown above.
To learn more about the Renege routing, see Renege.