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?