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:
@@ -546,7 +546,15 @@ enum GameDAGRouter {
|
||||
? max(0, availableHours)
|
||||
: Double(daysBetween) * constraints.maxDailyDrivingHours
|
||||
|
||||
return drivingHours <= maxDrivingHoursAvailable && drivingHours <= availableHours
|
||||
let feasible = drivingHours <= maxDrivingHoursAvailable && drivingHours <= availableHours
|
||||
|
||||
// Debug output for rejected transitions
|
||||
if !feasible && drivingHours > 10 {
|
||||
print("🔍 DAG canTransition REJECTED: \(fromStadium.city) → \(toStadium.city)")
|
||||
print("🔍 drivingHours=\(String(format: "%.1f", drivingHours)), daysBetween=\(daysBetween), maxAvailable=\(String(format: "%.1f", maxDrivingHoursAvailable)), availableHours=\(String(format: "%.1f", availableHours))")
|
||||
}
|
||||
|
||||
return feasible
|
||||
}
|
||||
|
||||
// MARK: - Distance Estimation
|
||||
|
||||
Reference in New Issue
Block a user