Abstract
During the peak tourist season, large theme parks often experience a simultaneous influx of visitors, resulting in prolonged waiting times for popular attractions. This extended waiting significantly reduces tourists’ satisfaction and may negatively impact their willingness to revisit the theme park. In Taiwan, schools at all levels often plan graduation trips to theme parks for their students. Students are divided into groups and must enter and exit the theme park at the same time. This article presents a new theme park problem with multitype facilities (TPP-MTF) for student groups. Based on the group's preference for theme park facilities, multitype reserved tickets with popular facilities are designed for groups, so groups do not need to wait for the reserved facilities. Since the waiting time for groups can be reduced, the theme park can also obtain ticket fees in advance and estimate the number of visitors to the theme park, so the theme park and the group can achieve a win–win situation. This article proposes a new decoding approach for a random permutation of integer sequence and embeds it into an immune-based algorithm, genetic algorithm, and particle swarm optimization algorithm to solve the TPP-MTF problem. A theme park in Taiwan was taken as an example and numerical results of the three algorithms were analyzed and compared to verify the effectiveness of the proposed algorithms.
Introduction
In recent years, many tourists have visited theme parks to enjoy various entertainment and experiences. Theme parks have become one of people's important travel and leisure choices. At present, the competition among theme parks around the world is very fierce, and increasing tourist attendance is one of the main goals of each theme park. A theme park can directly attract tourists by launching different new facilities or attractions. In addition, improving the service quality and entertainment experience of the theme park can directly increase tourist satisfaction and motivate tourists to revisit. Past studies have found that attracting new customers to a theme park costs approximately five times as much time and resources as retaining existing ones. 1 Therefore, improving tourist satisfaction is one of the important goals of the operation and management of a theme park.
At present, due to the limited facilities in a theme park, when many tourists flock to the theme park, they often cause long queues for various amusement facilities and decrease satisfaction, which in turn reduces the willingness to revisit. Abdillah et al. 2 pointed out that tourists usually spend 20% of their time in theme parks experiencing attractions, but more than half of their time is spent waiting in line. Dickson et al. 3 reported that crowding in theme parks significantly reduces tourist satisfaction, consumption intention, and revisit intention. Pizam and Ellis 4 pointed out that long waits result in each tourist only being able to visit an average of 10 attractions in theme parks. Geissler and Rucks 5 analyzed the reasons for the decline of tourist satisfaction in theme parks and found that long waiting times for rides were an important factor. Therefore, good queuing management in theme parks can reduce waiting times for rides, thereby improving tourist satisfaction and motivating them to return.
Recently, Niu et al. 6 explored the differences in tourist satisfaction and emotions in three theme parks Universal Studios, Disney World, and SeaWorld. According to the features/characteristics of theme parks and the tourist experience, they classified the main performance dimensions of the theme park as follows (Figure 1). Shared feature: It includes common characteristics of theme parks. For example, the waiting time of tourists for a facility, shows, activities, festivals, food, and visitor service. Unique feature: It includes unique characteristics in theme parks. For example, unique attractions or facilities, special experiences, and services for newlyweds. Positive experience: It includes unforgettable good experiences in theme parks. For example, a pleasant experience at a renowned facility, enthusiastic staff, and delicious food. Negative experience: It includes a poor theme park experience. For example, long waiting times for facilities, high transportation costs, and high ticket prices.

