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.