question

Kuilin S avatar image
0 Likes"
Kuilin S asked Felix Möhlmann commented

The logic for TaskSequence-find the reference of the task that being updated?

Now we have a scenario where we need to call the crown block to Queue1 20 seconds after processing, and wait for the completion of processing (the crown block is in the occupied state) to call "Box" to Queue2. The Source generates an endless stream of orders, and each order is a task that generates the above sequence of required tasks, which are sent to the Dispatcher to assign the crane (equivalent to the field dispatcher). The task is triggered at the appropriate starting point (delayed message), and I'm not sure what the reference to that task is. Because the tree structure is updated by rolling. Here is the model that I'm working with, please help me.

demo_dispatcher.fsm

FlexSim 22.0.4
dispatchertasksequencecodingcranes
demo-dispatcher.fsm (33.1 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.

Kuilin S avatar image Kuilin S commented ·
Using the Golbal taskSequence list to replace the dispatcher is pretty prefered, thank you.
0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

When creating the task sequence you could write it to a label on the item. When the message is received the item should be the first (and only) object inside the processor (fromObject), which gives you an easy reference to the task sequence.

Another problem with your current model is that cranes only do offset travel. To have them move to a certain location while not loading/unloading, you have to use the TRAVELTOLOC task type.

1656410099090.png

1656410110081.png

demo-dispatcher-fm.fsm

When also taking into account that the crane would then have to wait until the processor actually finishes, I believe controlling the cranes through a process flow might be the easier option.

demo-dispatcher-fm_1.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.

Kuilin S avatar image Kuilin S commented ·
Thank you for your answer. I'm working with the problem that is related to the crane scheduling. What relplaced the function of "Dispatcher1" in process flow? Can you give me more details?
0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Kuilin S commented ·

The cranes are present in the process flow as a Resource. The tokens can acquire them. Each object that is part of the resource can only be acquired by one token at a time. So the token acquiring the crane is the equivalent of the task sequence being dispatched to the crane, only that the tasks are only given to the crane after the fact and one at a time.

To acquire a specific crane (if more than one are available), you can use the query field in the acquire activity. For example to choose the closest one to the item, you'd add the 'distance' field to the resource ('Advanced' button opens the corresponding menu) and then order by that field in the query.

1656485339634.png

Note that the distance is calculated with respect to the 'puller' by default, which in this case is the token. To get the distance between the item and the crane, you have to edit the code that calculates the distance to reference the item instead (through the token label).

1656485391643.png

demo-dispatcher-fm-2.fsm

0 Likes 0 ·

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.