mqt.sqr.utils.animation

Module Contents

type Coord = tuple[int, int]
type Position = tuple[float, float]
type TimedNode = tuple[Coord, int]
type Edge = frozenset[Coord]
type EdgeTimeBand = tuple[int, int, set[Edge]]
type AgentId = Hashable
NODE_SIZE = 120
AGENT_COLORS = ('tab:red', 'tab:green', 'tab:orange', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:gray',...
class AgentAnimationData[source]
agent_id: AgentId
color: str
positions: list[Position] | list[Coord]
frames: list[float] | list[int]
last_index: int
frame_to_position: dict[float, Position]
first_frame: float | None
last_frame: float | None
animate_mapf(graph: networkx.Graph, plans: Mapping[AgentId, Sequence[TimedNode]], interval_ms: float = 0.1, substeps: int = 200, edge_timebands: Sequence[EdgeTimeBand] | None = None, failed_edges_timeline: Mapping[int, set[Edge]] | None = None, *, smooth: bool = True) → matplotlib.animation.FuncAnimation[source]