Abstract

The field service scheduling problem (FSSP) is the key problem in field services. Field service pays particular attention to customer experience, that is, customer satisfaction. Customer satisfaction described by customer behavior characteristics based on the prospect theory is considered as the primary optimization goal in this paper. The knowledge of the insertion feasibility on the solution is analysed based on the skill constraint and time window. According to the knowledge, an initialization method based on the nearest heuristic algorithm is constructed. Based on the prior knowledge of the FSSP and the endowment of the Fruit Fly Optimization Algorithm, two operators are defined according to the matrix encoding method. Based on these two operators, three search strategies are then proposed, and the smell-based search strategy and vision-based search strategy for the FOA are redesigned. To verify the performance of the algorithms, the proposed operators and strategies are tested and analysed in the well-known benchmark. Through comparison with the state-of-the-art algorithms, the results show that the proposed HFOA is an effective and efficient method to solve the FSSP with customer satisfaction.

1. Introduction

Field services usually refer to the series of service activities performed to meet customer needs at the customer's designated location. Field services are widely provided in various industries, such as the maintenance and protection of electric energy networks and mobile communication systems, after-sales installation and maintenance of home appliances, furniture repair, home care, and the maintenance, repair, and operation (MRO) services of manufacturing enterprises. For example, the MRO services of the Chinese industrial market are more than 500 billion dollars in 2016. With the development of big data, mobile Internet, and other information technologies, innovative business models continue to emerge, such as the online to offline (O2O) business model. Based on the rapidly growing and customized service needs of customers, the role of field service is becoming increasingly important. The efficiency and quality of field services are closely related to the rational allocation of workers and reasonable planning routes. If worker allocation or route planning is unreasonable, it often results in long travel time for workers, long waiting time for customers, staff skills not matching tasks, and other issues. As a result, worker satisfaction is reduced, which negatively affects worker attitude, service quality, and service efficiency, thereby reducing customer satisfaction and ultimately leading to corporate profit decline. Therefore, the field service scheduling problem (FSSP) is critical to field service.

Field service as a form of service extremely emphasizes customer satisfaction. However, little has been done to investigate the customer satisfaction in the current study about FSSP. Almost all models emphasize the cost, such as the shortest travel time for workers, the most tasks to complete. In fact, customer satisfaction is the first. All the companies try their best to improve the customer satisfaction even if the cost increases. Thus, customer satisfaction as the first optimization goal is presented in our study.

On the other hand, the algorithm for solving field service scheduling is not rich. Newer and advanced solution methods are highly desirable. Therefore, the Fruit Fly Optimization Algorithm (FOA) is proposed to solve the problem. The FOA is a novel global optimization method based on swarm intelligence, which is proposed by Wenchao Pan [1]. As a new global optimization method, FOA has the advantages of fast convergence, simple operation, and convenient application, and so on. Therefore, FOA has given rise to many researchers’ attention and has successfully been used in some areas in recent years, such as tuning of PID controller [2], neural network [3], machine scheduling [4], multidimensional knapsack problems [5], and joint replenishment problems [6]. However, the FOA has not been applied to FSSP in addition to our work [7].

This paper contributes to this research area in three ways: firstly, the customer satisfaction is formulated into the FSSP model as an optimization goal, and it is described according to the behavioral features of the customers based on prospect theory; secondly, the knowledge of the insertion feasibility on the solution is analysed. And the improved nearest neighbour insertion algorithm for initialization based on the knowledge is presented. Thirdly, the FOA is presented for FSSP. The matrix-based representation and three matrix-based search strategies are designed according to the problem characteristics.

The rest of the paper is organized as follows. Section 2 reviews the field service scheduling problem. Section 3 illustrates customer satisfaction based on the prospect theory. In Section 4, the mixed-integer programming model of FSSP is presented. After that, the hybrid FOA for FSSP is discussed in detail in Section 5. Thereafter, the simulation experiment and comparisons are provided in Section 6. Finally, the conclusions and future work are discussed in Section 7.

2. Literature Review

Lesaint et al. [8] firstly put forward the concept of field service scheduling. They developed a heuristic algorithm to schedule 20,000 engineers for British Telecom maintenance and repair. However, the details of the algorithm and the experimental results have not been published. Considering the types and priorities of tasks, worker skills, customer time windows, and other constraints, the model of FSSP was established and a greedy randomized adaptive search procedure (GRASP) was proposed for solving the problem by Xu and Chiu [9]. A construction heuristic and an adaptive large neighbourhood search algorithm for FSSP were presented by Cordeau et al. [10]. Akjiratikarl et al. [11] presented the shortest travel distance of workers as the optimization target and proposed the particle swarm optimization algorithm to optimize the solution. The time delay and overtime of workers were also considered in the optimization goal by Petrakis et al. [12], and the heuristic algorithm with insertion and neighbourhood was proposed to optimize the model.

