Skip to main content
. 2020 Dec 26;21(1):111. doi: 10.3390/s21010111
Algorithm 1: SP Algorithm
Begin
Initialize the value of all the decision variables to be zero;
Construct the nodes and links in the 2-D planar graph;
Let the node position of the evacuating person be the start node;
While (t|T|) //looping at each time slot t
Begin
Collect the temperature data at each node and the link cost data at each link at time slot t;
Calculate the best path from the start node to every exit node by using Dijkstra’s algorithm and let λe= the shortest path cost to every exit eE; //Step 2
Let λ˜=Min ArgeEλe; //the exit number that has the smallest shortest path cost, evacuation path is the best path to exit λ˜
If (the hop distance from the start node to the exit number λ˜ on the shortest path Λ) //reach the exit
Begin
  Let Ω = Ω + (The link cost from the start node to the exit λ˜ on this evacuation path);
  Report Ω and the evacuation path;
  ρ = 1;
  Break from the While loop;
End // If (the hop
Else // have not reached the exit, then move the start node Λ hop distance closer to exit λ˜ on the emergency path
Begin
  Let Ω = Ω + (All the link cost from the start node to the node with hop distance Λ on the evacuation path);
  Move the start node to the new position with Λ hop distance on the evacuation path;
End // Else
End; //While loop
If (ρ == 0)
  Report no feasible solutions;
End