question

Truc C avatar image
0 Likes"
Truc C asked Kavika F commented

Define route for each transporter

Hi all,

I have some problem with my model and really need your help!

I have 2 processor and 3 queue, I want to set the route that require:

- 2 processors can send item to any queue

- 1 operator/transporter can transport for only 1 queue.

I've tried to use the dispatcher but do not know how to set the operator so that they can just handle for only one queue.

Hope anyone can help. Thank you so much.

1677663754315.png

Set route_ex.fsm

FlexSim 22.1.3
dispatchertransport
1677663754315.png (125.1 KiB)
set-route-ex.fsm (43.9 KiB)
· 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 @Truc C, was Kavika F'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 ·

1 Answer

·
Kavika F avatar image
0 Likes"
Kavika F answered Kavika F commented

Hey @Truc C, here's a possible solution. set-route-ex_1.fsm

I altered the Dispatcher's Pass To code to do something custom.

1677716653085.png

TaskSequence taskSequence = param(1);
Dispatcher current = ownerobject(c);
/**Operator by Queue*/
// Get the destination Queue
Object destination = taskSequence.tasks[4].involved1.as(Object);
int portNum = Table("GlobalTable1").getRowByKey(destination, "Queue");
return portNum;

The Processor creates a Task Sequence (TS) for an Operator to pickup and drop-off items. The Dispatcher takes that TS and assigns it to an Operator on one of its output ports. That TS can be viewed in the Pass To code.

The code gets the destination queue (from the 4th task in the TS). I made a simple Global Table to look up the queue's row number. I specifically ordered the Queues in order that I want their Operators' port numbers to be (The Operator column doesn't do anything; it's mainly just for show).

1677716769676.png

It returns the port number relating to that Queue/Operator pair. So, when the dispatcher goes to choose a port, it will always send it to the right operator.


1677716653085.png (4.9 KiB)
1677716769676.png (5.3 KiB)
set-route-ex-1.fsm (47.6 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.

Truc C avatar image Truc C commented ·

Hi Kavika,

Thank you for your support, it really helped me a lot.

Sorry for disturbing you again. Can you check my model, cause when I set up one more station after the process, I have an error that traveler cannot reach the network after 5-6 times. Can you help me to check my model.

Really appreciate your help!

Test route SWave.fsm

1678329105053.png1678329665021.png

0 Likes 0 ·
1678329105053.png (8.6 KiB)
1678329665021.png (169.9 KiB)
Kavika F avatar image Kavika F ♦ Truc C commented ·

Hey @Truc C, I found the error to occur around 575 seconds into the model run. It's happening because Operator13 is trying to move a box from your In_MIx_3 into your MIx3_1, but it doesn't have a path to it since its on a Network System. Simply add a Network Node near your MIx3_1 (and your other MIx machines) and attach them to your MIx machines.

1678379999060.png

The blue line denotes that a Fixed Resource (like your queues or processors) are "connected" to your Network Node, so your Operator knows how to reach that destination.

test-route-swave_1.fsm

0 Likes 0 ·
1678379999060.png (107.3 KiB)

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.