A multi-passenger travel path planning method based on ant colony system

Through the multi-passenger travel path planning method based on the ant colony system, combined with the Ant Team and pheromone update strategy, the problem that the existing technology cannot effectively plan the multi-passenger travel path is solved, and the balance of tourism experience value and path optimization effect are achieved.

CN119578681BActive Publication Date: 2025-04-29NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510144490.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-04-29
Estimated Expiration
2045-02-10

AI Technical Summary

Technical Problem

The existing ant colony system algorithm cannot effectively solve the problem of multi-passenger travel path planning, especially when ensuring the balance of tourism experience values ​​among various tour groups.

Method used

A multi-passenger travel path planning method based on an ant colony system is proposed. By constructing an optimization model that integrates passenger budget, travel expenses, ticket fees and travel experience values ​​between tourist attractions, the Ant Team and pheromone update strategy is adopted, and the local optimization strategy of 2-opt and attractions insertion is combined to optimize the travel path.

Benefits of technology

It has achieved the best travel path for multiple passengers within the budgetary scope, maximize the travel experience value of each passenger, and minimize the travel experience difference between each passenger, improving the balance of travel experience value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578681B_ABST
    Figure CN119578681B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-passenger travel path planning method based on an ant colony system, including: constructing an optimization goal of maximizing the minimum travel experience value among multiple passengers; secondly, designing a travel path construction method based on a tourist attraction pre-selection strategy for the ant colony system, constructing heuristic information based on the tourist experience value of the scenic spot, the travel fee between scenic spots and the ticket fee of the scenic spot, proposing a pheromone update strategy based on the minimum tourist experience value and the total tourist experience value of the scenic spot, proposing a local optimization strategy of 2-opt and scenic spot insertion; through continuous iterative optimization, finally outputting multiple optimal travel routes that meet the budget of passengers. The present invention can effectively improve the tourist experience value of each passenger and balance the tourist experience value of each passenger.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of travel path planning and computational intelligence technology, and in particular to a multi-passenger travel path planning method based on an ant colony system. Background Art

[0002] The multi-passenger travel path planning problem has a wide range of practical applications, especially in travel agency business. Travel agencies need to plan multiple travel paths for multiple tour groups and ensure that the travel experience values ​​between each tour group are balanced. Therefore, it is very important to develop an efficient multi-passenger travel path planning scheme that can balance the travel experience values ​​between each tour group.

[0003] Ant Colony System (ACS) algorithm is a meta-heuristic algorithm based on population iterative optimization. Although it is widely used to solve travel path planning problems, it is only aimed at travel path planning for a single traveler and cannot solve the travel path planning model for multiple travelers. Summary of the invention

[0004] Purpose of the invention: The technical problem to be solved by the present invention is to provide a multi-passenger travel path planning method based on an ant colony system in view of the shortcomings of the prior art, including the following steps:

[0005] Step 1, obtaining tourist attraction data and passenger data;

[0006] Step 2: construct a multi-passenger travel path planning model that integrates passenger budget funds, travel expenses between tourist attractions, ticket fees for tourist attractions, and tourist experience values ​​of tourist attractions, establish an optimization objective function that maximizes the minimum tourist experience value among multiple passengers, and evaluate the quality of multi-passenger travel path planning solutions;

[0007] Step 3, according to the geographical location of tourist attractions, calculate the travel cost matrix between tourist attractions, use the greedy algorithm to build a greedy multi-travel path planning scheme, and initialize the pheromone matrix;

[0008] Step 4: Maintain an ant team and construct a multi-passenger travel path planning scheme. Each ant in the ant team constructs a travel path based on the tourist attraction pre-selection strategy;

[0009] Step 5: Use the 2-opt local search strategy to optimize the visit sequence of the travel path constructed by each ant in each ant team to reduce the travel cost; then use the scenic spot insertion local optimization strategy to insert new tourist attractions into the travel path constructed by each ant in each ant team to maximize the travel experience value of each travel path;

[0010] Step 6: Evaluate the multi-passenger travel path planning scheme constructed by each ant team, and update the global optimal multi-passenger travel path planning scheme; call the global pheromone update to update the pheromone concentration of the edge of the global optimal multi-passenger travel path planning scheme;

[0011] Step 7, repeat steps 4 to 6 until the iteration termination condition is met;

[0012] Step 8: Output the final global optimal multi-passenger travel path planning solution.

[0013] In step 1, the tourist attraction data includes: the number of tourist attractions n, the number of tourist attractions i, the coordinates of the tourist attractions (x i , y i ), the tourism experience value scene_score of tourist attraction i i Ticket fees for tourist attractions i ; where 1≤i≤n, x i ,y i Respectively represent the horizontal and vertical coordinates of tourist attraction i;

[0014] The passenger data includes the number of passengers m, the passenger number k, the coordinates of the passenger's starting point (x0, y0), and the passenger's budget budget; x0, y0 represent the horizontal and vertical coordinates of the passenger's starting point, respectively, and 1≤k≤m.

[0015] Step 2 includes: given n tourist attractions, m tourists and a tourist starting point coordinate (x0, y0), describe the tourist attraction map as a completely undirected graph G = (V, E), where V = {i, | 0≤i≤n} represents the attraction set, including tourist attractions and tourist starting points, and each tourist attraction includes two attributes: the tourist attraction ticket fee and the tourist attraction travel experience value, and E = {e ij , | i, j∈V} is the edge set between all attractions, and each tourist attraction is set to be visited by only one traveler; m travelers start from the starting point and build a travel path that satisfies the budget constraint and returns to the starting point. The optimization goal is to find m travel paths that maximize the travel experience value of the minimum traveler among the m travelers. Each travel path is a sequence of attractions, and the sequence starts with the passenger starting point and ends with the passenger starting point; the specific mathematical definition is:

[0016] ,

[0017] ,

[0018] ,

[0019] ,

[0020] Among them, max means taking the maximum value; min means taking the minimum value; tour_score min represents the minimum travel experience value among m passengers; represents the travel experience value of passenger k; represents the travel path of passenger k; scene_score i represents the tourism experience value of tourist attraction i; represents the travel cost of passenger k; ticket_fee represents the travel fee between tourist attractions i and j; j represents the ticket price of tourist attraction j; budget represents the budget of the traveler.

[0021] Step 3 includes: initializing the ant colony system parameters, including the number of ant teams NP, pheromone control parameter α, heuristic information control parameter β, local pheromone evaporation rate ξ, global pheromone evaporation rate ρ, development probability q0 and fitness value evaluation times Max_FV;

[0022] The travel expense matrix is ​​an n×n two-dimensional matrix DF = [ ] n×n , the travel cost calculation formula between two tourist attractions i and j is:

[0023] ,

[0024] Among them, (x j ,y j ) represents the spatial coordinates of tourist attraction j; unit_fee represents the travel fee per unit distance.

[0025] Then follow these steps:

[0026] Step 3-1, initialize an ant team, including m ants;

[0027] Step 3-2: All ants in the ant team start from the designated passenger starting point, select accessible tourist attractions that meet the budget constraint based on the heuristic information between tourist attractions, and start to build a greedy travel path planning scheme; the ant team initializes an empty tourist attraction taboo table and initializes the travel experience value of each ant to 0;

[0028] Step 3-3, each ant in the ant team obtains its own accessible tourist attraction set according to the budget constraint and the tourist attraction taboo table , and then each ant selects a tourist attraction from its own set of accessible tourist attractions. Pre-selected with respective current tourist attractions Tourist attractions with the most heuristic information ; Then, set each ant's pre-selected tourist attractions to be added to their constructed travel paths, and calculate each ant's future travel experience value;

[0029] Step 3-4, select the ant K with the smallest future travel experience value to build a path; if there are more than two ants with the same minimum future travel experience value, select the ant K with the largest heuristic information between the current tourist attraction and the pre-selected tourist attraction to build a path; add the tourist attraction pre-selected by ant K to the constructed travel path, add the taboo table at the same time, and update the corresponding travel cost and travel experience value;

[0030] Step 3-5, repeat steps 3-3 to 3-4 until each ant in the ant team can no longer choose a tourist attraction, thus obtaining a greedy multi-travel path planning solution;

[0031] Step 3-6, use the minimum travel experience value of the passenger and the total travel experience value of the tourist attractions in the greedy multi-passenger travel path planning scheme to assign the initial value of the pheromone , and then initialize the pheromone in the pheromone matrix as .

[0032] In step 3-2, the heuristic information is generated based on the tourist experience value of the scenic spot, the travel fee between the scenic spots and the ticket fee of the scenic spot, and the heuristic information between the two tourist spots i and j is The calculation formula is:

[0033] ,

[0034] in, represents the ticket price of tourist attraction i;

[0035] In step 3-3, the future travel experience value of ant k is calculated using the following formula: :

[0036] ,

[0037] in, Indicates Ant K pre-selected tourist attractions tourism experience value;

