# Resource Management in FlexSim Modelling: Addressing Drawbacks and Improving Accuracy
## 1 Introduction
### Research Problem  
People who are not familiar with TRIZ can also use the concept of resources in their work. For example, in FlexSim simulation modelling software, the designer can use the situation of an incoming customer to trigger a count of the waiting time in a queue. The details of this process are given below [3]. It should be noted that this example is taken from a FlexSim tutorial. A simple queueing model is considered, in which customers arrive with an inter-arrival time that has an exponential distribution and a mean of 60 s. A service desk (such as in a barber shop) will first help those customers who have been waiting the longest, and the service time has a log normal 2 distribution with a location, scale and shape of 90, 3.1, and 0.5, respectively. However, customers who have waited more than 200 s will becomefrustrated and leave via the unhappy customers sink. Customers who have been waiting the longest will be pulled from the waiting list and receive service at the service desk. There are two possible scenarios for a customer who is waiting in line: one is to be served at the service desk, and the other is to leave the system and become an unhappy customer. One is, therefore, unable to use an ordinary port connection between the waiting line and service desk, and a new set of logic operations needs to be established to fulfil the situation. To create this functionality, one uses a global list to filter and prioritise the flow of items using sophisticated sets of criteria. One sets up a list of flow items, named _WaitingCustomers_. For each item in the list, one sets up a field which helps keep track of the information on the items. One of these fields is called _WaitTime_, which tracks the length of time the item has been in the queue. The question is \"how should one update the value in _WaitTime_?\". Since FlexSim is a discrete simulation modelling package, the value of each flow item only advances when a new event occurs. The event that triggers the updating of _WaitTime_ is an incoming customer to the queue. The 3D model and its parameter settings for each of the objects of this case study are described below. Figure 1 shows the layout of a 3D model. Note that there are no port connections between the queue and the service desk, or between the queue and the unhappy customers sink; this is because a port connection ensures that the activity is executed, and since there are two possible scenarios following the queuing activity, no port correction should be made. How does a customer proceed to the next station? One sets up a global list called _WaitingCustomers_ and pushes all the customers in the queue to the list, as shown in Figure 2. A field called _WaitTime_ is used to keep track of the time spent by each customer in the queue. Under the tab entitled _Back Orders_, one checks the box marked _Reevaluate All Values on Push_ to update _WaitTime_, as shown in Figure 3. This marking enables the system to update the waiting time of the customers in the Waiting Line when a new customer joins the queue. Hence, when customers are created from the source (_Customers Arrive_), they enter the queue and are pushed into a list entitled _WaitingCustomers_. When the service desk is free to serve a new customer, it pulls the new customer, who has waited the longest time, from the _WaitingCustomers_ list, as indicated by the query field in the input section of the service desk. The value of the query field is set to _ORDER by WaitTime DESC_ (meaning descending), indicating that the customer with the longest wait will always be served first. Finally, the unhappy customers sink pulls any unhappy customer with a waiting time of more than 200 s. Note that the pull of the unhappy customers is activated when the new customers join the queue. At this moment, the wait times of the customers in the queue are re-evaluated and any with a wait time of more than 200 s will be pulled to the unhappy customers sink. Figure 1: 3D model of a single service desk.