13.07.2015 Views

Page 2 Lecture Notes in Computer Science 2865 Edited by G. Goos ...

Page 2 Lecture Notes in Computer Science 2865 Edited by G. Goos ...

Page 2 Lecture Notes in Computer Science 2865 Edited by G. Goos ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

216 T. Chu and I. Nikolaidis12: end for13: end for14: while (true) do15: m<strong>in</strong>Node ←−116: m<strong>in</strong>C ← <strong>in</strong>f17: for all x ∈ V do18: if (C[x] < 0 and C[x] < m<strong>in</strong>C) then19: m<strong>in</strong>Node ← x20: m<strong>in</strong>C ← C[x]21: end if22: end for23: if (m<strong>in</strong>Node = −1) then24: return (F EASIBLE)25: end if26: for all Ps i,j <strong>in</strong>P s do27: for k =1to |Ps i,j |−2 do28: s ← Ps i,j [k]29: via ← Ps i,j [k +1]30: d ← CurrentP ath[k +2]31: if (P [s][via] ≤ P [s][m<strong>in</strong>Node] andP [via][d] ≤ P [via][m<strong>in</strong>Node]) then32: for all v ∈ V do33: if (D[via][v] ≤ D[via][d]) then34: C[v]+ = T i,j35: end if36: Ps i,j ← Ps i,j − via37: end for38: end if39: end for40: end for41: if C[m<strong>in</strong>Node] < 0 then42: return (INFEASIBLE)43: end if44: end whilePsuedocode 2: All Pairs M<strong>in</strong>imum Energy PathsIn the second heuristic, All Pairs Shortest Paths(V,D,Ps) is an all pairsshortest path algorithm applied on aVvertex completely connected graph. Thecosts of the edges are provided <strong>in</strong> D and the result<strong>in</strong>g paths returned <strong>in</strong> Ps. Psis a set of paths. With slight abuse of syntax, Ps i,j represents the path from i toj <strong>in</strong> set Ps, and Ps ij [k] isthek th vertex along the paths from i to j from set Ps.This algorithm is based on the idea of all-pairs shortest paths algorithm suchas the Floyd-Warshall algorithm, which runs <strong>in</strong> O(N 3 ) time. We exam<strong>in</strong>e thenodes where the bandwidth constra<strong>in</strong>t is violated. We first f<strong>in</strong>d out a node such

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!