Goel and Meisel [13] investigated FSSP about the maintenance of electricity networks. To solve the problem, they combined the large neighbourhood search algorithm with the mathematical programming method. Xu et al. [14] investigated the nondominated sorting genetic algorithm-II (NSGA-II) to the cross-trained workers scheduling problem. The FSSP model considering both the constraint of worker’s skills and routing optimization was presented by Jiang and Wang [15]. The genetic algorithm based on the segment of the chromosome encoding method was investigated to solve the model. Kovacs et al. [16] solved the FSSP considering the team building by using adaptive large neighbourhood search.

Damm et al. [17] proposed a customized biased random key genetic algorithm to solve the multiobjective FSSP. The main objectives include the sum of priority values associated with the tasks and the idle time of the employees. Cortés et al. [18] developed the branch-and-price algorithm to solve a real FSSP. Hashimoto et al. [19] studied the FSSP model for France Telecom, and the task priority and skill level were considered in the model. The improved GRASP was investigated to solve the model. A parallel adaptive large neighbourhood search with the postoptimization procedure based on the mathematical programming was proposed to solve FSSP by Pillac et al. [20]. Decerle et al. [21] studied the memetic algorithm for the home health care routing and scheduling problem with time window and synchronization constraints.

A few papers also considered the multiperiod scheduling. Chen et al. [22] considered the service time affected by the technician's experience and learning rate. The rolling-horizon framework was built, and the variant of the record-to-record travel algorithm (RTR) was presented to solve the daily routes. Furthermore, Chen et al. [23] also considered the dynamic requests in daily decision making and proposed an approximate dynamic programming-based solution approach for the problem. Qin et al. [24] proposed several local search operators and integrated them into a tabu search framework to solve the multiperiod FSSP. Considering the team building, Zamorano and Stolletz [25] proposed a branch-and-price algorithm for the multiperiod FSSP.

Additional papers consider the dynamic and stochastic service requests. Souyris et al. [26] focused on uncertainty associated with service times, and the branch-and-price method was investigated for the problem. The dynamic workforce scheduling problem about British Telecom (BT) was researched by Borenstein et al. [27]. The problem was decomposed into subproblems, and a rule-based system was proposed for the problem. In addition, Tang et al. [28] and Cao and Han [29] studied the field service scheduling problem based on the M/G/m queuing model by simulation.

The foregoing short review shows that the FSSP has attracted increased attention. However, the study of the FSSP is still in its infancy. Since the important applications of the problem, closer to reality models and more advanced methods for solving the problem are highly desirable. To the best of our knowledge, it seems that no research considers the customer satisfaction in the optimization goal for FSSP. And FOA is also the first reported application of FSSP in our study.

The FOA has been successfully applied to various areas in recent years. To name a few, a two-stage adaptive FOA was proposed by Wang et al. [6] to solve the unrelated parallel machine scheduling problem with additional resource constraints. Hu et al. [30] used the FOA to optimize the parameter for the generalized regression neural network. Meng and Pan [31] investigated an improved FOA with the harmony search algorithm for solving the multidimensional knapsack problem. Shen et al. [32] used the FOA to tune support vector machine (SVM) parameter, and it was applied to medical diagnosis. Zheng et al. [33] presented the improved FOA to solve the semiconductor final testing scheduling problem. To keep the diversity of the population and avoid the algorithm falling into local optimum, Niu et al. [34] and Li et al. [35] proposed the multipopulation concept. Niu et al. [34] divided the population into two subpopulations: one was responsible for the exploration and the other was responsible for the exploitation. Li et al. [35] proposed the four subpopulations in the whole algorithm, and each subpopulation evolved separately.

A knowledge-guided multiobjective FOA was investigated for the multiskill resource-constrained project scheduling problem by Wang and Zheng [36]. To improve the local and global searching ability and avoid premature convergence, Han et al. [37] proposed the improvement of FOA with trend search and coevolution. Wu et al. [38] added adaptive strategies and multigroup mechanisms to the FOA. The strategies included the adaptive adjustment mechanism for the search direction, the iteration step, and the crossover and mutation mechanism. In addition, some FOAs with other intelligent optimization algorithms are proposed. Yuan et al. [39] used the chaotic sequence to enhance the global searching capability of FOA. Lei et al. [40] applied the FOA combining gene expression profiles for identifying the protein network structure. Peng et al. [41] used the FOA to the flow shop rescheduling problem. The FOA with the local search is used to improve the performance of a multistart variable neighbourhood descent algorithm. However, to the best of our knowledge, the FOA has not yet been applied to the FSSP.

