This project optimizes machine visitation routes with a clustering + genetic approach.
- Start with all machines.
- Run DBSCAN to group nearby machines into clusters.
- Apply GA clustering to shape routes close to 8 hours.
- For each cluster, run a genetic TSP solver to optimize visit order.
- Iterate until convergence and keep the best route per cluster.
- Generate an initial population by shuffling machine order.
- Evaluate fitness (opportunity cost + time/distance cost).
- Keep top individuals (elitism).
- Create children with crossover and mutation.
- Repeat for N iterations and return the best route.