CN111523059A - Personalized tour route recommendation method based on improved leapfrog algorithm - Google Patents

Personalized tour route recommendation method based on improved leapfrog algorithm Download PDF

Info

Publication number
CN111523059A
CN111523059A CN202010319466.3A CN202010319466A CN111523059A CN 111523059 A CN111523059 A CN 111523059A CN 202010319466 A CN202010319466 A CN 202010319466A CN 111523059 A CN111523059 A CN 111523059A
Authority
CN
China
Prior art keywords
algorithm
solution
new
population
fitness
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010319466.3A
Other languages
Chinese (zh)
Other versions
CN111523059B (en
Inventor
申晓宁
吴俊潮
王森林
仇友辉
张磊
李常峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Information Science and Technology
Original Assignee
Nanjing University of Information Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Information Science and Technology filed Critical Nanjing University of Information Science and Technology
Priority to CN202010319466.3A priority Critical patent/CN111523059B/en
Publication of CN111523059A publication Critical patent/CN111523059A/en
Application granted granted Critical
Publication of CN111523059B publication Critical patent/CN111523059B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/14Travel agencies
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Remote Sensing (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses an improved frog leap algorithm-based personalized tour route recommendation method, which comprises the following steps: (1) reading data and personalized parameters required by the model, and determining an optimization target and constraint conditions; (2) data preprocessing and algorithm parameter initialization; (3) randomly generating an initial population and calculating the fitness of the initial population; (4) judging whether population expansion is carried out or not; (5) sorting and grouping all individuals in a descending order according to fitness; (6) updating the population; (7) mixing the families and recording an optimal solution; (8) and judging whether the algorithm reaches a termination condition. The method has the characteristics of strong searching capability and accurate obtained result.

Description

Personalized tour route recommendation method based on improved leapfrog algorithm
Technical Field
The invention relates to a personalized tour route recommendation method based on an improved frog leaping algorithm.
Background
The path planning problem is a common and complex problem in daily life, and has wide application in many fields. The applications in the high and new technology field are as follows: the unmanned aerial vehicle has the advantages of obstacle avoidance and sudden prevention flight, cruise missile avoidance and radar search, autonomous collision-free action of the robot, anti-missile attack prevention and the like. The application in the daily life field is as follows: GPS navigation, road planning based on a GIS system, urban road network planning navigation and the like. Basically, any planning problem that can be converted into a dotted line network can be solved by a path planning method. The path planning problem is actually one of the combinatorial optimization problems.
To better solve the combinatorial optimization problem, an intelligent optimization algorithm of bionics, namely a mixed frog leap algorithm (SFLA), was proposed by Eusuff and Lansey in 2003. The idea of the frog leap algorithm is to simulate foraging behavior of a frog colony, and for a large number of widely distributed foraging points, the frog searches for different foraging points in groups. The frogs in each group exchange information of the foraging points to perform local search in the group. When the local search of each group is carried out to a certain degree, all the frogs are mixed together again to exchange information, and then are grouped again, and the actions are repeated until the optimal foraging route appears.
The following disadvantages exist in the route planning method: the hardware resource consumption is large, the running time is poor, the local optimization is easy to happen, and the solving precision is low.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a personalized tour route recommendation method based on an improved frog leaping algorithm.
The technical scheme is as follows: the invention provides an improved frog leap algorithm-based personalized tour route recommendation method, which comprises the following steps:
(1) reading data and personalized parameters required by the model, and determining an optimization target and constraint conditions;
(2) data preprocessing and algorithm parameter initialization;
(3) randomly generating an initial population and calculating the fitness of the initial population;
(4) judging whether population expansion is carried out or not;
(5) sorting and grouping all individuals in a descending order according to fitness;
(6) updating the population;
(7) mixing the families and recording an optimal solution;
(8) and judging whether the algorithm reaches a termination condition.
Further, the data required by the step (1) model comprises the positions of all local candidate sights and hotels, the number of candidate sights and hotels, the average consumption of time and money during the playing process, the time and transportation cost consumed during the traveling, and the lodging cost of the hotels; the personalized parameters comprise the number of travel days, the number of scene points played each day, travel preference, priority level and travel starting period; optimization objectives include minimum daily play time, minimum average monetary consumption during play; the constraint condition is that a hotel is selected as a fixed starting point for multiple daily trips or a daily trip, each scenic spot plays once at most and returns to the starting point on the same day;
the location of the view and hotel is represented in coordinates in a planar rectangular coordinate system with known latitude and longitude,
Figure BDA0002459072770000021
Figure BDA0002459072770000022
wherein S is a candidate scene point set, and the number of candidate scene points is ns; h is a candidate hotel set, and the number of candidate hotels is nh; the time spent, money spent playing at each attraction, the cost of candidate hotels in vector form,
Pm=[pm1,pm2,pm3,......,pmns]
Pt=[pt1,pt2,pt3,......,ptns]
Ph=[ph1,ph2,ph,......,phnh]
wherein Pm is the average playing cost of the candidate scenic spots, Pt is the playing time of the candidate scenic spots, and Ph is the unit price of the candidate hotels;
according to the constraint conditions, in the case of selecting a hotel as the starting point, the travel traffic cost and time-consuming interaction data between the hotel and the scenic spot are expressed in the form of matrixes mcost and tcost, and
size(mcost)=size(tcost)=(1+ns)×(1+ns)×4
that is, the dimensions of mcost and tcost are (1+ ns) × (4), and mcost (i, j, k) represents the traffic cost of the ith place for the jth place in the kth traffic mode; tcost (i, j, k) represents travel time from the ith location to the jth location in the kth transportation mode; where i, j ∈ {1, 2, 3...., ns +1}, and k ∈ {1, 2, 3, 4}, provided that: the number of the selected hotel is 1, and the sequence from the 2 nd to the ns +1 st is consistent with the sequence of the candidate sight numbers in the S; when k is 1, 2, 3, 4, it corresponds to bus, subway, driving, walking, obviously mcost (i, j, 4) is 0;
the personalization parameters include the number of travel days t _ days, the number of daily play spots t _ pnum, the travel preference t _ type, the priority level t _ sup, and the travel start period t _ date.
Further, the data preprocessing and algorithm parameter initialization method in the step (2) includes performing integer coding on all candidate scenic spots, hotels and traffic ways according to a fixed sequence, setting global mixed iteration times G, setting the current iteration times G to be 1, the number of initial ethnic groups M, the number of individuals in the initial groups I, the number of individuals in the initial groups M × I and the number of updating times N of the initial ethnic groups, and setting the population size expansion threshold T to be fth× G, wherein fthFor adjustment factors for the accuracy of the result, the currently selected hotel number h is 1 and the number of candidate hotels is nh.
Further, the step (3) randomly generates an initial population, and calculates the fitness thereof by a method comprising: m × I individuals are randomly generated, representing the route in the form of decimal integer vectors:
Figure BDA0002459072770000031
wherein route (d) represents route d day, pi(i-1, 2, 3.. t _ pnum +1) denotes the number of the ith location in the route, and the number specifying the hotel is p1And t _ pnum is the number of the sightseeing spots,
the selection of the transportation modes is numbered in the same way, and the selection of the transportation modes during travel is represented by decimal integer vectors:
Figure BDA0002459072770000032
wherein Pb (d) represents the mode of transportation adopted on day d, pbi(i ═ 1, 2, 3.. t _ pnum +1) denotes the number of the transportation means used to go from the ith location to the (i +1) th location, and the individual starting from the hotel with number h denotes:
Xh={Route,Pb}
calculating a target value for each individual:
f(Xh)=Con(Route)+con(Pb)
if time is the optimization goal, then con (route) and con (Pb) represent the time the attraction plays and the time spent on the road, respectively; if the cost is taken as the optimization target, con (route) and con (Pb) respectively represent the attraction play cost and the road cost; by selecting time or money saving, and using the consumption of time or money as the target value of each individual, the fitness of each individual is,
Figure BDA0002459072770000033
the smaller the target value, the higher the individual fitness.
Further, the step (4) is a method for judging whether population expansion is performed or not: judging whether the current iteration times g are equal to a selected threshold value T or not, if so, increasing the size of the ethnic group, and adding a group of random solutions equal to the number of the original ethnic group on the basis of the original ethnic group; the number of clusters after population size expansion becomes M '2M, the number of individuals in a cluster becomes I' 2I, the number of individuals in the initial population becomes (M × I) '2M × 2I, and the number of updates of the initial population becomes N' 2N.
Further, a population size expansion threshold value T-f is added on the basis of population expansion judgmentth× G, wherein fthWhen the iteration times do not reach T, the algorithm result is not converged to an optimal value, and common search is used at the moment; when the iteration times exceed T, the algorithm is about to converge, the search range is expanded, the omission of the optimal solution is reduced, the result accuracy is improved, and T is selected by an adjusting factor fthAnd (4) determining.
Further, the step (5) performs descending order sorting and grouping on all individuals according to fitness: and dividing the sequenced population into M clans, dividing each clan into I individuals, and distributing each individual to each clan according to a grouping rule of the mixed frog leaping algorithm.
Further, the step (6) is a method for updating a population: extracting the worst solution X _ w in each group according to the grouping resultkAnd the optimal solution X _ bk(k is 1, 2, 3 … … M), local search is performed N times for each group interior, and a new solution X _ new is obtained for each local searchkCalculating the fitness of the abnormal solution and judging whether the abnormal solution is the abnormal solution or not, if the abnormal solution is the abnormal solution, greatly reducing the fitness of the abnormal solution by adding a penalty factor, and finally determining the acceptance or rejection of a new solution by using an improved screening rule;
the abnormal solution is generated by the fact that scenic spot repetition occurs in a new solution generated during updating of a group, route intersection occurs in route planning of multiple daily trips, and the route does not meet the travel preference; immediately judging whether each random individual is an abnormal solution or not after generating each random individual, if so, replacing a target value with a penalty factor Delta C with a large enough value,
f(Xh)=ΔC
Figure BDA0002459072770000041
under the condition that the penalty factor delta C is large enough, the fitness of the abnormal individuals is reduced, so that the abnormal individuals are eliminated in the updating of the ethnic group;
the improved screening rule is as follows:
the improved screening rule in the step (6) is that a judgment condition is added on the basis of basic mixed frog leap, after jumping is carried out by taking the difference between the global optimal solution and the local worst solution as the maximum step length, if the difference is larger than the maximum step length, the judgment condition is that the judgment condition is not changed, and the judgment condition is that the judgment condition is changed to the judgment condition
||Xnew-Xwk||<
A new random solution is generated to replace the original XwkOtherwise, the original X is retainedwk. Wherein is a threshold value that is self-selected according to model and requirements.
The population update is realized by the following steps:
(a) group update counter i is 1;
(b) the group number k is l;
(c) calculating the maximum step size stepmax=X_bk-X_wk
(d) Generating a random number lambda of 0-1;
(e) updating X _ new to worst solutionk=X_wk+λstepmaxAnd for X _ newkCarrying out rounding operation;
(f) calculating a new solution fitness F (X _ new)k);
(g) If F (X _ new)k)>F(X_wk) Then let X _ wk=X_newkGo (m); otherwise, turning to (h);
(h) calculating a new maximum jump step size
Figure BDA0002459072770000051
(i) Generating a random number lambda' of 0-1;
(j) second updating the worst solution
Figure BDA0002459072770000052
And for X _ newkCarrying out rounding operation;
(k) if F (X _ new)k)>F(X-wk) Then let X _ wk=X_newkGo (m); otherwise, turning to (l);
(l) If it is
Figure BDA0002459072770000053
Or
Figure BDA0002459072770000054
Figure BDA0002459072770000055
Then X _ w is reservedkOtherwise, generating a new solution to replace the original X _ wk
(M) k ═ k +1, if k ≦ M to (c) otherwise to (n);
(N) i +1 if i ≦ N rotations (b), otherwise the algorithm terminates;
further, the method for recording the optimal solution by group mixing in the step (7) comprises the following steps: after updating of the population groups, mixing the individuals of all the population groups, sorting and selecting the current optimal solution, comparing the current optimal solution with the current global optimal solution, selecting a new global optimal solution according to a principle of high-out and low-out, and recording the new global optimal solution as the current global optimal solution
Figure BDA0002459072770000057
Obtained
Figure BDA0002459072770000058
I.e. a globally optimal solution starting from the hotel numbered h.
Further, the step (8) is a method for judging whether the algorithm reaches the termination condition:
if G is less than G and h is less than nh, returning to the step (4); if G is larger than or equal to G and h is smaller than nh, h is h +1, and the step (3) is returned; if G is larger than or equal to G and h is larger than or equal to nh, the algorithm is stopped to output the global optimal solution Xbest
Figure BDA0002459072770000056
The invention relates to a method for playing a plurality of scenic spots, which is characterized in that under the premise that a certain hotel is selected as a starting point, a specified number of scenic spots are played from the starting point and finally the starting point is returned, and the constraint condition is that all the scenic spots are played at most once during the travel period. The method of the invention considers the problems of money loss and time loss rather than point-to-point distance. The invention improves the original frog leaping algorithm, and the basic steps are as follows: reading local tourist attraction data and inputting personalized tourist parameters; preprocessing the data of the scenic spots, and initializing input parameters; judging whether the iteration times exceed a selected threshold, if so, increasing the size of the population, and carrying out more detailed search on the population, and if not, carrying out ordinary search on the population; randomly generating a population, and calculating the fitness of all individuals; sorting all the individual fitness degrees in a descending order, and grouping the population according to a grouping rule of a mixed frog-leaping algorithm; local search is carried out according to grouping results, the fitness of abnormal solutions is greatly reduced by adding penalty factors, and an improved screening scheme is adopted to update the ethnic group; after updating of the population group is finished, mixing the optimal solution, comparing the optimal solution with the current global optimal solution, and if the optimal solution is superior to the current global optimal solution, replacing; and judging whether the iteration times meet a termination condition, if so, terminating the algorithm and outputting the current global optimal solution. Otherwise, returning.
Has the advantages that: the invention changes the demarcation point T of the ordinary search and the fine search by setting an adjusting factor fth. The search range is not expanded until the algorithm is close to the end, so that the risk of missing more optimal solutions is reduced, and the operation time is controlled to a more objective level. In the process of generating the solution, the situations of repeated, crossed and other abnormal solutions often occur, and if the generation of the abnormal solution is stopped by adopting the forced circulation, the operation time is greatly prolonged and even the abnormal solution falls into the dead circulation. In the invention, the punishment factor Delta C is introduced to greatly reduce the fitness of the abnormal solution, so that the abnormal solution is eliminated in the updating of the ethnic group, the model is simplified, and the operation speed is improved. For the basic leapfrog algorithm, the fitness is used as a selection criterion, and after the process of generating a new solution twice is executed, if the new solution is still worse than the original solution, the original solution is discarded. Therefore, it is possible to cause old solutions with a greater potential to be rejected due to the fact that the fitness of a new solution generated is not high enough. In contrast, starting from the variation degree of the solution, the invention adds a new screening criterion: after the process of generating the new solution twice is carried out, if the new solution is still worse than the original solution, whether the original solution is reserved or not is determined according to the change degree of the old solution of the new solution. Through the operation, some solutions with larger development space, namely, larger search range can be reserved, and the risk of missing more optimal solutions is reduced.
Drawings
FIG. 1 is a schematic main flow chart of a personalized tour route recommendation method based on an improved mixed frog leaping algorithm according to the present invention;
FIG. 2 is a comparison graph of evolutionary curves obtained when the solution time is optimal for the basic mixed frog-leaping algorithm of the present invention;
FIG. 3 is a comparison graph of evolutionary curves obtained when the solution cost is optimal for the basic mixed frog-leaping algorithm of the present invention;
FIG. 4 is an optimal route planning graph obtained by solving time optimization by using a basic leapfrog algorithm and an improved leapfrog algorithm;
fig. 5 is an optimal route planning diagram obtained by solving cost optimization by adopting a basic leapfrog algorithm and an improved leapfrog algorithm.
Detailed Description
In the implementation, the scenic spots around Nanjing are taken as an example, 19 popular scenic spots are collected as candidate scenic spots, and 18 hotels are collected as candidate hotels. Data such as coordinates of each location, consumption of each sight spot, price of each hotel and the like are obtained by roughly dividing the Nanjing map. (wherein the data sources of mcost and tcost are: Gauda map, Tencent map, Nanjing subway official network).
TABLE 2 location number-coordinates (10X 10)
Figure BDA0002459072770000071
TABLE 3 scenic spot charges
Figure BDA0002459072770000072
Figure BDA0002459072770000081
Watch 4 scenic spot playing time
Figure BDA0002459072770000082
TABLE 5 Hotel price
Figure BDA0002459072770000083
Figure BDA0002459072770000091
The personalized tour route recommendation method based on the improved leapfrog algorithm provided by the invention is used for solving the planning scheme of the example, the main flow is shown in figure 1, and the specific steps are as follows:
(1) experimental data were read including coordinates of each site (table 2), money consumption of each site (table 3), time spent of each site (table 4), price of each hotel (table 5), traffic cost and time spent interactive data mcost and tcost between sites.
The set personalization parameters comprise the number of travel days t _ days ═ 3, the number of daily sights played t _ pnum ═ 3, the travel preference t _ type ═ 1(1. historical humanity, 2. natural landscape, 3. gourmet shopping), the priority level t _ sup (1. money saving, 2. time saving), the travel starting period (considering the condition that some sights will be closed).
(2) Algorithm parameter initialization
Setting global mixed iteration number G as 200, current iteration number G, initial population number M as 3, initial population number I as 6, initial population number M × I as 18, initial population updating number N as 20, population scale-up threshold T as fth× G, wherein fthFor adjustment factors for the accuracy of the results, in this experiment fth0.9. The number h of the currently selected hotel is 1, and the number nh of the candidate hotels is 18
(3) Randomly generating an initial population and calculating the fitness thereof
After fixed numbering of the sights of the data set, mxi individuals are randomly generated in a roulette manner, representing the route in the form of decimal integer vectors:
Figure BDA0002459072770000092
wherein route (d) represents route d day, pi(i-1, 2, 3.. t _ pnum +1) denotes the number of the ith location in the route, and the number specifying the hotel is p1And t _ pnum is the number of sights of play.
The selection of the transportation modes is numbered in the same way, and the selection of the transportation modes during travel is represented by decimal integer vectors:
Figure BDA0002459072770000101
wherein Pb (d) represents the mode of transportation adopted on day d, pbi( i 1, 2, 3.. t _ pnum +1) represents a number of a transportation method used for traveling from the ith location to the (i +1) th location. Individuals starting with hotel number h are represented as:
Xh={Route,Pb}
calculating a target value for each individual:
f(Xh)=ccon(Route)+con(Pb)
if time is the optimization goal, then con (route) and con (Pb) represent the time the attraction plays and the time spent on the road, respectively; if the cost is taken as the optimization target, con (route) and con (Pb) respectively represent the attraction play cost and the road cost; by selecting the time or money saving and using the time or money consumption as the target value of each individual, the fitness of each individual is
Figure BDA0002459072770000102
Obviously, the smaller the target value, the higher the individual fitness
a. With time consumption as the optimization target, with the h-th hotel as the starting point, the daily time consumption as the target value, for day d:
Figure BDA0002459072770000103
Figure BDA0002459072770000104
constraint of Route (1) ∩ Route (2) ∩days)={p1}
Through the calculation of the time consumption of each individual on the day d, the fitness of each individual on the day d can be obtained as
Figure BDA0002459072770000105
It is clear that smaller target values lead to higher individual fitness.
b. When the monetary consumption is taken as the optimization target, the average daily consumption is taken as the target value under the condition that the h-th hotel is taken as the starting point:
Figure BDA0002459072770000111
Figure BDA0002459072770000112
constraint of Route (1) ∩ Route (2) ∩days)={p1}
Through calculation of daily average consumption during playing, the fitness of each individual can be obtained as
Figure BDA0002459072770000113
It is clear that smaller target values lead to higher individual fitness.
(4) Judging whether population expansion is carried out
Judging whether the current iteration times g are equal to a selected threshold value T or not, if so, increasing the size of the ethnic group, and adding a group of random solutions equal to the number of the original ethnic group on the basis of the original ethnic group; the number of clusters after population size expansion becomes M '2M, the number of individuals in a cluster becomes I' 2I, the number of individuals in the initial population becomes (M × I) '2M × 2I, and the number of updates of the initial population becomes N' 2N.
(5) Sorting and grouping all individuals according to fitness in descending order
Dividing the sequenced population into M clans, dividing each clan into I individuals, and distributing each individual to each clan according to the grouping rule of the mixed frog leaping algorithm
(6) The improved screening rule is that a judgment condition is added on the basis of basic mixed frog leaping, after jumping by taking the difference between the global optimal solution and the local worst solution as the maximum step length, if the difference is larger than the maximum step length
||Xnew-Xwk||<
A new random solution is generated to replace the original XwkOtherwise, the original X is retainedwk. Wherein is a threshold value that is self-selected according to model and requirements.
The population update is realized by the following steps:
(a) group update counter i is 1;
(b) the group number k is 1;
(c) calculating the maximum step size stepmax=X_bk-X_wk
(d) Generating a random number lambda of 0-1;
(e) updating the worst solution
Figure BDA0002459072770000121
And for X _ newkCarrying out rounding operation;
(f) calculating a new solution fitness F (X _ new)k);
(g) If F (X _ new)k)>F(X_wk) Then let X _ wk=X_newkGo (m); otherwise, turning to (h);
(h) calculating a new maximum jump step size
Figure BDA0002459072770000122
(i) Generating a random number lambda' of 0-1;
(j) second updating the worst solution
Figure BDA0002459072770000123
And for X _ newkCarrying out rounding operation;
(k) if F (X _ new)k)>F(X_wk) Then let X _ wk=X_newkGo (m); otherwise, turning to (l);
(l) If it is
Figure BDA0002459072770000124
Or
Figure BDA0002459072770000125
Figure BDA0002459072770000126
Then X _ w is reservedkOtherwise, generating a new solution to replace the original X _ wk
(M) k ═ k +1, if k ≦ M to (c) otherwise to (n);
(N) i +1 if i ≦ N rotations (b), otherwise the algorithm terminates.
Then, step (7) is performed.
(7) Population mixing, recording optimal solution
After updating of the population groups, mixing the individuals of all the population groups, sorting and selecting the current optimal solution, comparing the current optimal solution with the current global optimal solution, selecting a new global optimal solution according to a principle of high-out and low-out, and recording the new global optimal solution as the current global optimal solution
Figure BDA0002459072770000127
Obtained at this time
Figure BDA0002459072770000128
I.e. a globally optimal solution starting from the hotel numbered h.
(8) Judging whether the algorithm reaches the termination condition
If G is less than G and h is less than nh, returning to the step (4); if G is larger than or equal to G and h is smaller than nh, h is h +1, and the step (3) is returned; if G is larger than or equal to G and h is larger than or equal to nh, the algorithm is stopped to output the global optimal solution Xbest
Figure BDA0002459072770000129
1. The experimental conditions are as follows:
matlab 2016a was used for simulation on a system with a CPU of Intel (R) core (TM) i7-7700HQ2.8GHz, 8GB memory, and WINDOWS 10.
2. The experimental contents are as follows:
for 19 popular scenic spot data around Nanjing, the travel time is 1 day, 3 scenic spots are played every day, and the historical humanity is taken as an individualized parameter to respectively perform simulation with minimum cost and minimum time consumption.
3. Results of the experiment
The improved frog-leaping algorithm and the common frog-leaping algorithm are respectively used, the same data are respectively and independently run for 30 times for two optimization targets, the minimum value, the mean value and the variance are calculated for each group of data, and the obtained results are as follows:
TABLE 6
Figure BDA0002459072770000131
From the results in table 6, it can be seen that the results obtained by improving the leapfrog algorithm are more accurate in the least time consuming and money consuming of 30 independent simulations. From the distribution of data, the deviation degree of the improved leapfrog algorithm is lower, and the performance is more stable. In general, the optimizing performance and stability of the improved frog leaping algorithm are improved compared with those of the basic frog leaping algorithm.
TABLE 7
Figure BDA0002459072770000132
TABLE 8
Figure BDA0002459072770000133
TABLE 9
tcost(1,2,4) tcost(2,13,3) tcost(13,14,3) tcost(14,1,3)
0 0.6 0.32 0.35
tcost(1,2,2) tcost(2,4,3) tcost(4,13,3) tcost(13,1,3)
0 0.25 0.43 0.58
mcost(1,7,2) mcost(7,9,4) mcost(9,2,1) mcost(2,1,4)
0 0 2 0
mcost(1,2,4) mcost(2,9,4) mcost(9,7,4) mcost(7,1,4)
0 0 0 0
Tables 7 and 8 show the route, transportation and time (cost) corresponding to the minimum time (cost) in the 30 sets of data, and table 9 shows tcost and mcost data required for calculating the time and cost in tables 7 and 8. Wherein the number of the route is consistent with the number in table 2. By comparison, the improved frog-leaping algorithm results more accurately than the basic frog-leaping algorithm.
Fig. 2 and 3 are evolutionary iterative curves for time and money optimization, respectively. Through comparative observation, the improved frog-leaping algorithm can finally converge to a better solution. In the optimization of the cost, although the convergence speed of the basic leapfrog algorithm is higher at the beginning, the improved leapfrog algorithm converges to a better value in advance than the basic leapfrog algorithm along with the increase of the iteration number.
Fig. 4 and 5 are route planning diagrams obtained by optimizing time and cost by adopting a basic leapfrog algorithm and an improved leapfrog algorithm respectively; this figure is plotted from the coordinate data in table 2 and the results in tables 7 and 8, and can roughly reflect the positional relationship between the respective sites. Where square points represent starting points, circular points represent sights played, and diamond points represent candidate sights not traveled. In the routing chart drawn in fig. 5, the routes obtained by adopting the basic leapfrog algorithm and the improved leapfrog algorithm are consistent, but the two routes have different costs due to different traffic mode selections.
In summary, the personalized tour route recommendation method based on the improved frog leaping algorithm increases a control factor for controlling the population scale according to the iteration times on the basis of the basic mixed frog leaping algorithm, and balances the accuracy degree of the calculation resource loss and the result; in the updating process of the group, a judgment criterion is added, the choice of the solution is determined by judging the change degree of the solution, and the risk of missing more optimal solution is reduced. The experimental result shows that the improved frog leaping algorithm is improved in the optimizing capability and stability compared with the basic frog leaping algorithm.