3. Customer Satisfaction Description Based on the Prospect Theory

The FSSP can be described as follows: a few spatially distributed tasks must be served exactly once by one of workers. Workers have different skills and different proficiency levels for every skill. They start their service from their home, visit locations to fulfill tasks, and return home. The assignment of a task to a worker is only possible if the worker has a certain skill required by the task. Each task has service time and time windows. Their services are forbidden outside the deadline. The optimization goals of the FSSP are usually to minimize the total travel time of the workers, the total service time, and so on. Unlike the previous studies, customer satisfaction is the primary goal of optimization in this paper. Therefore, how to describe the customer satisfaction is the key to solve the problem.

Field service scheduling is like a vehicle routing problem [10]. However, the two problems differ in the following aspects. First, the objective in the vehicle routing problem is usually to minimize the number of vehicles required or the total distance traveled, whereas FTSP tries to maximize the number of jobs completed within a given time frame. Second, the vehicles in VRP have physical capacities while the technicians in FSSP have different skills as required by different jobs. The customer satisfaction is represented based on time windows in the traditional vehicle routing problem [42], as shown in Figure 1 ( represents the time window that the customer can tolerate and represents the customer satisfaction). From the customer satisfaction point of view, if the customer is serviced in the time window, the satisfaction is 100%; otherwise, the satisfaction is 0. The method has a large gap from reality. The other researchers [43, 44] described customer satisfaction as a triangular fuzzy number or trapezoidal fuzzy number based on the time window, as shown in Figures 2 and 3. But the psychological characteristics of customers are not considered in these methods. For example, when customers are waiting for service, they tend to be inner anxiety and dissatisfaction (i.e., loss sensitive) as the waiting time increases nonlinearly. The prospect theory is a kind of behavioral decision theory which has great influence on behavioral science. It is based on the bounded rationality of human beings and can describe the decision-making behavior of people more reliably, such as dependency, loss avoidance, and decrease of sensitivity. Prospect theory has obvious advantages in describing human psychological characteristics such as satisfaction. Therefore, the customer satisfaction is described based on the prospect theory in this paper.

In the prospect theory, the individual needs to select a reference point in the initial stage of the decision, and the value of the reference point is zero. The individual evaluation is carried out relative to the reference point. In the decision-making stage, according to the value function of the income and loss of subjective evaluation (as shown in Figure 4), the specific form is as follows:where α and ß are the risk attitude coefficients, usually between (0,1); the larger the value, the more inclined to risk. is the loss of aversion coefficient, greater than 1 that is more sensitive to the loss of income characteristics [45].

In the field service scheduling, the customer satisfaction is mainly affected by the arrival time of workers. When the workers’ arrival time is later than the customer's psychological expectations, it will cause the customer's dissatisfaction; as the delay time increases, the dissatisfaction will increase. Because the impact of customer satisfaction is the gap between the customer's psychological expectations of arrival time and the actual situation, the greater the gap, the higher the customer dissatisfaction, rather than the arrival time itself. For the customer, the worker’s arrival delay is a loss, this loss will cause changes in customer psychological perception. Therefore, the customer dissatisfaction can be described by the prospect theory. Customer dissatisfaction with worker arrival time is shown in Figure 5, where represents the arrival time reference point for customer , represents the actual time to start the service, and is the customer’s maximum tolerance start time. The customer’s dissatisfaction function is expressed as (2).

is the maximum allowable start time corresponding to the loss value.

4. Model Formulation

The model assumes that all the information is known in advance in the static environment. Suppose a multigraph , where the vertex set is divided into two disjoint subsets . Set represents the locations of the engineers’ homes. Set represents the tasks’ locations. is the arc set and is the travel time from to . denotes the expected start time and the endured latest start time for task . denotes the proficiency level of worker for task . The smaller denotes the higher the proficiency, which means a shorter time required to complete task . indicates that the worker does not possess a required skill and cannot complete the task. denotes the actual start time of task . denotes the standard service time of task . Each worker has a default working time window , and any work performed after is considered as overtime. Let be the remaining time after technician returns to the home for the day. denotes a large enough integer. The binary decision variables if and only if the worker travels from node directly to node . The binary decision variables if and only if task is serviced by worker .

