I have a combiner which delivers containers to 4 separators and I want the selection of the output port to be by case and, within that case, the first available. The thing is that depending on the kind of piece, the container can go to the separator 1 or 2 which are doubled (4 separators in total) to increase production. Therefore, if the item should go to the separator 1, I would like it to go to the first available among the 2 of that kind (separador T1 and separador T1_2).
I have tried coding manually the output port by case in the combiner (combinador inicial) and it kind of works, but my problem is that the script is evaluated only when the container is ready to exit. Thus, if the script is evaluated and both possible separators are occupied, the container doesn't exit once one of the separators becomes free.
Is there any way to do what I am trying to do? Or is there any way to make Flexsim evaluate the code once a separator becomes free? I have read something about using the pull requirement, but I have never used it and really don't know how it works.
I would appreciate any help, thank you in advance.