Research Article
Hexagon-Based Generalized Voronoi Diagrams Generation for Path Planning of Intelligent Agents
Algorithm 1
Pseudocode for the hexagon-based Brushfire algorithm.
| GenerateRoughBrushfire GVDEdges() | (1) | while bfQueueLis ≠ Ø do | (2) | s ⟵ pop(bfQueueList) | (3) | if dists ≠ 0 then | (4) | adjCellList ⟵ Adj6(s) | (5) | sort(adjCellList) | (6) | n ⟵ pop(adjCellList) | (7) | dists = distn + 1 | (8) | obsts = obstn | (9) | parents = n | (10) | for all a ∈ adjCellList do | (11) | if typea ≠ OBST then | (12) | if dista = = MAXDIS then | (13) | if a ∉ bfQueueList then | (14) | obsta = obsts | (15) | insert(bfQueueList, a) | (16) | markBrushfire RoughEdge() | | markBrushfire RoughGVDEdges() | (17) | for all s ∈ allCellList do | (18) | bEdgeCell ⟵ false | (19) | for all n ∈ Adj6(s) do | (20) | if obsts ≠ obstn ∧ types ≠ OBST then | (21) | bEdgeCell ⟵ true | (22) | if bEdgeCell then | (23) | e ⟵ findEdge(s) | (24) | if e = = Ø then | (25) | e ⟵ Edge() | (26) | obste ⟵ obsts | (27) | insertEdge(e) | (28) | insertCell(e, s) | (29) | insertQueue(roughQueue, s, dists) | (30) | pruningEdgeCell() |
|