space_time_graph
cosmica.experimental_packet_routing.space_time_graph
__all__
module-attribute
__all__ = ['SpaceTimeGraph']
SpaceTimeGraph
dataclass
SpaceTimeGraph(
time_for_snapshots: list[datetime64],
graph_for_snapshots: list[Graph],
)
Base model for a space time graph.
Source code in src/cosmica/experimental_packet_routing/space_time_graph.py
27 28 29 30 31 32 33 | |
graph_for_snapshots
instance-attribute
graph_for_snapshots: list[Graph] = graph_for_snapshots
time_for_snapshots
instance-attribute
time_for_snapshots: list[datetime64] = time_for_snapshots
get_space_time_graph_at_time
get_space_time_graph_at_time(time: datetime64) -> Graph
Get the space time graph at the specified time.
Source code in src/cosmica/experimental_packet_routing/space_time_graph.py
169 170 171 172 | |
make_space_time_graph_from_graph
classmethod
make_space_time_graph_from_graph(
time: NDArray[datetime64],
graphs: list[Graph],
*,
check_interval_time: timedelta64 | None = None
) -> Self
Update time and graph lists if the graph shape changes.
Source code in src/cosmica/experimental_packet_routing/space_time_graph.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | |
update_space_time_graph_for_failure_edge
update_space_time_graph_for_failure_edge(
failure_edge: tuple[Node, Node], update_time: datetime64
) -> Self
Update the space time graph for the failure edge.
Source code in src/cosmica/experimental_packet_routing/space_time_graph.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |