question

Sofia G avatar image
0 Likes"
Sofia G asked Sofia G commented

Coordinated Task Sequence between two stations and two operators

Hello,

I'm trying to develop a model that does the follow: Processor 1 is controled by Operator 1 and the next station, Processor 2, is controlled by Operator 2.

The coordinated task sequence is contained in the ExitTransfer1 connected to Processor 1 and ExitTransfer2 connected to Processor 2, contains the task sequence for Processor 2. Operators are controlled by a dispatcher.

I want that the Operator 2 travels to Processor 1 after Operator 1 process 2 items (using a for loop), but by any means operator 1 should travel to processor 2.

Operator 2 travels, loads an item from the conyeyor, unload it in Processor 1 and travels back again to Processor 2 to continue loading and unloading items from the second conveyor. However, at some point, the operators stop working. I have tried by changing the blocking values in the allocate and deallocate commands, as well as changing the location of these in the code.

Additionally, when the for loop is executed for the Operator 1 to process the first two items, only the first item reaches the second station and the second one seems like dissapearing. I managed to fix that by changing the deallocation command for Operator 1 but then I get other errors.

I attach the model.

Thanks in advance.

Kind regards.

Sofia

ejemplo-task-sequence-rev10.fsm

@Jörg Vogel

FlexSim 16.2.2
task executercoordinated task sequencetask sequencestask sequence done by an operatorcoordinated task sequences
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Probably you want just to control the order the operator do their work. Unfortunately the keyword coordinated tasksequence is used for a special situation where two or more Taskexecuters work together at the same task. For example there is an item to transport but the weight is to high to carry it by one operator, then you need 4 worker in reality. The method is in Flexsim the coordinated tasksequence. Each time the operator team have to be at a position there are synchronize tasks in the coordinated tasksequence to achieve this.

1 Like 1 ·
Brenton King avatar image Brenton King ♦ commented ·

Sofia, I'm not sure I fully understand what you are trying to do... but I'm confident that you are making this more difficult than it needs to be.

Let me see if I understand your question.

Operator1's main job is to move items from conveyor1 to Processor1.

Operator2's main job is to move items from conveyor2 to Processor2.

However, every 3rd item that leaves conveyor1 needs to be carried by Operator2 to Processor1.

While Operator2 is doing Operator1's job, Operator1 goes to Processor2.

After Operator2 drops off the item at Processor1 he goes back to Processor2 to continue his original job.

Operator one goes back to conveyor1 and returns to his original job of carrying items from conveyor1 to Processor1.

After 2 more items they switch again.

Basically, the operators need to switch places for one item after every two items pass? Then after one load they return and wait to do it again?

0 Likes 0 ·
Sofia G avatar image Sofia G Brenton King ♦ commented ·

Hello Brenton,

Not exactly...

Operator1's main job is to move items from conveyor1 to Processor1. Correct.

Operator2's main job is to move items from conveyor2 to Processor2. Correct.

However, every 3rd item that leaves conveyor1 needs to be carried by Operator2 to Processor1. Correct.

While Operator2 is doing Operator1's job, Operator1 goes to Processor2. No. Operatos 1 has to enter an Idle state.

After Operator2 drops off the item at Processor1 he goes back to Processor2 to continue his original job. Correct.

After 2 more items they switch again. After 2 items the operator 2 travels again processor 1 to help operator 1.

I mean, I don't want operator 1 to travel to the second station, he will stay in the first station while operator 2 load/unload from exittransfer1. I just need operator 2 to travel to processor 1 every "X" number of items, during one item and then go back again to continue with the load/unload taks in processor 2.

Thanks for your help.

0 Likes 0 ·
Brenton King avatar image
1 Like"
Brenton King answered Sofia G commented

