question

Sean Webster avatar image
0 Likes"
Sean Webster asked Felix Möhlmann edited

How to see which AMR caused deadlock?

I'm using the A Star navigator with AMRs which I named AMR_1, AMR_2, etc. However, when a deadlock occurs I always get the console message "exception: Unrecoverable deadlock encountered for AMR1. Model stopped" How can I make this message give a unique identifier for the AMR which caused the issue, since it doesn't seem to use the name I set?


Also, it would be nice if in a future update you could just click the message and it would select the object causing the issue.

FlexSim 22.2.0
agva star navigation
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 edited

It seems that the name of the 'travelmembers' nodes in the AStarNavigator's variables are not updated when they are renamed.

1660550380426.png

I would assume that this might be the reason the error message is showing a different name. Try to either rename the nodes in the tree manually or remove and readd the AMRs to the A* system after you changed their names.


1660550380426.png (13.4 KiB)
· 2
5 |100000

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

Sean Webster avatar image Sean Webster commented ·

The "travelmembers" node does not exist on my tree, even after starting a run. Possibly because I am spawning the ANTs in the process flow instead of them permanently in the model? 1660587645715.png

1660587703464.png


I tried changing the "navigator" variable under the AMR which used to be called "/AStarNavigator>variable/travelmembers/AMR1" by default, but it still uses that label for the error message even after I change it. It seems like the travelmembers variable exists in the AStarNavigator somewhere but it isn't visible in the tree. Do you know what code would be used to change the name of that variable? It's hard for me to figure it out without seeing the tree.


1660587839889.png


0 Likes 0 ·
1660587645715.png (22.6 KiB)
1660587703464.png (14.4 KiB)
1660587839889.png (61.6 KiB)
Felix Möhlmann avatar image Felix Möhlmann Sean Webster commented ·

The travelmembers node is there. You have to open the Navigator's attribute tree by clicking on the arrow icon that appears on the left when the node is selected. Then you should find it in the variables node.

1660590448226.png

The navigator node you try to change is actually a link to that exact node. The value of each node is the path to each other. (Overwriting these pointer values with text is not a good idea). You could use this path in the "find()" command to access the travelmembers node though.

// Rename all travelmembers
treenode travelmembers = Model.find("/AStarNavigator>variables/travelmembers");
for(int i = 1; i <= travelmembers.subnodes.length; i++)
{
   travelmembers.subnodes[i].name = "ANT_" + string.fromNum(i);
}

(In the path ">" is going into an objects attribute tree, whereas "/" accesses the subnodes of a node. "+" is used to follow the path in a link node, so Model.find("ANT_1>variables/navigator/1+") would also end at the travelmembers node that corresponds to ANT_1.)

How are you connecting the task executers to the navigator?

0 Likes 0 ·
1660590448226.png (6.0 KiB)