question

mpj12 avatar image
0 Likes"
mpj12 asked mpj12 commented

How do you set processor time as function of wait time in queue

I am trying to model a process where an item flows between 2 processors with a queue in between. If the item spends more than a certain amount of time in the queue waiting for the next processor, it "cools down" and then has to be warmed up for an additional amount of time when getting processed by the next processor. It cannot be on a different processor because this allows an item to be on the "warm-up" processor and the "real processor" simultaneously which is not realistic.

I have tried using a global list with age_in_queue for the items but I can't change a label based on the list and then use the label in the processor to change processing time. The closest I've gotten is creating a second queue that pulls from the main queue when the time exceeds the limit and changed the label on entry before sending the item back in the queue and the list. This works inconsistently and has even crashed FS.

FlexSim 23.2.2
processortimeconditionaltime in queue
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

Logan Gold avatar image
1 Like"
Logan Gold answered mpj12 commented

I am attaching an example model (SetupTime_Conditional_TimeInQueue_Example_23.2.fsm) to show how you can do this with labels to keep track of time spent in the Queue, and then use that information to set a dynamic Setup Time on the second Processor. The model actually includes two examples, one with just 3D objects, and one with both Process Flow and 3D objects.

The top example in the model is using Queue1's triggers to set labels on the item. First, a label is set when the item enters the Queue (item.EntryTime), and a second label is set when the item exits (item.TimeInQueue). Processor2 is using the "Values By Case" option in the Setup Time to check if item.TimeInQueue is more than the cool down period (10 seconds in this example model). If TimeInQueue is greater than 10 seconds, the Setup Time will be 5 seconds. Otherwise, the Setup Time will be 0 and the item goes straight into the Process Time.

The bottom example in the model is basically doing the same thing, just in Process Flow. The Process Flow keeps track of the time an item enters Queue2 (token.EntryTime), then sets a label on the token (token.TimeInQueue) when the item leaves the Queue. And then it assigns a label to the item (item.SetupTime) based on if TimeInQueue is greater than 10 or not. This is also done with a "Values By Case" option, just in an Assign Labels activity instead. If TimeInQueue is greater than 10, item.SetupTime is set to 5. If not, item.SetupTime is set to 0. And finally, Processor4 uses item.SetupTime in the Setup Time field.


· 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.

mpj12 avatar image mpj12 commented ·
Awesome, thanks. I suspected there was more I could do with labels, and this is a good demo. I need to read up on the scripting syntax for FlexSim.
0 Likes 0 ·