question

Adam C avatar image
0 Likes"
Adam C asked Adam C answered

Can 'Pull from list' be turned on and off conditionally?

My model has parallel work stations (processors), each with an input and output queue (Max content of 1 each). The input queues pull a job from a list, and the job is delivered by a transporter. Once in the input queue, an operator picks up the job, carries it to the work station, processes it, and moves it to the output queue to be moved to the next work station.

The input queues will pull a second job while the first is being processed because it stops being full once the first job is moved to the work station. This becomes a problem when other work stations are freed up and cannot pull the second job because it has already been allocated to a work station that is not ready to work on it.

Things I have tried:

  • OnEntry trigger - current.input.close(), current.input.stop(), getvarnode(current,"maxcontent").value = 0 and reverse OnProcessFinish at work station.
  • OnExit trigger - current.stop() and reverse OnProcessFinish at work station.

The stop command OnExit is the closest to working as the input queue will not accept a new job, however it does not prevent a pull. The transporter (a crane, in this case) takes a job to the queue and becomes stuck when it cannot unload. How can the next pull be suspended until the job has finished processing?

FlexSim 18.0.8
pull from listpullstop and resume
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Adam C avatar image
0 Likes"
Adam C answered

Adding a custom code block into the operator's process flow (pick from input queue, process at processor, move to output queue) to call inputQueue.stop() after the Load task and to call inputQueue.resume() after ProcessFinish seems to meet my need. I will keep checking to make sure there are no bugs related to this fix.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Adam C commented

It sounds like you are using the Queue's pull strategy to pull from a list. This means as soon as the queue is empty, it will try to pull something else.

Instead, you should use Process Flow to govern when you pull an item from the list. You can create one token per queue, and have the token pull items from the list, instead of the queue. Then, you can have the token wait for the process to be empty before looping back to the pull from list activity.

· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Adam C avatar image Adam C commented ·

@jordan.johnson I am already handling all of the transport and process task sequences in process flow. They are currently initiated by event-triggered sources (a transport reference from the appropriate queue).

Here is a snapshot of the task sequences which move jobs to the input queues. Move to Shop handles pulls for untouched/new jobs (forklift only), and Move to Machine handles pulls from work station to work station (forklift or crane).

How would you replace the Transport Reference here and link it to tokens handling the pull logic? Maybe OnEntry or OnExit of the newly added Pull from List? I currently use a lot of information given by the transport reference (item, destination, priority) in the flow and I am unsure how to get priority otherwise.

0 Likes 0 ·
ts-flow.jpg (72.7 KiB)
Jordan Johnson avatar image Jordan Johnson ♦♦ Adam C commented ·

Can you post your model? I need to see how the 3D objects are configured, also.

0 Likes 0 ·
Adam C avatar image Adam C Jordan Johnson ♦♦ commented ·

This is a simpler concept model (earlier version) that I can share, but it functions similarly.

0 Likes 0 ·
coordtask.fsm (126.8 KiB)

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.