question

Carlos Antonio avatar image
0 Likes"
Carlos Antonio asked Felix Möhlmann commented

Trigger en la entrada de un procesador

Tengo un procesador(m) que alimenta a 5 procesadores (estos trabajan 6 días), este procesador trabaja en un horario de 7:00 am a 12:00 pm (5 horas) cada día, al paso de 5 días los 5 procesadores están ocupados, el 6to día el procesador(m) trabaja de manera habitual pero al estar todos los procesadores que alimenta ocupados, el item se procesa pero pasa al siguiente procesador hasta que se desocupa el primero.

Mi duda es como desactivar la entrada del procesador(m) cuando detecte que los 5 procesadores de la salida están ocupados, y que se active cuando detecte que ya hay una salida de procesador disponible.

Translation:

I have a processor(m) that feeds 5 processors (they work 6 days), this processor works from 7:00 am to 12:00 pm (5 hours) every day, after 5 days the 5 processors are busy, on the 6th day the processor(m) works normally but since all the processors it feeds are busy, the item is processed but passes to the next processor until the first one is free.

My question is how to deactivate the processor(m) input when it detects that the 5 output processors are busy, and activate it when it detects that there is already a processor output available

FlexSim 23.0.0
como configurar puerto de entrada
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Carlos Antonio, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

You can close the input of processor m in its "On Exit" trigger when all other processors, apart from the one the item is being send to, are busy. To detect whether a processor could receive an item, you can use the "opavailable()" command.

Opening the input can be done when any item exits one of the downstream processors in their "On Exit" trigger.

1673249205618.png

Google Translate:

Puede cerrar la entrada del procesador m en su disparador "On Exit" cuando todos los demás procesadores, además del que se envía el elemento, están ocupados. Para detectar si un procesador podría recibir un elemento, puede utilizar el comando "opavailable()".

La apertura de la entrada se puede hacer cuando cualquier elemento sale de uno de los procesadores posteriores en su disparador "On Exit".


1673249205618.png (17.7 KiB)
· 2
5 |100000

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

Carlos Antonio avatar image Carlos Antonio commented ·

Cómo indico los procesadores que quiero detectar con el comando "opavailable()"

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann commented ·

"opavailable(Object, N)" will return 1 if the output of rank N of Object is currently open/available, 0 otherwise. If you use it in the On Exit trigger, as I suggested, then the processor on which the trigger is defined can be accesses through the variable current.

So "opavailable(current, 1)" would check the status of the first output connection. For the "On Exit" event to occur, at least one output must be open anyway. So what you would want to check is whether the sum of "opavailable(current, N)" over all outputs is larger than 1. If it is, at least one other processor would also be available and the output can stay open. If not, the output should be closed.

0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

Once you have closed the input of processor(m) you can open the input by an event of one of your five processors, if a processed item is leaving them.


A more general logic would count items entering a set of processors and leaving them. You increment a label when items entering an area of processors and you decrement this label value if items leaving the area. While you do this in triggers or by events of On Entry and On Exit you restrict access to this area by closing an input or later by opening it again.

5 |100000

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