Research Article
Facility Location with Tree Topology and Radial Distance Constraints
Algorithm 3
Simulated annealing-based metaheuristic.
| Data: input matrices and and input graph . | | Result: a feasible solution for . | | Step 1:; | | Set and ; | | while loop as in Step 1 of Algorithm 2; | | and ; | | Step 2:; | | while () do | | Set and ; | | for each () do | | Draw a random number r from ; | | if then | | and ; | | Remove all neighbors of from W; | | while ( is not empty and ) do | | Chose a vertex randomly from W; | | and ; | | Remove all neighbors of from W; | | Find the minimum spanning tree formed with nodes in S using the Kruskal algorithm; | | Assign each user to its nearest facility in S and compute the objective function value of ; | | if (A better solution is found) then | | Save it in and set and ; | | else | | Compute as the difference between the current objective value minus the previous one; | | Draw a random number r from ; | | Compute ; | | if then | | Accept the new solution and save it in ; | | else | | ; | | and ; | | if () then | | ; | | if () then | | ; | | else | | ; | | Return best solution found and its objective function value; |
|