A single-passenger travel route planning method based on the maximum-minimum ant system
By modeling the tourism route planning problem as a constrained optimization problem, using the maximum-min ant system, integrating the experience value and cost information of scenic spots, and designing pheromone updating and local search strategies, the problem that the existing methods fail to consider travel expenses and ticket prices is solved, and the optimal route planning that maximizes user experience within the budget is achieved.
Patent Information
- Application Number
- CN202411888195.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-12-20
AI Technical Summary
Existing travel route planning methods fail to effectively consider factors such as travel expenses between attractions, attraction ticket prices, and user travel budgets, resulting in a failure to meet users' actual needs.
The tourist route planning problem is modeled as a constrained optimization problem. User budget is introduced as a cost constraint. A method based on the maximum-minimum ant system is designed. The heuristic information of tourist experience value, inter-attraction travel expenses and attraction ticket fees is integrated. Pheromone updating and local search strategies are used to optimize tourist routes.
On the premise of meeting the user's budget constraints, the user's travel experience is maximized, the best travel route is output, and the travel experience and satisfaction are improved.
Smart Images

Figure CN119940669B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of tourist route planning and computational intelligence technology, and in particular relates to a single-travel tourist route planning method based on a maximum-minimum ant system. Background Art
[0002] Tourism route planning is a combinatorial optimization problem with multiple constraints, and is inherently NP-hard. In real life, tourism route planning often involves multiple factors, such as the cost of traveling between attractions, attraction ticket prices, and the user's total travel budget. However, existing tourism route planning methods often fail to consider this crucial information when modeling such problems, resulting in their inability to meet users' actual needs.
[0003] Ant Colony Optimization (ACO) offers advantages such as strong parallelism, high adaptability, and robustness. However, ACO has primarily focused on solving logistics scheduling and vehicle dispatch optimization problems, with relatively little research on travel route planning. Therefore, existing ACO algorithms cannot directly solve the travel route planning problem modeled in this paper. Summary of the Invention
[0004] Purpose of the invention: The purpose of the present invention is to provide a single-passenger travel route planning method based on the maximum-minimum ant system, including the following two invention contents:
[0005] 1. Problem Modeling: Different from existing travel route planning methods, this paper proposes a new modeling approach, modeling the travel route planning problem as a constrained optimization problem. While considering both the travel expenses between attractions and the entrance fees to attractions, it introduces the user's budget as a cost constraint, minimizing the difference between the user's actual travel cost and the budget while maximizing the user's travel experience.
[0006] 2. Algorithm Design: This paper designs a single-passenger travel route planning method based on the maximum-minimum ant system, which includes the following innovative features:
[0007] 1) Designed heuristic information that integrates the tourist experience value of scenic spots, travel expenses between scenic spots, and scenic spot ticket fees;
[0008] 2) A pheromone update method that integrates the total experience value of the travel route and the total experience value of all attractions was proposed;
[0009] 3) A new local search strategy that combines 2-opt and point insertion is designed to further maximize the user's travel experience while satisfying the user's travel cost constraints, and ultimately output an optimal travel route that meets the user's budget and maximizes the user's travel experience.
[0010] Technical solution: The single-passenger travel route planning method based on the maximum-minimum ant system of the present invention includes the following steps:
[0011] S1, obtain tourist attraction information and user information, where the tourist attraction information includes the number of tourist attractions N, the location coordinates of the tourist attractions (x, y), the tourist attraction experience value score, the tourist attraction ticket and the travel cost between tourist attractions; the user information includes the user's departure location C0 and the user's budget C max ;
[0012] S2, the travel route planning problem is modeled as a constrained optimization problem. On the basis of considering the travel expenses between attractions and the ticket fees of scenic spots, the user's budget is introduced as a cost constraint. While minimizing the user's actual travel cost and budget, the user's total travel experience value is maximized. The tourist attractions that meet the user's budget and have the highest total experience value are visited in sequence, and finally return to the original starting point.
[0013] S3, the total experience value of the tourist route constructed by the greedy algorithm is used to initialize the pheromone matrix and the parameters of the ant colony algorithm. The parameters of the maximum and minimum ant system include: ant colony size NP, pheromone concentration weight α, heuristic information weight β, pheromone evaporation rate ρ, evolutionary stagnation judgment generation number rs, and maximum fitness value evaluation number Max_FV;
[0014] S4, for each ant, starting from the user's departure point, under the constraint of budget funds, selects the tourist attraction that maximizes the user's total experience value based on the pheromone concentration and heuristic information between tourist attractions, and constructs a tourist route;
[0015] S5, using the designed new local search method that integrates 2-opt and point insertion to optimize the constructed travel route, so as to further maximize the user's travel experience under the premise of satisfying the user's travel cost constraint;
[0016] S6, repeating steps S4 to S5 until all ants have constructed travel routes that meet the budget constraints; evaluating the travel route plans constructed by all ants in the entire ant colony, and updating the global optimal travel route with the highest total user travel experience value;
[0017] S7, based on the designed new pheromone updating method that integrates the total experience value of the travel route and the total experience value of all attractions, updates the pheromone matrix in the maximum and minimum ant system and checks the pheromone size;
[0018] S8, if the iteration termination condition is not met, go to step S4; if the iteration termination condition is met, output the global optimal travel route planning scheme;
[0019] Furthermore, in step S1, tourist attraction information and user information are obtained, wherein the tourist attraction information includes the number of tourist attractions N, the location coordinates (x, y) of the tourist attractions, the tourist attraction experience value score, the tourist attraction ticket and the travel cost between each tourist attraction; the user information includes the user's departure location C0 and the user's budget C max ; At the same time, construct the ant structure object ant{candidates, tour, tour_cost, tour_score}, which respectively stores the candidate tourist attraction numbers that meet the budget constraint, the constructed tourist routes, the cost of the currently constructed tourist route, and the total user travel experience value of the current route; construct the tourist attraction structure object spot{coordinates, ticket, score}, which respectively stores the coordinate information of the tourist attraction, the ticket price, and the travel experience value of the tourist attraction.
[0020] Furthermore, in step S2, the travel route planning problem is modeled as a constrained optimization problem. On the basis of considering the travel expenses between scenic spots and the ticket fees of scenic spots, the user's budget is introduced as a cost constraint. The user's total travel experience value is maximized while minimizing the actual travel cost and the budget. The specific steps include:
[0021] S201, establish the constraints of the travel route, the specific expression is as follows:
[0022]
[0023] Among them, cost(i, j) is the travel cost between attractions i and j, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in spot[i].ticket is the ticket price of attraction i, C max The travel budget given by the user.
[0024] S202: Establish a total travel experience value function for the travel route. The specific expression is as follows:
[0025]
[0026] Among them, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in , spot[i].score is the tourism experience value of attraction i.
[0027] S203, the constraints and the objective function are combined into a constrained optimization problem. The optimization model is as follows:
[0028]
[0029] Among them, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in, spot[i].score is the tourism experience value of attraction i, cost(i, j) is the travel cost between attraction i and attraction j, spot[i].ticket is the ticket price of attraction i, C max The user is given a travel budget; the user visits the tourist attractions that meet the budget and have the highest total experience value of the route in sequence, and finally returns to the original starting point.
[0030] Furthermore, in step S3, the parameters of the ant colony algorithm are initialized, including the ant colony size NP, the pheromone concentration weight α, the heuristic information weight β, the pheromone evaporation rate ρ, the evolutionary stagnation determination generation rs, and the maximum fitness value evaluation number Max_FV; a complete travel route that meets the user's budget cost constraint is obtained through a greedy algorithm, and the total travel experience value of the user on the travel route is divided by the total experience value of all tourist attractions to initialize the pheromone matrix. The specific implementation steps are as follows:
[0031] S301, starting from the user's departure point, traverse the tourist attractions that have not been visited in sequence, and add the attraction numbers that meet the cost constraint to the candidate attraction set greedy_candidates to construct a set of tourist attractions that meet the cost constraint and have not been visited;
[0032] S302: If the number of tourist attractions in the candidate node set greedy_candidates is greater than 0, then go to step S303; otherwise, there are no tourist nodes that meet the budget constraint requirements, and the greedy path construction is completed;
[0033] S303, using the tourist experience value of the attraction, the quotient of the travel cost between the two attractions, and the ticket price of the next attraction as the evaluation criteria, greedily select the candidate tourist attraction with the largest ratio as the next tourist attraction to be visited. The calculation formula of the greedy ratio is as follows:
[0034]
[0035] Among them, spot[j].score is the tourism experience value of attraction j, cost(i, j) is the travel cost between two tourist attractions i and j, and spot[j].ticket is the ticket price of tourist attraction j. The greedy algorithm determines the next tourist attraction j to be visited by calculating the ratio between the current tourist attraction i and each candidate tourist attraction.
[0036] S304: Add the next tourist attraction j selected by the ant to the greedy path greedytour and update the total cost and total experience value of the greedy path. The formula is as follows:
[0037] greedytour_cost←greedytour_cost+cost(i,j)+spot[j].ticket
[0038] greedytour_score←greedytour_score+spot[j].score
[0039] Where greedytour_cost is the total cost of the constructed greedy path, cost(i, j) is the travel cost between attractions i and j, spot[j].ticket is the ticket price of attraction j; greedytour_score is the total experience value of the constructed greedy path, and spot[j].score is the travel experience value of attraction j;
[0040] S305: After the greedy path is constructed, the total experience value of the path is divided by the sum of the experience values of all tourist attractions to calculate the maximum pheromone value τ max , thereby initializing the pheromone matrix; the initial value of pheromone τ max and the minimum pheromone value τ min The specific calculation formula is as follows:
[0041]
[0042] Among them, greedytour_score is the total experience value of the constructed greedy path, Sumscore is the sum of the experience values of all tourist attractions, and N is the total number of tourist attractions.
[0043] Furthermore, in step S4, the ants select the tourist attraction that maximizes the user's total experience value based on the pheromone concentration and heuristic information between the tourist attractions. The detailed steps of constructing the tourist route are as follows:
[0044] S401, ant k traverses the tourist attractions that have not been visited yet, and adds the attractions that meet the cost constraint to the candidate attraction set candidates[k] to construct a set of tourist attractions that meet the cost constraint and have not been visited yet;
[0045] S402: If the number of attractions in the candidate attraction set candidates[k] is greater than 0, then go to step S403; otherwise, there are no tourist attractions that meet the cost constraint, and the tourist route construction is completed;
[0046] In step S403, ant k determines the next tourist attraction j to visit at its current location through the state transition equation. The state transition probability expression between the current attraction i and the candidate attraction j is as follows:
[0047]
[0048] Among them, p ij is the state transition probability from the current scenic spot i to the next scenic spot j, τ ij is the pheromone concentration between the current attraction i and the next attraction j, η ij is the heuristic information between the current tourist attraction i and the next tourist attraction j, α and β are the weights of controlling pheromone concentration and heuristic information respectively, and l is the total number of candidate tourist attractions in the set of candidate attractions that meet the cost constraint;
[0049] Based on the actual situation, the present invention designs heuristic information that integrates the tourist experience value of scenic spots, the travel expenses between scenic spots, and the ticket fees of scenic spots. The specific expression is as follows:
[0050]
[0051] Among them, spot[i].score and spot[j].score are the travel experience values of attractions i and j respectively, cost(i, j) is the travel cost between attractions i and j, and spot[i].ticket and spot[j].ticket are the ticket fees of attractions i and j respectively.
[0052] S404: Select the next tourist attraction J to be visited in a roulette wheel selection manner. The specific operation is to first calculate the cumulative probability based on the state transition probability. The calculation formula is as follows:
[0053]
[0054] Among them, p ij is the state transition probability from the current attraction i to the candidate attraction j, p select [j] represents the sum of the state transition probabilities from the first candidate attraction to the jth candidate attraction, and l is the total number of candidate tourist attractions in the candidate attraction set that meets the cost constraint.
[0055] Based on the above cumulative probability, the next tourist attraction J to be visited is selected in the following way and added to the tour route tourk middle:
[0056] J=j,if rand(0,1)≤P select [j]
[0057] S405, updating the cost of the constructed travel route, the formula is as follows:
[0058] tour k _cost←tour k _cost+cost(i,j)+spot[j].ticket
[0059] Among them, tour k _cost is the cost of the constructed travel route, cost(i, j) is the travel cost between tourist attraction i and tourist attraction j, and spot[j].ticket is the ticket price for attraction j;
[0060] Furthermore, in step S5, the constructed travel route is further optimized using the designed new local search method integrating 2-opt and point insertion. The specific steps are as follows:
[0061] S501, perform 2-opt operation; traverse all tourist attractions in the travel path constructed by ant k, and find the two tourist attractions i and j that have the largest change in travel cost reduction Δcost. The travel cost reduction Δcost is calculated as follows:
[0062] Δcost(i,j)=[cost(i-1,j)+cost(i,j+1)]-[cost(i-1,i)+cost(j,j+1)]
[0063] Exchange the order of tourist attractions i and j on the tourist path, and at the same time, flip the order of attractions between the two points in turn, as follows Figure 3 As shown; continue to execute until there are no exchangeable points in the path that can reduce the cost, the 2-opt operation is completed, and the cost of the constructed travel path is updated. The formula is as follows:
[0064] tour k _cost←tour k _cost-∑Δcost
[0065] S502: Perform a point insertion operation. After step S501, the user's travel cost may be reduced. At this time, under the condition that the user's budget requirements are met, a new tourist attraction can be inserted to improve the user's total travel experience value. The specific implementation is as follows: traverse all the attractions in the set of candidate attractions that meet the cost constraint and find the candidate tourist attraction p with the largest travel experience value; traverse all the tourist attractions in the travel path constructed by ant k and find the two tourist attractions m and n that have the smallest change in the travel cost increase Δcost. The travel cost increase Δcost is calculated as follows:
[0066] Δcost(i,j)=spot[p].ticket+[cost(m,p)+cost(p,n)]-cost(m,n)
[0067] Insert the candidate attraction p with the largest tourism experience value between tourist attractions m and n as follows Figure 4 As shown; continue to perform this operation until no new tourist attractions can be inserted, the point insertion operation is completed, and the cost of the constructed tourist path is updated. The formula is as follows:
[0068] tour k _cost←tour k _cost+∑Δcost
[0069] Furthermore, in step S6, the travel route plans constructed by all ants in the entire ant colony are evaluated, and the global optimal travel route with the highest total user travel experience value is updated. The specific implementation steps are as follows:
[0070] S601, calculate the total user travel experience value of the travel route planning scheme constructed by each ant through the objective function. The expression of the objective function is as follows:
[0071]
[0072] Among them, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in spot[tour k [i]].score represents tourist attractions tour k [i]’s experience value;
[0073] S602: Mark the path with the maximum total travel experience value as the current optimal solution best, which is expressed as follows:
[0074] best=argmax{f(tour k )|1≤k≤NP}
[0075] When f(gbest) < f(best), replace the global optimal solution gbest with the scheduling plan of the current optimal solution best;
[0076] When f(gbest) ≥ f(best), the global optimal solution gbest remains unchanged.
[0077] Furthermore, in step S7, the designed total experience value of the integrated tourism path and the total experience value of all scenic spots are used to update the pheromone matrix. The specific update formula is as follows:
[0078]
[0079] where τ ij is the pheromone on the edge (i, j), ρ is the pheromone evaporation rate, and V is the set of all scenic spots; is the pheromone released on the edge (i, j) of the global optimal path.
[0080] Update the maximum pheromone value τ max and the minimum pheromone value τ min , and the specific formula is as follows:
[0081]
[0082] where gbest_score is the total experience value of the global optimal path, Sumscore is the total experience value of all tourist scenic spots, and N is the total number of tourist scenic spots; check whether the pheromone is within the specified range of [τ min , τ max , and perform out-of-bounds processing on the pheromone concentration that does not meet the constraint conditions. The specific operation method is as follows:
[0083]
[0084] When the algorithm enters a stagnation state, that is, when the global optimal solution gbest remains unchanged for rs consecutive generations, use τ max to re-initialize the pheromone matrix, specifically as follows:
[0085]
[0086] where gbest_score is the total experience value of the global optimal path, Sumscore is the sum of the experience values of all tourist scenic spots, N is the total number of tourist scenic spots, τ ij is the pheromone on the edge (i, j), and V is the set of all scenic spots.
[0087] The present invention further discloses a computer device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the present invention.
[0088] The present invention further discloses a computer-readable storage medium having a computer program / instruction stored thereon, which implements the steps of the method of the present invention when the computer program / instruction is executed by a processor.
[0089] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0090] 1. This invention considers multiple key information in real-world application scenarios, including attraction ticket fees, travel expenses between attractions, and the user's budget, modeling the travel route planning problem as a constrained optimization problem. Taking both travel expenses and attraction ticket fees into account, it introduces the user's budget as a cost constraint, minimizing the difference between the user's actual travel cost and budget while maximizing the user's travel experience. This novel modeling approach is more relevant to real-life travel route planning problems, better meets practical application needs, and offers higher modeling accuracy.
[0091] 2. The present invention proposes an effective algorithm to effectively solve the modeled travel route planning problem and designs a new heuristic information and pheromone update method; at the same time, it designs a new local search strategy to further maximize the user's travel experience while meeting the user's travel cost constraints, greatly improving the user's travel experience and satisfaction.
[0092] 3. The present invention designs a single-travel route planning method based on the maximum-minimum ant system, proposes heuristic information that integrates the tourist experience value of scenic spots, travel expenses between scenic spots, and ticket fees of scenic spots, designs a pheromone update method that integrates the total experience value of the tourist path and the total experience value of all scenic spots, and proposes a new local search strategy that integrates 2-opt and point insertion to further maximize the user's travel experience while satisfying the user's travel cost constraints, and finally outputs an optimal travel route that meets the user's budget and maximizes the user's travel experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 This is the main process of the single-passenger travel route planning method based on the maximum-minimum ant system of the present invention;
[0094] Figure 2 A schematic diagram of modeling the travel route planning problem of the present invention;
[0095] Figure 3 This is a schematic diagram of 2-opt operation;
[0096] Figure 4 This is a schematic diagram of point insertion operation;
[0097] Figure 5 Schematic diagram of the global optimal single-passenger travel path obtained by the maximum-minimum ant system optimization.
[0098] in, Figure 5 The first number in the title represents the travel budget given by the user, the second number represents the total experience value of the constructed travel route, and the third number represents the difference between the total cost of the constructed travel route and the user's budget; the black five-pointed star in the figure represents the user's departure place, and the black dots represent tourist attractions. The size of the circle is proportional to the experience value of the tourist attraction. The larger the dot, the higher the experience value of the tourist attraction. The first dimension of the tuple above the dot represents the experience value of the tourist attraction, and the second dimension represents the ticket price of the attraction. The arrow represents the order in which tourists visit the tourist attractions. DETAILED DESCRIPTION
[0099] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the scope of protection of the present invention is not limited to the following embodiment.
[0100] The single-passenger travel route planning method based on the maximum-minimum ant system in this implementation example is as follows: Figure 1 As shown, the following steps are included:
[0101] Step 1: Get tourist attraction information and user information. Tourist attraction information includes the number of tourist attractions N, the location coordinates (x, y), the experience value score of the tourist attractions, the ticket of the tourist attractions, and the travel cost (i, j) between each tourist attraction. User information includes the user's departure location C0 and the user's budget C. max At the same time, the ant structure object ant{candidates, tour, tour_cost, tour_score} is constructed to store the candidate tourist attraction numbers that meet the budget constraint, the constructed tourist routes, the cost of the currently constructed tourist route, and the total user travel experience value of the current route; the tourist attraction structure object spot{coordinates, ticket, score} is constructed to store the coordinate information of the tourist attraction, the ticket price, and the experience value of the tourist attraction. In this embodiment, the number of tourist attractions N = 100, the coordinates of the user's departure point are C0 = (0, 0), and the user's budget C max = 5000 yuan. The travel expenses between tourist attractions are defined as the Euclidean distance between tourist attractions multiplied by the cost per unit distance. The specific calculation is shown in formula (1):
[0102]
[0103] In this embodiment, the unit distance cost Q is set to 0.1; the specific data of the tourist attractions are shown in Table 1.
[0104] Table 1 Location coordinates, ticket prices and travel experience values of all attractions
[0105]
[0106]
[0107] Step 2: Model the travel route planning problem as a constrained optimization problem. Taking into account both the travel expenses between attractions and the entrance fees, the user's budget is introduced as a cost constraint. The goal is to minimize the gap between the user's actual travel cost and the budget while maximizing the user's total travel experience value. The specific optimization model is as follows:
[0108]
[0109] Among them, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in, spot[i].score is the tourism experience value of attraction i, cost(i, j) is the travel cost between attraction i and attraction j, spot[i].ticket is the ticket price of attraction i, C max The user is given a travel budget; the user visits the tourist attractions that meet the budget and have the highest total experience value of the route in sequence, and finally returns to the original starting point.
[0110] Step 3: The initialized ant colony algorithm parameters are shown in Table 2, including the ant colony size NP, pheromone concentration weight α, heuristic information weight β, pheromone evaporation rate ρ, evolutionary stagnation judgment generation rs, and maximum fitness evaluation times Max_FV;
[0111] Table 2 Maximum and minimum ant system parameter settings
[0112] Ant population size NP 20 Pheromone weight α 2.5 Heuristic information weight β 7.5 Pheromone evaporation rate ρ 0.2 Evolutionary stagnation determination algebra rs 20 Iteration number Max_FV 10000
[0113] Construct a greedy path; using the quotient of the travel experience value and travel cost between two attractions as the evaluation criterion, greedily select the tourist attraction with the largest ratio as the next visit node, and sequentially obtain a complete travel route that meets the user's budget cost constraint. Calculate the maximum pheromone value τ by dividing the total travel experience value of the user on the travel path by the sum of the experience values of all tourist attractions. max To initialize the pheromone matrix PheromoneMatrix, the greedy ratio is calculated as shown in formula (3), the initial pheromone value τ maxand the minimum pheromone value τ min The calculation method is shown in formula (4).
[0114]
[0115]
[0116] First, a greedy algorithm is used to solve a path greedy_tour that meets the user cost constraint: [0, 26, 65, 4, 16, 38, 99, 21, 11, 59, 72, 79, 18, 84, 49, 28, 67, 93, 77, 60, 35, 55, 43, 3, 71, 96, 50, 44, 64, 40, 69, 87, 57, 23, 91, 45, 32, 74, 1, 8, 89, 42, 6, 10, 0]. Then the experience value of the greedy path is calculated as tour_score = 339, and the total experience value of all tourist attractions is Sumscore = 559, which gives the initial pheromone value τ. max =339 / 559*0.01=0.0060644,τ min =τ max / N=0.0060644 / 100=0.000060644.
[0117] Step 4: Each ant starts from the user's departure point and, subject to budget constraints, selects the tourist attraction that maximizes the user's total experience value based on the pheromone concentrations and heuristic information between tourist attractions. The detailed steps for constructing a tourist route are as follows:
[0118] In step 401, ant k traverses the tourist attractions that have not been visited yet, and adds the points that meet the cost constraint into the candidate node set candidates[k] to construct a set of tourist attractions that meet the cost constraint and have not been visited yet. At this time, all ants have just set out from the starting point, so all tourist attractions meet the cost constraint, that is, the candidate sets of all ants contain the numbers of all tourist attractions.
[0119] In step 402, if the number of tourist attractions in the candidate attraction set candidates[k] is greater than 0, the process proceeds to step 403. Otherwise, there are no tourist attractions that meet the cost constraint, and the tourist route construction is completed. From step 401, it can be seen that the number of tourist attractions in all current ant candidate node sets is greater than 0, so the process proceeds to step 403.
[0120] In step 403, ant k determines the next tourist attraction j to visit at its current location through the state transition equation. The state transition probability expression between the current attraction i and attraction j is as follows:
[0121]
[0122] Among them, p ij is the state transition probability from the current scenic spot i to the next scenic spot j, τ ij is the pheromone concentration between the current attraction i and the next attraction j, η ij is the heuristic information between the current tourist attraction i and the next tourist attraction j, α and β are the weights of controlling pheromone concentration and heuristic information respectively, and l is the total number of candidate tourist attractions in the set of candidate attractions that meet the cost constraint;
[0123] Based on the actual situation, the present invention designs heuristic information that integrates the tourist experience value of scenic spots, the travel expenses between scenic spots, and the ticket fees of scenic spots. The specific expression is as follows:
[0124]
[0125] Among them, spot[i].score and spot[j].score are the travel experience values of attractions i and j respectively, cost(i, j) is the travel cost between attractions i and j, and spot[i].ticket and spot[j].ticket are the ticket fees of attractions i and j respectively.
[0126] Step 404: Select the next tourist attraction J to be visited in a roulette wheel selection manner. The specific operation is to first calculate the cumulative probability based on the state transition probability, as shown in formula (7):
[0127]
[0128] Among them, p ij is the state transition probability from the current attraction i to the candidate attraction j, p select [j] represents the sum of the state transition probabilities from the first candidate attraction to the jth candidate attraction, and l is the total number of candidate tourist attractions in the candidate attraction set that meets the cost constraint.
[0129] Then, the next tourist attraction J to be visited is selected by roulette selection and added to the tour route k In the embodiment, the specific implementation is shown in formula (8);
[0130] J=j, if rand(0,1)≤p select [j] (8)
[0131] In this embodiment, the user is currently at the starting point (number i = 0), and the state transition equation is substituted to calculate the probability of each candidate node p = [(1, 0.00462946), (2, 4.47372e-05), (3, 0.000459002), (4, 0.094608), (5, 0.000149775), (6, 0.00511761), (7, 8.75119e-05), (8, 0.00549017), (9, 2.3003e-06), (10, 0.00150484), (11, 0.00989892), (12, 7.44932e-05), (13, 0.0004375 56), (14, 1.2975e-06), (15, 0.000554904), (16, 0.0681585), (17, 0.0002 85573), (18, 0.0111619), (19, 0.000549017), (20, 0.000570608), (21, 0. 0117562), (22, 0.00122082), (23, 0.00276253), (24, 6.66215e-05), (25, 0.000791355), (26, 0.404525), (27, 0.000314582), (28, 0.0109643), (29 , 3.68411e-05), (30, 0.000532491), (31, 1.91284e-05), (32, 0.00085496 2), (33, 0.001421), (34, 4.56299e-05), (35, 0.00125866), (36, 9.40395e -06), (37, 0.000347955), (38, 0.0307157), (39, 0.000146715), (40, 0.00 238731), (41, 9.12073e-06), (42, 0.00281269), (43, 0.00240943), (44, 0 .000356251), (45, 0.00202958), (46, 1.05949e-05), (47, 0.00191457), ( 48, 1.54314e-06), (49, 0.00545007), (50, 0.00338146), (51, 9.82877e-0 5), (52, 0.000478428), (53, 6.89202e-05), (54, 0.000548784), (55, 0.00 225016), (56, 0.00156687), (57, 0.00176878), (58, 3.53625e-05), (59, 0.00319914), (60, 0.00300175), (61, 0.000335128), (62, 0.00113901), (63, 9.4496e-05), (64, 0.0016 8965), (65, 0.180365), (66, 0.00430904), (67, 0.0096811), (68, 8.13521e-05), (69, 0.00148176), ( 70, 2.49567e-05), (71, 0.000238045), (72, 0.00722169), (73, 7.99627e-05), (74, 0.0027138), (75, 1.49249e-05), (76, 0.000325277), (77, 0.00374717), (78, 7.69077e-05), (79, 0.023377), (80, 0.00 0230388), (81, 0.000539771), (82, 0.00182675), (83, 0.000113344), (84, 0.00699563), (85, 1.7593 2e-05), (86, 0.000494485), (87, 0.00243481), (88, 0.00339028), (89, 0.00969303), (90, 0.0003460 53), (91, 0.00265286), (92, 1.42217e-05), (93, 0.00144377), (94, 0.00909765), (95, 4.29944e-05) , (96, 0.000915946), (97, 0.000961337), (98, 0.000983039), (99, 0.0153534), (100, 0.000101542)]. .
[0132] Each element of the array is a two-tuple, the first value represents the number of the tourist attraction, the second value represents the probability of the tourist attraction being selected, and then the roulette strategy is used to select the attraction according to the random proportion rule to obtain j = 26; therefore, the next desired tourist destination of ant k is attraction 26. Add the next tourist attraction J selected by ant k to the tour route k In the middle, the current travel route constructed by ant k is tour k =[0, 26].
[0133] Step 405: Update the cost of the constructed travel route. The formula is as follows:
[0134] tour k _cost←tour k_cost+cost(i,j)+spot[j].ticket(9)
[0135] Among them, tour k _cost is the cost of the constructed travel route, cost(i, j) is the travel cost between tourist attraction i and tourist attraction j, and spot[j].ticket is the ticket price for attraction j;
[0136] In this embodiment, the distance between starting point 0 and scenic spot 26 is calculated to be 179.61. The ticket price of scenic spot 26 is 60 according to Table 1. Therefore, the path cost tour_cost is updated. k =179.61*0.1+60=77.96.
[0137] This process continues until there are no unvisited tourist attractions that meet the cost constraint, and the path construction is completed.
[0138] In this example, the travel path constructed by ant k is [0, 26, 65, 56, 16, 99, 38, 79, 18, 77, 23, 11, 21, 59, 84, 72, 91, 28, 67, 93, 94, 4, 49, 8, 6, 80, 55, 43, 3, 60, 57, 20, 27, 87, 35, 97, 0], and the path cost is 4878.58.
[0139] Step 5: The specific steps of further optimizing the constructed tourist route using the designed new local search method integrating 2-opt and point insertion are as follows:
[0140] Step 501: Perform a 2-opt operation to traverse all tourist attractions in the travel route constructed by ant k and find the two tourist attractions i and j that have the largest change in travel cost reduction Δcost. The travel cost reduction Δcost is calculated as follows:
[0141] Δcost(i,j)=[cost(i-1,j)+cost(i,j+1)]-[cost(i-1,i)+cost(j,j+1)] (10)
[0142] Exchange the order of tourist attractions i and j on the tourist path, and at the same time, flip the order of attractions between the two points in turn, as follows Figure 3 As shown; continue to execute until there are no exchangeable points in the path that can reduce the cost, the 2-opt operation is completed, and the cost of the constructed travel path is updated. The formula is as follows:
[0143] tour k _cost←tour k _cost-∑Δcost(11)
[0144] In this implementation example, after executing the 2-opt operation, the path constructed by ant k is updated to [0, 26, 65, 4, 97, 56, 80, 8, 49, 6, 67, 28, 93, 77, 20, 57, 87, 55, 3, 43, 27, 35, 60, 23, 91, 11, 59, 21, 72, 84, 99, 38, 18, 79, 94, 16, 0], and the path cost is updated to 3582.63.
[0145] Step 502: Perform a point insertion operation. After step 501, the user's travel cost may be reduced. At this time, under the condition that the user's budget requirements are met, a new tourist attraction can be inserted to improve the user's total travel experience value. The specific implementation is as follows: traverse all the tourist attractions in the set of candidate attractions that meet the cost constraint and find the candidate tourist attraction t with the largest travel experience value; traverse all the tourist attractions in the travel path constructed by ant k and find the two tourist attractions m and n that have the smallest change in the travel cost increase Δcost. The travel cost increase Δcost is calculated as follows:
[0146] Δcost(i,j)=spot[t].ticket+[cost(m,t)+cost(t,n)]-cost(m,n) (12)
[0147] Insert the candidate attraction t with the largest tourism experience value between tourist attractions m and n as follows Figure 4 As shown; continue to perform this operation until no new tourist attractions can be inserted, the point insertion operation is completed, and the cost of the constructed tourist path is updated. The formula is as follows:
[0148] tour k _cost←tour k _cost+∑Δcost(13)
[0149] In this implementation example, after the point insertion operation is completed, the path constructed by ant k is updated to [0, 26, 65, 4, 97, 56, 80, 8, 49, 6, 67, 28, 93, 77, 20, 57, 87, 82, 55, 3, 43, 27, 35, 60, 23, 91, 11, 59, 21, 72, 84, 99, 38, 18, 79, 94, 16, 0] and the path cost is updated to 3959.94.
[0150] In step 6, steps S4 to S5 are repeated until all ants have constructed travel routes that meet the budget constraints. The travel route plans constructed by all ants in the entire ant colony are evaluated, and the global optimal travel route with the highest total user travel experience value is updated. The specific steps are as follows:
[0151] Step 601. Calculate the total user travel experience value of the travel route planning scheme constructed by each ant through the objective function. The expression of the objective function is as follows:
[0152]
[0153] where, tour k represents the travel route constructed by ant k, N k represents the total number of tourist attractions in the travel route tour k , and spot[tour k [i]].score represents the experience value of tourist attraction tour k [i];
[0154] In this embodiment, the ant population NP = 20. Therefore, there are currently 20 path construction schemes. Evaluate these 20 travel routes in sequence according to the objective function to obtain the total experience value of each travel route, as shown in Table 3:
[0155] Table 3 Total travel experience values of NP = 20 travel routes
[0156] 282 307 280 303 300 318 303 296 341 308 285 329 317 300 313 299 290 315 323 303
[0157] Step 602. Mark the path with the maximum current total travel experience value as the current optimal solution best. The expression is as follows:
[0158] best = argmax{f(tour k )|1 ≤ k ≤ NP} (15)
[0159] When f(gbest) < f(best), replace the global optimal solution gbest with the scheduling scheme of the current optimal solution best;
[0160] When f(gbest) ≥ f(best), the global optimal solution gbest remains unchanged.
[0161] As shown in Table 3, according to formula (15), the route with the highest total travel experience value is constructed by Ant 9, so Ant 9's travel path is marked as best. Compared with the global optimal scheduling solution, since the current population is in the first iteration, there is no global optimal scheduling solution, so the current best is directly marked as the global optimal scheduling solution. The current gbest = [0, 26, 65, 4, 16, 79, 18, 38, 99, 84, 49, 6, 72, 21, 74, 59, 11, 32, 45, 91, 23, 60, 77, 57, 27, 55, 43, 3, 71, 100, 96, 5, 33, 76, 82, 50, 44, 2, 64, 67, 28, 93, 1, 8, 42, 89, 0], and the path cost is 4523.63.
[0162] Step 7: Based on the designed new pheromone update method that integrates the total experience value of the travel route and the total experience value of all attractions, update the pheromone matrix in the maximum and minimum ant system and check the pheromone size. The global pheromone update includes pheromone evaporation and release. The update formula is as follows:
[0163]
[0164] Among them, τ ij is the pheromone on edge (i, j), ρ is the pheromone evaporation rate, and V is the set of all scenic spots; is the pheromone released on the edge (i, j) of the global optimal path.
[0165] After each round of iterative update, the maximum pheromone value τ is updated max and the minimum pheromone value τ min , the specific formula is as follows:
[0166]
[0167] Among them, gbest_score is the total experience value of the global optimal path, Sumscore is the sum of the experience values of all tourist attractions, and N is the total number of tourist attractions. In this embodiment, update τ max =341 / 559*0.01=0.00610018,τ min =τ max / N=0.00610018 / 100=0.0000610018.
[0168] Check whether the pheromone is within the specified [τ min , τ max ] range, the pheromone concentration that does not meet the constraint conditions will be handled as out-of-bounds. The specific operation is as follows:
[0169]
[0170] Currently, the pheromones are all within the specified range of [τ min , τ max , so there is no need to perform out-of-bounds processing on the pheromone concentration.
[0171] When the algorithm enters a stagnant state, that is, when the global optimal solution gbest remains unchanged for rs consecutive generations, use τ max to reinitialize the pheromone matrix as follows: <00,00508>
[0172]
[0173] where gbest_score is the overall experience value of the global optimal path, Sumscore is the sum of the experience values of all tourist attractions, N is the total number of tourist attractions, τ ij is the pheromone on the edge (i, j), and V is the set of all attractions.
[0174] The current algorithm is in the first round of iteration. At this time, the number of times gbest remains continuously unupdated is iterations = 0 < rs, and it has not entered a stagnant state. Therefore, there is no need to reinitialize the pheromone matrix.
[0175] Step 8, if the iteration termination condition is not met, go to Step 4; if the iteration termination condition is met, output the global optimal tourist route planning scheme;
[0176] The iteration termination condition means that when the number of fitness value evaluations of the algorithm reaches Max_FV, stop the optimization and output the global optimal tourist route planning scheme gbest.
[0177] In this embodiment, the maximum number of fitness value evaluations Max_FV = 10000. When the number of fitness value evaluations is less than 10000, the algorithm enters the next round of iteration, and continues to let 20 ants construct new tourist routes; when the number of fitness value evaluations reaches 10000 times, the algorithm ends the optimization and outputs the global optimal scheduling scheme gbest = [0, 26, 65, 4, 97, 56, 89, 8, 49, 6, 1, 93, 28, 67, 69, 64, 40, 44, 50, 82, 76, 33, 37, 5, 96, 52, 71, 3, 43, 55, 87, 57, 35, 60, 77, 23, 91, 45, 32, 11, 59, 74, 21, 72, 84, 99, 38, 18, 79, 88, 16, 0], the path cost is 4991.48, which is less than the user's budget cost, meets the constraints, and the total path score is 379. As Figure 5 shown, in this route planning scheme, the user visits tourist attractions that meet the budget cost constraints and maximize the total path experience value in sequence, and finally returns to the starting point.
Claims
1. A single-passenger travel route planning method based on the maximum-minimum ant system, characterized in that: The steps are as follows: S1, obtaining tourist attraction information and user information, wherein the tourist attraction information includes the number of tourist attractions, location coordinates of tourist attractions, tourist attraction experience values, tourist attraction tickets, and travel expenses between tourist attractions; the user information includes the user's departure location and the user's budget; S2: The travel route planning problem is modeled as a constrained optimization problem. Taking into account the travel expenses between attractions and the entrance fees of scenic spots, the user's budget is introduced as a cost constraint. The goal is to minimize the user's actual travel cost and budget while maximizing the user's total travel experience value. The user visits the tourist attractions that meet the user's budget and give the highest total experience value in sequence, and finally returns to the original starting point. S3, a greedy algorithm is used to construct a travel route, and the total experience value of the travel route is used to initialize the pheromone matrix; then, the parameters of the ant colony algorithm are initialized, where the parameters of the maximum and minimum ant system include: ant colony size, pheromone concentration weight, heuristic information weight, pheromone evaporation rate, evolutionary stagnation judgment generation number, and maximum fitness value evaluation number; S4, for each ant in the maximum-minimum ant system, starting from the user's departure point, under the constraint of budget funds, it selects the tourist attraction that maximizes the user's total experience value based on the pheromone concentration and heuristic information between tourist attractions, and constructs a tourist route; S5, uses the designed new local search method that integrates 2-opt and point insertion to optimize the constructed travel route, maximizing the user's travel experience value under the premise of satisfying the user's travel cost constraint; S6, repeating steps S4 to S5 until all ants have constructed travel routes that meet the budget constraints; evaluating the travel route plans constructed by all ants in the entire ant colony, and updating the global optimal travel route with the highest total user travel experience value; S7, based on the designed new pheromone updating method that integrates the total experience value of the travel route and the total experience value of all attractions, updates the pheromone matrix in the maximum and minimum ant system and checks the pheromone size; S8, judging whether the iteration termination condition is satisfied. If the iteration termination condition is not satisfied, go to step S4; if the iteration termination condition is satisfied, output the global optimal travel route planning scheme.
2. A single-passenger travel route planning method based on the maximum-minimum ant system according to claim 1, characterized in that: Step S1 specifically includes: obtaining tourist attraction information and user information, wherein the tourist attraction information includes the number of tourist attractions, the location coordinates of the tourist attractions, the experience value of the tourist attractions, the tickets for the tourist attractions, and the travel expenses between the tourist attractions; the user information includes the user's departure location and the user's budget; at the same time, constructing an ant structure object ant{candidates, tour, tour_cost, tour_score}, the variables in which respectively store the candidate tourist attraction numbers that meet the budget constraint, the constructed tourist routes, the cost of the currently constructed tourist route, and the total user travel experience value of the current route; constructing a tourist attraction structure object spot{coordinates, ticket, score}, the variables in which respectively store the coordinate information of the tourist attractions, the ticket price, and the travel experience value.
3. The single-passenger travel route planning method based on the maximum-minimum ant system according to claim 1 is characterized in that: In step S2, the travel route planning problem is modeled as a constrained optimization problem. On the basis of considering the travel expenses between scenic spots and the entrance fees of scenic spots, the user's budget is introduced as a cost constraint. The user's actual travel cost and budget are minimized while maximizing the user's total travel experience value. The specific steps include: S201, establish the constraints of the travel route, the specific expression is as follows: Among them, cost(i, j) is the travel cost between attractions i and j, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in spot[i].ticket is the ticket price of attraction i, C max The travel budget given by the user; S202: Establish a travel experience value function for the travel route. The specific expression is as follows: Among them, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in , spot[i].score is the tourism experience value of attraction i; S203, the constraints and the objective function are combined into a constrained optimization problem. The optimization model is as follows: Among them, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in, spot[i].score is the tourism experience value of attraction i, cost(i, j) is the travel cost between attraction i and attraction j, spot[i].ticket is the ticket price of attraction i, C max The user is given a travel budget; the user visits the tourist attractions that meet the budget and have the highest total experience value of the route in sequence, and finally returns to the original starting point.
4. The method for planning a single-passenger travel route based on the maximum-minimum ant system according to claim 1, characterized in that: Step S3 specifically involves initializing the parameters of the ant colony algorithm, including the ant colony size, pheromone concentration weight, heuristic information weight, pheromone evaporation rate, evolutionary stagnation determination generation, and maximum fitness evaluation times; using a greedy algorithm to find a complete travel route that meets the user's budget cost constraints, and initializing the pheromone matrix by dividing the user's total travel experience value on the travel route by the total experience value of all tourist attractions. The specific implementation steps are as follows: S301, starting from the user's departure point, traverse the tourist attractions that have not been visited in sequence, and add the numbers of the attractions that meet the cost constraint to the candidate attraction set greedy_candidates to construct a set of tourist attractions that meet the cost constraint and have not been visited; S302: If the number of tourist attractions in the candidate node set greedy_candidates is greater than 0, then go to step S303; otherwise, there are no tourist nodes that meet the budget constraint requirements, and the greedy path construction is completed; S303, using the tourist experience value of the attraction, the quotient of the travel cost between the two attractions, and the ticket price of the next attraction as the evaluation criteria, greedily select the candidate tourist attraction with the largest ratio as the next tourist attraction to be visited. The calculation formula of the greedy ratio is as follows: Among them, spot[j].score is the tourism experience value of attraction j, cost(i, j) is the travel cost between two tourist attractions i and j, and spot[j].ticket is the ticket price of tourist attraction j. The greedy algorithm determines the next tourist attraction j to be visited by calculating the ratio between the current tourist attraction i and each candidate tourist attraction. S304, add the selected next tourist attraction j to the greedy path greedytour and update the total cost and total experience value of the greedy path. The formula is as follows: greedytour_cost←greedytour_cost+cost(i,j)+spot[j].ticket greedytour_score←greedytour_score+spot[j].score Where greedytour_cost is the total cost of the constructed greedy path, cost(i, j) is the travel cost between attractions i and j, spot[j].ticket is the ticket price of attraction j; greedytour_score is the total experience value of the constructed greedy path, and spot[j].score is the travel experience value of attraction j; S305: After the greedy path is constructed, the total experience value of the path is divided by the total experience value of all tourist attractions to calculate the maximum pheromone value τ. max To initialize the pheromone matrix, the initial value of pheromone τ max and the minimum pheromone value τ min The specific calculation formula is as follows: Among them, greedytour_score is the total experience value of the constructed greedy path, Sumscore is the total experience value of all tourist attractions, and N is the total number of tourist attractions.
5. The method for planning a single-passenger travel route based on the maximum-minimum ant system according to claim 1, characterized in that: Step S4 is as follows: the ants select the tourist attraction that maximizes the user's total experience value based on the pheromone concentrations and heuristic information between the tourist attractions. The detailed steps for constructing the tourist route are as follows: S401, ant k traverses the tourist attractions that have not been visited yet, and adds the attractions that meet the cost constraint to the candidate attraction set candidates[k] to construct a set of tourist attractions that meet the cost constraint and have not been visited; S402: If the number of attractions in the candidate attraction set candidates[k] is greater than 0, then go to step S403; otherwise, there are no tourist attractions that meet the cost constraint, and the tourist route construction is completed; In step S403, ant k determines the next tourist attraction j to visit at its current location through a state transition equation. The state transition probability expression between the current attraction i and the candidate attraction j is as follows: Among them, p ij is the state transition probability from the current scenic spot i to the next scenic spot j, τ ij is the pheromone concentration between the current attraction i and the next attraction j, η ij is the heuristic information between the current tourist attraction i and the next tourist attraction j, α and β are the weights of controlling pheromone concentration and heuristic information respectively, and l is the total number of candidate tourist attractions in the set of candidate attractions that meet the cost constraint; The specific expression of the designed heuristic information integrating the tourist experience value of scenic spots, travel expenses between scenic spots and ticket fees of scenic spots is as follows: Among them, spot[i].score and spot[j].score are the travel experience values of attractions i and j respectively, cost(i, j) is the travel cost between attractions i and j, spot[i].ticket and spot[j].ticket are the ticket prices of attractions i and j respectively; S404: Select the next tourist attraction J to be visited in a roulette wheel selection manner. The specific operation is to first calculate the cumulative probability based on the state transition probability. The calculation formula is as follows: Among them, p ij is the state transition probability from the current attraction i to the candidate attraction j, p select [j] represents the sum of the state transition probabilities from the first candidate attraction to the jth candidate attraction, and l is the total number of candidate tourist attractions in the candidate attraction set that meets the cost constraint; Based on the above cumulative probability, the next tourist attraction J to be visited is selected in the following way and added to the tour route tour k middle: J=j,if rand(0,1)≤p select [j] S405, updating the cost of the constructed travel route, the formula is as follows: tour k _cost←tour k _cost+cost(i,j)+spot[j].ticket Among them, tour k _cost is the cost of the constructed travel route, cost(i, j) is the travel cost between tourist attractions i and j, and spot[j].ticket is the ticket fee for tourist attraction j.
6. The method for planning a single-passenger travel route based on the maximum-minimum ant system according to claim 1, characterized in that: Step S5 is specifically as follows: The specific steps of further optimizing the constructed tourist route using the designed new local search method integrating 2-opt and point insertion are as follows: S501: Execute the 2-opt operation to traverse all tourist attractions in the travel path constructed by ant k and find the two tourist attractions i and j that have the largest change in travel cost reduction Δcost. The travel cost reduction Δcost is calculated as follows: Δcost(i,j)=[cost(i-1,j)+cost(i,j+1)]-[cost(i-1,i)+cost(j,j+1)] Exchange the order of tourist attractions i and j on the tourist path. At the same time, flip the sequence of attractions between the two points in turn. Continue until there are no exchangeable points in the path that can reduce the cost. The 2-opt operation is completed and the cost of the constructed tourist path is updated. The formula is as follows: tour k _cost←tour k _cost-∑Δcost S502, perform the point insertion operation; after step S501, the user's travel cost may be reduced. At this time, under the condition of meeting the user's budget, new tourist attractions are inserted to improve the total user travel experience value. The specific implementation is as follows: Traverse all the attractions in the candidate attraction set that meet the cost constraint, and find the candidate tourist attraction p with the largest travel experience value among them; Traverse all the tourist attractions in the travel path already constructed by ant k, and find the two tourist attractions m and n that minimize the change in the travel cost increment Δcost. The formula for calculating the travel cost increment Δcost is as follows: Δcost(i,j) = spot[p].ticket + [cost(m,p) + cost(p,n)] - cost(m,n) Insert the candidate attraction p with the largest travel experience value between tourist attraction m and tourist attraction n; Continue to perform this operation until no new tourist attractions can be inserted anymore, and the point insertion operation ends; Update the cost of the constructed travel path, and the formula is as follows: tour k _cost←tour k _cost+∑Δcost 。 7. The method for planning a single-passenger travel route based on the maximum-minimum ant system according to claim 1, characterized in that: Step S6 is specifically as follows: The steps to evaluate the travel route plans constructed by all ants in the entire ant colony and update the global optimal travel route with the highest total user travel experience value are as follows: S601, calculate the total user travel experience value of the travel route planning plan constructed by each ant through the objective function. The expression of the objective function is as follows: Among them, tour k represents the travel route constructed by ant k, N k Indicates the tour route tour k The total number of tourist attractions in spot[tour k [i]].score represents tourist attractions tour k [i]’s experience value; S602, mark the path with the largest current total travel experience value as the current optimal solution best, and the expression is as follows: best=argmax{f(tour k )|1≤k≤NP} When f(gbest) < f(best), replace the global optimal solution gbest with the scheduling plan of the current optimal solution best; When f(gbest) ≥ f(best), the global optimal solution gbest remains unchanged.
8. The method for planning a single-passenger travel route based on the maximum-minimum ant system according to claim 1, characterized in that: Step S7 is specifically as follows: The designed information素 update formula that combines the total experience value of the travel path and the total experience value of all attractions is as follows: Among them, τ ij is the pheromone on the edge (i, j) connecting scenic spots i and j, ρ is the pheromone evaporation rate, and V is the set of scenic spots; is the pheromone released on the edge (i, j) of the global optimal path; Update pheromone maximum value τ max and the minimum pheromone value τ min , the specific formula is as follows: Among them, gbest_score is the total experience value of the global optimal path, Sumscore is the sum of the experience values of all tourist attractions, and N is the total number of tourist attractions; check whether the pheromone is within the specified [τ min , τ max ] range, the pheromone concentration that does not meet the constraint conditions will be handled as out-of-bounds. The specific operation is as follows: When the algorithm enters a stagnant state, that is, the global optimal solution gbest remains unchanged for consecutive RS generations, τ is used max Reinitialize the pheromone matrix as follows: Among them, gbest_score is the total experience value of the global optimal path, Sumscore is the total experience value of all tourist attractions, N is the total number of tourist attractions, τ ij is the pheromone on edge (i, j), and V is the set of all tourist attractions.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory, wherein: The processor executes the computer program to implement the steps of the method described in claim 1.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by the processor, the steps of the method described in claim 1 are implemented.