question

Emily K avatar image
0 Likes"
Emily K asked Jason Lightfoot edited

How to save control point into list

Hi there,
I want to let AGV choose a random path when it enters an intersection, instead of selecting the shortest route. I want to trigger this behavior when AGV enters the cp (ControlPoint_I1) before the intersection.
I duplicate the AGVWork list and create a RandomCP to save the control points (CP1, CP2, CP3), therefore I could pull random CP from the list using query, ORDER BY RAND()

But how could I save those cps into list?
I have created 2 models using different PF, I have no idea which is better to achieve my goal.
sample_using AGV PF.fsmsample_using general PF.fsm

Hope to get some suggestion, thanks!

FlexSim 21.2.4
listcontrolpoints
· 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.

1 Answer

Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Jason Lightfoot edited

Couple things I noticed in your model:

- The On Arrival event only fires when the AGV actually stops at the respective control point. Use the On Pre Arrival event when the AGV might be just passing through.

- The travel activity would only start after the AGV has completed its current task (-sequence). With other network types, you would have to create a preempting task sequence. With the AGV network you can use the Control -> AGV -> Redirect option in the custom code activity.

To get the control points onto the list you can add them to the initial content.

1683206358474.png

I would then suggest to check the Leave Entries On List option in the Pull From List activity, so they are never actually removed from the list. (Saves you having to push them back)

1683206335287.png

sample-using-general-pf-fm.fsm

If not needed, I would not use the AGV Process Flow in this case. On one hand it keeps its own list of control points based on the NextWork connections. So you would only need to add the ORDER BY clause to the relevant activity.

1683206508346.png

But, since this section of the Process Flow is not used when the AGV is 'unloading mode', you would have to add the logic from the General Process Flow anyway but furthermore make sure that it only activates when the AGV is unloading, as to not interfere with the rest of the AGV flow.


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