question

Alejandro L7 avatar image
0 Likes"
Alejandro L7 asked tannerp commented

Stop processing an item to process a different one and then resume after.

I have 4 different item types that are handled by the same processor; however i need to set it up so that when an item type 4 is avaible in a queue, the processor stops processing its current item (if its type 1 ,2 or 3), sending it to a queue to work with the item type 4 and then resumes (not start again) the process of the previous item.

FlexSim 19.0.6
item type in process flow
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

A classic 3D processor cannot do that, because the events of process finish are already set in the event list. You can achieve such a behavior only with process flow.
An alternative object that can be preempted is a taskexecuter. You can let him act like a processor, the taskexecuter is delayed in the state of processing and preempt his processing if an item with type 4 is available.

0 Likes 0 ·

1 Answer

·
Kyle P avatar image
3 Likes"
Kyle P answered

This is definitely doable, but it involves a few triggers and a little loss of the built-in functionality of your processor. The idea is to store the process time as a label on the item and have the processor process the item one time unit at a time, recycling the item back into the queue until the process time has reached 0. After the process time reaches 0, the processor routes the item to the next location. The queue for the processor continuously resorts its contents to present the most urgent item next. There is a little of label management and opening/closing of ports you must account for, but the idea is pretty straight forward. The sorting of the queue must include the following labels in order of priority:

item type quantifier (here we will place high priority on item type 4)

work in process quantifier (this ensures the part being work continues being worked)

FIFO quantifier (this ensure items are processed as received)

I have attached an example model to illustrate how this could be implemented.

preempt-example.fsm


preempt-example.fsm (18.3 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.

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.