question

Adam J avatar image
0 Likes"
Adam J asked Braydn T converted comment to answer

Prioritizing

In my model I have a queue connected to two processors. I would like to compare in every run period the amount of items sent to each processor. For example if the amount sent to processor 1 was greater than the amount sent to processor 2, for the next period the queue will sent a quantity to processor 2 that will be greater than the quantity it will sent to processor 1.

Thanks in advance.

FlexSim 19.0.0
processorqueues
· 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.

Jeff Nordgren avatar image Jeff Nordgren commented ·
@Adam J

Without a model to look at I'm not sure what you are wanting. By default, a Queue will send to the first available Processor. That is what determines how may flowitems a processor will receive from the queue. If the process times are identical, then it should send the same amount of flowitems to each processor. With the one caveat being that a queue will, by default, send to the first available downstream object starting with the first output port to the last output port. So I don't understand what you are trying to control or what your application is without seeing your model or a sample model showing the "problem".

Thanks.

0 Likes 0 ·
Adam J avatar image Adam J Jeff Nordgren commented ·

Here's the example example.fsm

What I'd like to do is each time a queue sends items to processor I can compare the quantities sent to each processor ( or to the connected queues). If it happens that one processor received a quantity greater than the other, the processor/queue having recieved less will receive the greater quantity ( whatever it will b) and so on till the end of simulation.

0 Likes 0 ·
example.fsm (17.5 KiB)

1 Answer

·
Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered

@Adam J,

Still a little unclear as to what you are wanting. In your example model, Processor1 has a process time of 2 and Processor2 has a processing time of 10. So naturally, Processor1 is going to process more flowitems than Processor2. So, if you want equal amounts to go to each processor, what you are saying is that you want flowitems to stay in the queue and NOT go to Processor1 when it is ready for another flowitem, is that correct? If so, the attached model should do what you are describing.

I added a label to the queue for the OutputPort to use. Then I added code in the OnReset and OnExit triggers of the queue to manage flow.

Take a look at the model. If this isn't what you were wanting maybe you could expand your explanation to better understand what it is you are after.

Thanks.

adam-example1-jn1.fsm


5 |100000

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

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.