Multiobjective Real-Time Scheduling of Tasks in Cloud Manufacturing with Genetic Algorithm

In cloud manufacturing, customers register customized requirements, and manufacturers provide appropriate services to complete the task. A cloud manufacturing manager establishes manufacturing schedules that determine the service provision time in a real-time manner as the requirements are registered in real time. In addition, customer satisfaction is aﬀected by various measures such as cost, quality, tardiness, and reliability. Thus, multiobjective and real-time scheduling of tasks is important to operate cloud manufacturing eﬀectively. In this paper, we establish a mathematical model to minimize tardiness, cost, quality, and reliability. Additionally, we propose an approach to solve the mathematical model in a real-time manner using a multiobjective genetic algorithm that includes chromosome representation, ﬁtness function, and genetic operators. From the experimental results, we verify whether the proposed approach is eﬀective and eﬃcient.


Introduction
Cloud manufacturing (CM) is an advanced model that provides a cloud-based manufacturing platform on which enterprises virtualize and share their manufacturing services such as welding, milling, and machining to produce highly customized products [1][2][3]. A task to produce a customized product consists of several activities, and each activity provides a related manufacturing service. e task is processed in the following order [4]. First, a platform manager determines the manufacturing services and an appropriate processing order. is step is called a task definition. e manager then establishes a schedule by selecting services from the platform and determines the start times of each service, considering availability, processing time, and service order. is step, called task scheduling, differs from service allocation in that it considers time [5]. In other words, it allows duplicate assignment of a service (in this case, delay may occur), while service allocation does not. Finally, the task sequence begins processing according to the schedule.
Because task scheduling is an important operational problem in CM, many researchers have recently addressed it. Zhou et al. [6] modeled a scheduling problem to minimize the weighted sum of differences between requirement levels and actual levels in terms of time, cost, and quality, and service type is considered a major constraint. ey improved a genetic algorithm (GA) to solve the scheduling problem and compared it with particle swarm optimization (PSO) and simulated annealing in an experiment in which each task was given a different weight. ey argued that their proposed algorithm outperformed other algorithms in terms of objective value. Cao et al. [7] investigated a task-scheduling problem in terms of time, quality, cost, and service and adopted fuzzy decision-making theory to transform these criteria into degrees of relative superiority. ey presented a mathematical model that maximizes the weighted sum of the relative degrees and applied ant colony optimization (ACO) to obtain a solution. rough experiments, they showed that ACO outperformed GA and PSO in every iteration. Liu et al. [8] revealed that workloads affect total completion time, service utilization, and so forth in task-scheduling problems. ey compared two scheduling methods based on workload. e first completes the tasks with larger workloads first, while the second completes tasks with smaller workloads first. ey concluded that the first method yields a superior performance. Jiang et al. [9] addressed a task-scheduling problem in CM that specializes in disassembly, with the objective of minimizing both total expected makespan and cost. ey designed a multiobjective algorithm using the nondominated sorting genetic algorithm II (NSGA-II) to solve the task-scheduling problem. Li et al. [10] studied a task-scheduling problem for distributed robots in CM in which tasks were scheduled by allocating a robot to a subtask, considering geographical location. ey solved the problem from three perspectives: difference of workload among robots, overall cost, and overall processing time with a GA.
Although previous research investigated task scheduling from multiple perspectives, the chosen approaches were unrealistic in terms of multiobjective and real-time characteristics. Scheduling problems should consider two or more objectives simultaneously. Some researches such as in [6] considered multiple objectives as a weighted sum, but they also were not practical as it proved difficult to choose the proper weight. Only a few (e.g., [9]) considered simultaneous objectives, when modeling the scheduling problem. In addition, the proper services should be used in real-time process (sub) tasks whenever they are registered because this aspect is an important characteristic of CM platform operations.
Meta-heuristic algorithms have been frequently employed to solve computational engineering problems [11][12][13][14][15][16][17]. For example, Hoang [11] integrated history-based adaptive differential evolution and linear population size reduction to find the optimal hyperparameters of the support vector machine for pitting corrosion detection. Chen et al. [12] developed a hybrid of variable neighborhood search (VNS) and estimation of distribution algorithm (EDA), called VNS-EDA, to compose the feature subset for credit risk classification. Jiang et al. [18] improved particle swarm optimization (PSO) by integrating with the gravitational search algorithm with dependent random coefficients. Peng et al. [19] introduced chaotic search for the fuzzy neural network to improve PSO to handle complex engineering problems.
A GA is one of the most famous meta-heuristic algorithms to solve diverse scheduling problems such as project scheduling [20,21], job-shop scheduling [22], parallel machine scheduling [23], and flow-shop scheduling [24,25] and usually performs well. In addition, a multiobjective genetic algorithm (MOGA) has also been successfully applied to various multiobjective problems, such as a scheduling problem to minimize both production cost and time. For example, Tang et al. [26] addressed a multiobjective radio frequency identification network-planning problem with the objective of minimizing collision and interference of the network and network cost. ey integrated a divide and conquer greedy heuristic algorithm and an MOGA to solve the problem. Zhang et al. [27] addressed multiobjective assembly line-balancing problems to minimize cycle time and rebalancing cost by modifying NSGA-II. Because GA is appropriate for handling the multiobjective scheduling problem, as shown in many previous researches, we choose GA to solve a multiobjective real-time task-scheduling problem in CM.
In this paper, we study a multiobjective real-time taskscheduling problem in CM where tasks are scheduled whenever they are registered. e major research contents and contributions are as follows. First, we formalized the scheduling problem as a binary integer programming model with four objectives to minimize total tardiness, cost, quality, and reliability penalties. In addition, we design an MOGA to solve the problem by focusing on feasibility because most solutions to the problem are infeasible. Finally, we conduct an experiment to verify the proposed approach's performance. Table 1 summarizes how the contribution of our study extends previous research results. e rest of this paper is organized as follows. Section 2 describes the problem and introduces a mathematical model. Section 3 develops the proposed approach by focusing on designing a multiobjective GA that includes chromosome representation, a fitness function, and genetic operators. Section 4 conducts the experiments and compares the efficiency of the GA, and Section 5 concludes the paper.

