Having an activity check the current number of entities on-hand at a particular storage area. Useful for making decisions based on the number of entities in a storage, activity, or range of activities.
Suggested Technique
- From the Insert menu select Attributes & Variables.
- In the resulting dialog select the Global Variables tab.
- Create a variable to track the level of entities at the storage (e.g., Inv_Level).
- In the Action Logic of the storage, enter INC Var_Name , where Var_Name is the name of the variable you defined.
- In the Action Logic of every connection routing entities out of the storage, enter DEC Var_Name , where Var_Name is the name of the variable you defined.
- In the Action Logic of the activity from which you wish to determine the inventory level, enter an IF…THEN statement to test the value of the variable as shown in the example below.
Example: A manager wants to know how many times the business is under-stocked during the week (the length of the simulation run). He defines two variables, Times_Under and Stock_Level.
TO DO: Enter the action logic as shown in the above illustration.