[0038] In step 3-4, the ant K for constructing the travel path is selected according to the following formula, that is, the ant with the smallest future travel experience value is selected to construct the travel path:

[0039] ,

[0040] If the value of K is not unique, that is, there are more than two ants with the same minimum future travel experience value, the numbers of the ants with the same minimum future travel experience value are stored in the pending set, and K is set to an empty set. Reselect according to the following formula, that is, select the ant with the maximum heuristic information between the current tourist attraction and the pre-selected tourist attraction from the ants with the same minimum future travel experience value to construct the path:

[0041] ,

[0042] in, Indicates the tourist attraction where Ant K is currently located and its pre-selected tourist attractions Heuristic information between

[0043] Use the following formula to update the corresponding travel cost and tourism experience value:

[0044] ,

[0045] ,

[0046] in, represents the travel cost of the travel path constructed by ant K; Indicates the tourist attraction where Ant K is currently located Pre-selected tourist attractions with Ant K travel expenses between Indicates tourist attractions Ticket fees; represents the travel experience value of the travel path constructed by ant K; Indicates tourist attractions tourism experience value;

[0047] In steps 3-6, the greedy multi-passenger travel path planning scheme is used to assign the initial pheromone value , the calculation formula is:

[0048] ,

[0049] Among them, greedy_score min represents the minimum travel experience value in the greedy multi-passenger travel path planning scheme; Q1 represents the control coefficient; the pheromone matrix is ​​an n×n two-dimensional matrix PM = [ ] n×n , represents the pheromone concentration between tourist attractions i and j. At the beginning of the algorithm, .

[0050] Step 4 includes:

[0051] Step 4-1, maintain NP ant teams, each team contains m ants;

[0052] Step 4-2: All ants in ant team h start from the designated passenger starting point, select accessible tourist attractions that meet the budget constraint based on the pheromone concentration and heuristic information between tourist attractions, and start to build a travel path planning plan; ant team h initializes an empty tourist attraction taboo table and initializes the travel experience value of each ant to 0;

[0053] Step 4-3, each ant in the ant team h first obtains its own set of accessible tourist attractions according to the budget constraint and the tourist attraction taboo table, and then pre-selects the next tourist attraction from its set of accessible tourist attractions according to the state transition equation;

[0054] Step 4-4, setting each ant's pre-selected tourist attractions to be added to the travel path constructed by each ant, and calculating the future travel experience value of each ant;

[0055] Step 4-5, select ant K with the minimum future travel experience value in ant team h to construct a travel path; if there are more than two ants with the same minimum future travel experience value, select ant K with the maximum heuristic information between the current tourist attraction and the pre-selected tourist attraction to construct a travel path; add the tourist attractions pre-selected by ant K to the constructed travel path, and add the tourist attraction taboo table of ant team h, and update the corresponding travel cost and travel experience value; call local pheromone update to instantly update the pheromone on the edge that the ant is currently passing through;

[0056] Step 4-6, repeat steps 4-3 to 4-5 until each ant in the ant team h can no longer choose a tourist attraction, thereby obtaining a multi-passenger travel path planning scheme;

[0057] Step 4-7, repeat steps 4-2 to 4-6 until all ant teams have built multi-passenger travel path planning solutions.

[0058] In step 4-3, an ant team maintains a taboo table of tourist attractions, which records the tourist attractions that have been visited and is shared by m ants. Before each ant k selects the next tourist attraction, it first obtains the set of tourist attractions that can be visited by each ant according to the budget constraint and the taboo table of tourist attractions. , and then according to the following state transition equation from the set of accessible tourist attractions Pre-select your next tourist attraction :

[0059] ,

[0060] in, , They represent the tourist attractions where ant k is currently located. Next tourist attraction l q represents the pheromone concentration and heuristic information between 0 and 1; q represents a random number uniformly distributed in the interval [0, 1]; q0 is the development probability, which means that the ant will visit the tourist attraction with the strongest pheromone concentration and heuristic information with probability q0, and explore each edge with a biased probability of (1-q0); J is a random tourist attraction selected by the roulette wheel selection algorithm according to the probability distribution given by the following formula:

[0061] ,

[0062] ,

[0063] in, Indicates that ant k is from the current tourist attraction Visit the collection of accessible tourist attractions The probability of visiting tourist attraction j in ; r represents a random number uniformly distributed in the interval [0, 1]; express Total number of tourist attractions in Indicates the set of tourist attractions that can be accessed from ant k in sequence The sum of the probabilities of the first tourist attraction to the jth tourist attraction.

[0064] In step 5, the 2-opt local search strategy includes the following steps:

[0065] Step 5-1, set any two tourist attractions and the attraction sequence between the two tourist attractions in the travel path constructed by ant k in ant team h, and calculate the reduction in travel cost;

[0066] Step 5-2, traverse all tourist attractions in the travel path constructed by ant k, find the two tourist attractions corresponding to the maximum travel cost reduction, swap the two tourist attractions and the scenic spot sequence between the two tourist attractions in the travel path; update the travel cost of the travel path constructed by ant k;

[0067] Step 5-3, repeating steps 5-1 and 5-2 until swapping any two tourist attractions in the travel path constructed by ant k and the sequence of attractions between two tourist attractions will not reduce the travel cost;

[0068] Step 5-4, repeat steps 5-1 to 5-3 until the 2-opt local search strategy is executed for each ant in each ant team;

[0069] In step 5-1, the previous attraction of tourist attraction i in the travel path is set to t, and the next attraction of tourist attraction j is set to l , the calculation formula for the reduction in tourism costs is:

[0070] ,

[0071] in, It represents the reduction in tourism cost caused by swapping the tourist attractions i, j and the sequence of tourist attractions i, j in the tourism route; represents the travel expenses between tourist attractions t and i; Indicates tourist attractions j, l travel expenses between represents the travel expenses between tourist attractions t and j; Indicates tourist attractions i, l travel expenses between

[0072] In step 5-2, all tourist attractions in the travel path constructed by ant k are traversed to find the two tourist attractions i and j corresponding to the maximum travel cost reduction, and the two tourist attractions and the attractions between the two tourist attractions in the travel path are swapped;

[0073] Then, the travel cost of the travel path constructed by ant k is updated, and the calculation formula is as follows:

[0074] ,

[0075] in, Indicates the maximum travel cost reduction found by this traversal operation;

[0076] The scenic spot insertion local optimization strategy specifically includes the following steps:

[0077] Step 5-5, each ant in the ant team h obtains its own accessible tourist attraction set according to the budget constraint and the tourist attraction taboo table, calculates the travel experience value of each ant in the ant team h, and sorts the tourist attractions in its own accessible tourist attraction set according to the travel experience value;

[0078] Step 5-6, select ant k with the minimum travel experience value in ant team h to perform point insertion operation on the travel path; select tourist attraction s to be inserted from the accessible tourist attractions set according to the travel experience value from high to low, set s to be inserted into any two adjacent tourist attractions i and j on the travel path constructed by ant k, and calculate the increase in travel cost caused by this;

[0079] Step 5-7, traverse all tourist attractions in the travel path constructed by ant k, find two adjacent tourist attractions corresponding to the minimum travel cost increase that meets the budget constraint, insert the tourist attraction to be inserted between the two tourist attractions; update the travel cost and travel experience value of the travel path constructed by ant k;

[0080] Step 5-8, repeat steps 5-5 to 5-7 until all ants in the ant team h can no longer insert unvisited tourist attractions into the constructed travel path;

[0081] Step 5-9, repeat step 5-5 to step 5-8 until the local optimization strategy of scenic spot insertion is executed for each ant in each ant team;

[0082] After executing the 2-opt local search strategy for the travel path of each passenger in each ant team, the scenic spot insertion local optimization strategy is executed. The specific implementation steps are as follows:

[0083] In step 5-6, the increase in tourism cost is calculated using the following formula:

[0084] ,

[0085] in, represents the travel expenses between tourist attractions i and s; represents the travel expenses between tourist attractions s and j; represents the ticket fee of tourist attraction s; It represents the increase in travel cost caused by inserting tourist attraction s between adjacent tourist attractions i and j in the travel path;

[0086] In steps 5-7, the travel cost and travel experience value of the travel path constructed by ant k are updated using the following formula:

[0087] ,

[0088] ,

[0089] in, Indicates the minimum increase in travel cost found by this traversal operation; scene_score s Represents the tourism experience value of tourist attraction s.

[0090] In step 6, the global optimal multi-passenger travel path planning scheme adopts the following fitness value function:

[0091] ,

[0092] ,

[0093] ,

[0094] in, represents the fitness value of the multi-passenger travel path planning scheme constructed by the ant team h; the implementation steps of updating the global optimal multi-passenger travel path planning scheme gbest include:

[0095] First, the fitness value of the NP ant teams is calculated through the fitness value function. Then, the multi-passenger travel path planning scheme with the largest current fitness value is marked as current_best. The calculation formula is:

