OpticalTopo

OpticalTopo#

User APIs#

openoptics.OpticalTopo.round_robin([...])

Create a round-robin topology with the circle method.

openoptics.OpticalTopo.opera(nb_node, nb_link)

Opera topology support multiple upper links per node.

openoptics.OpticalTopo.shale(nb_node, h[, ...])

Create a Shale topology.

openoptics.OpticalTopo.static_topo(nb_node)

Static topology generated from a random regular graph.

openoptics.OpticalTopo.bipartite_matching(...)

Create a bipartite matching topology based on traffic matrix.

Helper Functions#

openoptics.OpticalTopo.draw_topo(slice_to_topo)

Draw the topology using matplotlib in a style that matches the dashboard card UI (indigo accent, slate text/edges, no axes, system-ish font).

openoptics.OpticalTopo.topo_randomize_ts(...)

Randomize connection order (time_slice -> connections mapping) for circuits.

openoptics.OpticalTopo.port_offset(circuits)

Helper function to transform the circuits to reconfigure topology one port per time slice.

openoptics.OpticalTopo.get_nb_time_slice_from_circuits(...)

Helper function to get the number of time slices from circuits.

openoptics.OpticalTopo.get_nb_links_from_circuits(...)

Helper function to get the number of links from circuits.