Skip to main content
. 2024 Feb 21;9(3):125. doi: 10.3390/biomimetics9030125
Algorithm 2 IAC-RRT* algorithm for solving route planning problem
  • Input: 

      

  •    

    Qn,Qst,Qob,qstart,qend,n iteration times;

  • Output: 

      

  •    

    Route from qstart to qend;

  • 1:

    Search from qstart;

  • 2:

    while Iterate n times do

  • 3:

       while dis(qnew,qend)>R do

  • 4:

         Generate qnew within the radius R;

  • 5:

         if qnewQob do

  • 6:

            discard qnew;

  • 7:

         else qnewQnγstQst do

  • 8:

            reselect parent node for qnew;

  • 9:

            minDnew=dis(qstart,qnear)+dis(qnear,qnew);

  • 10:

           rewire with qnear as the parent node;

  • 11:

           minDnear=dis(qstart,qnear);

  • 12:

         end if

  • 13:

       end while

  • 14:

       Backtrack along qnew from qend to qstart, i.e., find the route;

  • 15:

       Select the route with minimal distance from each iteration;

  • 16:

    end while

  • 17:

    Output the selected route from qstart to qend.