[0096] ,

[0097] f(gbest) represents the fitness value of the global optimal multi-passenger travel path planning scheme, and f(current_best) represents the fitness value of the multi-passenger travel path planning scheme with the largest current fitness value. When f(gbest) < f(current_best), the global optimal solution gbest is replaced by the current best multi-passenger travel path planning scheme current_best; when f(gbest) ≥ f(current_best), the global optimal solution gbest remains unchanged.

[0098] In step 4-5, the local pheromone update occurs during the travel path construction process. Every time the ant passes an edge e ij , will immediately update the edge e ij The pheromone update formula is as follows:

[0099] .

[0100] In step 6, the global pheromone update means that only the ant team that constructs the optimal multi-passenger travel path planning solution is allowed to release and update pheromones after each iteration. The pheromone update formula is:

[0101] ,

[0102] ,

[0103] in represents the edge e of the travel path in the global optimal multi-passenger travel path planning solution ij The pheromone released on the surface; Q2 represents the fitness value control coefficient.

[0104] The present invention is based on the needs of actual application scenarios. Firstly, a multi-passenger travel path planning model is constructed, aiming to find the best travel path within the budget for multiple passengers, so as to maximize the travel experience value of each passenger and minimize the travel experience differences between passengers, while realizing mutually exclusive visits to tourist attractions by each passenger; secondly, a multi-passenger travel path planning method based on an ant colony system is proposed, a path construction method based on a tourist attraction pre-selection strategy is designed, heuristic information based on the tourist experience value of the attraction, the travel expenses between attractions and the ticket fees of the attraction is proposed, a pheromone update strategy based on the minimum tourist experience value of the passenger and the total tourist experience value of the attraction is designed, and a local optimization strategy of 2-opt and attraction insertion is proposed.

[0105] The present invention has the following beneficial effects: 1. The present invention integrates travel expenses between scenic spots and ticket fees for scenic spots based on actual situations, introduces the budget of tourists as a constraint condition, and assigns quantitative travel experience values ​​to tourist attractions, aiming to find the best travel route within the budget for multiple tourists, so as to maximize the travel experience value of each tourist and minimize the travel experience differences between tourists, thereby constructing a multi-travel route planning model that integrates tourist budget funds, travel expenses between tourist attractions, ticket fees for tourist attractions and travel experience values ​​of tourist attractions, so as to improve the travel experience value of each tourist in the tour group and ensure the balance of travel experience values ​​of each tourist's travel route.

[0106] 2. The present invention proposes an ant colony system algorithm based on a tourist attraction preselection strategy, which incorporates a tourist attraction preselection strategy into path planning. This strategy evaluates the future travel experience value of passengers and gives priority to passengers with the minimum future travel experience value to construct travel paths, so as to balance the travel experience values ​​between the travel paths of each passenger. In addition, the present invention also proposes heuristic information based on the tourist experience value of scenic spots, travel expenses between scenic spots, and ticket fees for scenic spots, designs a pheromone update strategy based on the minimum tourist experience value of passengers and the total tourist experience value of scenic spots, and proposes a local optimization strategy of 2-opt and scenic spot insertion, which can effectively improve the travel experience value of each passenger and balance the travel experience value of each passenger. BRIEF DESCRIPTION OF THE DRAWINGS

[0107] Figure 1 It is a tourist attraction distribution map of an example of a multi-passenger travel path planning problem of the present invention, including 3 passengers and 150 tourist attractions, and the passenger budget is 2,000 yuan.

[0108] Figure 2 It is a flow chart of a multi-passenger travel path planning method based on an ant colony system according to the present invention.

[0109] Figure 3 It is the first multi-passenger travel path planning solution route map in the example of the present invention.

[0110] Figure 4 It is the first multi-passenger travel path planning solution route map after adopting 2-opt local optimization in the example of the present invention.

[0111] Figure 5 It is the first multi-passenger travel path planning route map after being optimized by using the scenic spot insertion local optimization strategy in the example of the present invention.

[0112] Figure 6 It is the global optimal multi-passenger travel path planning solution roadmap finally output by the example of the present invention. DETAILED DESCRIPTION

[0113] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and other advantages of the present invention will become more clear.

[0114] like Figure 2 As shown, the embodiment of the present invention provides a multi-passenger travel path planning method based on an ant colony system, such as Figure 1 The tourist attraction distribution map of the multi-passenger travel path planning problem example of the present invention shown includes 150 tourist attractions (dots), a passenger starting point (asterisk), 3 passengers and a budget of 2,000 yuan, and each tourist attraction has two attributes, represented by a tuple (ticket, travel experience value); this example needs to plan the best travel path for 3 passengers from 150 tourist attractions under the condition of a budget of 2,000 yuan, to ensure that the travel experience value of the 3 passengers is maximized and balanced. The method of the present invention specifically includes the following steps:

[0115] Step 1, obtain tourist attraction data and passenger data, wherein the tourist attraction data includes: the number of tourist attractions n = 150, the tourist attraction number i, the coordinates of the tourist attraction (x i , y i ), the tourism experience value scene_score of tourist attraction i i And the ticket fee for tourist attractions i i ;

[0116] The passenger data includes the number of passengers m = 3, the passenger number k, the coordinates of the passenger's starting point (41, 21) and the passenger's budget budget = 2000. The specific data of the tourist attractions are shown in Table 1:

[0117] Table 1

[0118]

[0119] Step 2: Based on the above tourist attraction data and passenger data, a tourist attraction distribution map is constructed, and a multi-passenger travel route planning model is constructed that integrates passenger budget funds, travel expenses between tourist attractions, ticket fees for tourist attractions, and travel experience values ​​of tourist attractions.

[0120] Step 3, initialize the ant colony system parameters, including the number of ant teams NP = 10, pheromone control parameter α = 4.5, heuristic information control parameter β = 19.0, local pheromone evaporation rate ξ = 0.1, global pheromone evaporation rate ρ = 0.1, development probability q0 = 0.6 and fitness value evaluation times Max_FV = 50000;

[0121] According to the geographical location of tourist attractions, the travel cost matrix between tourist attractions is calculated. In this example, the travel cost matrix is ​​a 151×151 two-dimensional matrix DF = [df ij ] 151×151 , which is actually generated by multiplying the Euclidean distance between tourist attractions by the unit distance travel fee. The travel fee calculation formula between two tourist attractions i and j is:

[0122] ,

[0123] in, represents the travel expenses between tourist attractions i and j; (x i ,y i )、(x j ,y j ) represent the spatial coordinates of tourist attractions i and j respectively; unit_fee represents the travel fee per unit distance, and the present invention sets unit_fee=1;

[0124] Then follow these steps:

[0125] Step 3-1, initialize an ant team consisting of 3 ants and construct a greedy multi-passenger travel route planning solution, represented as greedy_solution = {tour_route1, tour_route2, tour_route3}, where tour_route k = [], 1≤k≤3;

[0126] Step 3-2: All ants in the ant team start from the designated passenger starting point (serial number 0, coordinates (42,21)), select accessible tourist attractions that meet the budget constraint based on the heuristic information between tourist attractions, and start to build a greedy travel path planning scheme; at this time, greedy_solution = {[0], [0], [0]}, and initialize an empty tourist attraction tabu table tabu = Ø, and initialize the travel experience value of each ant to 0; the heuristic information is generated based on the tourist experience value of the attraction, the travel fee between attractions, and the attraction ticket fee. The heuristic information between two tourist attractions i and j is The calculation formula is:

[0127] ,

[0128] in, represents the ticket price of tourist attraction i;

[0129] Step 3-3, each ant in the ant team obtains its own accessible tourist attractions set according to the budget constraint and the tourist attractions tabu table tabu , and then each ant selects a tourist attraction from its own set of accessible tourist attractions. Pre-selected with respective current tourist attractions Tourist attractions with the most heuristic information ; Then, set each ant's pre-selected tourist attractions to be added to their constructed travel paths, and use the following formula to calculate each ant's future travel experience value :

[0130] ,

[0131] in, Indicates Ant K pre-selected tourist attractions 87, 55, 43, 121,78, 96, 52, 50, 116, 126, 95, 82, 33, 76, 72], 44, 33, 70, 116, 126, 95, 82, 33, 76, 72], 45, 21, 104, 111, 99, 38, 84, 106, 79, 94, 72], 46, 33, 71, 116, 126, 95, 82, 33, 76, 72], 44, 33, 71, 116, 126, 95, 82, 33, 76, 72], 44, 33, 71, 116, 126, 95, 82, 33, 76, 72], 44, 33, 71, 116, 126, 95, 82, 33, 76, 13]}, the next tourist attractions pre-selected by the three ants are 1, 11, and 40 respectively, the travel experience values ​​of the three pre-selected attractions are 74, 84, and 73 respectively, the travel experience values ​​of the three ants are 1186, 1127, and 1138 respectively, and the heuristic information of the current tourist attractions and the pre-selected tourist attractions of the three ants are 0.9054, 0.8895, and 0.7510 respectively; it is assumed that the pre-selected attractions are added to the travel paths of the corresponding ants, and the future travel experience values ​​of the three ants are calculated to be 1260, 1211, and 1211 respectively;