Problem Description and
Mathematical Model 2.1. Notation. Table 2 shows notations used in this paper.

Problem Description.
In cloud manufacturing, customers upload their requirements in the cloud-based manufacturing platform, and then the requirements are converted into a task, each of which consists of several activities and saved in the task pool. Enterprises virtualize and upload their manufacturing services (e.g., milling and cutting), and the services are saved in the service pool. e task-scheduling problem is to make a schedule for each task in the task pool by assigning a set of proper manufacturing services in the service pool. e considered task-scheduling problem is to assign a proper service to each activity of every task to minimize total tardiness and cost, quality, and reliability penalties at each time. Figure 1 shows a typical example of the structure of a taskscheduling problem. e schedule is constructed by a manager (or management system) on a cloud-based manufacturing platform.
Each task is composed of several activities in sequence or in parallel. Task T t 2 , in Figure 1, for example, is composed of three activities: 3 ) are in parallel. e required service type differs according to the activity. For example, if S k is the service type needed by A t i,j , then one of Each activity can be processed only after the preceding activities have been completed. e activity without preceding activities (the root activity) can be processed only after the task to which it belongs is registered. Finally, services may have different performance metrics such as cost and quality even though they are of the same type. Services should be scheduled considering all required levels of tasks.

Mathematical Problems in Engineering
Additional assumptions of the problem are summarized as follows: (1) Required service type to process each activity is known (2) e maximum allowed cost, minimum allowed quality and reliability, and due date are given (3) ere is no rework for any activity (4) Customer satisfaction can be measured by cost, quality, reliability, and due date (5) Geographical distances among service providers are not considered (6) e outcome of a task is delivered to the customer once the task is completed

Objective Functions.
e objectives are to minimize the total penalty associated with tardiness, cost, quality, and reliability. In this section, we explain how to obtain objective values from the service schedule.
Actual delivery time D t i of task T t i is the maximum among completion times of activities that do not have the following activities. Because completion time of A t i,j is calculated as the sum of service assignment time and processing time, D t i is obtained as follows: where F t i,j and p k,v denote the set of A t i,j 's following activities and the processing time of S k,v , respectively. With equation (1), the tardiness penalty T t i of T t i is computed as the difference Improving meta-heuristic algorithm Zhou et al. [6] √ √ √ Cao et al. [7] √ √ √ Liu et al. [8] √ √ Jiang et al. [9] √ √ √ Li et al. [10] √ √ is paper √ √ √ √ Task and activity related where D t i is the due date of T t i . By expanding equation (2) to all tasks registered at t, we have the first objective function, which is the sum of tardiness penalty for every task registered at t: e actual cost C t i to complete T t i is calculated as the sum of costs of services assigned to the task as given by with equation (4), the cost penalty cp t i on T t i is where C t i is the maximum allowed cost to complete T t i . By expanding equation (5) to all tasks, the second objective function is obtained as follows: Similarly, the actual quality Q t i of T t i is the average of qualities of services, and actual reliability R t i is the product of reliabilities of services assigned to the task as given by where k�Type(A t i,j ),∀v (r k,v × x t,τ i,j,k,v ) is the reliability of the service assigned to activity A t i,j . e quality penalty is Q . e third and fourth objective functions become (8) and (9), respectively:  Figure 1: Typical example of task scheduling.

