question

Felix H avatar image
0 Likes"
Felix H asked Matt Long commented

Problems using both pull from list and port connections on a queue

Hi guys,

I am building a model for distribution of pallets and im having a problem with a queue sending items with both port connections and lists. The queue is for storing empty pallets and has an onEntry trigger pushing all pallets to an itemlist. There is one TE pulling from the queue using the list, and there is one combiner pulling from the queue using A-connections. When the combiner pulls from the queue it does not pull from the list, so the item still remains on the itemlist for empty pallets. I've tried using an onExit trigger on the queue, pulling from the itemlist, but then when the TE arrives, items gets pulled twice. I've also tried using an event-triggered source waiting for SendToPort, followed by a pull form list, but then it seems like it pulls everything.

So is there a way to solve this problem? The TE-pull from list is important, so it would be great if the solution fixes the combiner-part of the problem.

Thank you in advance!

Model_test2.fsm


FlexSim 18.0.10
list pullflexsim 18.0.10port connections
model-test2.fsm (71.9 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

Matt Long avatar image
0 Likes"
Matt Long answered Felix H commented

Once you push something to a List it remains on that List until it gets pulled or the list entry is manually deleted. Those are the only two ways of removing an entry. This means you could either pull the item from the list in the On Entry of the combiner, or when you push items to the list, store the List.Entry reference on a label on the item and then using

  1. item.ListEntry.as(List.Entry).remove();

To remove the entry.

However, neither of these are very clean solutions. My recommendation is to use Process Flow to control your Combiner's logic. I've attached a small model showing how you might accomplish this.

The combiner has two inputs, one from a source that just feeds it pallets, the other is from a dummy queue that does nothing but give the combiner another input connection. Queue1 pushes items to a list.

I then created a Task Executer Process Flow (so I could use this same flow on any number of combiners) and connected it to the combiner.

The flow has a List shared asset Item List that points to ItemList1. This is just a pass through to allow a Pull from List activity to pull items from that list. The first activity is an Event-Triggered Source which is listening for the On Entry event of the combiner. When a pallet moves onto the combiner this activity will create a new token.

Next there is a breathe (delay activity with time = 0) to allow the combiner to finish getting the pallet into the combiner. Then the Pallet Arrived Decide activity checks if it was a pallet arriving or if this token arrived from a box entering the combiner. If a pallet arrived, then the token pulls an item off of the list and moves it into the combiner.

When items are moved into the combiner, the On Entry activity creates a token and this time Pallet Arrived sends the token to the Pallet Full? activity. If the pallet is full, the token is destroyed. Otherwise the token pulls an additional item from the list.

Hopefully this helps!

CombinerExample.fsm


1590325417429.png (19.5 KiB)
combinerexample.fsm (36.5 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.