mamut_routing_lib.td¶
Time-dependent routing (TDVRPTW / TDVRP) contract and canonical checker.
See the TD benchmark standard in the MAMUT-routing repository for the format
specification: instance .vrp.json files reference an ATF sidecar
(.atf.json / .atf.json.gz) holding one arrival-time NDCPWLF per arc.
IGP_MATERIALIZER_GENERATOR
module-attribute
¶
TD_OBJECTIVES
module-attribute
¶
AnyTDBenchmarkInstance
module-attribute
¶
ROAD_MATERIALIZER_GENERATOR
module-attribute
¶
ATFFormatError
¶
Bases: ValueError
Raised when an ATF sidecar file violates the canonical format.
InstanceATFs
dataclass
¶
InstanceATFs(instance_name: str, benchmark_name: str, horizon: tuple[float, float], num_customers: int, arcs: dict[tuple[int, int], NDCPWLF], generator: dict[str, Any] = dict(), format_version: int = ATF_FORMAT_VERSION)
In-memory content of an ATF sidecar file.
generator
class-attribute
instance-attribute
¶
LoadedTDInstance
dataclass
¶
LoadedTDInstance(instance: AnyTDBenchmarkInstance, atfs: InstanceATFs, instance_path: Path, atf_path: Path | None, categories_path: Path | None = None, road_graph_path: Path | None = None, traffic_path: Path | None = None, collection_root: Path | None = None)
A TD instance paired with its arrival-time functions.
atf_path is the on-disk ATF sidecar for atf-ndcpwlf instances and
None for the materialized models; categories_path
(igp-profile) and road_graph_path + traffic_path
(road-graph v2) point to the respective compact sidecars in the
materialized cases. collection_root is set for instances living in a
marker-rooted collection (road-graph sidecar paths resolve against it).
IGPFormatError
¶
Bases: ValueError
Raised when an IGP categories sidecar violates the canonical format.
InstanceCategories
dataclass
¶
InstanceCategories(base_name: str, benchmark_name: str, num_customers: int, num_categories: int, categories: list[str], generator: dict[str, Any] = dict(), format_version: int = IGP_CATEGORIES_FORMAT_VERSION)
In-memory content of an IGP categories sidecar.
categories holds num_customers + 1 digit strings of the same
length; categories[i][j] is the category of arc (i, j). The matrix
is symmetric with a fixed '0' diagonal (self-arcs do not exist; the
value is never read).
TDRouteEvaluation
¶
TDSolutionCheckResult
¶
BenchmarkInstanceTDVRP
¶
Bases: _TDInstanceValidationMixin
BenchmarkInstanceTDVRPTW
¶
Bases: _TDInstanceValidationMixin
validate_time_window_lengths
classmethod
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/models.py
TDArrivalFunctionsRef
¶
Bases: BaseModel
Reference to the ATF sidecar file of a TD instance.
atf_path is relative to the directory containing the instance file.
atf_sha256 is computed over the uncompressed canonical JSON bytes of
the sidecar, so it is stable across .json and .json.gz storage.
validate_atf_path
classmethod
¶
TDIGPProfileRef
¶
Bases: BaseModel
Compact IGP (Ichoua-Gendreau-Potvin 2003) time-dependent travel model.
Instead of shipping a consolidated ATF sidecar, the instance stores the
IGP data that fully determines it: contiguous time_periods (stored
absolute floats are canonical — never recomputed), a strictly positive
speeds matrix (num_categories x num_periods; FIFO by
construction), and a reference to the arc-category sidecar. The canonical
ATFs are materialized deterministically on load
(mamut_routing_lib.td.igp); atf_sha256 pins the materialized
canonical ATF bytes exactly as it would for a committed sidecar. See the
TD benchmark standard and the Lera2026 family design note.
validate_categories_path
classmethod
¶
validate_time_periods
classmethod
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/models.py
validate_speeds
classmethod
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/models.py
TDRoadGraphRef
¶
Bases: BaseModel
Compact road-network time-dependent travel model (format v2).
The instance references two sidecars, both collection-root-relative
and sha-pinned: the static road graph shared by every traffic subinstance
of the base (<base>.road.json.gz: trimmed subgraph with per-edge
free-flow speed_limit and vertex coordinates) and one traffic overlay
(<base>.traffic-<model>-<intensity>.json.gz: per-edge 24-bin speeds
aligned with the graph's edge order, clamped at free-flow). The canonical
ATFs are materialized deterministically on load
(mamut_routing_lib.td.roadgraph): pinned Dijkstra over the static
free-flow times, exact per-edge arrival functions from the overlay
speeds sampled exactly along the pinned paths on a fixed departure grid,
then deterministic decimation. sample_step and simplify_tolerance
are the authoritative materialization parameters and must equal the
values recorded in the road sidecar. atf_sha256 pins the materialized
canonical ATF bytes exactly as it would for a committed sidecar. See the
TD benchmark standard (road-graph v2).
NDCPWLF
¶
A non-decreasing continuous piecewise linear function.
Immutable by convention: xs and ys must not be mutated after
construction.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/pwlf.py
identity
classmethod
¶
The identity function over [low, high].
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/pwlf.py
empty
classmethod
¶
is_empty
¶
num_breakpoints
¶
evaluate
¶
Evaluate the function at x (must lie within the domain).
At a vertical step the smallest value is returned.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/pwlf.py
compose
¶
Return h = self ∘ g restricted to {x in dom(g) : g(x) in dom(self)}.
Two-pointer event merge over the common value axis
dom(self) ∩ img(g); O(len(self.xs) + len(g.xs)).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/pwlf.py
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 140 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 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | |
min_shifted_image
¶
Return (min_k (ys[k] - xs[k]), xs[k*]) with k* the earliest argmin.
For a route ready-time function this is the optimal route duration and
the associated optimal depot departure time. The minimum of y - x
over the whole domain is attained at a breakpoint because the shifted
function is linear between breakpoints.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/pwlf.py
PWLFError
¶
Bases: ValueError
Raised when NDCPWLF invariants are violated.
InstanceRoadGraph
dataclass
¶
InstanceRoadGraph(base_name: str, benchmark_name: str, num_customers: int, horizon: tuple[float, float], extension_end: float, bin_edges: list[float], sample_step: float, simplify_tolerance: float, num_vertices: int, vertex_osm_ids: list[int], vertex_lonlat: list[tuple[float, float]], node_vertices: list[int], edges: list[tuple[int, int, float, float]], generator: dict[str, Any] = dict(), format_version: int = ROAD_GRAPH_FORMAT_VERSION)
In-memory content of a road-graph sidecar (format v2).
Vertices are 0 .. num_vertices - 1; vertex_osm_ids[v] records the
originating OSM node id of vertex v (strictly increasing — vertices
are numbered in ascending OSM-id order, informative only);
vertex_lonlat[v] is its WGS84 (lon, lat) position (informative
only: rendering and heatmaps, never read by the materialization).
edges holds [u, v, length_m, speed_limit] entries sorted strictly
increasing by (u, v) (directed, no parallel edges); speed_limit is
the static free-flow limit (m-per-time-unit in the instance's units,
strictly positive) defining the pinned Dijkstra weight
length / speed_limit. node_vertices[i] is the graph vertex of
instance node i (depot first, all distinct). sample_step is the
departure-grid spacing and simplify_tolerance the decimation
tolerance of the pinned materialization; both are canonical (hashed)
materialization parameters, repeated in the instance td block and
cross-checked at load.
generator
class-attribute
instance-attribute
¶
RoadGraphFormatError
¶
Bases: ValueError
Raised when a road-graph or traffic-overlay sidecar violates the canonical format.
TrafficOverlay
dataclass
¶
TrafficOverlay(base_name: str, benchmark_name: str, traffic_model: str, intensity: str, bin_edges: list[float], edge_speeds: list[list[float]], generator: dict[str, Any] = dict(), format_version: int = TRAFFIC_OVERLAY_FORMAT_VERSION)
In-memory content of a traffic-overlay sidecar.
edge_speeds[k] is the per-bin speed row of edge k of the base's
road-graph sidecar (same order, same count); every speed is strictly
positive (FIFO by construction) and at most the edge's static
speed_limit (validated against the road graph: overlays are slowdowns
by contract). bin_edges must equal the road sidecar's bit-exactly.
atfs_to_canonical_json_bytes
¶
Serialize to the canonical JSON bytes (the input of atf_sha256).
Fixed key order, one arc per line, floats via Python's shortest round-trip repr.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/artifacts.py
compute_atf_sha256
¶
get_atf_path_for_instance
¶
Resolve the sidecar path next to the instance file.
When atf_path (from the instance's td block) is given it is
resolved relative to the instance directory; otherwise the conventional
sibling names are probed (plain first, then gzip).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/artifacts.py
load_instance_atfs
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/artifacts.py
load_td_benchmark_instance
¶
Load and validate the instance file only (no sidecar).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/artifacts.py
load_td_instance
¶
load_td_instance(instance_path: str | Path, *, verify_sha256: bool = True, validate_complete: bool = True, collection_root: str | Path | None = None) -> LoadedTDInstance
Load instance + sidecar, checking their mutual consistency.
For igp-profile and road-graph instances the ATFs are
materialized deterministically from the td block and the compact
sidecar(s); verify_sha256 then covers both the sidecar hashes (cheap)
and atf_sha256 (a full canonical serialization of the materialized
ATFs -- minutes at n=1000; pass verify_sha256=False in solver hot
paths, materialization is deterministic either way). road-graph
sidecar paths are collection-root-relative: the root is found by walking
up to the mamut-collection.json marker, or passed explicitly via
collection_root.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/artifacts.py
save_instance_atfs
¶
Write the sidecar; gzip iff the path ends with .atf.json.gz.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/artifacts.py
td_instance_from_payload
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/artifacts.py
annotate_td_bks_optimality
¶
annotate_td_bks_optimality(loaded: LoadedTDInstance | str | Path, optimality: OptimalityMetadata | dict[str, Any], objective_function: ObjectiveFunction = ObjectiveFunction.DURATION) -> Path
Stamp the stored BKS of loaded with an optimality proof.
The stored BKS (of objective_function's store file) is re-validated by
the TD checker before being rewritten with metadata["optimality"] set.
When the stamp declares a proven_optimum, it must match the stored
cost: an absolute difference beyond :data:OPTIMALITY_COST_TOLERANCE
raises, and a dust-level difference is accepted only when the stamp's
note explains it. Everything else in the stored file (routes, cost,
authorship, other metadata) is left untouched — the proof stamp records
who proved the solution optimal, which is independent of who found it.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/bks.py
create_td_bks_from_solution
¶
create_td_bks_from_solution(loaded: LoadedTDInstance | str | Path, solution: BenchmarkSolution, *, authors: str, metadata: dict[str, Any] | None = None, objective_function: ObjectiveFunction = ObjectiveFunction.DURATION) -> BenchmarkBKS
Validate solution with the TD checker and wrap it as a BKS.
The BKS cost is the checker's canonical value under
objective_function. If solution.cost is set, check_td_solution
itself rejects any deviation from that value (exact doubles, no
tolerance), so a solver that disagrees with the reference checker can
never write to the BKS store.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/bks.py
save_td_solution_as_bks_if_improved
¶
save_td_solution_as_bks_if_improved(loaded: LoadedTDInstance | str | Path, solution: BenchmarkSolution, *, authors: str, metadata: dict[str, Any] | None = None, objective_function: ObjectiveFunction = ObjectiveFunction.DURATION) -> BKSUpdateResult
TD counterpart of save_solution_as_bks_if_improved.
The candidate and any stored BKS are both validated by the TD checker
under objective_function; the stored file is replaced only on a strict
improvement. Each objective has its own store file
(<Name>.bks.<Objective>.json). Accepts a :class:LoadedTDInstance
directly so callers that already hold the loaded instance (solvers, sweep
runners) avoid re-reading the ATF sidecar.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/bks.py
build_arc_atf
¶
Exact PWL arrival function: breakpoints at every zone-boundary crossing.
Zone bounds are coerced to floats: canonical ATF breakpoints must be
serialized as JSON floats (1080.0), and integer zone bounds would
otherwise leak python ints into xs and break the write/reload sha256
round-trip (1080 vs 1080.0).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/igp.py
categories_to_canonical_json_bytes
¶
Serialize to the canonical JSON bytes (the input of categories_sha256).
Fixed key order, one category row per line, gzip-independent.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/igp.py
compute_categories_sha256
¶
euclidean_distance
¶
Canonical distance of the igp-profile model: sqrt(dx*dx + dy*dy).
IEEE-754 binary64 with correctly rounded sqrt -- fully deterministic,
and bit-identical to the stored Sintef2008 arc_costs on integer G&H
coordinates.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/igp.py
ichoua_travel_time
¶
Exact forward IGP loop; last-zone speed extended beyond the horizon.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/igp.py
load_instance_categories
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/igp.py
materialize_instance_atfs
¶
materialize_instance_atfs(instance: AnyTDBenchmarkInstance, categories: InstanceCategories) -> 'InstanceATFs'
Build the canonical complete-graph InstanceATFs of an igp-profile instance.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/igp.py
save_instance_categories
¶
Write the sidecar; gzip iff the path ends with .igp.json.gz (mtime=0).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/igp.py
canonical_route_order
¶
check_td_solution
¶
check_td_solution(loaded: LoadedTDInstance, solution: BenchmarkSolution | BenchmarkBKS, objective_function: ObjectiveFunction = ObjectiveFunction.DURATION) -> TDSolutionCheckResult
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/checker.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
compute_route_duration
¶
compute_route_duration(instance: AnyTDBenchmarkInstance, atfs: InstanceATFs, route: list[int]) -> TDRouteEvaluation
Optimal Duration Δ*_r and earliest optimal depot departure t*_r.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/checker.py
compute_route_ready_time_function
¶
compute_route_ready_time_function(instance: AnyTDBenchmarkInstance, atfs: InstanceATFs, route: list[int]) -> NDCPWLF
Route ready-time function δ_r over feasible depot departure times.
Returns an empty function when the route is time-infeasible.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/checker.py
compute_solution_cost
¶
compute_solution_cost(instance: AnyTDBenchmarkInstance, atfs: InstanceATFs, routes: list[list[int]], objective_function: ObjectiveFunction = ObjectiveFunction.DURATION) -> float
Total cost under objective_function, canonical route order.
Duration: sum of per-route durations. FleetCostDuration: the same fold,
then a single + fleet_fixed_cost * len(routes). Raises on infeasible
routes and on a missing fleet_fixed_cost.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/checker.py
make_service_theta
¶
Vertex ready-time function θ without a time window, over [0, upper].
θ(t) = t + service_time, no waiting. upper is the largest arrival
time the vertex can see. It shares the dedup of make_theta, so
upper == 0 yields the single point ([0.0], [service_time]) instead
of two equal consecutive points.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/pwlf.py
make_theta
¶
Vertex TW ready-time function θ over arrival times in [0, latest].
θ(t) = max(t, earliest) + service_time: arriving before earliest
waits (plateau), arriving after latest is infeasible (out of domain).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/pwlf.py
build_adjacency
¶
Outgoing edge indices per vertex, in edge-list (sorted (u, v)) order.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
compute_fastest_path_tree
¶
compute_fastest_path_tree(road: InstanceRoadGraph, adjacency: list[list[int]], source_vertex: int) -> tuple[list[float], list[int]]
Pinned Dijkstra over static free-flow times from source_vertex.
Free-flow edge weight is length / speed_limit: a property of the
base's road graph, independent of any traffic overlay. Determinism is
pinned end to end: the heap orders (distance, vertex) tuples (total
order, so equal-distance pops resolve by vertex id), outgoing edges relax
in edge-list order, and labels update on strict < only — the first
fastest path found is canonical. Returns (dist, pred_edge) where
pred_edge[v] is the index into road.edges of the tree edge
entering v (-1 at the source and at unreachable vertices).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
compute_road_graph_sha256
¶
compute_traffic_overlay_sha256
¶
free_flow_node_times
¶
Free-flow fastest travel times between all instance nodes.
One pinned Dijkstra per node; entry [i][j] is the free-flow time from
node i to node j (0.0 on the diagonal). This is the reference the
published distances-fastest sidecar must match (after the family's
rounding convention); this is the generation gate of the Poryos2026 collection.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
load_instance_road_graph
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
load_traffic_overlay
¶
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
materialize_instance_atfs_roadgraph
¶
materialize_instance_atfs_roadgraph(instance: AnyTDBenchmarkInstance, road: InstanceRoadGraph, overlay: TrafficOverlay) -> 'InstanceATFs'
Build the canonical complete-graph InstanceATFs of a road-graph instance.
Pinned fastest paths come from the road graph's static free-flow limits (shared by every subinstance of the base); per-edge arrival functions come from the overlay's bin speeds. One pinned Dijkstra per instance node, then per-arc ATFs by exact grid sampling: the departure grid is propagated down the fastest-path tree (arrival vectors memoized per tree vertex), each target's samples are decimated (exact-collinear drop, then Douglas-Peucker with the pinned tolerance), and the kept subset of exact samples becomes the arc ATF.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | |
materialize_selected_atfs_roadgraph
¶
materialize_selected_atfs_roadgraph(instance: AnyTDBenchmarkInstance, road: InstanceRoadGraph, overlay: TrafficOverlay, selected_arcs: set[tuple[int, int]]) -> dict[tuple[int, int], NDCPWLF]
Materialize only selected complete-graph arcs with canonical semantics.
This is the sparse counterpart of :func:materialize_instance_atfs_roadgraph.
It uses the same pinned paths, departure grid, edge evaluation and
simplification, but avoids constructing the quadratic matrix when a
generation audit needs only the arcs of a route certificate.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 | |
road_graph_to_canonical_json_bytes
¶
Serialize to the canonical JSON bytes (the input of the graph sha256).
Fixed key order, one edge / one vertex coordinate pair per line, floats via Python's shortest round-trip repr, gzip-independent.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
save_instance_road_graph
¶
Write the sidecar; gzip iff the path ends with .road.json.gz (mtime=0).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
save_traffic_overlay
¶
Write the overlay; gzip iff the path ends with .json.gz (mtime=0).
The conventional name is <base>.traffic-<model>-<intensity>.json[.gz];
the .traffic- infix is required so overlays are never confused with
other sidecars.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
simplify_ndcpwlf
¶
Deterministic Douglas-Peucker simplification of an NDCPWLF.
Keeps a subset of the original breakpoints (endpoints always kept), so
the result is non-decreasing and continuous by construction and every
kept breakpoint keeps ys >= xs. Interior breakpoints are dropped when
their vertical deviation from the chord of the enclosing kept pair is
<= tolerance; the split point is the deviation argmax, ties broken by
the smallest index. A vertical step strictly inside a kept pair may be
smoothed like any other breakpoint (its deviation is bounded the same
way); only when the kept pair itself is a pure vertical run (equal
x) is chord interpolation undefined and the run kept whole.
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
traffic_overlay_to_canonical_json_bytes
¶
Serialize to the canonical JSON bytes (the input of the traffic sha256).
Source code in MAMUT-routing-tools/MAMUT-routing-lib/src/mamut_routing_lib/td/roadgraph.py
validate_overlay_against_road
¶
The alignment contract between a traffic overlay and its base road graph.