question

liang avatar image
0 Likes"
liang asked Felix Möhlmann commented

The AMR cannot drive to the specified destination

When AMR_009 was performing the first mission, he went to the E-rack of our designated destination (about 810 seconds), but later at 4400 seconds, the AMR was blocked by two AMRs in the aisle. And drive to another place to unload the materials.

If I want the AMR to wait at the spot until it can pass before going to the destination, how can I modify my model?


1736736421328.png

At 810 seconds, the AMR goes to E-rack 3 to unload materials, and now it is heading to the destination we specified.

1736736554427.png

At 4400 seconds, because two AMRs were blocked in the aisle and could not go to the designated destination, the AMR went to a non-designated destination for unloading.

Model: V1.10.2_問題版本.fsm


1736736850099.png

The position of this task in the processflow.

FlexSim 24.2.0
astar navigatordestinationamr models
1736736421328.png (115.8 KiB)
1736736554427.png (91.1 KiB)
1736736850099.png (76.3 KiB)
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

When no valid path to the destination can be found due to barriers, the traveller will instead move to the next closest cell to the destination it can reach.

In your case this happens because you declare other AMRs as barriers during the path calculation. What you could do is check whether the actual result of routing is 'close enough' to the target destination. If not, meaning there is probably a blockage, the AMR gets preempted to stay in place and tries again later.

Code to compare the coordinates might look something like this, where "token.AMR" is a reference to the AMR and "token.DestLoc" is an array that contains the x- and y-coordinate of the destination. The offsets in line 4 and 5 depend on the grid location.

AStar.Traveler amr = AStar.Traveler(token.AMR);
AStar.Cell destCell = amr.travelPath[amr.travelPath.length].cell; double destCellY = -47.5 + destCell.row; double destCellX = -67.5 + destCell.col; if(Math.fabs(destCellX - token.DestLoc[1]) > 2 || Math.fabs(destCellY - token.DestLoc[2]) > 2) {     // Destination coordinates do not match }

Though it might overall make more sense to not treat other travellers as barriers at all times and instead only try to route around them when an ARM becomes blocked.

· 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.

liang avatar image liang commented ·

hi Felix Möhlmann Thanks for your reply


This method seems to be that AMR will confirm whether it is the same as the original destination after arriving at the destination. Is there a way to know the location of the destination calculated by A star before departure? If it is wrong If the path is somewhere else, wait there and recalculate the path after ten seconds.


In addition, I would like to ask about

double destCellY = -47.5 + destCell.row;

double destCellX = -67.5 + destCell.col;

How can I determine the offset between X and Y?


Please help me solve the confusion

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann liang commented ·

The code reads the last cell on the AMRs travel path (line 2), so it will only work after the travel task has started. I don't know of a way to 'query' a route without using an actual travel task.

The cell in the lower left corner of the grid has the row and col numbers (0, 0). The column counts up in the x-direction and the row counts up in the y-direction. Hence you get the model coordinate of a grid cell by taking the coordinate of the origin cell and adding the row/col multiplied by the grid spacing.

You can either check the coordinates of the (0, 0) cell by just placing an object there or look them up in the tree.

1736928647620.png

0 Likes 0 ·
1736928647620.png (11.4 KiB)