| Algorithm 2: TASP Algorithm |
|
Begin Initialize the value of all the decision variables to be zero, and the node position of the evacuating person be the start node; 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 ; Remove the link L from set L if the link temperature is over the upper limit of human temperature tenability M; //avoiding traverse to a node with temperature more than M on the evacuation path Calculate the shortest path from the start node to every exit node by using Dijkstra’s algorithm; //Step 3 Let = 0; For every exit Begin If there is the best path to exit Begin Let the best path cost to exit ; = 1; End //if End //For If (== 0)//cannot find any best path to all the exits Begin Report no; Break from the While loop; End //If (== 0) Else //at least there is the shortest path to exit 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 evacuation path ) //reach the exit Begin Let = + (The link cost from the start node to the exit on the 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 |