question

Noah Z avatar image
3 Likes"
Noah Z asked Ben Wilson edited

Reevaluate pull strategy check box?

As stated here:

https://answers.flexsim.com/articles/19445/flow-page-23.html

"reevaluate pull requirement on all items when each upstream item is released - this parameter is only visible if "pull" is checked. If checked, the object will re-evaluate the pull requirement for all released flowitems upstream every time a new flow item is released. This is much like the Reevaluates sendto on downstream availability check box, in that you may need to explicitly call openinput() if you want to manually trigger the re-evaluation of the pull requirement."

However, when I have the "Pull" requirement checked (see screenshot) I don't see any checkbox. I need this functionality for a model I'm working on. How do I make the queue (or other fixed resource for that matter) reevaluate the Pull logic each time an upstream flowitem is introduced?

FlexSim 16.0.1
queuecombinerpull strategypull requirementreevaluate
no-checkbox.png (51.3 KiB)
· 5
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

Brandon Peterson avatar image
7 Likes"
Brandon Peterson answered Ben Wilson edited

@Noah Zenker,

I ran a simple test where I had one source feed three queues that then feed into one processor. I set the sendtoport on the source to "Round Robin" and I set the pullrequirement on the processor to only pull the 2nd item unless the total content of all three queues was more than 2 and the item was in the first queue.

  1. /**Only pull the 2nd item unless there are more than 2 waiting*/
  2. int totcont = content(inobject(current, 1)) + content(inobject(current, 2)) + content(inobject(current, 3));
  3. if(getrank(item) == 2 || totcont > 2)
  4. return 1;
  5. return 0;

This setup creates a situation where the 3rd created will enter the 3rd queue with one item already in each of the first two queues. According to the logic above, the 3rd item will not be pulled because it is the 1st item in the 3rd queue. If the pullrequirement was automatically reevaluated then the item in the first queue should be pulled at this time because there are more than two items total in all the queues and it is in the 1st queue. It does not get pulled until after the 4th item enters the 1st queue gets pulled to the processor and exits. I placed a break point in the pullrequirement and it is obvious that the the code is not fired for the 1st item until after the processor finishes processing the 4th item.

So I believe that the answer to your question is: No, the pullrequirement is not automatically reevaluated.

In the past the checkbox that you are referring to would change the variable "pullcontinuous" on the fixed resource to 1. I tried manually changing this variable to 1 and ran the test again. Again, the 1st item was not pulled when the 3rd item entered the 3rd queue. However, when the 4th item entered the 1st queue the 1st item was pulled instead of the 4th.

After setting the pullcontinous variable back to 0 I decided to try another approach. On the entrytrigger of each queue I added code to close and then open the input ports of the processor. This caused the pullrequirement to evaluate for each of the items that had entered the queues prior to the entering item. This resulted in the 1st item being pulled into the processor when the 3rd item entered the 3rd queue. I think that this approach will help you with your issue.

I hope this clears things up for you,

Brandon

· 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.