feat: add Follow Team Mode (Scenario D) for road trip planning
Adds a new planning mode that lets users follow a team's schedule (home + away games) and builds multi-city routes accordingly. Key changes: - New ScenarioDPlanner with team filtering and route generation - Team picker UI with sport grouping and search - Fix TravelEstimator 5-day limit (was 2-day) for cross-country routes - Fix DateInterval end boundary to include games on last day - Comprehensive test suite covering edge cases: - Multi-city routes with adequate/insufficient time - Optimal game selection per city for feasibility - 5-day driving segment limits - Multiple driver scenarios Enables trips like Houston → Chicago → Anaheim following the Astros. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,8 +30,9 @@ enum TravelEstimator {
|
||||
let distanceMiles = calculateDistanceMiles(from: from, to: to)
|
||||
let drivingHours = distanceMiles / averageSpeedMph
|
||||
|
||||
// Maximum allowed: 2 days of driving
|
||||
let maxAllowedHours = constraints.maxDailyDrivingHours * 2.0
|
||||
// Maximum allowed: 5 days of driving (matches GameDAGRouter.maxDayLookahead)
|
||||
// This allows multi-day cross-country segments like Chicago → Anaheim
|
||||
let maxAllowedHours = constraints.maxDailyDrivingHours * 5.0
|
||||
if drivingHours > maxAllowedHours {
|
||||
return nil
|
||||
}
|
||||
@@ -62,8 +63,9 @@ enum TravelEstimator {
|
||||
let distanceMiles = distanceMeters * 0.000621371 * roadRoutingFactor
|
||||
let drivingHours = distanceMiles / averageSpeedMph
|
||||
|
||||
// Maximum allowed: 2 days of driving
|
||||
let maxAllowedHours = constraints.maxDailyDrivingHours * 2.0
|
||||
// Maximum allowed: 5 days of driving (matches GameDAGRouter.maxDayLookahead)
|
||||
// This allows multi-day cross-country segments like Chicago → Anaheim
|
||||
let maxAllowedHours = constraints.maxDailyDrivingHours * 5.0
|
||||
if drivingHours > maxAllowedHours {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user