How to assign each transporter to be in charge of different queues?

How to assign each transporter to be in charge of different queues?

yifei_wang
Not applicable
25 Views
13 Replies
Message 1 of 14

How to assign each transporter to be in charge of different queues?

yifei_wang
Not applicable

[ FlexSim 16.1.0 ]

Hi,

Please see my model. Based on this model, I would like each transporter to be in charge of multiple queues. For example, I would like the transporter 1 to be in charge of moving all desired objects from racks to queue 1and 2. Transporter 2 is going to be in charge of moving all desired objects from racks to queue 3 and 4. Can someone help me with this? Thanks!

Note: one queue may need multiple kinds of itemtypes. Please refer to the model.

newmodel.fsm

Accepted solutions (1)
26 Views
13 Replies
Replies (13)
Message 2 of 14

david_besson
Not applicable

You could:

  1. for each Queue: add a Dispatcher and connect it with a center port
  2. for each Dispatcher: connect the corresponding Transporters
  3. for each Rack: change the transport field as follow: "centerobject(destination, 1)"

See attached model.

990-newmodel-r1.fsm

Message 3 of 14

Brandon_Peterson
Autodesk
Autodesk
Accepted solution

Yifei,

On the racks in your model you can use the "Center Port By Case" picklist option in the Use Transport field. In the field "Case Function" enter the word "port". Then you can set the cases 1 and 2 to return the number for the center port connection to transporter 1 and the cases 3 and 4 to return the number for the center port connection to transporter 2. Doing it this way will not be affected by the itemtype of the flowitems.

Hope this helps!

Brandon

img src="https://damassets.autodesk.net/content/dam/autodesk/logos/autodesk-logo-primary-rgbblack-small_forum.png" >

Brandon Peterson
Principal Technology Consultant
>
Message 4 of 14

yifei_wang
Not applicable

Brandon,

Thank you for your reply. I set up the model in the way you described. However, transporter 1 works does not goes to queue 2 instead it goes to queue 3. Transporter 2 is not moving at all. Do you know why this happens? newmodel.fsm

0 Likes
Message 5 of 14

yifei_wang
Not applicable

Brandon,

Please see the new attached model. I fixed some code in the previous one. But, I am still not sure why Center Port by Case is not working here.

newmodel.fsm

Message 6 of 14

yifei_wang
Not applicable
995-990-newmodel-r1-autosave.fsm

David,

Thank you for your answer. Your answer works for me. This is a small model I am building right now. Later on, I would like to implement all those codes in a real plant simulation. Things may be more complicated there. I would prefer to have transporters connect to racks. Also, my SendToPort Pull from FRList will not work with your model. Any help will be appreciated. Thanks!

0 Likes
Message 7 of 14

adrian_haws
Not applicable

Hi Yifei,

We were able to find another solution using the Send to Port in rack properties with "Push to Task Sequence List" instead of "Center Port By Case." Then in that list add another Expression Field called "unloadStation." So each of these racks will send the destination of the object to a list. Then in each transporter in the OnResourceAvailable trigger click on "Pull from Task Sequence List" and enter a Query to determine which partitions to pull from. So for Transporter1 it would look like this:

WHERE unloadStation = node("/Queue1", model()) OR unloadStation = node("/Queue2", model())

We ran the model and it seemed to work just fine according to what you described. See attached model and let us know if you have any questions!

Message 8 of 14

yifei_wang
Not applicable

Hi Adrian,

Thanks for your answer. I am glad it works!! I am wondering how to fix my SendToPort on Racks because I would like the transporter to send the items to the shortest queue among the ones it is responsible for.

0 Likes
Message 9 of 14

yifei_wang
Not applicable
0 Likes
Message 10 of 14

adrian_haws
Not applicable

@Yifei Wang it looks like your model is already doing that in the Query for

ORDER BY queueSize ASC

When you step through your model and look at the entries for FRList1 it shows that each item does get transported to the shortest queue among those available.

Does the updated model do what you want it to?

0 Likes
Message 11 of 14

Brandon_Peterson
Autodesk
Autodesk

Yifei,

Because you are using the option to pull from a list for your send to port field the port value returned to the use transport trigger is 0. This is why it does not work for you.

img src="https://damassets.autodesk.net/content/dam/autodesk/logos/autodesk-logo-primary-rgbblack-small_forum.png" >

Brandon Peterson
Principal Technology Consultant
>
Message 12 of 14

yifei_wang
Not applicable

Brandon,

How should I fix that then?

0 Likes
Message 13 of 14

yifei_wang
Not applicable

Adrian,

When you look at the model when it runs, the transporter does not always go to the shorter queue.

0 Likes
Message 14 of 14

Brandon_Peterson
Autodesk
Autodesk

Yifei,

If you add the following code at line 7 of the use transport trigger (when using the "Center Port By Case" pick list option) then the port value will be set correctly and the pick list option will work like you wanted.

port = nrop(current);
while(destination != outobject(current, port) && port >= 0)
	port--;

Basically the code will loop through the outputs until it finds the destination or reaches zero.

Good Luck,

Brandon

img src="https://damassets.autodesk.net/content/dam/autodesk/logos/autodesk-logo-primary-rgbblack-small_forum.png" >

Brandon Peterson
Principal Technology Consultant
>