The main theme park performance dimensions.
A recent theme park survey 7 in 2018 showed that price, queues, and crowding were the main issues that tourists felt needed improvement, accounting for about 38% of the total. Therefore, the waiting time for rides is an important basis for tourists to evaluate theme parks. When the waiting time is too long and becomes a negative experience in the theme park, it will directly reduce tourist satisfaction, thereby reducing tourists to revisit.
Currently, most theme parks use queuing systems to manage and improve tourists’ waiting time for rides. In the past, traditional queuing systems consisted of physical queues and tourists followed the FIFO (first-in first-out) rule to use theme park facilities. However, tourists were unable to leave during the queuing process, which directly reduced tourist satisfaction and affected customers’ willingness to visit the theme park again. 3 In addition, Zhang et al. 8 showed that tourists with higher income and better economic status are more sensitive to crowded queues.
In recent years, technological advancements have allowed theme parks to reduce tourist waiting times at attractions. For example, based on Radio-Frequency Identification (RFID) information and tourist behavior, Tsai and Chung 9 proposed a personalized route recommendation service for theme parks to reduce waiting times and increase tourist satisfaction. Additionally, several theme parks have implemented virtual queuing systems to reduce tourist waiting times at attractions, such as Disney's Fast Pass (or Priority Pass) and Universal Studios's Express Pass. By purchasing a Fast Pass or Express Pass, tourists can skip lines and experience amusement facilities through separate queues with virtually no wait. Typically, Fast Pass or Fast Pass tickets are limited daily to control queues for facilities within theme parks. Tourists can purchase merchandise, enjoy meals and use other rides in the theme park while waiting in virtual queues. Hernandez-Maskivker and Ryan 10 pointed out that priority queues, such as Fast Pass or Express Pass, can effectively reduce waiting times and create new revenue for theme parks. In addition, a variety of techniques, 11 such as real-time queue monitoring, personalized notifications, integration with theme park Apps, etc., can be utilized to effectively manage the queueing system in a theme park.
In addition, several researchers have adopted various approaches to analyze the performance of different queueing systems and strategies in theme parks. Beloiu and Szekely 12 used simulation methods to evaluate the effectiveness of three queuing systems, namely ordinary queuing systems, virtual queuing systems, and push queuing systems. The ordinary queuing system is a typical FIFO queuing system. The virtual queuing system is similar to Fast Pass and Express Pass at Disney and Universal Studios. The push queuing system can send recommended rides with shorter waiting times to selected tourists through the control center. Yu et al. 13 investigated three personalized recommendation strategies for a tourist service system in a theme park, including the closest first strategy, shortest waiting time first strategy, and hottest first strategy. Sakayori and Takahashi 14 presented a mathematical model for finding the optimal routes for attraction with Fast Pass constraints at Tokyo Disney. For each attraction, they used its annual average waiting time to set the utility. The objective function is to maximize the total utility of attractions in the theme park. Ko and Park 15 studied a decision-making problem for a theme park with normal admission and express admission. The goal of the problem is to determine the price and maximum number of express admission tickets allowed per day and the type of rides for express admission tickets to maximize theme park revenue. Li and Li 16 developed a mathematical model for a Fast Pass system with heterogeneous tourists, that is, deriving an optimal pricing strategy such that the objective of tourist satisfaction and theme park profit is maximized. In their study, Shanghai Disneyland was taken as an example to show the effectiveness of their approach.
In this article, we present a new theme park problem with the multitype facility (TPP-MTF), where four types of facilities must be selected and scheduled for groups from the same organization to minimize the group's departure time. TPP-MTF is described in the next section, and the solving algorithm of TPP-MTF will be introduced in the third section.
TPP-MTF
In Taiwan, schools at all levels often plan graduation trips for students. Schools usually arrange a large theme park in the itinerary to enhance friendship between teachers and students. The graduation trip has the following characteristics: All students have the same itinerary. Students are grouped according to their classes. Different groups have different preferences for facilities in the theme park. All students enter and exit the theme park at the same time.
Student groups, hereinafter referred to as groups, differ from the ordinary theme park tourists, because they are from the same school and must enter and exit the theme park together. In addition, different groups may have different preferences for facilities in the theme pack. This research proposes a new TPP-MTF in which various types of reserved tickets are designed for groups with the consideration of preference to the facility in the theme park. More specifically, each group has its must-play facility set and some optional-play facility sets. The theme park must then arrange facilities for group bookings of tickets. Thus, groups can experience the facilities included in their reserved tickets without waiting. The theme park can obtain the ticket fees in advance and plan catering, souvenirs, and food needs. Therefore, the theme park and the group will achieve a win–win situation. The goal of TPP-MTF is to efficiently schedule each group's must-play and optional-play facilities to minimize the completion time of groups in the theme park so that all groups can leave the theme park together.
At present, large theme parks have different types of facilities to meet the preferences of tourists of different ages and genders. Table 1 lists the four main types of theme park facilities by operating hours and capacity.
Type 1: The facility is available for immediate use, and there is no limit on the number of users. For example, the rainbow trail, decorated light waterfall, and herb plant field. Type 2: The facility is available for immediate use, but there are limits on the number of users. For example, lover suspension bridge. Type 3: The facility is not available for immediate use, and there are limits on the number of users. For example, sky shuttle and roller coaster. Type 4: The facility is not available for immediate use, and there is no limit on the number of users. For example, the pirate village square show.
Four types of amusement facilities.
Typically, facilities in a theme park can be classified into one of these types. For example, in Tokyo Disneyland, Space Mountain is a type 3 facility, and firework display is a type 4 facility. Groups of different ages and genders usually have different preferences for the above-mentioned types of amusement facilities. For example, female groups may prefer type 2 and type 3 facilities, while male groups may prefer type 3 and type 4 facilities. However, popular facilities have limited capacity, such as type 3 facilities. In this article, based on the preference of groups, various reserved tickets with must-play and optional-play facilities are designed for groups. For example, Group 1: Must-play facility {1}, Option-play 1: choose 2 from set {2,3,4}, Option-play 2: choose 2 from set {5,6}; Group 2: Must-play facility {1}, Option-play 1: choose 1 from set {2,3}, Option-play 2: choose 2 from set {4,5,6}. The TPP-MTF must identify facilities from each optional-play set and schedule all facilities, including must-play facilities and selected optional-play facilities, for each group in the theme park. Each group can then ride or use these facilities without waiting.
The TPP-MTF is similar to the Museum Visitor Routing Problem (MVRP) considered by Chou and Lin, 17 Yu et al., 18 and Hsieh and You. 19 MVRP has to arrange multiple tour groups to visit exhibition rooms in a museum. Each room can accommodate a group at a time, regardless of the number of people. However, TPP-MTF differs from MVRP, because: (a) MVRP assumes that all tour groups are required to visit all rooms.17,18 But, in practice, due to time factors, general groups cannot use all facilities in the TPP-MTF. (b) MVRP assumes that each room is open to visit at any time and can only accommodate one group.17–19 But in fact, not all facilities are open to use immediately and can only accommodate one group in the TPP-MTF. (c) MVRP assumes that each group has no special preference for the exhibition.17,18 But in fact, each group may have its preference for the facility in the TPP-MTF.
The studied TPP-MTF is more general than MVRP because it considers the preference of groups. Additionally, it assumes that: Theme park facilities are divided into four types, as shown in Table 1. Each group has its must-play facility set and multiple optional-play facility sets based on its preferences. The TPP-MTF scenario in this study is that groups of a large or medium school visit a theme park, and they arrive and exit the theme park at the same time.
The TPP-MTF problem is a practical problem in Taiwan and an NP-hard problem. The main purpose of this article is to design several reserved tickets with various must-play and optional-play facilities for groups to reduce their waiting time in the theme park so that all groups can leave the theme park together as soon as possible. The main contributions of this paper include: (a) A new decoding method is presented to convert any arbitrary permutation of an integer sequence into a feasible solution of TPP-MTF which contains the scheduled must-play and optional-play facilities and their use time in the reserved tickets. (b) The new decoding method is embedded into three evolutionary algorithms, namely, immune-based algorithm (IA), genetic algorithm (GA), and particle swarm algorithm (PSO) to solve the TPP-MTF problem. (c) Taking a domestic theme park in Taiwan as an example, the numerical results of the three algorithms are reported and compared to verify the effectiveness of the proposed new decoding.
Methods
Related methods of TPP-MTF
The studied TPP-MTF involves the combination and permutation of must-play and optional-play facilities, therefore, it is an NP-hard problem. Many approaches can be used to solve the TPP-MTF for global optimization, for example, the branch-and-bound method, 20 dynamic programming, 21 integer mathematical programming. 22 However, these approaches are time-consuming and when the dimension of the problem is slightly larger, these methods require a large amount of computer memory making it difficult to obtain an approximately optimal solution within a reasonable time. Therefore, with the advent of artificial intelligence algorithms, various evolutionary algorithms have been presented to solve numerous types of complicated optimization problems. The main merit of these evolutionary artificial intelligence algorithms is that they can provide a good solution for many different types of optimization problems in a reasonable computing time. At present, there are more than hundreds of various evolutionary artificial intelligence algorithms developed to solve complicated optimization problems and their evolutionary process is mainly based on animal behavior or natural phenomenon. More specifically, most evolutionary algorithms are associated with swarm-based algorithms that mimic the hunting, cooperative, and competitive behaviors of animals. In addition, based on the natural phenomenon, many evolutionary artificial intelligence algorithms have been developed to solve optimization problems, for example, the rain optimization algorithm, 23 water wave optimizer, water flow-like algorithm, electromagnetism algorithm, gravitational search algorithm, 24 etc. Chakraborty and Kar 25 briefly reviewed the animal-based swarm intelligence algorithms and classified them into (a) insect-based algorithms, such as ant colony optimization algorithm, bee-inspired algorithm, butterfly-inspired algorithm, grasshopper optimization algorithm, etc., and (b) animal-based algorithms, such as bat-based algorithm, squirrel-based algorithm, whale-based algorithm, wolf-based algorithm, etc. Recently, Tang et al. 26 reviewed the most representative swarm intelligence algorithms and analyzed their strengths from 127 works of literature, including ant colony optimization, PSO, artificial bee colony, artificial fish swarm, etc. Tao et al. 27 reviewed and analyzed the nature-based algorithms for the river flow model.
Three evolutionary algorithms for TPP-MTF
As mentioned in the Related methods of TPP-MTF section, there are many evolutionary artificial intelligence algorithms developed to solve complicated optimization problems. At present, GA and PSO are probably the most well-known and popular evolutionary artificial intelligence algorithms due to their many successful applications. We refer to Alhijawi and Awajan 28 and Shami et al. 29 for the survey of GA and PSO and their applications. Recently, IA, an immune-based algorithm, has attracted much attention due to its outstanding performance in applications. IA is based on the basic concept of the human immune system. When the human body encounters antigens (antigens) such as external bacteria or microorganisms, they are recognized as nonself-antigens and are immediately excreted from the body. Antibodies (Antibodies) are produced in specific T lymphocytes or memory B lymphocytes, which combine with antigens to resist them together, thus forming a self-protective defense system. IA is similar to GA in the evolutionary process, such as crossover and mutation, for chromosomes. The main difference between IA and GA is that IA possesses a unique mechanism of memory set for chromosomes. In each evolution of chromosome, IA has to compute the similarity among chromosomes and delete the too similar ones even though they have good fitness values. Thus, IA has a higher probability of keeping a variety of chromosomes.30–32
Therefore, in this article, we adopt three evolutionary algorithms, namely, IA, GA, and PSO to solve the TPP-MTF problem. In addition, a new decoding method is proposed in this research to convert any random permutation of a sequence of integers into a feasible solution to the problem, and it is embedded in the three algorithms to solve the TPP-MTF problem. A theme park in Taiwan is taken as an example. Numerical results of the three algorithms are analyzed and compared to illustrate the effectiveness of the proposed algorithm.
The main steps of IA, GA, and PSO are illustrated in Figures 2–4, respectively.

Main steps of IA. IA: immune-based algorithm; TPP-MTF: theme park problem with multitype facilities.

Main steps of GA. GA: genetic algorithm; TPP-MTF: theme park problem with multitype facilities.

Main steps of PSO. PSO: particle swarm algorithm; TPP-MTF: theme park problem with multitype facilities.
Notations and assumptions of TPP-MTF
Notations and variables
={1,2,…, n}, set of groups, i ∈ N.
={1,2,…, f}, set of facilities in the theme park, j ∈ F.
Number of people in group i, i ∈ N.
The capacity limit for facility j, j ∈ F.
The set of must-play facilities for group i, Mi ⊆ F, i ∈ N.
={si(1), si(2),…, si(ki)}, the sets of optional-play facilities for group i, where ki is the number of optional-play sets for group i, i ∈ N.
={ui(1),…, ui(ki)}, the sets of the number of selected optional-play facilities in Si for group i.
The playing time of facility j for group i, i ∈ N, j ∈ F.
The moving time from facility j to facility k, j≠k, j ∈ F, k ∈ F.
The moving time of a group from the entrance of the theme park to facility j, j ∈ F.
The moving time of a group from facility j to exit of the theme park, j ∈ F.
The completion time of group i for its must-play and optional-play facilities, including moving time, playing time, and waiting time, i ∈ N.
Assumptions
According to groups’ preferences, group i has its must-play facility set Mi, and multiple optional-play facility sets of si(1), si(2),…, si(ki), i ∈ N.
For group i, all must-play facilities in Mi and ui(ki) facilities in the optional-play facility set si(ki) must be arranged in the reserved ticket, i ∈ N. Hereinafter referred to as {ui(k)|si(k)} for selecting ui(k) facilities in the optional-play facility set si(k) for group i.
The facilities are classified into four types as shown in Table 1.
All groups are not allowed to interrupt when they are playing a facility.
Each group can only play one facility at a time.
There is no restriction on the order of using facilities for groups.
Each group can use the arranged facilities in the reserved ticket without waiting.
The TPP-MTF problem is to minimize the completion time for all groups, that is, min {max ci0, i ∈ N}, so that they can leave together.
Decoding scheme and approaches
The Decoding section proposes a new decoding method to convert any random permutation of an integer sequence into feasible solutions of TPP-MTF. The decoding method is then embedded into three algorithms IA, GA, and PSO, which are introduced in the Three evolutionary algorithms for TPP-MTF section.
Decoding
The new decoding method is based on the MOD operator for a random permutation of an integer sequence. The pseudo-code of the new decoding is as follows.
An example
Example
Consider a TPP-MTF with 8 groups (n = 8) and 6 facilities (f = 6) in Figure 5. Figure 5 shows that facilities 1 and 3 are type 1, facilities 2 and 4 are type 2, facility 5 is type 3, and facility 6 is type 4. The moving times between the facilities and the entrance/exit are shown in Figure 5. Additionally, we assume that four types of reserved tickets for groups are as follows:
(1) Groups 1, 2: (reserved ticket A1) Mi = {1}, si(1) = {2,3,4}, si(2) = {5,6}, ui(1) = 2, ui(2) = 2, i = 1, 2. Groups 3, 4: (reserved ticket A2) Mi = {1}, si(1) = {2,3}, si(2) = {4,5,6}, ui(1) = 1, ui(2) = 2, i = 3, 4. Groups 5, 6: (reserved ticket A3) Mi = {1}, si(1) = {2,3,4}, si(2) = {5,6}, ui(1) = 2, ui(2) = 1, i = 5, 6. Groups 7, 8: (reserved ticket A4) Mi = {1}, si(1) = {2,4}, si(2) = {3,5,6}, ui(1) = 1, ui(2) = 2, i = 7, 8. For example, reserved ticket A4 for groups 7 and 8 must contain 4 facilities, including 1 facility in the must-play set {1}, 1 facility in the optional-play set {2,4}, and 2 facilities in the optional-play set {3,5,6}. Assuming that the group's must-play and optional-play sets of facilities are determined in advance based on the group's preferences, the theme park must select and arrange the corresponding selected facilities for all groups in the reserved tickets to minimize their departure time. (2) W = (w1, w2, …, w8) = (2, 4, 3, 2, 2, 3, 2, 2), the number of people in groups 1 to 8. (3) C2 = 6, C4 = 4, C5 = 4, the capacity limit for facilities 2, 4, and 5. (4) The playing time of the group for various facilities (dij) is shown in Table 2.

Decoding example (n = 8, f = 6).
The playing time of groups for various facilities (example).
Decoding steps
(1) v = (1 + 1 + 1 + 1 + 1 + 1 + 1 + 1) + (4 + 4 + 3 + 3 + 3 + 3 + 3 + 3) = 34, the total number of selected facilities across all groups reserved tickets. Assume that R = 16, 18, 2, 8, 25, …, 34 as shown in Table 3. i = h = 0. That is, R is a random integer sequence with length v.
(2) i = 1. For group 1:
(must-play set) h = 1. g = {mod (R(h), |M1|) + 1} = {mod (16,1) + 1} = 1, T(h) = 1, M1 = M1 − {1} = Ø. That is, R(1) = 16 is used to determine the selected facility T(h) by using the mod operator.
(optional-play set s1(1))
(i) k = 1, u = 1, h = 2. g = {mod (R(h), |s1(1)|) + 1} = {mod (18,3) + 1} = 1, T(h) = 2, s1(1) = {2,3,4} − {2} = {3,4}. (ii) u = 2, h = 3. g = {mod (R(h), |s1(1)|) + 1} = {mod (2,2) + 1} = 1, T(h) = 3, s1(1) = {3,4} − {3} = {4}. That is, R(2) = 18 and R(3) = 2 are used to determine the two selected facilities T(h) in the optional-play set s1(1) by using the mod operator.(optional-play set s1(2)) (i) k = 2, u = 1, h = 4. g = {mod (R(h), |s1(2)|) + 1} = {mod (8,2) + 1}=1, T(h) = 5 s1(2) = {5,6} − {5} = {6}. (ii) u = 2, h = 5. g = {mod (R(h), |s1(2)|) + 1} ={mod (25,1) + 1} = 1, T(h) = 6, s1(2) = {6} − {6} = Ø. That is, R(4) = 8 and R(5) = 25 are used to determine the two selected facilities T(h) in the optional-play set s1(2) by using the mod operator.
(3) Repeating a similar process, we have T(6) to T(34) for groups 2 to 8 as shown in Table 3.
(4) Let Q be an increasing order of R, that is, Q = 27, 3, 14, 33, 7,…, 34. Thus, we may sequentially assign the corresponding group and facility of R(Q(1)) to R(Q(34)) in Table 3 to the Gantt chart in Figure 6 with the consideration of constraints of facilities, such as the playing time, capacity, and immediate use or not, etc. The Gantt chart is shown in Figure 6, where:
Group 1:Must-play facility 1; optional-play set 1: select 2,3 from {2,3,4}; optional-play set 2: select 5,6 from {5,6}. Completion time (including entry and exit) = 43. : Group 8:Must-play facility 1; optional-play set 1: select 2 from {2,4}; optional-play set 2: select 3,5 from {3,5,6}. Completion time (including entry and exit) = 37.
The objective = max{43,43,43,42,43,40,40,37} = 43. That is, the best departure time of groups is 43 if they enter the theme park at time 0.
Test problems and numerical results
Test problem
We take the theme park in Yunlin, Taiwan, as an example to test the effectiveness of the applied methods. The theme park in Figure 7 contains 18 main facilities as follows.
Type 1: 4 facilities in total, namely, facilities 13–16. Type 2: 2 facilities in total, namely, facilities 17 and 18. Type 3: 10 facilities in total, namely, facilities 1–10. Type 4: 2 facilities in total, namely, facilities 11 and 12.