[0132] Step 3-4, select the ant K with the smallest future travel experience value to construct the travel path; if there are more than two ants with the same minimum future travel experience value, select the ant K with the largest heuristic information between the current tourist attraction and the pre-selected tourist attraction to construct the path; the ant K for constructing the travel path is selected according to the following formula, that is, the ant with the smallest future travel experience value is selected to construct the travel path:

[0133] ,

[0134] If the value of K is not unique, that is, there are more than two ants with the same minimum future travel experience value, the numbers of the ants with the same minimum future travel experience value are stored in the set to be processed, and K is set to an empty set. Reselect according to the following formula, that is, select the ant with the maximum heuristic information between the current tourist attraction and the pre-selected tourist attraction from the ants with the same minimum future travel experience value to construct the path:

[0135] ,

[0136] in, Indicates the tourist attraction where Ant K is currently located and its pre-selected tourist attractions =The heuristic information between ants 2 and 3; Since ant 2 and ant 3 have the same minimum future travel experience value in the above case, the heuristic information between the current attractions and the pre-selected attractions of ant 2 and ant 3 is compared, that is, the heuristic information of attractions 72 and 11 in travel path 2 is 0.8895 and the heuristic information of attractions 13 and 40 in travel path 3 is 0.7510; Therefore, ant 3 is finally selected to construct the travel path; the tourist attractions pre-selected by ant K are added to the constructed travel path, and the taboo table is added at the same time, and the corresponding travel cost and travel experience value are updated using the following formula:

[0137] ,

[0138] ,

[0139] in, The travel cost of the travel path constructed by ant K; Indicates the tourist attraction where Ant K is currently located and its pre-selected tourist attractions travel expenses between Indicates tourist attractions Ticket fees; The travel experience value of the travel path constructed by Ant K; Indicates tourist attractions travel experience value; in this example, the original travel cost of Ant 3 is 1272.77, and the travel cost of Ant 3 will increase the ticket fee of the tourist attraction by 40 40 = 80 and travel expenses from tourist attraction 13 to tourist attraction 40 df 13,40 43, 121, 78, 96, 52, 50, 116, 126, 95, 82, 33, 76, 43], [0, 87, 55,43, 121, 78, 96, 52, 50, 116, 126, 95, 82, 33, 76, 43]; 223, 176, 180, 78, 67, 105, 138, 133, 143, 118, 26, 124, 65, 4, 66, 16, 134, 18, 113, 47], [0, 28, 93, 91, 45, 21, 104, 111, 99, 38, 84, 106, 79, 94, 72]; 223, 176, 180, 78, 67, 105, 138, 133, 143, 118, 26, 124 13, 40]};

[0140] , 42, 6, 49, 63, 90, 0], [0, 28, 93, 91, 45, 21, 104, 111,99, 38, 84, 106, 79, 94, 72, 11, 74, 141, ] ; 3-5. Repeat steps 3-3 and 3-4 until each ant in the ant team can no longer choose tourist attractions, thus obtaining a greedy multi-travel path planning solution; in this example, greedy_ solution ={[0, 108, 67, 105, 138, 133, 143, 118, 26, 124, 65, 4, 66, 16, 134, 18, 113,47, 1, 130, 8, 89, 42, 6, 49, 63, 90, 0], 3-6. 40, 140, 145, 57, 149, 7, 0]};

[0141] Step 3-6, use the minimum travel experience value of the passenger and the total travel experience value of the tourist attractions in the greedy multi-passenger travel path planning scheme to assign the initial value of the pheromone , the calculation formula is:

[0142] ,

[0143] Among them, greedy_score min represents the minimum travel experience value in the greedy multi-passenger travel path planning scheme; Q1 represents the control coefficient, and the present invention sets Q1=0.0001; in this example, = 2.2139e-05, the pheromone matrix is ​​a 151×151 two-dimensional matrix PM = [ ] 151×151, represents the pheromone concentration between tourist attractions i and j. At the beginning of the algorithm, .

[0144] Step 4: Maintain an ant team and construct a multi-passenger travel path planning scheme. Each ant in the ant team constructs a travel path based on the tourist attraction pre-selection strategy, including the following steps:

[0145] Step 4-1: Maintain 10 ant teams, each team contains 3 ants. Each ant team is responsible for building a multi-passenger travel path planning solution;

[0146] Step 4-2: All ants in ant team h start from the designated passenger starting point, select accessible tourist attractions that meet the budget constraint based on the pheromone concentration and heuristic information between tourist attractions, and start to build a travel path planning scheme; at this time, solution h ={[0], [0], [0]}, the ant team initializes an empty taboo table of tourist attractions tabu h =Ø, initialize the travel experience value of each ant to 0;

[0147] Step 4-3: An ant team maintains a taboo table of tourist attractions, which records the tourist attractions that have been visited and is shared by m ants. Before each ant k selects the next tourist attraction, it first obtains the set of tourist attractions that can be visited according to the budget constraint and the taboo table of tourist attractions. , and then according to the following state transfer equation from the set of accessible tourist attractions Pre-select your next tourist attraction :

[0148] ,

[0149] in, , They represent the tourist attractions where ant k is currently located. Next tourist attraction l q represents the pheromone concentration and heuristic information between 0 and 1; q represents a random number uniformly distributed in the interval [0, 1]; q0 is the development probability, which means that the ant will visit the tourist attraction with the strongest pheromone concentration and heuristic information with probability q0, and explore each edge with a biased probability of (1-q0); J is a random tourist attraction selected by the roulette wheel selection algorithm according to the probability distribution given by the following formula:

[0150] ,

[0151] ,

[0152] in, Indicates that ant k is from the current tourist attraction Visit its collection of accessible tourist attractions The probability of visiting tourist attraction j in the ant team is 0; r represents a random number uniformly distributed in the interval [0, 1]. In this example, after the three ants in ant team 1 have selected tourist attractions several times, solution1 = {[0, 28, 20, 55, 132,120], [0, 108, 67, 105, 93, 91, 47], [0, 87, 43, 121]}. The next tourist attractions pre-selected by the three ants are 100, 131, and 116, respectively. The tourism experience values ​​of the three pre-selected attractions are 33, 4, and 89, respectively. The tourism experience values ​​of the three ants are 320, 349, and 290, respectively. The heuristic information of the current tourist attractions and the pre-selected tourist attractions of the three ants are 0.7264, 0.7381, and 0.9346, respectively.

[0153] Step 4-4, set each ant's pre-selected tourist attractions to be added to the travel path constructed by each ant, and calculate the future travel experience value of each ant; in this example, set the pre-selected attractions to be added to the travel paths of the corresponding ants, and calculate the future travel experience values ​​of the three ants to be 353, 353, and 379 respectively;

[0154] Step 4-5, select ant K with the minimum future travel experience value in ant team h to construct the travel path; if there are more than two ants with the same minimum future travel experience value, then construct the travel path from ant K with the maximum heuristic information between the current tourist attraction and the pre-selected tourist attraction; since in the above case, ant 1 and ant 2 have the same minimum future travel experience value, then compare the heuristic information between the current attractions and the pre-selected attractions of ant 1 and ant 2, that is, the heuristic information of attractions 120 and 100 in travel path 1 is 0.7264 and the heuristic information of attractions 47 and 131 in travel path 2 is 0.7381; therefore, ant 2 is finally selected to construct the travel path;

[0155] Add the tourist attractions pre-selected by ant K to the constructed travel path, add the tourist attraction taboo table of ant team h, and update the corresponding travel cost and travel experience value; in this example, the original travel cost of ant 2 is 391.179, and the ticket fee ticket_fee of tourist attraction 131 will be increased 131 = 20 and travel expenses from tourist attraction 47 to tourist attraction 131 df 47,131 =6.708, the updated travel cost of ant 1 is 397.887, and the travel experience value is 353; currently, solution1 = {[0, 28, 20, 55, 132, 120], [0, 108, 67, 105, 93, 91, 47, 131],[0, 87, 43, 121]};

[0156] Call local pheromone update to instantly update the pheromone on the current edge. The pheromone update formula is as follows:

[0157] ,

[0158] According to the parameter setting in step 3, ξ = 0.1, = 2.2139e-05; In this example, the travel path of ant 1 adds a new tourist attraction 131, and edge e needs to be updated 47,131 Pheromones on;