Here is a version of the model that doesn't use any Process Flow. I also built it in FlexSim 2016 Update 2 (I think that is the version you are working in?) Once I understood that there actually wasn't any coordinated tasksequence stuff that needed to happen, it was just a simple "if" statement that chose which operator to use. I did it in code because I wanted Operator2 to have to return to his station after he finished.

7599-ejemplo-task-sequence-rev10-fs.fsm


· 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.

Brenton King avatar image Brenton King ♦ commented ·

The trick to this model is in the fmod(NumEntries,3) command. Basically, I get the input of the exittransfer and divide it by 3. The fmod tells me if there is a remainder or not. This lets me know if it is the 3rd item in a set.

0 Likes 0 ·
Sofia G avatar image Sofia G commented ·

@Brenton King, thanks a lot.

I actually got to do something similar using an if as well. The for loop was making things too complicated and the if solved everything.

Kind regards,

Sofia

0 Likes 0 ·
Brenton King avatar image
0 Likes"
Brenton King answered Brenton King commented

Is this what you were looking to do?

2optestmodel.fsm


2optestmodel.fsm (42.2 KiB)
· 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.

Brenton King avatar image Brenton King ♦ commented ·

2optestmodel-1.fsmJust saw your reply. I made the change. I think this is doing what you would like now. I used process flow because I thought you needed a more complex task sequence. The key to getting the switch in operators is inside of the "3rd Item" activity.

0 Likes 0 ·
2optestmodel-1.fsm (40.9 KiB)
Brenton King avatar image Brenton King ♦ Brenton King ♦ commented ·

I'm not sure why my videos keep freezing in the middle! Sorry.

0 Likes 0 ·
Sofia G avatar image Sofia G Brenton King ♦ commented ·

Hello Brenton,

Thanks a lot. The second video shows exactly what I trying to do. But for some reason I open the file and is empty. Would yu be so kind to post it once again?

Kind regards,

Sofia

0 Likes 0 ·
Show more comments
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

After looking into your model their is code to load more items than there might be available. You intend to load two items in a for loop, but what reference get the second item, if it isn't in the ExitTransfer. It get NULL. That won't work. Flexsim has only this ability with Lists. Their exists the option of backorders. Flexsim stores a task that can be fulfilled later as a backorder in the lists.

What you really do is to transfer the tasksequences in a predefined order. Or let the operator do nothing if there isn't an item available to transport which must be transported to fulfill the order. Operator1 must process items at the processors 1 and 2. Operator must transport items from and to the processors.

You can place two dispatchers in the model. One controls the utilize tasksequences the second controls the transport tasksequences.

You need a lot of do nothing events at the dispatcher which administers the utilize tasksequences. A utilize tasksequence gets to a dispatcher when an the item enters the processor. It won't get already to the dispatcher when it is in transfer. In this situation the operator must wait or do nothing. That means the dispatcher has probably a tasksequence to transfer which contains the utlize tasksequence but for the wrong processor. Then the dispatcher doesn't transfer the tasksequence. The operator gets into the idle state. When the dispatcher receives the utilize task which matches to the order list he transfers the sequence otherwise he places the tasksequence in the tasksequencequeue.

I would decide which utilize tasksequence is to transfer by a label value at the dispatcher. In the function pass to I compare the value of the label with the reference of the tasksequence that contains the object the utilze task is for. The function that can evaluate informations in a tasksequence is gettaskinvolved. If the tasksquence matches I change the label value for the next check and return the port number of the operator he is connected to the dispatcher. If the tasksequence doesn't match the return value is -1. This value tells the dispatcher to store the tasksequence into the tasksequencequeue. When the operator has finished a tasksequence and becomes available the dispatcher tests all tasksequences in the tasksequencequeue if he can transfere one of them to the operator.

The second dispatcher passes tasksequence in your predefined order or in the order of the longest waiting time or in an order which prevents that the process gets in a blocked state.

In your model with just two operators you needn't any dispatcher, because you can write the logic into the operators, too.

The taskexecuter class inherits the functionality of the dispatcher class already.

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.