question

Joris Van Poucke avatar image
1 Like"
Joris Van Poucke asked Ale edited

Custom task types "Utilize" and "Free Operators" with dispatcher in Process Flow

I know these should be used when the duration is unknown on beforehand. This is the case in my production model, but in attachment is a simplified version with known duration. But this should not make the difference.

The utilization feature works like expected. He makes the crane "utilized" for the time needed. However I can't free the crane again. Difficulty is that I have to give my crane task by the dispatcher.

I read in the manual that I have to fill in the first parameter of the Utilize task, which will be used in the FreeOperators task (in the second parameter) as a reference. However, the crane doesn't become free again. Advice?

utilize-freeoperators-custom-tasks.fsm

FlexSim 17.0.3
process flowdispatcherutilize operatorfreeoperatorutilize
5 |100000

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

1 Answer

Matt Long avatar image
2 Likes"
Matt Long answered Joerg Vogel edited

The Crane is currently stuck on the Utilize task. It's waiting for someone to call freeoperators() on it, not to give it a new task of type free operators. You'll notice that there is an additional field that you have left blank which is the Object field. If you gave the Free Operators task to another TE and specified the Object as the Crane and the Involved as token.item, the Crane would leave it's utilized state and move on to its next task.

Instead of adding a Custom Task activity, add a Custom Code and call:

freeoperators(model().find("Dispatcher1"), token.item)

If you do a just replace the Custom Task with a Custom Code, you'll see that an exception is thrown once the token gets to the Unload task, this is because the Crane will have completed the task sequence when freeoperators() is called, before the Unload task gets a chance to fire. You can solve this by moving the Unload before the Free Operators and unchecking the box Wait Until Complete:

This will cause the Unload task to be added immediately following the Utilize task so that when freeoperators() is called, the crane will finish the Utilize task and start the Unload task.


freeops.png (27.7 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.

Ale avatar image Ale commented ·

Thanks

0 Likes 0 ·