Claims (10)

1. A personalized tour route recommendation method based on an improved frog leaping algorithm is characterized by comprising the following steps: the method comprises the following steps:
(1) reading data and personalized parameters required by the model, and determining an optimization target and constraint conditions;
(2) data preprocessing and algorithm parameter initialization;
(3) randomly generating an initial population and calculating the fitness of the initial population;
(4) judging whether population expansion is carried out or not;
(5) sorting and grouping all individuals in a descending order according to fitness;
(6) updating the population;
(7) mixing the families and recording an optimal solution;
(8) and judging whether the algorithm reaches a termination condition.
2. The personalized tour route recommendation method based on the improved frog leap algorithm as claimed in claim 1, wherein: the data required by the model of the step (1) comprises the positions of all local candidate sights and hotels, the number of the candidate sights and hotels, the average consumption of time and money during the playing process, the time and traffic cost consumed during the trip, and the lodging cost of the hotels; the personalized parameters comprise the number of travel days, the number of scene points played each day, travel preference, priority level and travel starting period; optimization objectives include minimum daily play time, minimum average monetary consumption during play; the constraint condition is that a hotel is selected as a fixed starting point for multiple daily trips or a daily trip, each scenic spot plays once at most and returns to the starting point on the same day;
the location of the view and hotel is represented in coordinates in a planar rectangular coordinate system with known latitude and longitude,
Figure FDA0002459072760000011
Figure FDA0002459072760000012
wherein S is a candidate scene point set, and the number of candidate scene points is ns; h is a candidate hotel set, and the number of candidate hotels is nh; the time spent, money spent playing at each attraction, the cost of candidate hotels in vector form,
Pm=[pm1,pm2,pm3,......,pmns]
Pt=[pt1,pt2,pt3,......,ptns]
Ph=[ph1,ph2,ph3,......,phnh]
wherein Pm is the average playing cost of the candidate scenic spots, Pt is the playing time of the candidate scenic spots, and Ph is the unit price of the candidate hotels;
according to the constraint conditions, in the case of selecting a hotel as the starting point, the travel traffic cost and time-consuming interaction data between the hotel and the scenic spot are expressed in the form of matrixes mcost and tcost, and
size(mcost)=size(tcost)=(1+ns)×(1+ns)×4
that is, the dimensions of mcost and tcost are (1+ ns) × (4), and mcost (i, j, k) represents the traffic cost of the ith place for the jth place in the kth traffic mode; tcost (i, j, k) represents travel time from the ith location to the jth location in the kth transportation mode; where i, j ∈ {1, 23.·, ns +1}, k ∈ {1, 2, 3, 4}, specifying: the number of the selected hotel is 1, and the sequence from the 2 nd to the ns +1 st is consistent with the sequence of the candidate sight numbers in the S; when k is 1, 2, 3, 4, it corresponds to bus, subway, driving, walking, obviously mcost (i, j, 4) is 0;
the personalization parameters include the number of travel days t _ days, the number of daily play spots t _ pnum, the travel preference t _ type, the priority level t _ sup, and the travel start period t _ date.
3. The personalized tour route recommendation method based on the improved frog-leaping algorithm as claimed in claim 2, wherein the data preprocessing and algorithm parameter initialization method in the step (2) is that all candidate scenic spots, hotels and traffic ways are subjected to integer coding according to a fixed sequence, a global mixed iteration time G is set, the current iteration time G is 1, the number of initial clusters M, the number of individuals I in the initial clusters I, the number of individuals in the initial clusters M × I, the number of updates of the initial clusters N, and a population size expansion threshold T is fth× G, wherein fthFor adjustment factors for the accuracy of the result, the currently selected hotel number h is 1 and the number of candidate hotels is nh.
4. The personalized tour route recommendation method based on the improved frog leap algorithm as claimed in claim 3, wherein: the step (3) randomly generates an initial population and calculates the fitness thereof: m × I individuals are randomly generated, representing the route in the form of decimal integer vectors:
Figure FDA0002459072760000021
wherein route (d) represents route d day, pi(i ═ 1, 2, 3.. t _ pnum +1) denotes the compilation of the ith place in the routeNumber, number specifying hotel as p1And t _ pnum is the number of sights of play.
The selection of the transportation modes is numbered in the same way, and the selection of the transportation modes during travel is represented by decimal integer vectors:
Figure FDA0002459072760000022
wherein Pb (d) represents the mode of transportation adopted on day d, pbi(i ═ 1, 2, 3.. t _ pnum +1) denotes the number of the transportation means used to go from the ith location to the (i +1) th location, and the individual starting from the hotel with number h denotes:
Xh={Route,Pb}
calculating a target value for each individual:
f(Xh)=con(Route)+con(Pb)
if time is the optimization goal, then con (route) and con (Pb) represent the time the attraction plays and the time spent on the road, respectively; if the cost is taken as the optimization target, con (route) and con (Pb) respectively represent the attraction play cost and the road cost; by selecting time or money saving, and using the consumption of time or money as the target value of each individual, the fitness of each individual is,
Figure FDA0002459072760000031
the smaller the target value, the higher the individual fitness.
5. The personalized tour route recommendation method based on the improved frog leap algorithm as claimed in claim 4, wherein: the step (4) is a method for judging whether population expansion is performed or not: judging whether the current iteration times g are equal to a selected threshold value T or not, if so, increasing the size of the ethnic group, and adding a group of random solutions equal to the number of the original ethnic group on the basis of the original ethnic group; the number of clusters after population size expansion becomes M '2M, the number of individuals in a cluster becomes I' 2I, the number of individuals in the initial population becomes (M × I) '2M × 2I, and the number of updates of the initial population becomes N' 2N.
6. The personalized tour route recommendation method based on the improved frog leap algorithm as claimed in claim 5, wherein: increasing a population size expansion threshold T ═ f on the basis of population expansion judgmentth× G, wherein fthWhen the iteration times do not reach T, the algorithm result is not converged to an optimal value, and common search is used at the moment; when the iteration times exceed T, the algorithm is about to converge, the search range is expanded, the omission of the optimal solution is reduced, the result accuracy is improved, and T is selected by an adjusting factor fthAnd (4) determining.
7. The personalized tour route recommendation method based on the improved frog leap algorithm as claimed in claim 6, wherein: the step (5) is a method for sorting and grouping all individuals in a descending order according to fitness: and dividing the sequenced population into M clans, dividing each clan into I individuals, and distributing each individual to each clan according to a grouping rule of the mixed frog leaping algorithm.
8. The personalized tour route recommendation method based on the improved frog leap algorithm as claimed in claim 7, wherein: the step (6) is a method for updating the population: extracting the worst solution X _ w in each group according to the grouping resultkAnd the optimal solution X _ bk(k is 1, 2, 3 … … M), local search is performed N times for each group interior, and a new solution X _ new is obtained for each local searchkCalculating the fitness of the abnormal solution and judging whether the abnormal solution is the abnormal solution or not, if the abnormal solution is the abnormal solution, greatly reducing the fitness of the abnormal solution by adding a penalty factor, and finally determining the acceptance or rejection of a new solution by using an improved screening rule;
the abnormal solution is generated by the fact that scenic spot repetition occurs in a new solution generated during updating of a group, route intersection occurs in route planning of multiple daily trips, and the route does not meet the travel preference; immediately judging whether each random individual is an abnormal solution or not after generating each random individual, if so, replacing a target value with a penalty factor Delta C with a large enough value,
f(Xh)=ΔC
Figure FDA0002459072760000041
under the condition that the penalty factor delta C is large enough, the fitness of the abnormal individuals is reduced, so that the abnormal individuals are eliminated in the updating of the ethnic group;
the improved screening rule is as follows:
the improved screening rule in the step (6) is that a judgment condition is added on the basis of basic mixed frog leap, after jumping is carried out by taking the difference between the global optimal solution and the local worst solution as the maximum step length, if the difference is larger than the maximum step length, the judgment condition is that the judgment condition is not changed, and the judgment condition is that the judgment condition is changed to the judgment condition
||Xnew-Xwk||<
A new random solution is generated to replace the original XwkOtherwise, the original X is retainedwk. Wherein is a threshold value that is self-selected according to model and requirements.
The population update is realized by the following steps:
(a) group update counter i is 1;
(b) the group number k is 1;
(c) calculating the maximum step size stepmax=X-bk-X_wk
(d) Generating a random number lambda of 0-1;
(e) updating X _ new to worst solutionk=X_wk+λstepmaxAnd for X _ newkCarrying out rounding operation;
(f) calculating a new solution fitness F (X _ new)k);
(g) If F (X _ new)k)>F(X_wk) Then let X-wk=X_newkGo (m); otherwise, turning to (h);
(h) calculating a new maximum jump step size
Figure FDA0002459072760000042
(i) Generating a random number lambda' of 0-1;
(j) second updating the worst solution
Figure FDA0002459072760000043
And for X _ newkCarrying out rounding operation;
(k) if F (X _ new)k)>F(X_wk) Then let X-wk=X-newkGo (m); otherwise, turning to (1);
(l) If it is
Figure FDA0002459072760000051
Or
Figure FDA0002459072760000052
Figure FDA0002459072760000053
Then X-w is retainedkOtherwise, generating a new solution to replace the original X _ wk
(M) k ═ k +1, if k ≦ M to (c) otherwise to (n);
(N) i +1 if i ≦ N rotations (b), otherwise the algorithm terminates.
9. The method for recommending the personalized tour route based on the leapfrog algorithm of claim 8, wherein: the method for mixing the group in the step (7) and recording the optimal solution comprises the following steps: after updating of the population groups, mixing the individuals of all the population groups, sorting and selecting the current optimal solution, comparing the current optimal solution with the current global optimal solution, selecting a new global optimal solution according to a principle of high-out and low-out, and recording the new global optimal solution as the current global optimal solution
Figure FDA0002459072760000057
Obtained
Figure FDA0002459072760000055
I.e. a globally optimal solution starting from the hotel numbered h.
10. The personalized tour route recommendation method based on the improved frog leap algorithm as claimed in claim 9, wherein: the step (8) is a method for judging whether the algorithm reaches the termination condition:
if G is less than G and h is less than nh, returning to the step (4); if G is larger than or equal to G and h is smaller than nh, h is h +1, and the step (3) is returned; if G is larger than or equal to G and h is larger than or equal to nh, the algorithm is stopped to output the global optimal solution Xbest
Figure FDA0002459072760000056
CN202010319466.3A 2020-04-21 2020-04-21 Personalized travel route recommendation method based on improved frog-leaping algorithm Active CN111523059B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010319466.3A CN111523059B (en) 2020-04-21 2020-04-21 Personalized travel route recommendation method based on improved frog-leaping algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010319466.3A CN111523059B (en) 2020-04-21 2020-04-21 Personalized travel route recommendation method based on improved frog-leaping algorithm

Publications (2)

Publication Number Publication Date
CN111523059A true CN111523059A (en) 2020-08-11
CN111523059B CN111523059B (en) 2023-08-22

Family

ID=71910991

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010319466.3A Active CN111523059B (en) 2020-04-21 2020-04-21 Personalized travel route recommendation method based on improved frog-leaping algorithm

Country Status (1)

Country Link
CN (1) CN111523059B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114611020A (en) * 2022-05-09 2022-06-10 支付宝(杭州)信息技术有限公司 Method and system for travel recommendation
CN114865673A (en) * 2022-05-31 2022-08-05 国网湖北省电力有限公司荆门供电公司 Micro-grid charge-storage cooperative optimization method, device, equipment and storage medium
CN115018474A (en) * 2022-08-03 2022-09-06 山东美丽乡村云计算有限公司 Text and travel consumption heat degree analysis method based on big data
CN116432986A (en) * 2023-06-09 2023-07-14 华中科技大学 Reservoir optimal scheduling method based on particle frog jump lightning search algorithm

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180357610A1 (en) * 2017-06-12 2018-12-13 Hefei University Of Technology Method and system for collaborative scheduling of production and transportation based on shuffled frog leaping and path relinking algorithms
CN110298583A (en) * 2019-06-27 2019-10-01 浙江工业大学 The vehicle scheduling of low cost based on multi-field model multi-vehicle-type and paths planning method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180357610A1 (en) * 2017-06-12 2018-12-13 Hefei University Of Technology Method and system for collaborative scheduling of production and transportation based on shuffled frog leaping and path relinking algorithms
CN110298583A (en) * 2019-06-27 2019-10-01 浙江工业大学 The vehicle scheduling of low cost based on multi-field model multi-vehicle-type and paths planning method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陆婷 等: "多目标TSP模型在景区游览路线规划中的应用" *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114611020A (en) * 2022-05-09 2022-06-10 支付宝(杭州)信息技术有限公司 Method and system for travel recommendation
CN114865673A (en) * 2022-05-31 2022-08-05 国网湖北省电力有限公司荆门供电公司 Micro-grid charge-storage cooperative optimization method, device, equipment and storage medium
CN115018474A (en) * 2022-08-03 2022-09-06 山东美丽乡村云计算有限公司 Text and travel consumption heat degree analysis method based on big data
CN115018474B (en) * 2022-08-03 2022-11-08 山东美丽乡村云计算有限公司 Text and travel consumption heat degree analysis method based on big data
CN116432986A (en) * 2023-06-09 2023-07-14 华中科技大学 Reservoir optimal scheduling method based on particle frog jump lightning search algorithm
CN116432986B (en) * 2023-06-09 2023-08-11 华中科技大学 Reservoir optimal scheduling method based on particle frog jump lightning search algorithm