The objective function (3) has two parts; the first part represents maximizing the average satisfaction of all customers. is calculated according to equation (2). The second part represents maximizing the average of remaining time ratio of workers. We include in the objective function the remaining time rather than the travel time because the remaining time can be used to allocate more jobs when new jobs are requested, while idle time is wasted just like travel time. Maximizing remaining time is the same as minimizing travel time plus idle time. The purpose of using the denominator is to remove the dimension. Constraint (4) ensures that each task is visited by exactly one worker. Flow conservation constraint (5) ensures that a worker arriving at a task location also leaves that location, and each task is visited exactly once. Constraint (6) is necessary for the assignment of workers to their homes. Equality (7) sets the arriving time at the task . Constraint (8) ensures that the arriving time does not exceed the endured latest start time for task. When two tasks are consecutively executed by the same worker, constraint (9) ensures that the beginning of service starts up after the completion time of its predecessor plus the travel time between them. Constraint (9) together with (10) and (11) is aimed to eliminate subtours. Constraint (12) guarantees that the idle time of workers that when they return to their home is less than or equal to the size of their time windows. Constraint (13) defines variables and as binaries, and constraint (14) defines as nonnegative real variables.

5. Hybrid Fruit Fly Optimization Algorithm for FSSP

5.1. Standard FOA

The FOA is to simulate the foraging behavior of fruit fly swarms. Fruit flies have a keen sense of smell; they can detect a source of food at 40 km. Furthermore, they have outstanding vision and can find where other flies are gathering and flying in that direction. There are two main steps in FOA: smell-based search and vision-based search. In the smell-based procedure, a fruit fly search for food randomly around the swarm location. In the visual procedure, a fruit flies fly to the best location of the swarm according to its excellent vision. The two procedures are repeated until meeting the termination criterion. The standard FOA procedures are summarized as follows:Step 1: initialization. The parameters of the algorithm (i.e., population size and maximum number of iterations) and the initial center location of the swarm are initializedStep 2: smell-based search procedureStep 2.1: every fruit fly randomly determines a candidate location for a food sourceStep 2.2: evaluate the smell concentration values for each fruit flyStep 3: vision-based search procedureStep 3.1: find the fruit fly with the best smell concentration and record the best locationStep 3.2: the fruit fly flies toward the best location and updates the center location of the swarmStep 4: termination condition. If the termination conditions are met, the algorithm ends; otherwise, return to Step 2

The standard FOA is mainly applied for continuous optimization. To solve the FSSP, the knowledge of the solution is analysed, and then the encoding method, the smell-based search, and the vision-based search are redesigned. The detailed implementations of the hybrid FOA are introduced, respectively, including the nearest insertion heuristic algorithm for initialization; the matrix-based representation and the decoding procedure; and three matrix-based search strategies and postoptimization process.

5.2. Solution Knowledge about Task Insertion Feasibility

Because of the presence of time windows, two factors should be considered when a task is inserted into existing routes: the skill constraint and time window. Here, a feasible insertion property is proposed. For worker , the existing feasible routes are . If task is inserted after position (between and ), then the start service time in is , where represents the wait time in the . The delay time in the is as follows:

When the inserts into the route, if , then will delay. Due to the “absorption” of the waiting time on the original route, the delay time in after the insertion of is as follows:

Suppose the original arriving time in is , then the maximum delay that does not violate the time window constraint in is . Thus, if task is inserted after position (between and ), it should meet the following properties.

Property 1. For worker , the existing feasible routes are . If task is inserted after position (between and ), the necessary and sufficient conditions for insertion are as follows: According to Property 1, we can check whether the task can be inserted into the position. However, maybe several positions are feasible in the route for the task which is the optimum position. The optimum insertion position is the one that the average degree of dissatisfaction is minimum after insertion in all possible insertion positions. The determination of the optimal insertion position can be made according to the following steps:Step 1: find out the set of all possible insertion positions in the current route for the candidate task, and set the customer's dissatisfaction to be 1.Step 2: calculate the average dissatisfaction of all customers after inserting the task into the leftmost position of the current feasible insertion position set. If the dissatisfaction is smaller than the original value, the average customer dissatisfaction is set to the current value, and the current insertion position is set as the optimal insertion position, and the position is deleted from the feasible set, and go to Step 3.Step 3: check the feasible insertion position collection. If the collection is not empty, go to Step 2; otherwise, end.

5.3. Heuristic for Initialization Based on Solution Knowledge

