question

Mario García López avatar image
0 Likes"
Mario García López asked Mario García López commented

task executer pick priority item

I want the taskexecuter to load specific items if available. The items type 2 are the most important item to pick. If in the queue there are items type 2, the task executer must load it besides there were items type 1 waiting for long.


priorityitems.fsm

FlexSim 24.0.4
itemtaskexecuteritemflow
priorityitems.fsm (29.5 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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Mario García López commented

This is easiest if you pull the items/task sequences from a list which allows to use a query to filter and/or order them.

In the attached model I order the items by the expression "Type*100 + age DESC". This means items with type 2 will be preferred, as long as any type 1 item didn't wait for more than 100s longer than them.

itemlist-fm.fsm


itemlist-fm.fsm (36.9 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.

Mario García López avatar image Mario García López commented ·

Thank you so mutch for the answer! But I am trying to include the process flow with a network node path and it's not working. I have added two different paths with load/unload triggers in the model. Thanks!

itemlistpath.fsm

0 Likes 0 ·
itemlistpath.fsm (40.3 KiB)
Felix Möhlmann avatar image Felix Möhlmann Mario García López commented ·
Queue1 is not connected to Queue2 and thus not sending the items anywhere. You can of course also push the items to the list in a different manner (for example in the On Entry trigger or the Send to Port field) but then you will have to set the destination in Process Flow differently as well, since the "destination" label won't exist on the items.
0 Likes 0 ·