Dynamic routing of item by changing the steps in task sequence

Dynamic routing of item by changing the steps in task sequence

chin_soon_chong
Not applicable
7 Views
10 Replies
Message 1 of 11

Dynamic routing of item by changing the steps in task sequence

chin_soon_chong
Not applicable

[ FlexSim 7.5.4 ]

0 Likes
Accepted solutions (1)
8 Views
10 Replies
Replies (10)
Message 2 of 11

joerg_vogel_HsH
Mentor
Mentor

@chin soon chong, what do you want to know? The transport tasksequence consists of

  1. Travel to loading station.
  2. Travel offset and load item.
  3. Execute break to to look for other tasksequences if there is transport capacity left.
  4. Travel to unload station
  5. Travel offset and unload item

You can insert tasks that let the taskexecuter travel to other objects or coordinates. You can add tasks that let the taskexecuter execute the offset travel relatively in directions until he reaches the pick or place location.

0 Likes
Message 3 of 11

chin_soon_chong
Not applicable

Dear Sir/Madam,

I have a simple model with a queue connected to 3 processors: A, B and C. A transporter with a capacity of 2 is used to transport items from the queue to the 3 processors, and processor to processor. Processor A is connected to Processor B and C, which are connected to a sink. The 'send to port' rule is 'Round Robin if Available' or simply 'First Available'

Suppose the transporter is moving itemX from the queue to be delivered to Processor C. Before delivering itemX, the transporter needs to travel to Processor A first to pick up another itemY to be sent to Processor B. On the 'Load' trigger of the transporter doe itemY, we changed the steps in task sequence to first unload itemX already on the transporter to Processor A (instead of delivering it to Processor C) and then deliver itemY to Processor B. This seems to work well

However, when we run simulation longer, something weird happens, Processor C stops accepting more items, and Processor A seems to be problem sending out the processed item.

Anything we need to do to make sure this model will work as expected?

0 Likes
Message 4 of 11

joerg_vogel_HsH
Mentor
Mentor

@chin soon chong, and can you upload the model?

0 Likes
Message 5 of 11

chin_soon_chong
Not applicable

Dear Jörg Vogel,

See attached model.

load-and-unload-v6.fsm

Thanks a lot

0 Likes
Message 6 of 11

joerg_vogel_HsH
Mentor
Mentor

There are variables at the objects, that count the number of items to receive by taskexecuters or to transport them. They are called number of transports in or number of transport out.

Each time a transport tasksequence is created for fixed resources those variables are adjusted at the sender or receiver objects. Those variables values and the available capacity of objects are responsible, if an object is able to receive items from other objects.

If you dynamically adjust the destinations of items, those variables aren’t updated. An object still awaits an incoming transport to reduce the number of transports in, but the detouring prevents this. There are commands to update the variables by transportincomplete or transportoutcomplete, if you change the destination of objects.

Message 7 of 11

chin_soon_chong
Not applicable

Dear Jörg Vogel,

Thanks for your very quick response.

I have tried using 'transportincomplete' for Processor C in the previous version of model. It doesn't seem to work.

How should I do to make sure the model logic is correct?

0 Likes
Message 8 of 11

braydn_t
Not applicable

@chin soon chong

What do you mean by "model logic is correct"? I took a look at your model and it seemed to be working well to me. What are you having issue with?

0 Likes
Message 9 of 11

chin_soon_chong
Not applicable

I have tried using 'transportincomplete' for Processor C. But then Processor C somehow will not accept any new flowitem anymore

,

I have tried using 'transportincomplete' for Processor C. But it seems that Processor C will not accept any new flowitem


0 Likes
Message 10 of 11

joerg_vogel_HsH
Mentor
Mentor

You need to understand the default port logic of FlexSim. The input port number defines from which inobject an object receives first an item. The Processor 4 is connected always to the input ports of number 2 of Processor 5 and 13. The processed item will stay at Processor 4 until Processor 5 or 13 won't get items from the queue. If you want that processor 4 let transport the item earlier, you must change the order of the input ports at processor 5 and/or 13.

22939-order-of-input-ports.jpg

The Taskexecuter has a function where he can find the next tasksequences to do. As long as he works alone, independently from a dispatcher, he stores his tasksequences in his own tasksequencequeue. But if he receives tasksequences from a dispatcher, the dispatcher stores the available taskesequences in his own tasksequencequeue.

22938-break-to-queued-in-dispatcher.jpg

You need to adjust the template options of the Break To function of the taskexecuter to look for new tasksequence in the dispatcher "inobject(current,1)".

I think all your code OnUnload won't do anything because the tasksquencequeue of the taskexecuter stays empty of not begun new tasksequences with a dispatcher involved.

dynamic-routing-vs-dispatcher-port-order.fsm

0 Likes
Message 11 of 11

chin_soon_chong
Not applicable
Accepted solution

Dear Jörg Vogel,

Thanks for the detailed solution. I am yet to try out your solution.

I have my code on 'OnLoad' for the taskexecuter, not on 'OnUnload'. The purpose of this is to check any flowitem already on the taskexecuter (the taskexecuer has a capacity of 2) when taskexecuter is loading a flowitem, say item A from the processor X.

If there is a flowitem, say item B already on the taskexecuter (capacity of 2), there must be a tasksequence in the taskexecuter's tasksequencequeue. Without changing the original logic, what flexsim will do is to unload item A to its destination, and then unload item B to its destination.

I have modified the code to override the sequence of tasks. Instead of unloading item A to its destination, I made item B to be unloaded first onto the processor X, followed by unloading item A to its destination, since the taskexecuter is at processor X. By doing this, taskexecuter will save on traveling.

However, item B's destination may thus be changed from its destination to processor X, and hence the issue I encountered.

Chong

0 Likes