| 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 //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 ; Calculate the best path from the start node to every exit node by using Dijkstra’s algorithm and let the shortest path cost to every exit ; //Step 2 Let ; //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; End |