[0159] , 133, 72, 130, 0], [0, 108, 67, 105,93, 91, 47, 131, 60, 77, 45, 113, 21, 104, 111, 143, 118, 57,149, 128, 71, 100, 101, 135, 142, 138, 133, 72, 130, 0]; 4-6. Repeat steps 4-3 to 4-5 until each ant in the ant team h can no longer choose tourist attractions, thereby obtaining a multi-travel path planning solution; in this example, the first multi-travel path planning solution obtained is solution1 = {[0, 28, 20, 55, 132, 120, 86, 35, 27, 125, 145, 140, 57,149, 128, 71, 100, 101, 135, 142, 138, 133, 72, 130, 0], 4-7. 40, 49, 89, 8, 63, 0]}; e.g. Figure 3 The first multi-passenger travel path planning scheme route map in the example of the present invention shown includes travel path 1, travel path 2 and travel path 3 constructed by ant 1, ant 2 and ant 3 respectively, and each travel path has two attributes, which are represented by a tuple (travel cost, travel experience value), that is, the travel cost and travel experience value of travel path 1 are 1978.29 and 1488 respectively, the travel cost and travel experience value of travel path 2 are 1982.17 and 1687 respectively, and the travel cost and travel experience value of travel path 3 are 1974.41 and 1569 respectively;

[0160] Step 4-7, repeat steps 4-2 to 4-6 until all ant teams have built multi-passenger travel path planning solutions; in this example, 10 multi-passenger travel path planning solutions solution1 to solution 10, as shown below:

[0161] solution1 = {[0, 28, 20, 55, 132, 120, 86, 35, 27, 125, 145, 140, 57,149, 128, 71, 100, 101, 135, 142, 138, 133, 72, 130, 0], [0, 108, 67, 105,93, 91, 47, 131, 60, 77, 45, 113, 21, 104, 111, 143, 118, 124, 26, 65, 66, 4,16, 94, 134, 19, 0], [0, 87, 43, 121, 78, 64, 50, 116, 126, 95, 33, 82, 96,52, 123, 115, 150, 61, 69, 40, 49, 89, 8, 63, 0]};

[0162] solution2 = {[0, 28, 67, 116, 64, 54, 50, 73, 126, 95, 132, 101, 82,76, 40, 144, 138, 94, 19, 134, 11, 36, 84, 90, 99, 63, 0], [0, 143, 118, 65,4, 66, 26, 124, 16, 79, 106, 130, 93, 108, 42, 133, 62, 45, 91, 98, 35, 77,57, 7, 61, 0], [0, 87, 55, 149, 43, 121, 78, 96, 52, 33, 13, 111, 104, 21,72, 113, 47, 32, 86, 60, 150, 140, 125, 0]};

[0163] solution3 = {[0, 28, 67, 105, 1, 47, 91, 45, 113, 21, 11, 104, 134,94, 79, 72, 141, 74, 99, 18, 90, 49, 142, 89, 42, 63, 131, 0], [0, 87, 55,121, 78, 96, 52, 43, 128, 120, 149, 86, 60, 77, 93, 108, 133, 138, 57, 140,50, 116, 126, 95, 0], [0, 82, 76, 33, 81, 69, 143, 118, 26, 124, 65, 66, 4,16, 106, 84, 111, 38, 24, 6, 130, 122, 8, 0]};

[0164] solution4 = {[0, 28, 105, 67, 138, 64, 50, 116, 40, 54, 82, 73, 140,149, 86, 145, 125, 77, 26, 124, 66, 94, 134, 38, 24, 32, 0], [0, 91, 93, 108,133, 143, 118, 19, 65, 4, 49, 21, 74, 104, 111, 79, 90, 106, 16, 18, 84, 72,130, 1, 63, 0], [0, 87, 55, 43, 121, 78, 96, 52, 126, 95, 13, 33, 128, 120,115, 57, 62, 60, 45, 47, 113, 11, 98, 8, 0]};

[0165] solution5 = {[0, 108, 67, 105, 142, 143, 66, 124, 118, 65, 72, 21,91, 45, 47, 113, 1, 130, 133, 89, 42, 57, 149, 86, 35, 98, 0], [0, 28, 93,44, 104, 111, 18, 16, 94, 106, 84, 38, 99, 11, 74, 141, 4, 134, 79, 90, 49,145, 55, 7, 0], [0, 87, 132, 43, 121, 78, 96, 52, 50, 64, 40, 54, 116, 126,95, 82, 13, 138, 8, 26, 19, 62, 60, 110, 0]};

[0166] solution6 = {[0, 28, 57, 86, 140, 50, 2, 116, 13, 33, 126, 95, 96,78, 121, 43, 73, 108, 67, 105, 93, 1, 49, 130, 63, 6, 66, 0], [0, 91, 84,111, 104, 21, 72, 113, 47, 45, 11, 74, 94, 16, 134, 79, 18, 36, 38, 99, 141,98, 60, 62, 131, 0], [0, 87, 55, 120, 77, 90, 106, 143, 118, 26, 124, 4, 65,8, 42, 138, 133, 89, 64, 40, 54, 82, 52, 107, 0]};

[0167] solution7 = {[0, 28, 105, 104, 111, 99, 21, 91, 45, 47, 90, 106, 49,113, 63, 1, 130, 72, 11, 74, 141, 60, 93, 77, 145, 0], [0, 108, 67, 138, 133,143, 118, 66, 65, 4, 26, 124, 16, 94, 79, 84, 38, 18, 134, 89, 8, 97, 42, 6,131, 0], [0, 87, 125, 55, 132, 43, 121, 78, 96, 52, 50, 64, 40, 54, 116, 126,95, 82, 73, 86, 35, 62, 150, 120, 128, 0]};

[0168] solution8 = {[0, 120, 62, 55, 43, 128, 71, 100, 138, 73, 64, 40, 54,133, 65, 118, 124, 26, 143, 19, 4, 66, 8, 1, 130, 131, 0], [0, 108, 69, 50,121, 78, 96, 52, 126, 95, 82, 13, 101, 30, 77, 28, 93, 47, 113, 72, 84, 11,74, 106, 0], [0, 87, 7, 145, 140, 86, 57, 125, 105, 67, 116, 33, 76, 132, 60,91, 98, 45, 21, 104, 24, 79, 38, 111, 63, 0]};

[0169] solution9 = {[0, 87, 121, 76, 140, 132, 43, 128, 55, 27, 86, 60, 91,98, 45, 47, 113, 6, 79, 134, 16, 4, 26, 19, 0], [0, 108, 50, 116, 126, 95,13, ​​33, 82, 96, 78, 52, 35, 77, 61, 89, 150, 62, 57, 145, 125, 1, 130, 63,131, 0], [0, 28, 67, 105, 138, 133, 143, 118, 18, 104, 111, 99, 21, 72, 106,84, 38, 94, 65, 66, 124, 8, 42, 97, 0]};

[0170] solution 10 = {[0, 4, 65, 66, 26, 124, 16, 94, 106,49, 1, 130, 64, 40, 57, 140, 73, 145, 150, 149, 0], [0, 28, 67, 105, 108, 93,91, 47, 63, 72, 21, 104, 99, 111, 38, 36, 84, 141, 45, 77, 62, 98, 113, 11,74, 134, 0], [0, 87, 54, 50, 116, 43, 0]}.

[0171] Step 5, using the 2-opt local search strategy to optimize the visit sequence of the travel path constructed by each ant in each ant team to reduce the travel cost; then using the scenic spot insertion local optimization strategy to insert new tourist attractions into the travel path constructed by each ant in each ant team to maximize the travel experience value of each travel path; the 2-opt local search strategy includes the following steps:

[0172] Step 5-1, set any two tourist attractions and the attraction sequence between the two tourist attractions in the travel path constructed by ant k in ant team h, and calculate the resulting reduction in travel cost; set the previous attraction of tourist attraction i in the travel path as t, and the next attraction of tourist attraction j as l, and the calculation formula for the reduction in travel cost is:

[0173] ,

[0174] in, It represents the reduction in tourism cost caused by swapping the tourist attractions i, j and the sequence of tourist attractions i, j in the tourism route; represents the travel expenses between tourist attractions t and i; Indicates tourist attractions j, l travel expenses between represents the travel expenses between tourist attractions t and j; Indicates tourist attractions i, l travel expenses between.

[0175] , 101, 100, 71, 128, 149, 57, 140,145, 125, 142, 138, 133, 72, 130, 0], [0, 108, 67, 105, 93, 91, 105, 0]; Step 5-2: traverse all tourist attractions in the travel path constructed by ant k, find the two tourist attractions corresponding to the maximum travel cost reduction, and swap the two tourist attractions and the sequence of attractions between the two tourist attractions in the travel path; in this example, the two tourist attractions corresponding to the maximum travel cost reduction found by the three ants of ant team 1 in the first traversal are 125 and 135, 143 and 94, 49 and 8 respectively. Therefore, after the first swap operation, solution1 ={[0, 28, 20, 55, 132, 120, 86, 35, 27, 135, 101, 100, 71, 128, 149, 57, 140,145, 125, 142, 138, 133, 72, 130, 0], [0, 108, 67, 105, 93, 91, 4, 63, 40, 9, 89, 49, 63, 0]}.