Gantt chart for the TPP-MTF decoding example (IX1: entrance/exit to facility, IX2: facility to facility). TPP-MTF: theme park problem with multitype facilities.

A theme park in Yunlin, Taiwan.
Decoding of TPP-MTF for the example.
For group i, Mi = must-play set, si(1) = option-play set 1, si(2) = option-play set 2.
TPP-MTF: theme park problem with multitype facilities.
Table 4 shows the capacity and the playing time interval of the facility, Table 5 shows the moving time between the facility and entrance, Table 6 shows the number of people in each group, and Table 7 shows the playing time of each group for the facility. Table 8 shows the sets of must-play and optional-play facilities for each group. As shown, two test problems with n = 8 and n = 16 are tested by using IA, GA, and PSO algorithms separately, to investigate the impact of the number of groups on the objective value.
The capacity (Cj) of the facility and the interval time of each play.
Moving time between facilities and entrance (mjk).
The number of people for each group (wi).
The playing time of each group for the facility (dij).
The must-play and optional-play sets for groups in the test problem.
Note: {a|bcdef} means selecting a facilities from facilities b, c, d, e, f.
Parameter setting and equipment environment
Preliminary tests were conducted to find the best combination of given parameters to improve the efficiency of the three algorithms. Since IA is similar to GA, except for the mechanism of the memory set in the evolution process. Therefore, we adopt the same parameter setting for IA and GA. For IA and GA, the parameters recommended in Lee et al., 33 Kozeny, 34 and Ghareb et al., 35 namely, (crossover rate, mutation rate, number of populations) = (0.6, 0.1, 100), (0.8, 0.15, 300), (0.9, 0.001, 500), were used as candidates. For PSO, the parameters recommended in Amano and Farmani, 36 Hulett et al., 37 and Golpayegani et al., 38 namely, (c1, c2, populations) = (1.42, 1.63, 100), (2.0, 2.0, 300), (2.07, 2.07, 500), were used as candidates. Then, we use the Taguchi method to obtain the best combination of parameters from these candidate parameters. Finally, we adopted the parameters of IA and GA: (crossover rate, mutation rate, populations) = (0.6, 0.1, 100), and the parameters of PSO: (c1, c2, populations) = (1.42, 1.63, 100).
Numerical results and discussions
We executed 40 times for the two test problems in Table 8 through IA, GA, and PSO, respectively. In addition, if the objective value has no improvement after 1000 iterations, the algorithm is set to stop. Herein, the objective value is the completion time of groups in the theme park. The numerical results of the objective are summarized in Table 9 and illustrated in Figure 8 in which Y-axis indicates the objective value derived by the three adopted algorithms.