A random initialization method is simple but may produce invalid solutions. To generate an initial solution with good quality, an insertion heuristic initialization method utilizing knowledge of the problem is proposed. The nearest insertion heuristic algorithm (NIH) is a classical local search algorithm. The core idea is described as follows: the nearest task that meets the constraint is selected from the nonserviced task collection and then inserted into a route. Based on the above property, the improved NIH is proposed in this paper. We revise the criteria for selecting candidate tasks, not only considering the distance, but also the service time of the worker. Suppose is the last task in the current routes, represents the unserviced task, and represents the generalized costs between and . can be defined as follows:where are weight coefficients, where . All unserviced task generalized costs are calculated according to formula (18). Then the smallest is selected, and the task is inserted into the routes following task. The procedure for NIH is as follows.

represents the task set, represents the route set, represents the travel time of the routes, and represents the task set of worker .Step 1: .Step 2: check the status of . If it is null, then go to Step 5. Otherwise, select the minimum costly task . If , then initialize , insert task into , remove from, and update .Step 3: according to Property 1, select an unserviced task from , then calculate the generalized costs of every task, and search the minimum . Then insert the corresponding task into , and update and . Repeat this procedure until no task is selected.Step 4: , , go back to Step 2.Step 5: map the initialization solution to the encoding population. Calculate the concentration of the initial solution, and select the maximum fitness as the current optimal solution.

5.4. Representation and Decoding Procedure

To determine a feasible schedule for the FSSP, it needs to assign a suitable worker for each task and arrange the execution orders of task for each worker. In the HFOA, the solution is represented by an matrix, where the rows denote workers and columns represent the tasks.

The elements in the matrix represent that task is assigned to worker . Otherwise, . Because all tasks are processed only once, , meaning there is only one nonzero element in each column. For every row , the collection of nonzero elements represents the tasks that are assigned to worker . These elements are arranged from small to large, and the corresponding task order is worker’s service route. Using the encoding scheme, the tasks and the routes for workers can be represented simultaneously, and the search operator applied to the representation influences the schedule directly. To map a solution to a feasible schedule, the decoding procedure is outlined as follows:Step 1: generate the initial allocation plan for every worker.For {select all the nonzero elements of row . Then sequence from small to large, and then the corresponding tasks are .}Step 2: the amendment of the illegal solution. For the routes of worker , each task is checked whether the arrival time of the workers meets constraint (8) in turn. If constraint (8) is violated, the task is deleted and reinserted into the routes according to Property 1, and the procedure with the determination of the optimal insertion position is applied. If it is unable to insert, the task will be assigned to other workers. There are three principles of assignment: (a) assign to the nearest workers; (b) assign to the workers who have the shortest service time; and (c) assign to the workers who have the least task. Repeat the above procedure until all tasks in the route are feasible. For the routes that are reallocated, the process is also performed.Step 3: according to the feasible solution, the corresponding coding value is corrected, and the correction process is to exchange the corresponding value.

Example 1. Consider 3 workers and 8 tasks in FSSP, and the encoding is as follows: According to the decoding algorithm, for worker 1, the tasks are (7, 2, 4), for worker 2, the tasks are (1, 5), and for worker 3, the tasks are (3, 8, 6). Then check and revise the routes, and the workers’ travel routes are as follows: no. 1 route is 2-7-4; no. 2 route is 5-1; and no. 3 route 8-6-3. Finally, the code will be encoded and the resulting code is as follows:

5.5. Fruit Fly Search Strategies Based on Prior Knowledge

The classical FOA utilizes real number coding and is mainly applied to function optimization. Therefore, the strategies of classical FOA are not applicable to the FSSP. In this paper, three strategies of fruit fly search are proposed according to the characteristics of the FSSP. First, we define two operators on two matrices.

represents that the row (or column) and row (or column) are exchanged in a matrix . represents an individual fruit fly. All nonzero elements in G are calculated as follows: where denotes the corresponding value for the current best individual. From the perspective of social psychology, this operation indicates that fruit flies use population experience information to guide their search. represents that the element in is reassigned to a new value according to the following formula:where denotes the corresponding value in the neighbour that is selected randomly within the field of view. From the perspective of social psychology, this operator represents the comparison of two positions of fruit flies on the horizon and determines which position is closer to the food source. It is worth noting that when is updated, the other elements in column will be set to zero to guarantee a feasible solution.

