question

我才是馬邦德 avatar image
0 Likes"
我才是馬邦德 asked 我才是馬邦德 commented

All items satisfying the initial pull condition need to be processed first.

Hi, I'd like to ask a question regarding the pull strategy. I want the Processor's pull to process items sequentially based on the maximum counter value in the list. However, I would like it to finish processing all the items of a particular type before moving on to the next type with the next highest counter value. To illustrate with the initial list entries, I'd like to finish processing all 50 items (Process:3, Type:3) first before moving on to the 14 items of (Process:6, Type:8).

Due to the nature of the production line process, not all items of the same type will be waiting in the list for processing at the same time. Therefore, I need to wait until all items of the same type on the production line have been processed before moving on to the next type. How can I achieve this? Additionally, if the future list may contain items reaching up to tens of thousands, what would be the best approach for designing this?


Pull question.fsm

FlexSim 24.0.1
list pull
pull-question.fsm (31.6 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
1 Like"
Felix Möhlmann answered 我才是馬邦德 commented

You can store the previously pulled type on a label on the processor. Then first order by the item type being equal to that type.

ORDER BY Type == puller.LastType DESC, counter DESC

With a large number of items I would centrally store the counts of each type (for example a label on the queue) and update those in the On Entry/Exit triggers. This will be much faster than having to loop through the entire contents of the queue every time the counter is read.

pull-question_1.fsm

If the processor might have to wait for items not yet on the list at some point, you can further specify that the processor can not pull any other type as long as the "LastType" label is set to something other than 0. This would then require a counter label on the processor that tracks at which point "LastType" can be reset.

WHERE puller.LastType == 0 OR Type == puller.LastType ORDER BY counter DESC

pull-question-1.fsm (132.1 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.

我才是馬邦德 avatar image 我才是馬邦德 commented ·
Thank you!!
0 Likes 0 ·