question

shanice.c avatar image
0 Likes"
shanice.c asked Felix Möhlmann commented

How to know the number of agv allocated the control area?

May I ask which variable of control area from the tree could be use to determine the control area allocation status. I would like to get the number of agv has allocated control area.

1655178429619.png

I could only find "MaxAllocations" and "Deallocation Type" these two fields from property table.

1655178608216.png

There are 2 agvs in my system. The red control area is bidirectional, and I hope agvs check if the control area is allocated before leaving from each bay. Is this a possible way? Thank you!

1655178767480.png


FlexSim 22.1.0
allocationcontorl area
1655178429619.png (111.3 KiB)
1655178608216.png (24.9 KiB)
1655178767480.png (68.2 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.

1 Answer

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

The number of allocations is equal to the number of subnodes of the 'allocations' node.

1655187468735.png

  1. int allocNum = Model.find("ControlArea1>variables/allocations").subnodes.length;

Note that, as with anything read directly from the tree, there is no guarantee this will work in future versions.


1655187468735.png (12.7 KiB)
· 5
5 |100000

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