Based on these two operators, three search strategies are defined:(1)Worker-swap (W-sp): . This strategy indicates that all tasks are exchanged between two workers, and it also causes service order changes.(2)Task-swap (T-sp): . This strategy indicates that two tasks are exchanged between two workers. The service orders may also change simultaneously.(3)Task-reallocation (T-re): . This strategy indicates that task is assigned to worker . It can also change the service order.

The aforementioned strategies have to perform the decoding procedure that is described in Section 5.4 after execution, and if it encounters an illegal solution, it is corrected according to Property 1 and the procedure of determination of the optimal insertion position. Based on the strategies, the smell-based search and vision-based search are implemented as illustrated in Figures 6 and 7. As we know, the smell-based search is primarily responsible for exploration. Its search range is relatively large in the FOA. The vision-based search is primarily responsible for exploitation. It performs fine-grained searching in a relatively small area. According to the above principles, for smell-based search, W-sp, T-sp, and T-re are carried out in turn. We then select the best solution from the three results. Next, if the best new solution is better than the original solution, we update the original solution using the new solution. Otherwise, we repeat the above procedure until the original solution is improved. While the best acceptance principle is utilized in the smell-based search, the better acceptance principle is utilized in the vision-based search, only T-sp and T-re are carried out, and whenever a better solution is found, the previous solution will be updated.

5.6. Postoptimization Procedure

To improve the quality of the solution, two local search algorithms (2-Opt and Or-Opt) are carried out as the postoptimization procedure. The 2-Opt and Or-Opt algorithms will compare every possible valid combination of the swapping to find the better solution. Note that the nodes should be checked according to Property 1 before swapping. The postoptimization process utilizes a better acceptance strategy to update the solution. Based on the above design, the flowchart of the HFOA is presented in Figure 8.

5.7. Computational Complexity Analysis

To analyze the efficiency of the algorithm, computational complexity analysis is necessary. Assume that the population size is , and the maximum iteration number is , the task number is and the worker is . According to the procedure of HFOA, its computational complexity can be analysed as follows: in the initialization procedure, the computational complexity of NIH is and the computational complexity of the encoding procedure is . For each iteration, in the decoding procedure, there are find and sort process and the computational complexity is . The computational complexity of fitness evaluation is . In the smell-based search, W-sp, T-sp, and T-re are carried out in turn. For each search strategy, the computational complexity is . Then, the decoding and fitness evaluation procedure are carried out after the search strategy. Therefore, the computational complexity of smell-based search is approximate to . Similar to smell-based search, the computational complexity of vision-based search procedure is . In the postoptimization procedure, the computational complexities of 2-Opt and Or-Opt are, respectively, and . Usually, it is reasonable to take the highest power item as the computational complexity of the algorithm. Therefore, the analyses above show that the computational complexity is . The algorithm approximates an level algorithm.

6. Experimental Results and Comparisons

6.1. Test Instance

The HFOA is coded in C++ and executed on a PC with an Intel Core i5 [email protected] GHz CPU. Since there is no public standard benchmark for the FSSP, we built the instances based on the well-known multidepot vehicle routing problem with time windows which were designed by Cordeau [46].

The new instances keep the original coordinates. The number of workers is equal to the number of vehicles in the original instances. There are multiple vehicles in each warehouse in the original instances. Therefore, while setting the original warehouse location as a worker’s location, it is also necessary to set some customer locations as worker positions. In addition, for each instance, it is necessary to generate a matrix of workers’ proficiency levels for tasks. The matrix is generated randomly, and the range of is [0.5, 3]. For each worker, . The time windows of the customer in the original instance are . In our instance, the time window of the task is . . The service time is set to the standard customer service time. There are 20 instances in our experiments, and the detailed information is described in Table 1.

PR01 represents 4 depots and 48 customers, with 2 vehicles in each depot in the MDVRPTW dataset. Here, we modify it to 8 workers and 44 tasks. 4 workers are located at the original depot and the other four are randomly selected from the group of customers. The other instances are similarly converted. It is noted that the difference between PR01 and PR11 is only in the time window. The time window of PR01 is more compact, but PR11 is more relaxed. As a result, PR01 needs more workers.

The parameters of our algorithm are set as follows: the parameters of dissatisfaction function , population size , and iteration number . To conveniently evaluate and compare the algorithms, the relative percentage increase (RPI) is defined as follows: where A denotes HFOA, its variants, and the state-of-the-art algorithms. represents the average result of 20 runs for algorithm , and is the best result among the algorithms.

6.2. Effectiveness of Three Key Features of the HFOA
6.2.1. Effectiveness of Initialization Method