l). (10)
Another constraint is the activity precedence. A service cannot be allocated to an activity with a preceding activity that has not been completed, which is expressed as follows: where τ 0 is the assignment time for a preceding activity with assignment time τ 1 , v 0 and S k 1 ,v 1 are assigned to A t i,j 0 and A t i,j 1 at τ 0 and τ 1 , respectively. e next constraint is service availability. A service cannot be allocated to other activities until it is released: Constraint (12) can also be expressed by means of indicator variables as follows: In other words, can prevent the system from allocating an unavailable service and resolve an unexpected situation in which a service becomes unavailable suddenly. For example, a service S k,v that is supposed to be allocated to a task at time τ ≥ t may suddenly become unavailable because of a service-provider issue (e.g., contract expiration). e proposed GA can resolve this by setting I(S τ k,v ) � 0 for τ ≥ t and then continuing to search the solutions.
Finally, because every decision variable is binary, we need the following:

Genetic Algorithm
is section describes the design procedure of the multiobjective GA to solve the mathematical model developed in the previous section. Figure 2 shows an illustrative flowchart of the proposed multiobjective GA, with which the schedule for a task T t i is constructed in the order of the registered time. at is, the proposed GA selects the proper services for a task, which are scheduled to process the task and then service availability is updated. erefore, a task can be scheduled as soon as it is uploaded (that is, task can be scheduled in a real-time manner).

Chromosome Representation.
e h th chromosome in the g th population is represented as χ t [ where  Mathematical Problems in Engineering  Table 3, circled by a bold blue rectangle). e rankings of Z 1 , Z 2 , Z 3 , and Z 4 with regard to χ t [g] [1] are 3, 1, 3, and 2, respectively, and the fitness value is calculated as (1/μ(3, 1, 3, 2)) � 0.444 (see the first row of Table 3, delineated by a dashed red rectangle). Note that the solution with a smaller objective function value takes a higher ranking because they are to be minimized.

Genetic Operators.
We adopt a uniform crossover operator that selects one of the crossover lines randomly and assigns chromosomes of parents to the children based on those lines [29]. In this paper, we avoided generating infeasible solutions as presented in Algorithm 2.

Experiment
In this section, we conduct experiments to verify that the proposed approach is practical under the experiment environment: OS: Microsoft Windows 10 Home (×64) CPU: Intel ® Core ™ i7-6700 CPU RAM: 16.0 GB Language: Python 3.6.9 First, a small toy problem is introduced to find all possible solutions and calculate their fitness values by means of a Pareto ranking method in Section 4.1, followed by checking the ranks of the solutions obtained by the proposed approach. Second, we apply the proposed approach to solve a more realistic, large-scale scheduling problem and examine the search time to establish a schedule in Section 4.2. e first experiment shows that our approach can find a schedule that is effective and sufficiently close to the optimal schedule. e second experiment is to verify the given schedule as efficient and appropriate for a large-scale practical problem in real time. Figure 3 shows the task type introduced to compare the proposed method with an exhaustive search method. "S" and "H" are activities that require software and hardware services, respectively.