[0176] Update the travel cost of the travel path plan constructed by ant k. The calculation formula is as follows:

[0177] ,

[0178] Among them, Δreduce_expense max Indicates the maximum travel cost reduction found by this traversal operation; in this example, the original travel costs of the three ants in ant team 1 are 1978.29, 1982.17, and 1974.41 respectively, and the maximum travel cost reductions found by the first traversal operation are 11.41, 13.90, and 16.38 respectively, so the updated travel costs are 1966.88, 1968.27, and 1958.02 respectively;

[0179] , 132, 101, 135, 55, 149, 57, 140, 145, 125, 0], [0, 108, 67, 105, 143, 118, 26, 124, 66, 65, 4, 19, 134, 16, 94, 111, ], 2-opt local search strategy optimization, solution1 = {[0, 28, 142, 138, 133, 130, 72, 35, 86, 20, 27,120, 128, 71, 100, 132, 101, 135, 55, 149, 57, 140, 145, 125, 0], 2-opt local search strategy optimization, solution2 = {[0, 28, 142, 138, 133, 130, 72, 35, 86, 20, 27,120, 128, 71, 1 40, 89, 8, 49, 63, 0]}; Figure 4 The example of the present invention shown uses the first multi-passenger travel path planning solution route map after 2-opt local optimization, which includes travel paths 1, travel paths 2 and travel paths 3 of ant 1, ant 2 and ant 3 respectively after 2-opt local optimization, and each travel path has two attributes, which are represented by a tuple (travel cost, travel experience value), that is, the travel cost and travel experience value of travel path 1 are 1911.35 and 1488 respectively, the travel cost and travel experience value of travel path 2 are 1919.79 and 1687 respectively, and the travel cost and travel experience value of travel path 3 are 1855.71 and 1569 respectively;

[0180] Step 5-4, repeat steps 5-1 to 5-3 until the 2-opt local search strategy is executed for each ant in each ant team;

[0181] The scenic spot insertion local optimization strategy specifically includes the following steps:

[0182] Step 5-5, each ant in the ant team h follows the budget constraint and the tourist attraction taboo table tabu h Get the set of tourist attractions that each ant can visit, calculate the travel experience value of each ant in ant team h, and sort the tourist attractions in the set of tourist attractions that each ant can visit according to the travel experience value; in this example, the travel experience values ​​of the three ants in ant team 1 are 1488, 1687, and 1569 respectively;

[0183] Step 5-6, select ant k with the minimum travel experience value in ant team h to perform point insertion operation on the travel path; in this example, ant 1 in ant team 1 has the smallest travel experience value, so the point insertion operation is performed on ant 1 first; according to the travel experience value from high to low, the tourist attraction s to be inserted is taken from the accessible tourist attractions set, and s is set to be inserted into any two adjacent tourist attractions i and j on the travel path constructed by ant k, and the resulting increase in travel cost is calculated. The calculation formula is as follows:

[0184] ,

[0185] in, represents the travel expenses between tourist attractions i and s; ticket_fee represents the travel fee between tourist attractions s and j; s represents the ticket fee of tourist attraction s; It represents the increase in travel cost caused by inserting tourist attraction s between adjacent tourist attractions i and j in the travel path.

[0186] Step 5-7, traverse all tourist attractions in the travel path constructed by ant k, find the two adjacent tourist attractions corresponding to the minimum travel cost increase that meets the budget constraint, and insert the tourist attraction to be inserted between the two adjacent tourist attractions; in this example, the two adjacent tourist attractions corresponding to the minimum travel cost increase that meets the budget constraint found by ant 1 in the first traversal operation are 130 and 72, and the tourist attraction to be inserted is 84; after executing the first point insertion operation, solution1 = {[0, 28, 142, 138, 133, 130, 84, 72, 35, 86, 20, 27, 120, 128,71, 100, 132, 101, 135, 55, 149, 57, 140, 145, 125, 0], [0, 108, 67, 105,143, 40, 89, 8, 49, 63, 0]};

[0187] Update the travel cost and travel experience value of the travel path constructed by ant k. The calculation formula is as follows:

[0188] ,

[0189] .

[0190] Among them, Δincrease_expense min Indicates the minimum increase in travel cost found by this traversal operation; scene_score s Indicates the tourism experience value of tourist attraction s; in this example, the original travel cost of ant 1 is 1911.35, the original tourism experience value is 1488, and the tourism experience value of tourist attraction 84 is increased by scene_score 84 = 77, the minimum travel cost increase found by the first traversal operation is 87.44, so the updated travel cost is 1998.79 and the travel experience value is 1565.

[0191] , 135, 55, 149, 57, 140, 145, 125, 0], [0, 108, 67, 105, 42,143, 118, 26, 124, 66, 65, 4, 19, 134, 16, 94, 111, ]; 2. Step 5-8: Repeat steps 5-5 to 5-7 until all ants in ant team h can no longer insert unvisited tourist attractions into the constructed travel path; in this example, after optimization of the local optimization strategy for inserting tourist attractions, solution1 = {[0, 28, 142, 138, 133, 130, 84, 72, 35, 86, 20, 27, 120, 128,71, 100, 132, 101, 135, 55, 149, 57, 140, 145, 125, 0], 2. Step 5-8: Repeat steps 5-5 to 5-7 until all ants in ant team h can no longer insert unvisited tourist attractions into the constructed travel path; in this example, after optimization of the local optimization strategy for inserting tourist attractions, solution1 = {[0, 28, 142 40, 89, 8, 49, 99, 63, 0]}; e.g. Figure 5 The example of the present invention shown is a first multi-passenger travel path planning scheme route map after optimization by using the local optimization strategy of scenic spot insertion, which includes newly inserted tourist attractions (triangles), travel paths 1, ant 2 and ant 3 respectively optimized by the local optimization strategy of scenic spot insertion, and each travel path has two attributes, which are represented by a binary group (travel cost, travel experience value), that is, the travel cost and travel experience value of travel path 1 are 1998.79 and 1565 respectively, the travel cost and travel experience value of travel path 2 are 1990.40 and 1742 respectively, and the travel cost and travel experience value of travel path 3 are 1998.21 and 1661 respectively;

[0192] Step 5-9, repeat steps 5-5 to 5-8 until the local optimization strategy of scenic spot insertion is executed for each ant in all ant teams;

[0193] Step 6, the implementation steps of updating the global optimal multi-passenger travel path planning scheme gbest include:

[0194] First, the fitness values ​​of the 10 ant teams are calculated through the fitness value function. Then, the multi-passenger travel path planning scheme with the largest current fitness value is marked as current_best. f(gbest) represents the fitness value of the global optimal multi-passenger travel path planning scheme. f(current_best) represents the fitness value of the multi-passenger travel path planning scheme with the largest current fitness value. When f(gbest) < f(current_best), the global optimal solution gbest is replaced by the current best multi-passenger travel path planning scheme current_best; when f(gbest) ≥ f(current_best), the global optimal solution gbest remains unchanged; in this example, according to the fitness value function, the fitness values ​​of the 10 multi-passenger travel path planning solutions are 0.2066, 0.2102, 0.2075, 0.2145, 0.2156, 0.2199, 0.2238, 0.2187, 0.2152, and 0.2234, respectively. It can be seen that solution 7 has the largest fitness value, which is marked as current_best. 8, 42, 8, 97, 143, 118,26, 124, 65, 4, 66, 16, 94, 18, 38, 84, 79, 134, 6, 4, 0, 4, 6, 2, 3, 4, 7, 113, 104, 24, 106, 90, 49, 63, 113,1, 130, 105, 28, 93, 0], [0, 108, 67, 142, 138, 133, 89, 42, 8, 97, 143, 118,26, 124, 65, 4, 66, 16, 94, 18, 38, 84, 79, 134, 6, 40, 54, 0]};

[0195] Call the global pheromone update to update the pheromone concentration of the edge of the global optimal multi-passenger travel path planning solution; the global pheromone update means that only the ant team that has constructed the optimal multi-passenger travel path planning solution is allowed to release and update pheromones after each iteration. The pheromone update formula is:

[0196] ,

[0197] ,

[0198] in represents the edge e of the travel path in the global optimal multi-passenger travel path planning solution ij The pheromone released on the surface; Q2 represents the fitness value control coefficient, and the present invention sets Q2=0.001; in this example, when , , update the pheromone concentrations on the three travel paths in gbest in turn.

[0199] Step 7: Repeat steps 4 to 6 until the iteration termination condition is met.

