Counting the total number of entities meeting a special condition.
Suggested Technique
- Determine the condition or attribute to be counted.
- Create a variable of type Integer to use to keep a tally.
- In the appropriate Action logic, increment or decrement the variable to reflect the condition being counted.
Example: A restaurant has a buffet. The management wants to know how many men, women, and children go through the buffet. An attribute called a_Gender has been defined and assigned one of three descriptors (man, woman, kid) in the arrival Action logic of the Customer entity according to a discrete distribution. Three variables have been defined to count the number for each gender: Children, Men, and Women.
TO DO: Create the variables and attribute as described above. Enter the Action logic as shown in the above illustration in the properties dialog for the Buffet activity.
To examine the results, look for variable statistics in the General Statistics Report (see General Statistics Report) where you will find the average value of each variable. The total count is reported as the current value of each variable.
Related to Entity
- What is an Entity?
- What is Entity Cost?
- How do I change Activity Time based on Entity Attribute?
- How do I Change Activity Time Based on Recurring Entity Passes?
- How do I Divide an Entity?
- How do I Randomly Assign Entity Attribute Values?
- How do I Renege an Entity?
- How do I Change Entity Graphics During Simulation?
- How do I Import Entity Graphics?
- Why am I Getting Entity Arrival Failures at the End of Simulation?
- Why am I Getting Entity Exits System Before Releasing all Captured Resources?