Skip to content

feat: add support for maps with traffic#2320

Open
diogodanielsoaresferreira wants to merge 1 commit into
TimefoldAI:mainfrom
diogodanielsoaresferreira:add_support_maps_with_traffic
Open

feat: add support for maps with traffic#2320
diogodanielsoaresferreira wants to merge 1 commit into
TimefoldAI:mainfrom
diogodanielsoaresferreira:add_support_maps_with_traffic

Conversation

@diogodanielsoaresferreira
Copy link
Copy Markdown
Contributor

@diogodanielsoaresferreira diogodanielsoaresferreira commented May 29, 2026

Summary

Adds support for traffic-aware travel times in the maps model. Travel-time matrices can now be enriched with time-of-day traffic information using configurable time-frame bucketing strategies, enabling solver models to plan with realistic, traffic-sensitive routing.

Changes

New opt-in enrichment path for solver models whose travel times and distances vary with time of day. Existing LocationsAwareSolverModel + TravelTimeMatrixEnricher untouched.

  • the usage of matrices with traffic is decided by the model based on which solver model is used (LocationsAndTrafficAwareSolverModel or LocationsAwareSolverModel); enricher supports both.
  • new TimeframeBucketing interface + two impls: StaticDaypartBucketing (morning 00–12, midday 12–15, afternoon 15+) and SingleTimeframeBucketing (one key, used by Haversine).
  • New MapService method taking an availability map: applies the bucketing, fans out one concurrent bundled call per timeframe, caches the composite.
  • for now, getWaypoints still use a map with timeframe "static", which means that for models to use it, we always need the 3 timeframe maps + static one

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
28.8% Coverage on New Code (required ≥ 70%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant