# Optimized Travel Itineraries: Combining Mandatory Visits and Personalized Activities
## 2 Literature Reviews
### Problem Definition  
Recent literature has introduced TOPTW, which incorporates time windows as a constraint. In TOPTW, each location or customer must be visited within a specified time interval, defined by the earliest and latest times for service. For the TTDP, this means that some attractions may have specific opening and closing times, requiring tourists to plan their visits within these designated time periods. In this study, the optimization model for the personalized tourism itineraries with mandatory visit and activity selection is proposed. It is an extension of the TOPTW and partial scores (TOPTW-PS), introduced by [PERSON] et al. [44] and the TOPTW with mandatory visits (TOPTW-MV) [45]. The proposed model is primarily implemented in TTDP, where each location in the itinerary includes an associated activity that can be attended. For example, these activities may encompass cultural explorations, religious experiences, and other related engagements. Additionally, some locations are designated as mandatory, meaning they must be visited as part of the trip. The objective of the proposed model is to determine the trip that maximizes the total collected score from visiting locations without violating their constraints. For the mathematical model formulation, we define:  
* A set \(N=\{N_{0}\cup N_{c}\}\) is a set of all locations. \(N_{0}\) is a set of location \(0\) that is designated as the starting and ending point, \(N_{0}=\{0\}\). \(N_{c}\) is a set of the attractive locations, \(N_{c}=\{1,2,3,\ldots,|N_{c}|\}\). \(N_{m}\) is a set of mandatory locations that can be visited any time in the trip, \(N_{m}\in N_{c}\). \(N_{d}\) is a set of mandatory locations that should be visit every day, ex. restaurant, \(N_{d}\in N_{c}\) and \(N_{d}\
otin N_{m}\). Let \(P\) is a set of paths (or days), \(P=\{1,2,3,...,|P|\}\). For example, \(P=\{1\}\) refers to a sequence of locations for Day 1. Set \(A\) is a set of activities provided in each location, \(A=\{1,2,3,...,|A|\}\). \(A_{m}\) is a set of preferred activities \(A_{m}\in A\). * A partial score \(S_{i,a}\) is assigned to a location \(i\in N_{c}\) based on the activity \(a\in A\). \(w_{i,a}\) represents the service time associated with location \(i\) during the activity \(a\). * A travel time \(t_{i,j}\) refers to the duration required to move from location \(i\) to \(j\) (\(i,j\in N\)). * Each location \(i\in N_{c}\) can be visited at most once in the time interval \([O_{i},E_{i}]\). Additionally, not all locations can be visited due to the constraints of the available time \(T_{max}\). * At least \(l\) location in \(N_{m}\) should be visited. * At least \(n\) location in \(N_{d}\) should be visited. * At least \(o\) location in \(A_{m}\) should be visited. Constraint (2) ensures that each route starts and ends at location 0. This means that the travel itinerary is structured such that the journey begins and concludes at a designated starting point, typically a central location or a point of origin. Constraint (3) is the connectivity of each path. Constraint (4) ensures that each location is visited at most once. This restriction prevents duplicate visits to any location within the itinerary. Constraint (5) ensures that at each location, a maximum of \(|A|\) activities can be selected. Constraint (6) involves calculating the total visiting time for each location. This means summing up the service times for all activities selected at a given location to ensure that the itinerary respects the time constraints and accurately reflects the duration required at each location. Constraint (7) defines the timeline for each path, ensuring that the scheduling of visits follows a logical sequence within the given time constraints. Constraints (8) and (9) restrict the start of the service to the time window. The route is limited by \(T_{\text{max}}\) is ensured in Constraint (10). In addition, Constraint (11) stipulates that the visiting time at the first location must be greater than the travel time from the starting location (0) to that location \(j\).