question

Paolo R4 avatar image
0 Likes"
Paolo R4 asked Paolo R4 commented

AGV Travel Time

Hello,

I was trying to do a simple simulation of an AGV operation. I wanted to do a task of going to a certaing area, load some objects, go to the initial area and unload the objects.

My problem is that I want to obtain the time that it takes to the AGV to complete the first travel and the time to complete de way back travel. I was trying to use labels and triggers but it doesnt seem to be working in a proper way.

I know that in this simple simulation it would be easier to take the distance travel and do a simple operation with the speed, but I would like to implement this in a bigger model with a few more AGV and with more control points, and obtain all the times automatically.

Thank you for your help!

AGV_4cajas.fsm

FlexSim 22.1.2
agv
agv-4cajas.fsm (9.4 MiB)
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
0 Likes"
Felix Möhlmann answered Paolo R4 commented

Your general idea seems sound. However, the unload trigger only fires when an item is about to be removed from the AGV. So the unload time is included in the measured time. The triggers will fire for every loaded/unloaded item, so you would have to check if a travel action took place inbetween and if the data should actually be stored.

I would instead use the 'On AGV Start/Finish Travel' triggers. In the start trigger, store the current control point and the current time in labels. In the finish trigger write, you can then write the relevant data (agv, start point, end point, time) to, for example, a global table.

1657787876817.png

That table can then be mirrored by a calculated table and used to plot the information in a chart.

agv-4cajas-fm.fsm


1657787876817.png (31.6 KiB)
agv-4cajas-fm.fsm (4.4 MiB)
· 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.

Paolo R4 avatar image Paolo R4 commented ·

That was exactly what I needed! Thank you very much

But how can I do the global table? Is there any tutorial about it? Because I dont know how to reproduce what you have done

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Paolo R4 commented ·

First, you set up a new global table with the columns you want. I also added the 'Delete all Rows' option to the on reset trigger, so it starts empty run.

To fill in new rows you could also copy the code from the "Add Row and Data to Global Table" pick option of a different trigger.

1657794281103.png

All of the used properties/methods/operators are described in the Table Class Reference.

What I used are 'addRow()', 'numRows' to get the number of the newly added row and then 'Table()[][]' to write the data into the cells of that new row.

The other part of the code that converts the control point reference to the connected objects finds the node in the control points tree that links the two objects ('fromCP.find(">connections/Location/1...').

1657794762406.png

It then follows the path given in that link node to arrive at the link node in the other object's tree (the '+' does this). From that node, I go up in the tree structure until I arrive at the 'owner' of that link node - the connected object (the '~' does this).

The calculated table is set up to simply select all relevant columns from the global table.

1657794891787.png

Hope this helps.

0 Likes 0 ·
1657794281103.png (24.4 KiB)
1657794762406.png (9.9 KiB)
1657794891787.png (27.0 KiB)
Paolo R4 avatar image Paolo R4 Felix Möhlmann commented ·
Okey now I see it. Thank you very much for your help!!
0 Likes 0 ·