Weather-Aware Travel Itinerary Optimization
Published:
This project develops a weather-aware itinerary optimization framework for tourist trip planning under real-world constraints. The work began as a single-day route optimizer for urban attractions and was later extended into a multi-day Gurobi model with hotel selection, traveler profiles, and overnight routing decisions.
Using Yelp business and review data, Open-Meteo weather signals, and geographic travel-time estimates, the system scores attractions by quality and popularity, predicts congestion-aware waiting time, and then solves for feasible routes that balance utility against travel and crowding costs.
The original attraction utility model is based on:
\[U_i = \text{rating}_i \cdot \log(\text{review count}_i)\]and the waiting-time component is modeled as a weather- and calendar-dependent function (W_i(t)). In the single-day formulation, the itinerary is chosen with an orienteering-style objective:
\[\max \sum_i U_i x_i - \alpha \sum_i W_i(t_i)x_i - \beta \sum_{i,j} d_{ij} y_{ij},\]subject to time-budget and route-feasibility constraints.
The later multi-day extension upgrades the problem into a TTDP/OPHS-style formulation. Attractions use normalized utility and waiting terms, while hotels become decision nodes across multiple outings:
\[\tilde{u}_i = \frac{u_i - \min_j u_j}{\max_j u_j - \min_j u_j}, \qquad \tilde{w}_i = \frac{w_i - \min_j w_j}{\max_j w_j - \min_j w_j}.\]For each traveler profile, the Gurobi model selects attractions, orders visits across days, chooses hotels, and penalizes overnight switching:
\[\max \; \sum_{d=1}^{K}\sum_{i \in A} \alpha_p \tilde{u}_i x_{id} - \sum_{d=1}^{K}\sum_{i \in A} \beta_p \tilde{w}_i x_{id} - \sum_{d=1}^{K}\sum_{h \in H} \eta_p r_h y_{hd} - \sum_{d=1}^{K-1}\sum_{h,g \in H} \lambda_p \tau^{H}_{hg} z_{hgd}.\]This extension produces a richer itinerary system with relaxed, balanced, and explorer profiles, multi-day outing layers, and hotel-aware route visualization.
Key Features
- Utility modeling using Yelp business ratings and review counts
- Weather-aware congestion estimation
- Construction of a travel-time matrix using geographic coordinates
- Single-day route optimization for feasible sightseeing plans
- Multi-day Gurobi optimization with hotel selection and switching penalties
- Integration of machine learning predictions and operations research
- Interactive visualization of optimized tourist routes for both versions
Original Single-Day Interactive Map
The original prototype solves a single-day sightseeing problem and renders the optimized route in the HTML map below.
Multi-Day Gurobi Extension
I later extended the original system into a multi-day itinerary optimizer that supports hotel selection, overnight routing, and traveler-profile comparisons. That extension is saved as tourist_routes_map_gurobi.html in the images folder and is embedded below.
Technologies Used
- Python
- Optimization: Integer Programming, mixed-integer optimization, Gurobi
- Machine Learning: XGBoost and predictive congestion modeling
- Data Sources: Yelp Open Dataset, Open-Meteo Weather API, OpenStreetMap
- Visualization: Folium / Leaflet interactive maps