Also Published As

Publication number Publication date
CN111523059B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
CN111523059A (en) Personalized tour route recommendation method based on improved leapfrog algorithm
CN101493329B (en) Multiple target point path planning method and device
CN111722643B (en) Unmanned aerial vehicle cluster dynamic task allocation method imitating wolf colony cooperative hunting mechanism
Qu et al. Profitable taxi travel route recommendation based on big taxi trajectory data
CN105679102B (en) A kind of national flight flow spatial and temporal distributions prediction deduction system and method
CN111402616B (en) Intelligent parking control method, system, storage medium and terminal
CN111177572B (en) Personalized travel route recommendation method based on dynamic interests of user
Annaswamy et al. Transactive control in smart cities
CN112013829A (en) Multi-UAV/UGV (unmanned aerial vehicle/user generated Unit) cooperative long-term operation path planning method based on multi-objective optimization
Huang et al. Automatic planning of multiple itineraries: A niching genetic evolution approach
CN116518960B (en) Road network updating method, device, electronic equipment and storage medium
CN115186446A (en) Intersection full-link traffic simulation method based on discrete grid structure
Luo et al. Dynamic taxi service planning by minimizing cruising distance without passengers
CN110598948A (en) Speed-up method for full-array path planning aiming at multi-point source return of scenic spots
CN113391633A (en) Urban environment-oriented mobile robot fusion path planning method
CN115409256A (en) Route recommendation method for congestion area avoidance based on travel time prediction
Elsayed et al. Smart Solution for STSP Semantic Traveling Salesman Problem via Hybrid Ant Colony System with Genetic Algorithm.
CN111797331B (en) Multi-target multi-constraint route recommendation method based on crowd sensing
Lu et al. Particle swarm algorithm and its application in tourism route design and optimization
Li et al. A bibliometric analysis and review on reinforcement learning for transportation applications
CN110956337B (en) Exploration method and device before normalized intelligent operation of unmanned aerial vehicle
CN115328210B (en) Path planning method, device, terminal equipment and storage medium
CN116167254A (en) Multidimensional city simulation deduction method and system based on city big data
CN116795089A (en) Path planning method and device and cloud platform
Shi et al. An adaptive route guidance model considering the effect of traffic signals based on deep reinforcement learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant