Remove unused planning files
Deleted files replaced by new scenario-based planners: - RouteCandidateBuilder.swift - RouteOptimizer.swift (TSP solver) - ScheduleMatcher.swift (corridor logic) - LegacyPlanningTypes.swift - TripScorer.swift - DateRangeValidator.swift - DrivingFeasibilityValidator.swift - GeographicSanityChecker.swift - MustStopValidator.swift These were superseded by ScenarioA/B/C planners, GeographicRouteExplorer, and ItineraryBuilder. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
//
|
||||
// LegacyPlanningTypes.swift
|
||||
// SportsTime
|
||||
//
|
||||
// Supporting types for legacy planning components.
|
||||
// These are used by ScheduleMatcher and RouteOptimizer.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreLocation
|
||||
|
||||
// MARK: - Game Candidate
|
||||
|
||||
/// A game candidate with scoring information for route planning.
|
||||
struct GameCandidate: Identifiable {
|
||||
let id: UUID
|
||||
let game: Game
|
||||
let stadium: Stadium
|
||||
let homeTeam: Team
|
||||
let awayTeam: Team
|
||||
let detourDistance: Double
|
||||
let score: Double
|
||||
}
|
||||
|
||||
// MARK: - Route Graph
|
||||
|
||||
/// Graph representation of possible routes for optimization.
|
||||
struct RouteGraph {
|
||||
var nodes: [RouteNode]
|
||||
var edgesByFromNode: [UUID: [RouteEdge]]
|
||||
|
||||
init(nodes: [RouteNode] = [], edges: [RouteEdge] = []) {
|
||||
self.nodes = nodes
|
||||
self.edgesByFromNode = [:]
|
||||
for edge in edges {
|
||||
edgesByFromNode[edge.fromNodeId, default: []].append(edge)
|
||||
}
|
||||
}
|
||||
|
||||
func edges(from nodeId: UUID) -> [RouteEdge] {
|
||||
edgesByFromNode[nodeId] ?? []
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Route Node
|
||||
|
||||
struct RouteNode: Identifiable {
|
||||
let id: UUID
|
||||
let type: RouteNodeType
|
||||
let coordinate: CLLocationCoordinate2D?
|
||||
|
||||
init(id: UUID = UUID(), type: RouteNodeType, coordinate: CLLocationCoordinate2D? = nil) {
|
||||
self.id = id
|
||||
self.type = type
|
||||
self.coordinate = coordinate
|
||||
}
|
||||
}
|
||||
|
||||
enum RouteNodeType: Equatable {
|
||||
case start
|
||||
case end
|
||||
case stadium(UUID)
|
||||
case waypoint
|
||||
}
|
||||
|
||||
// MARK: - Route Edge
|
||||
|
||||
struct RouteEdge: Identifiable {
|
||||
let id: UUID
|
||||
let fromNodeId: UUID
|
||||
let toNodeId: UUID
|
||||
let distanceMeters: Double
|
||||
let durationSeconds: Double
|
||||
|
||||
init(
|
||||
id: UUID = UUID(),
|
||||
fromNodeId: UUID,
|
||||
toNodeId: UUID,
|
||||
distanceMeters: Double,
|
||||
durationSeconds: Double
|
||||
) {
|
||||
self.id = id
|
||||
self.fromNodeId = fromNodeId
|
||||
self.toNodeId = toNodeId
|
||||
self.distanceMeters = distanceMeters
|
||||
self.durationSeconds = durationSeconds
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Candidate Route
|
||||
|
||||
/// A candidate route for optimization.
|
||||
struct CandidateRoute {
|
||||
var nodeSequence: [UUID] = []
|
||||
var games: [UUID] = []
|
||||
var totalDistance: Double = 0
|
||||
var totalDuration: Double = 0
|
||||
var score: Double = 0
|
||||
}
|
||||
Reference in New Issue
Block a user