question

Jyhjeng D2 avatar image
0 Likes"
Jyhjeng D2 asked Jyhjeng D2 commented

Reevaluate All Values On Push

Dear Sir:

I am using the basic tutorial task 1.1 - Build 3D Model as an illustration to learn what will happen if I want the list entries to be updated every time both a new customer joins the waiting line and a customer leaving the waiting line. In the tutorial, it shows only the updating of waiting time of the list entries when a new customer joins the waiting line. The way the tutorial did is to check the Reevaluate All Values On Push in the Back Orders tab in the WaitingCustomers global list. My question is what should I do if I want the waiting time to be updated whenever the event of a customer going to the waiting line object or a customer leaving the waiting line object. What should I do? A FlexSim Program and a snap shop of Back Orders tab are attached in the google cloud.

https://drive.google.com/drive/folders/1V-eDcYLQI81NUTNN5hXi0RR54mfGO3CU?usp=sharing

FlexSim 22.0.1
reevaluate all values on push
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Jyhjeng D2 commented

Just to be sure that there are no misunderstandings about what that option does:
The field value is updated every time it is accessed, such as when viewing the list entries as a table, as long as the "Dynamic" checkbox is checked.

The "Reevaulate All Values On Push" option means that anything that is currently waiting to pull something from the list ("Backorders") will check if it can pull any value on the list, instead of just the new one.

This is useful if the pulling object filters for certain field values that change over time, like the "Unhappy Customers" sink. When the sink first tries to pull something or when a new customer is pushed to the list it will not be pulled because the wait time has not reached the threshold yet. The waiting time value can pass that threshold (as mentioned above, it will update whenever accessed). However this will not automatically make it get pulled, since it was already checked previously and deemed to not fit the condition.

So you have to tell the list to also re-check older values again by checking that option.

Below those options you can add other "Reevaluate Events". For example an item/customer leaving the queue or a fixed timer.

1666604159847.pngYou can also use the following command in any trigger of a Custom Code in Process Flow to reevaluate all backorders of a global list.

List("ItemList1").reevaluateBackOrders();

1666604159847.png (20.1 KiB)
· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jyhjeng D2 avatar image Jyhjeng D2 commented ·

Dear Felix:

Thank you for your reply. It is very helpful. There is one thing left to be cleared up. You mentioned that we might add a timer interval, say 60, in your example. I do not know what it means. Does it mean each customer in the waiting line only waits for 60 s, then leaves the waiting line? When I tried it and compared the result with the Process flow model, it seemed not to be the case. Please kindly advise.

Daniel Deng

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Jyhjeng D2 commented ·

The backorders will be evaluated in the set interval (in addition to other triggers, such as something being pushed to the list).

For example, without the timer, if no new customer where to enter the queue for 10 minutes, no customer would leave dissatisfied, since the backorders of the sink would not be reevaluated. With the timer set to 60 seconds, each customer would at most wait for 60s longer than the set maximum wait time before being redirected to the queue.

Customer enters -> 0s wait -> stays
Reeval. after 60s -> 60s wait -> stays
Reeval. after 120s -> 120s wait -> stays
Reeval. after 180s -> 180s wait -> stays
Reeval. after 240s -> 240s wait -> leaves

Note that the 60s are global. Depending on when in the interval the customer arrives the above example could also look like this:

Customer enters -> 0s wait -> stays (20s after last timer trigger)
Reeval. after 40s -> 40s wait -> stays
Reeval. after 100s -> 100s wait -> stays
Reeval. after 160s -> 160s wait -> stays
Reeval. after 220s -> 220s wait -> leaves

0 Likes 0 ·
Jyhjeng D2 avatar image Jyhjeng D2 Felix Möhlmann commented ·

Great! Thank you for your help.

0 Likes 0 ·
Jyhjeng D2 avatar image Jyhjeng D2 commented ·
Felix solution is correct! Thanks.
0 Likes 0 ·