Firstly, to certificate the effectiveness of the hybrid initialization method for the HFOA, the experiments are implemented to compare the hybrid initialization method with the other two methods. The two methods are NIH and random method, and the corresponding HFOAs with the two approaches are named n-HFOA and r-HFOA. Six instances (PR01, PR05, PR10, PR11, PR15, and PR20) are selected for the test. The RPI results are shown in Table 2. It can be seen from Table 2 that the optimization results of n-HFOA are significantly better than the random method (r-HFOA), and the RPI is improved by 4.76% on average. The optimization results of the hybrid initialization method (HFOA) are better than the n-HFOA, with an average increase of 3.51%. This is because NIH can generate an initial solution with better quality, which helps the algorithm to locate promising regions within the large search space. And the random method can generate diversity distribution initial solution. Therefore, the hybrid initialization method is more effective and efficient.

To evaluate the parameters , we implement another comparison experiment. 9 levels are set for as shown in Table 3. As , the is not independent and then it is not listed in the table. From Table 3, when , the results are significantly better than other values. As for and , moderate values are preferred that is because and determine the weight of travel time and service time. A too large and a too small may cause overfocusing on the travel time when inserting the new task in the route. On the contrary, a too small and a too large may cause overfocusing on the service time when inserting the new task in the route. According to the results of the experiment, the weight coefficient of NIH is set .

6.2.2. Effectiveness of Fruit Fly Search Strategies

Secondly, we verified the effectiveness of the three search strategies presented above. The three search strategies were executed separately. The results of the RPI on the three search strategies are shown in Table 4. It can be seen from the table that the results of T-sp are the best and the results of W-sp are the worst because W-sp mainly exchanges customers between the workers, although it can change the customers’ order, but more limited, relatively rough search. The ability of T-re is stronger than that of W-sp, and the optimization result of RPI is improved by 23.53% on average. T-re is like an insertion operator, and the search precision is better than that of W-sp. The T-sp operator has the strongest optimization ability in the three search strategies, which is 15.06% higher than the T-re, since T-sp operator does not only change the assignment of tasks between workers, but also changes the order of the tasks. It is like a 2-Opt operator that integrates between innerroutes and interroutes.

Next, to compare the performance of the smell search and vision search, we carry out computational experiments to compare the HFOA with different search procedures. The full version that the smell search and vision search are all executed is named HFOA, the version that only the smell search is executed is named HFOAss, and the version that only the vision search is executed is named HFOAvs. 6 instances (RP01, PR05, PR10, PR11, PR15, and PR20) are tested. The average RPI for the 6 instances is 0.66% for HFOA, 1.89% for HFOAss, and 3.71% for HFOAvs. The RPI values are shown in Figure 9. From the figure, we can see that the full version is significantly better than the others. The HFOAss is more effective than HFOAvs. The smell search executes the three strategies (T-re, T-sp, and W-sp) in turn and selects the best result to update the solution. On the contrary, the vision search is primarily responsible for exploitation, only T-sp and T-re are carried out, and whenever a better solution is found, the solution will be updated.

6.2.3. Effectiveness of Postoptimization

Furthermore, to verify the effectiveness of the postoptimization search, we carry out computational experiments to compare the HFOA with different postoptimization procedures. Figure 10 shows the effect of the postoptimization procedure on the algorithm. It is clear from the comparisons that the hybrid procedure using 2-Opt and Or-Opt can produce significantly better results than other methods. The postoptimization procedures (2-Opt + Or-Opt) lead to a performance improvement of approximately 3.56%. Using a postoptimization algorithm alone, Or-Opt has a slight advantage over 2 -Opt.

6.3. Comparison with State-of-the-Art Algorithms

To verify the performance of the proposed algorithm, we compared the HFOA with the four algorithms: GRASP [9], genetic algorithm (GA) [15], the record-to-record travel algorithm (RTR) [22], and memetic algorithm (MA) [21]. The parameters for the GRASP, GA, RTR, and MA are set to the corresponding value according to the existing literature. The RPI values for the five algorithms are shown in Table 5. The best value is marked in bold. From the table, we can see that HFOA is significantly superior to the other four algorithms. The average RPI value of the HFOA is 0.57%, which is much lower than those four algorithms. Simultaneously, the HFOA performs the best for 18 out of 20 instances, except PR09 and PR19. The MA has an average RPI value of 1.63% and it is ranked second. Meanwhile, it gets the best result in PR09 and PR19. For the other three algorithms, the average RPI of GA is equal to 3.81%, and it is ranked third. The average RPI of GRASP and RTR are 8.51% and 11.21%. Based on the above analysis, we can conclude that HFOA has better performance than other algorithms.