Numerical results of objective for the three algorithms (40 experiments). (a) n = 8 and f = 18 and (b) n = 16 and f = 18.
The numerical results of 40 experiments of algorithms for the test problems.
GA: genetic algorithm; IA: immune-based algorithm; Iter: convergence iteration; Obj: objective; PSO: particle swarm algorithm.
From Table 9 and Figure 8, we have the following findings.
For all test problems, as the number of groups increases, the best objective (completion time) increases. For example, in Table 9, for the test problem of 8 groups, the best completion time of IA is 111, and it is 128 for the test problem of 16 groups. The results of GA and PSO are also similar. For all test problems, the best objective obtained by IA is better than that of GA, and the best solution obtained by GA is better than that of PSO. For example, in Table 9, for the test problem of 8 groups, the best solutions obtained by IA, GA, and PSO are 111, 118, and 121, respectively. For the test problem of 16 groups, the best solutions obtained by IA, GA, and PSO are 128, 140, and 140, respectively. For all test problems, the standard deviation of the 40 best objectives for IA, GA, and PSO is not large. This implies that IA, GA, and PSO can solve TPP-MTF stably. For example, in Table 9, for the test problem of 8 groups, the standard deviations of the 40 best solutions for IA, GA, and PSO are 5.44, 4.26, and 3.75, respectively. For all test problems, the average number of convergence iterations of IA is less than that of GA, and GA is less than that of PSO. For example, in Table 9, for the test problems of 8 groups, the average number of convergence iterations for IA, GA, and PSO are 108.32, 238.08, and 466.14, respectively. This shows that IA can effectively and stably solve this TPP-MTF. In terms of solving speed, GA is faster than PSO, and PSO is faster than IA. For example, in Table 9, for the 8 groups of test problems, the average CPU time of IA, GA, and PSO are 15,824.7, 3295.2, and 5367.2, respectively. As the number of groups increases, the CPU time for each algorithm increases steadily. For example, for the test problem of 8 groups, the average CPU times of IA, GA, and PSO were 15,824.7, 3295.2, and 5367.2 respectively, while for the test problem of 16 groups, the average CPU times of IA, GA, and PSO only slightly increased to 28,038.0, 3903.6, and 10,173.2.
In addition, Table 10 shows the facility selected in the group reservation tickets obtained by IA.
The best solution obtained by IA for n = 8, 16 with f = 18.
Conclusions
In this study, we scheduled the must-play and optional-play facilities for student groups and used IA, GA, and PSO to investigate the TPP-MTF of four types of facilities in a theme park. The main contributions and findings of this research are as follows.
We have introduced a new TPP-MTF problem in which various reserved tickets are designed to achieve a win–win situation for the theme park and groups, that is, reducing the group's waiting time for the facility and increasing the group's satisfaction with the facility when revisiting the theme park. We have proposed a new decoding approach to convert any permutation of an integer sequence into a feasible solution of the TPP-MTF and embedded it in IA, GA, and PSO to solve the TPP-MTF problem. A theme park in Taiwan was taken as an example to show the effectiveness of the new approach to the TPP-MTF problem. Numerical results of the three algorithms have been presented and discussed. Numerical results have shown that: for all two TPP-MTF test problems, IA is superior to GA, and GA is superior to PSO. In the solving process, IA is more robust than GA, and GA is more robust than PSO. In the solving speed, GA is faster than PSO and PSO is faster than IA.
In future research, other artificial intelligence algorithms can be applied to solve the TPP-MTF problem. In addition, other special constraints to the theme park problem can be considered, such as the facility's available capacity at different periods may differ. For example, considering ordinary tourists, the sky shuttle (a type 3 facility) can provide three student groups to ride at a time between 9:00 and 11:00, but only two student groups to ride at a time between 12:00 and 15:00.
Footnotes
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was supported in part by National Science & Technology Council, Taiwan, with grants MOST 107-2221-E-150-002 and MOST 108-2221-E-150-002.
