question

Kari Payton avatar image
0 Likes"
Kari Payton asked Matt Long answered

Query list based on operator label from time table.

In my operator time table, I set label "opAvail = 1" on resume and "opAvail = 0"on down. I added that as a label field to the list that operators are pulled from.

On the pull option, I am attempting to use query WHERE opAvail = 1 to pull only operators who are on shift, but it does not work. Any ideas what I am doing incorrectly?

establish-user-library-3.fsm

FlexSim 17.0.2
querylist pull
entries.png (52.7 KiB)
backorder.png (10.8 KiB)
· 2
5 |100000

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

Matt Long avatar image Matt Long commented ·

It looks like what you're doing is valid and correct. Can you share your model so we can better figure out what's going on?

0 Likes 0 ·
Kari Payton avatar image Kari Payton Matt Long commented ·

@Matt Long Uploaded the model.

0 Likes 0 ·
Matt Long avatar image
0 Likes"
Matt Long answered

If you set the model run speed to 0.0, hit reset and run, and then hit step twice, you'll see that a back order is created requesting 6 operators where there are currently no entries on the list. Hit step one more time and you'll see that all of the entries are then added to the list with their opAvail field empty. Hit step 5 or 6 more times and you'll see the opAvail field be filled in with 0's. Eventually they become available.

It's important to understand when a back order is evaluated. When you first pull from a list, it goes through each entry and tries to pull that entry based upon the criteria set in the query. If it can't complete the pull request, the back order is created. Now, each time a value is pushed on to the list, that back order is reevaluated for THAT entry only. It does not reevaluate for every entry on the list (this would be slow). Since the pull happens before the entries are on the list, and when the entries are added to the list, their opAvail field is not 1, the back order never fulfills. If this happens, you have to tell the List to revaluate back orders. This can be done through the Back Order Reevaluation Events in the List properties.

The other alternative that may work depending on how your model is set up, is to ensure that the first pull request does not happen until the entries are on the List.

5 |100000

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

Adrian Haws avatar image
1 Like"
Adrian Haws answered

Kari,

I got the query to work correctly by adding a "Max Wait Timer" to the list that loops back to the "Pull From List" activity at the end of the time interval, allowing the list entries to be reevaluated.


sql-query.png (23.4 KiB)
5 |100000

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