6.4. Application to Solve Vehicle Routing Problem with Time Windows

Furthermore, to verify the ability of HFOA to solve the NP-hard problem, the well-known combined optimization problem vehicle routing problem with time windows is provided in this section. The dataset including 56 Solomon instances with 100 customers is tested in the experiments. These instances are categorized into six different categories: R1, R2, C1, C2, RC1, and RC2. Each category contains R which indicates that customers are distributed randomly, C categories are clustered, and RC means customers are distributed both randomly and clustered. Moreover, the R1, C1, and RC1 instances have narrower time windows for the depot and all customers are associated with very tight time windows. By contrast, the R2, C2, and RC2 instances have a long scheduling horizon that permits many customers to be serviced by the same vehicle, and the time windows defined for the customers are wider.

All instances are repeatedly solved 20 times. The HFOA results are compared to those obtained by other algorithms in the literature. We select six state-of-the-art algorithms that have obtained the best results. These algorithms include the following: genetic algorithm and set partitioning (CGH) [47], genetic algorithm (GA) [48], hybrid ant colony with tabu search (ACOT) [49], a multiadaptive particle swarm optimization (MAPSO) [50], adaptive harmony search algorithm (AHSA) [51], and a probabilistic tabu search (TS) [52]. The RPI values of the six algorithms and HFOA over all tested instances are presented and compared in Table 6. The best-known results of average total distances (TD) for each category also are reported. The results tabulated in Table 5 show that HFOA achieved competitive results compared to others, among the total 7 heuristics, HFOA is ranked second. The proposed algorithm can achieve the solutions close to the best-known solutions for the cluster problem sets C1 and C2. Moreover, HFOA can obtain comparable solutions for the problem sets R1, R2, RC1, and RC2 compared with other metaheuristics.

To compare the convergence speed with the state-of-the-art algorithms, the average computational time is reported in Table 7. We report the average running time in seconds. The best computational times are highlighted in bold font. It is noted that the CGH and GA do not report the runtime for each category and only provide the total average computational time; TS does not report the running time. CGH and TS also do not report the CPU type. As can be seen from the table, the computational time of HFOA is very competitive with CGH, GA, ACOT, and AHSA. Furthermore, we could observe that the algorithm converges faster in the clustered instances. Considering the tradeoff of quality and computation time, HFOA is the competitive approach among the seven methods.

7. Conclusion

In this paper, we research the field service scheduling problem with customer satisfaction. The customer satisfaction that considered customer behavioral features is described based on the prospect theory. It provides a new way to describe customer satisfaction. The mathematical model for FSSP with customer satisfaction is presented. To solve the NP model, the knowledge of the insertion feasibility on the solution is research. And an effective HFOA is proposed for the model. Based on the prior knowledge of the FSSP and endowment of the Fruit Fly Optimization Algorithm, a novel encoding method based on matrix is proposed for HFOA. To improve the solution quality, an effective nearest neighbour insertion heuristic is developed to generate the initial solution. Additionally, three search strategies and postoptimization procedure are applied to the HFOA.

To verify the ability of HFOA, the well-known VRPTW dataset including 56 Solomon instances with 100 customers is tested in the experiments. The results illustrate that the HFOA algorithm provides excellent results compared to the other six metaheuristic methods. The proposed HFOA is also successfully applied to FSSP. The comparisons verified the effectiveness of the developed heuristic and search strategies. Through comparison with the other four algorithms, the results show that the proposed HFOA is an effective and efficient method to solve the FSSP. Although this work is presented in terms of FSSP with customer satisfaction, the main idea of the HFOA could also be applied to many other FSSP problems such as dynamic task arriving and dynamic road network information, and we will extend the HFOA to these problems in the future research.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Additional Points

(1)The customer satisfaction that considered the customer behavioral characteristics is described based on the prospect theory, and the mathematical model for field service scheduling problem with customer satisfaction is formulated.(2)The knowledge of the insertion feasibility on the solution is analysed. According to the knowledge, the improved nearest neighbour insertion algorithm for initialization is proposed.(3)The Fruit Fly Optimization Algorithm is presented for FSSP. A matrix encoding method is designed, and three search operators based on swarm behavior and prior knowledge of the problem are proposed. Based on the operators, the smell-based search strategy and the vision-based search strategy are redesigned.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This project was supported by the National Social Science Foundation of China (Grant no. 20BGL025) and National Natural Science Foundation of China (Grant nos. 71671089 and 71701092).