question

chin soon chong avatar image
0 Likes"
chin soon chong asked chin soon chong edited

Dynamic routing of item by changing the steps in task sequence

FlexSim 7.5.4
dynamic routing of item by changing the steps in task sequence
· 4
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

@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 0 ·
chin soon chong avatar image chin soon chong commented ·

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 0 ·
Joerg Vogel avatar image Joerg Vogel chin soon chong commented ·

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

0 Likes 0 ·
chin soon chong avatar image chin soon chong commented ·

Dear Jörg Vogel,

See attached model.

load-and-unload-v6.fsm

Thanks a lot

0 Likes 0 ·
chin soon chong avatar image
-1 Like"
chin soon chong answered chin soon chong edited

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

5 |100000

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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered chin soon chong commented

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.

· 3
5 |100000

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

chin soon chong avatar image chin soon chong commented ·

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 0 ·
Braydn T avatar image Braydn T commented ·

@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 0 ·
chin soon chong avatar image chin soon chong commented ·

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 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

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.

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.

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


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.