Effectiveness Verification.
We assume three tasks, three software services, and three hardware services in this problem. Information about the tasks, such as maximum allowed due date (D t i ), cost (C t i ), minimum quality (Q t i ), and reliability (R t i ), is summarized in Table 4. Table 5 supplies information on services such as cost (c k,v ), quality (q k,v ), reliability (r k,v ), and processing time (p k,v ).
Step 2. j � 1, and save the service type for A t i,j as k, and randomly select v t i,j and τ t,s i,j which satisfies: (1) I(S τ k,] ) � 1 for τ � τ s i,j , τ s i,j + 1, . . . , τ s i,j + p k,v − 1, and (2) τ s i,j is one of minimums among τ satisfying (1), and update I( Step 3. Increase j by 1 and save the service type for A t i,j as k.
Step 4. Randomly select v t i,j and τ s i,j which satisfies: i,j is one of minimums among τ satisfying both (1) and (2), and update I( Step 6. If i � n t and j � m t i , terminate this algorithm. If j � m t i and i ≠ n t , increase i by 1 and go to Step 2. If j ≠ m t i , increase j by 1 and go to step 3. output:

ALGORITHM 1: Generation of initial solutions of χ t [1][h].
GA parameters in the proposed approach are set as follows: the number of generations is 50; the number of solutions per each generation is 20. erefore, the GA searches 50×20 � 1000 solutions. We calculate the ranks of all solutions, including the one obtained by the proposed approach. Any inferior solutions (e.g., those waiting to allocate a service even though it is available, solutions that allocate no service at all, and solutions that allocate a single service to every activity) are ignored when searching all possible solutions. Table 6 summarizes all possible solutions, which are listed in the descending order of fitness values. e values in bold indicate the solution obtained by the proposed GA.
As seen in Table 6, our approach has found the 172 th solution among 34,012,224 solutions, which lies in the top 0.00051%. In other words, the proposed algorithm can find a solution which is very close to the optimal. Because the proposed algorithm makes a schedule after a task is uploaded in the task pool, we expect that the number of tasks has little effect on the result. From the experiment result and the real-time property of the algorithm, we can conclude that the proposed algorithm is effective for task scheduling in cloud manufacturing.

Efficiency Verification.
Next, a CM platform is assumed dealing with a more complicated and realistic task, depicted in Figure 4, which was adopted from [30].
We randomly generate six situations where 5, 10, 15, 20, 25, and 30 tasks are uploaded at a day, and we calculate search time to establish the schedules in each situation. We assume that every task is uploaded at t, and D t i , C t i , Q t i , and R t i are uniformly distributed in the intervals [30,60] [1,3], respectively. e costs of hardware and software services are assumed to be different from each other; that is, c k, v of software and hardware service is   Step 1. Initialize i as 1.
Step 3. Randomly select an element from h 1 , h 2 , and let h be the chosen and h be the other one.
Step  Table 7 shows the search times when the numbers of solutions are 1000, 5000, and 10,000 and tasks are 5, 10, 15, 20, 25, and 30. It is obvious that as more solutions are searched it takes longer but is more likely to find the best solution. e rightmost column is the average scheduling time per task when 10,000 solutions are considered.
As seen, the maximum search time is 12,438 seconds (3.455 hours) for 10,000 solutions and 30 tasks. A search time of three and a half hours is a relatively long time, raising the concern that the proposed approach is inadequate to be applied to in real time. However, the average time to schedule a task when we searched 10,000 solutions is 205∼420 seconds, approximately 3∼7 minutes. In practice, it is not usual for a complicated task to be uploaded every 7 minutes. In addition, the considered task is overly complicated comparing to realistic tasks, implying that the average time will be much lower than the experiment result provided in this study.
us, once a complete and full    Mathematical Problems in Engineering schedule has been established, which may take several hours, a couple of tasks can be added to the existing schedule, which can be updated within 10 minutes, to produce an efficient schedule. erefore, we conclude that the proposed approach is efficient and can be used in practice with a large number of complicated tasks and services. Even though the proposed algorithm is applied to establish schedules under an unreal situation in terms of the number of tasks and services, it can be applied to real tasks and services uploaded in CM such as in [8].

Conclusion
CM is a manufacturing model based on the concept of sharing manufacturing resources among manufacturing enterprises to deal with highly customized requests of customers. In CM, each request is regarded a task, and it is assigned to one or more enterprises, called task scheduling. e objective of the task scheduling is to maximize customer satisfaction, and therefore, tardiness, cost, quality, and so forth should be considered. In addition, the task should be assigned as soon as possible for practical usage.
is paper addressed a real-time and multiobjective taskscheduling problem to minimize total tardiness, cost, quality, and reliability penalties in CM. is problem was formalized as a binary integer programming model, and the MOGA was designed to solve the model by focusing on generating feasible solutions. From the experiment, we showed that the schedule based on the proposed approach is near the optimal schedule for small problems. In addition, we verified that the proposed approach establishes effective schedules in a real-time manner for a more realistic large-scale problem.
In future research, we will develop a GA that does not generate infeasible or inferior solutions.
is will surely reduce the search time remarkably. In addition, we will conduct practical research to apply our algorithm to the commercialized cloud manufacturing system. Finally, we will improve the proposed multiobjective GA to apply it to train the deep learning model-based CM scheduler.

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

Conflicts of Interest
e authors declare that they have no conflicts of interest.