[0200] 40, 111, 99, 141, 74, 21, 11, 32, 45, 91, 98, 60, 77, 150, 86, 33, 52, 78, 96, 101, 121, 132, 43, 115, 120, 57,140, ​​61, 0], [0, 93, 47, 113, 72, 36, 104, 111, 99, 141, 74, 21, 11, 32, 45, 91, 98, 60, 77, 150, 86, 33, 52, 78, 96, 101, 121, 132, 43, 115, 120, 57,140, ​​61, 0], 2. , 149, 55, 87, 145, 125, 0], [0, 28, 130, 1, 63, 84,38, 24, 18, 94, 16, 79, 106, 134, 4, 65, 66, 124, 26, 118, 143, 8, 89, 138,133, 142, 0]}, its fitness value is 0.2280; Figure 6 The example of the present invention shown in the figure finally outputs the global optimal multi-passenger travel path planning solution route map, which includes travel path 1, travel path 2 and travel path 3 finally constructed by ant 1, ant 2 and ant 3 respectively, and each travel path has two attributes, which are represented by a tuple (travel cost, travel experience value), that is, the travel cost and travel experience value of travel path 1 are 1991.05 and 1729 respectively, the travel cost and travel experience value of travel path 2 are 1999.59 and 1727 respectively, and the travel cost and travel experience value of travel path 3 are 1997.20 and 1736 respectively.

[0201] The travel path planning schemes obtained by the multi-passenger travel path planning method based on the ant colony system are all feasible route solutions that meet the budget cost constraints, and there is no intersection within the route of each passenger. Thanks to the pre-selection strategy of tourist attractions, the travel experience value among each passenger is relatively balanced.

[0202] The present invention provides a multi-passenger travel path planning method based on an ant colony system. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.

Claims

1. A multi-passenger travel path planning method based on ant colony system, characterized in that: The following steps are involved: Step 1, obtaining tourist attraction data and passenger data; Step 2: construct a multi-passenger travel path planning model that integrates passenger budget funds, travel expenses between tourist attractions, ticket fees for tourist attractions, and tourist experience values ​​of tourist attractions, establish an optimization objective function that maximizes the minimum tourist experience value among multiple passengers, and evaluate the quality of multi-passenger travel path planning solutions; Step 3, according to the geographical location of tourist attractions, calculate the travel cost matrix between tourist attractions, use the greedy algorithm to build a greedy multi-travel path planning scheme, and initialize the pheromone matrix; Step 4: Maintain an ant team and construct a multi-passenger travel path planning scheme. Each ant in the ant team constructs a travel path based on the tourist attraction pre-selection strategy; Step 5: Use the 2-opt local search strategy to optimize the visit sequence of the travel path constructed by each ant in each ant team to reduce the travel cost; then use the scenic spot insertion local optimization strategy to insert new tourist attractions into the travel path constructed by each ant in each ant team to maximize the travel experience value of each travel path; Step 6: Evaluate the multi-passenger travel path planning scheme constructed by each ant team and update the global optimal multi-passenger travel path planning scheme; Call global pheromone update to update the pheromone concentration of the edges belonging to the global optimal multi-passenger travel path planning solution; Step 7, repeat steps 4 to 6 until the iteration termination condition is met; Step 8: Output the final global optimal multi-passenger travel path planning solution; Step 3 includes: initializing the ant colony system parameters, including the number of ant teams NP, pheromone control parameter α, heuristic information control parameter β, local pheromone evaporation rate ξ, global pheromone evaporation rate ρ, development probability q0 and fitness value evaluation times Max_FV; The travel expense matrix is ​​an n×n two-dimensional matrix DF=[df ij ] n×n , the travel cost calculation formula between two tourist attractions i, j is: Among them, (x j ,y j ) represents the spatial coordinates of tourist attraction j; unit_fee represents the travel fee per unit distance; Then follow these steps: Step 3-1, initialize an ant team, including m ants; Step 3-2: All ants in the ant team start from the designated passenger starting point, select accessible tourist attractions that meet the budget constraint based on the heuristic information between tourist attractions, and start to build a greedy travel path planning scheme; the ant team initializes an empty tourist attraction taboo table and initializes the travel experience value of each ant to 0; Step 3-3, each ant in the ant team obtains its own accessible tourist attraction set candidates according to the budget constraint and the tourist attraction taboo table k , and then each ant selects from its own set of accessible tourist attractions candidates k Pre-selected tourist attractions with their respective current k Tourist attractions with maximum heuristic information j k ; Then, set each ant's pre-selected tourist attractions to be added to their constructed travel paths, and calculate each ant's future travel experience value; Step 3-4, select the ant K with the smallest future travel experience value to build a path; if there are more than two ants with the same minimum future travel experience value, select the ant K with the largest heuristic information between the current tourist attraction and the pre-selected tourist attraction to build a path; add the tourist attraction pre-selected by ant K to the constructed travel path, add the taboo table at the same time, and update the corresponding travel cost and travel experience value; Step 3-5, repeat steps 3-3 to 3-4 until each ant in the ant team can no longer choose a tourist attraction, thus obtaining a greedy multi-passenger travel path planning solution; Step 3-6, use the minimum travel experience value of the passenger and the total travel experience value of the tourist attractions in the greedy multi-passenger travel path planning scheme to assign the initial value of the pheromone τ0, and then initialize the pheromone in the pheromone matrix to τ0; In step 3-2, the heuristic information is generated based on the tourist experience value of the scenic spot, the travel fee between the scenic spots and the ticket fee of the scenic spot. The heuristic information η between two tourist spots i and j is ij The calculation formula is: Among them, ticket_fee i represents the ticket price of tourist attraction i; In step 3-3, the future travel experience value of ant k, future_score, is calculated using the following formula: k : in, Indicates that ant k pre-selects tourist attraction j k tourism experience value; In step 3-4, the ant K for constructing the travel path is selected according to the following formula, that is, the ant with the smallest future travel experience value is selected to construct the travel path: If the value of K is not unique, that is, there are more than two ants with the same minimum future travel experience value, the numbers of the ants with the same minimum future travel experience value are stored in the pending set, and K is set to an empty set. Reselect according to the following formula, that is, select the ant with the maximum heuristic information between the current tourist attraction and the pre-selected tourist attraction from the ants with the same minimum future travel experience value to construct the path: in, Indicates the tourist attraction i where ant k is currently located k and other pre-selected tourist attractions k Heuristic information between Use the following formula to update the corresponding travel cost and tourism experience value: Among them, tour_expense K represents the travel cost of the travel path constructed by ant K; Indicates the tourist attraction i where ant K is currently located K And Ant K pre-selected tourist attractions K travel expenses between Indicates tourist attractions K Ticket price; tour_score K represents the travel experience value of the travel path constructed by ant K; Indicates tourist attractions K tourism experience value; In step 3-6, the greedy multi-passenger travel path planning scheme is used to assign the initial value of pheromone τ0, and the calculation formula is: Among them, greedy_score min represents the minimum travel experience value in the greedy multi-passenger travel path planning scheme; Q1 represents the control coefficient; the pheromone matrix is ​​an n×n two-dimensional matrix PM=[τ ij ] n×n , τ ij represents the pheromone concentration between tourist attractions i and j. At the beginning of the algorithm, τ ij =τ0.

2. The method according to claim 1, characterized in that In step 1, the tourist attraction data includes: the number of tourist attractions n, the number of tourist attractions i, the coordinates of the tourist attractions (x i ,y i ), the tourism experience value scene_score of tourist attraction i i Ticket fees for tourist attractions i ; where 1≤i≤n, x i ,y i Respectively represent the horizontal and vertical coordinates of tourist attraction i; The passenger data includes the number of passengers m, the passenger number k, the coordinates of the passenger's starting point (x0, y0), and the passenger's budget budget; wherein x0 and y0 represent the horizontal and vertical coordinates of the passenger's starting point, respectively, and 1≤k≤m.

3. The method according to claim 2, characterized in that Step 2 includes: given n tourist attractions, m tourists and a tourist starting point coordinate (x0, y0), the tourist attraction map is described as a completely undirected graph G = (V, E), where V = {i, |0≤i≤n} represents the attraction set, including tourist attractions and tourist starting points, and each tourist attraction includes two attributes: the tourist attraction ticket fee and the tourist attraction travel experience value, and E = {e ij ,|i,j∈V} is the edge set between all attractions, and each tourist attraction is set to be visited by only one tourist; m tourists start from the starting point and build a travel path that satisfies the budget constraint and returns to the starting point. The optimization goal is to find m travel paths that maximize the travel experience value of the minimum tourist among the m tourists. Each travel path tour_route k is a sequence of attractions, and the sequence starts with the passenger starting point and ends with the passenger starting point; the specific mathematical definition is: maxtour_score min , tour_score min =min{tour_score k |1≤k≤m}, Among them, max means taking the maximum value; min means taking the minimum value; tour_score min Indicates the minimum travel experience value among m passengers; tour_score k Indicates the travel experience value of passenger k; tour_route k represents the travel path of passenger k; scene_score i Indicates the tourism experience value of tourist attraction i; tour_expense k represents the travel cost of passenger k; df ij ticket_fee represents the travel fee between tourist attractions i and j; j represents the ticket price of tourist attraction j; budget represents the budget of the traveler.

