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

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

shanice_c
Not applicable
92 Views
7 Replies
Message 1 of 8

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

shanice_c
Not applicable

[ FlexSim 22.1.0 ]

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


0 Likes
Accepted solutions (1)
93 Views
7 Replies
Replies (7)
Message 2 of 8

moehlmann_fe
Participant
Participant
Accepted solution

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.

0 Likes
Message 3 of 8

shanice_c
Not applicable

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
Message 4 of 8

shanice_c
Not applicable

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
Message 5 of 8

moehlmann_fe
Participant
Participant

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
Message 6 of 8

Jeanette_Fullmer
Community Manager
Community Manager

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
Message 7 of 8

shanice_c
Not applicable

@Felix Möhlmann Thank you for your reply.

I would like to share my previous private question answered by Phil BoBo. I think maybe in this post, my question about why "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)). " has the same problem like below 2 picture descriptions.

The actions after a stop event would forget about previous setting. I have stop 8 seconds every intersection(I use this 8-sec stop as AGV rotating time). And maybe this cause AGV release control area it has originally acquired.

1655522966471.png

1655523096991.png


0 Likes
Message 8 of 8

moehlmann_fe
Participant
Participant

The same logic should also work without 'stopping' the object. Then the area should not be deallocated at the wrong time.

WaitAtWaypoint.fsm

0 Likes