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.

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

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.