4. The method according to claim 3, characterized in that: Step 4 includes: Step 4-1, maintain NP ant teams, each team contains m ants; Step 4-2: All ants in ant team h start from the designated passenger starting point, select accessible tourist attractions that meet the budget constraint based on the pheromone concentration and heuristic information between tourist attractions, and start to build a travel path planning plan; ant team h initializes an empty tourist attraction taboo table and initializes the travel experience value of each ant to 0; Step 4-3, each ant in the ant team h first obtains its own set of accessible tourist attractions according to the budget constraint and the tourist attraction taboo table, and then pre-selects the next tourist attraction from its set of accessible tourist attractions according to the state transition equation; Step 4-4, setting each ant's pre-selected tourist attractions to be added to the travel path constructed by each ant, and calculating the future travel experience value of each ant; Step 4-5, select ant K with the minimum future travel experience value in ant team h to construct a travel path; if there are more than two ants with the same minimum future travel experience value, select ant K with the maximum heuristic information between the current tourist attraction and the pre-selected tourist attraction to construct a travel path; add the tourist attractions pre-selected by ant K to the constructed travel path, add the tourist attraction taboo table of ant team h, and update the corresponding travel cost and travel experience value; call local pheromone update to instantly update the pheromone on the edge that the ant is currently passing through; Step 4-6, repeat steps 4-3 to 4-5 until each ant in the ant team h can no longer select a tourist attraction, thereby obtaining a multi-passenger travel path planning solution; Step 4-7, repeat steps 4-2 to 4-6 until all ant teams have built multi-passenger travel path planning solutions.

5. The method according to claim 4, characterized in that In step 4-3, an ant team maintains a taboo table of tourist attractions, which records the tourist attractions that have been visited and is shared by m ants. Before each ant k selects the next tourist attraction, it first obtains the set of candidates for the tourist attractions that it can visit based on the budget constraint and the taboo table of tourist attractions. k , and then select candidates from the set of accessible tourist attractions according to the following state transition equation k Pre-select your next tourist attraction k : Among them, τ ikl , η ikl They represent the tourist attraction i where ant k is currently located. k α represents the pheromone concentration and heuristic information between the first and the next tourist attraction l; α represents the pheromone control parameter; β represents the heuristic information control parameter; q represents a random number uniformly distributed in the interval [0,1]; q0 is the development probability, indicating that the ant will visit the tourist attraction with the strongest pheromone concentration and heuristic information with a probability of q0, and explore each edge with a biased probability of (1-q0); J is a random tourist attraction selected by the roulette wheel selection algorithm according to the probability distribution given by the following formula: in, Indicates that ant k is from the current tourist attraction i k Visit the set of candidates for accessible tourist attractions k The probability of visiting tourist attraction j in; r represents a random number uniformly distributed in the interval [0,1]; |candidates k | indicates candidates k Total number of tourist attractions in Indicates the set of tourist attractions that can be visited from ant k in sequence k The sum of the probabilities of the first tourist attraction to the jth tourist attraction.

6. The method according to claim 5, characterized in that In step 5, the 2-opt local search strategy includes the following steps: Step 5-1, set any two tourist attractions and the attraction sequence between the two tourist attractions in the travel path constructed by ant k in ant team h, and calculate the reduction in travel cost; Step 5-2, traverse all tourist attractions in the travel path constructed by ant k, find the two tourist attractions corresponding to the maximum travel cost reduction, swap the two tourist attractions and the scenic spot sequence between the two tourist attractions in the travel path; update the travel cost of the travel path constructed by ant k; Step 5-3, repeating steps 5-1 and 5-2 until swapping any two tourist attractions in the travel path constructed by ant k and the sequence of attractions between two tourist attractions will not reduce the travel cost; Step 5-4, repeat steps 5-1 to 5-3 until the 2-opt local search strategy is executed for each ant in each ant team; In step 5-1, the previous attraction of tourist attraction i in the travel path is set to t, and the next attraction of tourist attraction j is set to l. The calculation formula for the reduction in travel cost is: Δreduce_expense ij =df ti +df jl -df tj -df il , Among them, Δreduce_expense ij represents the reduction in travel cost caused by swapping the tourist attractions i, j and the sequence of tourist attractions i, j in the travel route; df ti represents the travel expenses between tourist attractions t,i; df jl represents the travel expenses between tourist attractions j and l; df tj represents the travel expenses between tourist attractions t and j; df il represents the travel expenses between tourist attractions i and l; In step 5-2, all tourist attractions in the travel path constructed by ant k are traversed to find the two tourist attractions i and j corresponding to the maximum travel cost reduction, and the two tourist attractions and the attractions between the two tourist attractions in the travel path are swapped; Then, the travel cost of the travel path constructed by ant k is updated, and the calculation formula is as follows: tour_expense k =tour_expense k -Δreduce_expense max , Among them, Δreduce_expense max Indicates the maximum travel cost reduction found by this traversal operation; The scenic spot insertion local optimization strategy specifically includes the following steps: Step 5-5, each ant in the ant team h obtains its own accessible tourist attraction set according to the budget constraint and the tourist attraction taboo table, calculates the travel experience value of each ant in the ant team h, and sorts the tourist attractions in its own accessible tourist attraction set according to the travel experience value; Step 5-6, select ant k with the minimum travel experience value in ant team h to perform point insertion operation on the travel path; select tourist attraction s to be inserted from the accessible tourist attractions set according to the travel experience value from high to low, set s to be inserted into any two adjacent tourist attractions i, j on the travel path constructed by ant k, and calculate the increase in travel cost caused by this; Step 5-7, traverse all tourist attractions in the travel path constructed by ant k, find two adjacent tourist attractions corresponding to the minimum travel cost increase that meets the budget constraint, insert the tourist attraction to be inserted between the two tourist attractions; update the travel cost and travel experience value of the travel path constructed by ant k; Step 5-8, repeat steps 5-5 to 5-7 until all ants in the ant team h can no longer insert unvisited tourist attractions into the constructed travel path; Step 5-9, repeat step 5-5 to step 5-8 until the local optimization strategy of scenic spot insertion is executed for each ant in each ant team; After executing the 2-opt local search strategy for the travel path of each passenger in each ant team, the scenic spot insertion local optimization strategy is executed. The specific implementation steps are as follows: In step 5-6, the increase in tourism cost is calculated using the following formula: Δincrease_expense ij =df is +df sj +ticket_fee s -df ij Among them, df is represents the travel expenses between tourist attractions i and s; df sj ticket_fee represents the travel fee between tourist attractions s and j; s Indicates the ticket fee for tourist attraction s; Δincrease_expense ij It represents the increase in travel cost caused by inserting tourist attraction s between adjacent tourist attractions i and j in the travel path; In steps 5-7, the travel cost and travel experience value of the travel path constructed by ant k are updated using the following formula: tour_expense k =tour_expense k +Δincrease_expense min , tour_score k =tour_score k +scene_score s , Among them, Δincrease_expense min Indicates the minimum increase in travel cost found by this traversal operation; scene_score s Represents the tourism experience value of tourist attraction s.

7. The method according to claim 6, characterized in that In step 6, the global optimal multi-passenger travel path planning scheme adopts the following fitness value function: tour_score min =min{tour_score k |1≤k≤m}, Among them, f(solution h ) represents the fitness value of the multi-passenger travel path planning scheme constructed by the ant team h; the implementation steps of updating the global optimal multi-passenger travel path planning scheme gbest include: First, calculate the fitness values of NP ant teams through the fitness value function. Then, mark the multi-passenger travel route planning scheme with the largest current fitness value as current_best. The calculation formula is as follows: f(gbest) represents the fitness value of the globally optimal multi-passenger travel route planning scheme, and f(current_best) represents the fitness value of the multi-passenger travel route planning scheme with the largest current fitness value. When f(gbest) < f(current_best), replace the globally optimal solution gbest with the current best multi-passenger travel route planning scheme current_best; when f(gbest) ≥ f(current_best), the globally optimal solution gbest remains unchanged.

8. The method according to claim 7, characterized in that In step 4-5, the local pheromone update occurs during the travel path construction process. Every time the ant passes an edge e ij , will immediately update the edge e ij The pheromone update formula is as follows: t ij =(1-ξ)τ ij +ξτ0, Among them, ξ represents the local pheromone evaporation rate; In step 6, the global pheromone update means that only the ant team that constructs the optimal multi-passenger travel route planning scheme is allowed to release and update the pheromone after each iteration. The pheromone update formula is as follows: Where ρ represents the global pheromone evaporation rate; Δτ ij gbest represents the edge e of the travel path in the global optimal multi-passenger travel path planning solution ij The pheromone released on the surface; Q2 represents the fitness value control coefficient.

Citation Information

Patent Citations

  • Multi-path planning method and system

    CN111238481A

  • Multi-travel itinerary planning method based on density ant colony algorithm and intelligent system

    CN118134221A