question

Xavi Aguirre avatar image
0 Likes"
Xavi Aguirre asked Jeff Nordgren commented

Pull multiple items (milkrun type model)

rampla-2.fsm

Hi all,

I'm trying to model a milkrun type delivery of materials, where a platform will travel to multiple locations and drop different kinds of materials.

I "joined" a queue with a task executer to create the travelling platform and I'm pushing the contents into a list. At every location node, the idea is to trigger a pull with a message to drop the specific items.

So far I have made it to drop 1 item of it's type at each location, but I would like to ask if anyone can help me in how to configure the Pull query to make it drop "N" units of itemtype 1, "X" units of itemtype 2, etc...

pull from listmilk run
rampla-2.fsm (34.7 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.

1 Answer

·
Jeff Nordgren avatar image
1 Like"
Jeff Nordgren answered Jeff Nordgren commented

@Xavi Aguirre,

Attached is your model with the changes that I made. I added a label call "NumToPull' to both Queue10 and Queue2. And I changed the OnMessage code in both of those queues. To modify the number of items to put in the queue, all you would have to do is set that label sometime before calling the OnMessage trigger. Hope that will get you to a place where you can apply it for your needs.

rampla-2-jn1.fsm


rampla-2-jn1.fsm (32.9 KiB)
· 1
5 |100000

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

Xavi Aguirre avatar image Xavi Aguirre commented ·

Thank you very much @Jeff Nordgren. I modified it a bit, since it seems that the combo taskexecuter+queue was generating 2 messages on arrival to the node and pulling twice as many items as the label value. With limiting the number of message to the value of the itemsToPull label, It is working now! Thanks

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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