My model has a processor connected to 3 queues and each of these queues is connected to another processor. Is it possible to make an item from the first processor to choose the queue with the shortest waiting time?
My model has a processor connected to 3 queues and each of these queues is connected to another processor. Is it possible to make an item from the first processor to choose the queue with the shortest waiting time?
It is not possible to choose the queue with shortest waiting time at initial stage because waiting time will be calculated once inventory starts to add. Try to use basic process flow decision logic to move item to queue whichever you like. Otherwise, there is so many options in send to the port flow tab. Try to use that
Thank you for your answer, but I should have submitted an image from this part of the model for a better understanding. The situation is the following:
So, my question applies for the Processor1 when it is sending objects to Queue2, Queue3 or Queue 4. In send to port flow tab from the processor I must introduce some instruction/code to make the shortest waiting time the decision criterion. Is it possible?
@Maria B6 i can't open your image. Please resend it
Hi @maria.b6, was joerg.vogel's or braydn.t's answer helpful? If so, please click the red "Accept" button on one of their answers. Or if you still have questions, add a comment and we'll continue the conversation.
Hi @Maria B6,
longest queue is not shortest waiting time. In the attached model I add all waiting times of all items of the same queue together. Therefore all Items are pushed to a global list on entry event and pulled on exit of any queue. The shortest time gets evaluated if all queues are filled at least with one item. The source code is in the queue previous to the waiting queues. The code is written to insert more queues.
@Jörg Vogel this code really worked for my problem. Thank you! I only have one question about the model you sent: I didn't understand the function of the "on reset" trigger, because the update of waiting time values is done with the codes on the "on entry" and "on exit" tabs of the queues, am I right?
On Reset I collect all names of objects connected to the queue which receives items into an array at a label called "outs". If you want to customize the feature limited for output objects, you can edit the source code in the On Reset trigger. In Line 5 I read this label in my code.
you wrote me an e-mail, what do you want to know about my code? How can I help?
I see that on the list are all the times that the boxes spent on the waiting line. But how is the sum of these values plotted in a table and still in ascending order? Where is this function described?
@Maria B6
Does this shortest queue option not work?
Also, we cannot see your image.
15 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved