In my Flexsim model, two labels are assigned numerical values for items in a queue: Percentage and Ref. Percentage is calculated based on a formula and produces a different value each time. Ref ranges from 1 to 6. I want to implement a pull system where two machines pull items from the queue. The first criterion for the machines is to select the item with the lowest Percentage value. Once the machine picks the item with the lowest value, the next X items it pulls must have the same Ref as the one it selected. The value for X is defined in a global table, which has 6 columns, one for each Ref. This means that each Ref has a different X value associated with it. After those items are pulled, the system should repeat the same criteria. How can I implement this?