The model attached is an attempt to release a single flow item from a queue or a combiner as an upstream workstation to a conveyor decision point. It is shown in isolation from the decision point/conveyor for simplicity. When the flow item leaves the queue/combiner, the resource should only send the single flow item. We are attempting to do this via closing the output port of the upstream resource, however we have tried closing the input port of the downstream resource and run into the same issue. On a message from the downstream resource, the current resource should release another single flow item and then no more. We are attempting to do this via opening the output port of the current resource based on a message (no contents, just the presence of one), but have also tried using the input port of the downstream resource with the same result.
The issue we ran into is that when the current resource (combiner or queue) opens its output ports, it passes all of its current contents downstream, one item at a time. The problem with this is that it continues to pass items once its ports are closed. This defeats the logic of the operation sequence we are trying to model (i.e. pallet/assembly on the conveyor arrives and consumes one flow item and departs, flow items are consumed by a center port connected sink only when the pallet/assembly is present). We have tried using object.output.close() as well as closing the input ports of the downstream resource (both closeinput(object) and object.input.close()) but the same issue occurs. The upstream resource will send flow items until its original content quantity is exhausted, or the downstream resource is at its capacity, whichever comes first.
Is there a different function/method we can use to release only a single flow item or a way we can control the flow? I am sure it can be set up in process flow, however it will need to be portable and modular as we are developing standard building blocks for use in a number of simulations of conveyors.
Thanks
port-closure-control-queue-and-combiner.fsm