Loading src/opticalcontroller/RSA.py +4 −4 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import opticalcontroller.dijsktra from opticalcontroller.dijkstra import Graph, shortest_path from opticalcontroller.tools import * from opticalcontroller.variables import * Loading Loading @@ -83,7 +83,7 @@ class RSA(): return "{},{},{}".format(self.c_slot_number, self.l_slot_number, self.s_slot_number) def initGraph(self): self.g = dijsktra.Graph() self.g = Graph() for n in self.nodes_dict: self.g.add_vertex(n) for l in self.links_dict["optical_links"]: Loading @@ -100,7 +100,7 @@ class RSA(): def initGraph2(self): self.g = dijsktra.Graph() self.g = Graph() for n in self.nodes_dict: self.g.add_vertex(n) Loading @@ -117,7 +117,7 @@ class RSA(): self.g.printGraph() def compute_path(self, src, dst): path = dijsktra.shortest_path(self.g, self.g.get_vertex(src), self.g.get_vertex(dst)) path = shortest_path(self.g, self.g.get_vertex(src), self.g.get_vertex(dst)) print("INFO: Path from {} to {} with distance: {}".format(src, dst, self.g.get_vertex(dst).get_distance())) if debug: print(path) Loading src/opticalcontroller/dijsktra.py→src/opticalcontroller/dijkstra.py +0 −0 File moved. View file Loading
src/opticalcontroller/RSA.py +4 −4 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import opticalcontroller.dijsktra from opticalcontroller.dijkstra import Graph, shortest_path from opticalcontroller.tools import * from opticalcontroller.variables import * Loading Loading @@ -83,7 +83,7 @@ class RSA(): return "{},{},{}".format(self.c_slot_number, self.l_slot_number, self.s_slot_number) def initGraph(self): self.g = dijsktra.Graph() self.g = Graph() for n in self.nodes_dict: self.g.add_vertex(n) for l in self.links_dict["optical_links"]: Loading @@ -100,7 +100,7 @@ class RSA(): def initGraph2(self): self.g = dijsktra.Graph() self.g = Graph() for n in self.nodes_dict: self.g.add_vertex(n) Loading @@ -117,7 +117,7 @@ class RSA(): self.g.printGraph() def compute_path(self, src, dst): path = dijsktra.shortest_path(self.g, self.g.get_vertex(src), self.g.get_vertex(dst)) path = shortest_path(self.g, self.g.get_vertex(src), self.g.get_vertex(dst)) print("INFO: Path from {} to {} with distance: {}".format(src, dst, self.g.get_vertex(dst).get_distance())) if debug: print(path) Loading