question

Taro Y avatar image
0 Likes"
Taro Y asked Jeanette F commented

unload a FlowItem from an AGV

I am making a simulation model of AGV.

Is it possible for Operator1 to create a task to unload a FlowItem from TaskExecuter?


unloadtest_with worker_1.fsm


1656659734391.png




FlexSim 21.0.10
taskexecutorunload items
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Taro Y, was one of Felix Möhlmann's or Jason Lightfoot's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered

To do this, you could listen to the 'On Finish Task' event of the task executer. In the trigger, you check whether the next task is the unloading. If that is the case, the task executer sends a message to itself. In the message trigger it then creates a new task sequence to preempt itself and abort the unload task. It then also dispatches a task sequence to the operator which has it load the item from the task executer and move it into the queue.

I first tried doing this in the 'On Finish Task' trigger directly, but that lead to errors and eventual corruption of the model - FlexSim doesn't like tinkerung with task sequences during that event.

The task sequence that is dispatched to the operator also includes the task to send a message after the item was loaded. This message then causes the task executer to add a travel task to the previously created preempting task sequence.

unloadtest-with-worker-fm-triggers.fsm

I do want to mention that the entire logic, including the transport from Queue0, can also be build in process flow. Which is quite a bit simpler in my opinion, because you don't have to deal with aborting the task sequence and creating the sequence for the operator 'manually' in the trigger code.

The attached model uses an instanced process flow to control the task executers. They first drive to ControlPoint1. Then they pull a waiting item from a list, onto which they are pushed in the 'Use Transport' option of the Queue. Afterwards they travel to the destination. When they arrive, a separate token is created that deals with the operator unloading the item. This loop os then repeated.

1656671053675.png

unloadtest-with-worker-fm-processflow.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.

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

Here's the coordinated task sequence version using the transport dispatcher trigger - and has updated PassTo on the dispatcher to find the closest agv. I've also changed the dispatcher references on the queue to labels instead of centerport references.

unloadtest-with-worker-1_jl.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.