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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @shanice.c, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. 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 ·

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

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.

shanice.c avatar image shanice.c commented ·

Hello @Felix Möhlmann May I ask why this control area max allocation is 1, but both agv has come in.

At the same time, from the tree I could see only 1 subnode(AGV02)?

1655188594260.png

0 Likes 0 ·
1655188594260.png (184.3 KiB)
shanice.c avatar image shanice.c shanice.c commented ·

Also both agvs has brown line attached to control area. But max allocations is 1.

1655188774486.png

It seems the control area is released after unloading.


0 Likes 0 ·
1655188774486.png (137.3 KiB)
video1.mp4 (15.5 MiB)
Felix Möhlmann avatar image Felix Möhlmann shanice.c commented ·

This could be a bug. The first AGV deallocates the area when it stops at 17s in your video (the orange line connecting the agv and the area vanishes and the second agv acquires the area (line turns orange from red)).

Without looking at the model or at least knowing why/how the AGV stops it's difficult to replicate the issue. If you can pinpoint which event causes the deallocation, you could report this as a bug.

To do this, you can place a stop time shortly before the deallocation happens. Then, while the event list is open, step through the events one by one and note when exactly the deallocation happens.

1655195510043.png

0 Likes 0 ·
1655195510043.png (11.0 KiB)
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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