Abstract

To deal with the problem of resource integration and optimal scheduling in cloud manufacturing, based on the analyzation of the existing literatures, multitask oriented virtual resource integration and optimal scheduling problem is presented from the perspective of global optimization based on the consideration of sharing and correlation among virtual resources. The correlation models of virtual resources in a task and among tasks are established. According to the correlation model and characteristics of resource sharing, the formulation in which resource time-sharing scheduling strategy is employed is put forward, and then the formulation is simplified to solve the problem easily. The genetic algorithm based on the real number matrix encoding is proposed. And crossover and mutation operation rules are designed for the real number matrix. Meanwhile, the evaluation function with the punishment mechanism and the selection strategy with pressure factor are adopted so as to approach the optimal solution more quickly. The experimental results show that the proposed model and method are feasible and effective both in situation of enough resources and limited resources in case of a large number of tasks.

1. Introduction

Cloud manufacturing is a typical model of service-oriented manufacturing [1]; its core idea is to form the pool of cloud manufacturing resource based on the virtualization for manufacturing resources and servitization for manufacturing capacity through the integration of new technologies such as cloud computing and IoT and then provide various manufacturing services which can be obtained anytime, used on demand, safe and reliable, of high-quality, and of low-cost for the full life-cycle manufacturing process, and finally to achieve customers, manufacturers, and providers value added jointly [2, 3].

In cloud manufacturing service system, based on cloud manufacturing service platform, manufacturing enterprises can integrate a large number of personalized requirements to form clustering requirements and can form a dynamic entity named cloud enterprise [4] according to dynamic configuration of clustering requirements and integration of virtual manufacturing resources from the pool of cloud manufacturing resources. The cloud enterprise can provide products or services on demand and finally can satisfy personalized requirements through the optimal scheduling of virtual resources and the mapping of virtual resources and real resources.

After receiving customers’ requirements, cloud manufacturing enterprise usually fulfills through several steps: (1) task classification; (2) task decomposition; (3) resource allocation; (4) resource optimal scheduling; (5) task execution and services feedback evaluation. A large number of existing literatures are based on single task [58]; however, tasks are received continuously in reality. If the method for single task problem is used to solve multitask problem, there would be some following shortages that the scheduling result makes every single task optimized but might not be the best in global view.

(1) If multiple tasks are scheduled one by one adopting the existing single task oriented scheduling method simply, we should sort tasks using typical strategy (e.g., first-come-first-service, task priority marked, etc.) firstly and then configure optimal schedule resources for each task in turn. This makes the optimization goal that the configuration and optimal scheduling of resources only meet the current task each time. The problem is that if the key resources can meet lots of tasks, but only used in the priority task, this will lead to the optimization for multiple tasks from a global perspective that cannot be achieved. Even though the literature [9] optimized the problem from the global view, it did not consider the relationship of resources which would be emphasized in this paper.

(2) Only the exclusivity of resources is considered, and the sharing of resources is not taken into account in a scheduling process. The exclusivity of resources means that if a resource is occupied or used, it cannot be used by other tasks at the same time. In the related literatures of service computing and/or cloud computing [9, 10], the exclusivity of resources means that a resource is used only once in a scheduling process, no matter how many tasks are in a scheduling process. And also the exclusivity of resources is a typical characteristic of resources scheduling in service computing and/or cloud computing environment, because the unit of time for a scheduling is usually seconds or even milliseconds, microseconds [11, 12]. However, in cloud manufacturing environment, the unit of time for resources scheduling is usually days or weeks, so in order to enhance the resources utilization, resources should be considered to reuse in other tasks when resources are free in a multiple tasks scheduling process. In this paper, we call the time division sharing of resources.

(3) The optimal scheduling did not consider the correlation of resources. Resource scheduling, service selection, discovery, and composition in the literatures are based on the features of resources and/or services [1315]. However, in fact, there are correlations among resources, particularly resources were used in tasks. Normally, for example, two consecutive subtasks in a task performed by resources of the same provider should be more efficient than different providers. Here, the same provider is the correlation of resources.

In cloud manufacturing environment, tasks may be continuous, but, in this paper, we put time into segments and handle all tasks in a time slot just like planning in manufacturing enterprises. And then we could optimally schedule virtual resources at the beginning of a time slot, fully considering the correlation and sharing of resources, to break through the limitation of local optimization and to achieve the overall optimization for multiple tasks.

2. Problem Formulation

Just like service composition and optimal scheduling for single task, every single task of multiple tasks for optimal scheduling in cloud manufacturing also should go through decomposition, production of candidate resource sets, selection of resources, and selection of execution path. From the perspective of the execution path of subtasks and candidate resource sets, tasks will be divided into 3 categories in this paper.(1)Different types of tasks: the execution path of subtasks and corresponding candidate resource sets are totally different. For example, tasks from logistics enterprises and tasks from manufacturing enterprises are different types.(2)Same type of tasks: the execution path of subtasks and corresponding candidate resource sets are totally the same. For example, multiple tasks from a certain type of product manufacturing enterprises are the same type.(3)Mixed types of tasks: the execution path of subtasks and corresponding candidate resource sets are partly the same. For example, multiple tasks from different types of product manufacturing enterprises are mixed types. All the tasks have different manufacturing processes but require the same cutting process.

Virtual resources integration and optimal scheduling for different types of tasks could adopt the method of traditional single task execution because of totally different candidate resource sets and execution paths. And for mixed types of tasks, we will study it in the future because of its complexity. So in this paper, we will focus on the same type of tasks and study virtual resource integration and optimal scheduling.

2.1. Motivating Example

Before introducing the problem, an example of manufacturing process of C70E open wagon in CNR is presented to illustrate the problems that are addressed in this paper. The task of manufacturing process for C70E open wagon, denoted by Ta(deliverTime, price), has five subtasks such as wheel processing, hook lock processing, body processing, assembling, painting, experiment, and delivery. Assuming the candidate set of virtual resources (VRS) for each process has three candidate virtual resources (VR), as shown in Figure 1, the first number of the candidate resource denotes the processing days and the second number denotes the cost. For example, the first number “5” of virtual resource indicates the processing days and the second number “700” indicates the cost.

When a cloud manufacturing enterprise received 3 tasks: , we can get an optimal execution path of resource integration to maximize profit , using traditional heuristic method without considering the sharing and correlation of resources. However, when the cloud manufacturing enterprise receives the fourth task at the same time, the tasks could not be fully scheduled without considering the sharing of resources. The general method is that we could select 3 tasks from the 4 tasks to maximize profit. But if we consider the sharing of resources, the cloud manufacturing enterprise could fully schedule the 4 tasks before the deadline of each task. The following is a feasible solution (maybe not the best solution): where . The performance period of tasks is shown in Figure 2.

The feasible solution is that we just delayed starting the fourth task 6 days (). The feasible solution is typically considering the time division sharing of resources (). Obviously, the feasible solution could be further optimized.

On the other hand, there is correlation among resources from the manufacturing and service perspective. In this paper, we divided the correlation of resources into two categories.(1)The correlation of resources in a task: we take the first task , for example, if the selected resources of the last three subtasks belong to the same provider , the cost of will be lower than the default cost. If all of them have 10% off, the cost of execution path will decrease from 2000 to 1940.(2)The correlation of resources among tasks: we take the feasible solution, for example, the resources are used twice, and then the cost will be reduced per use. Assume that all of them have 5% off and the cost of path will be reduced 150, the same as . Finally, the cost of solution will be reduced by 300 than without correlation among tasks.

So, the sharing and correlation of resources are fully considered to realize virtual resource integration and optimal scheduling for multitask in this paper.

2.2. Problem Formulation
2.2.1. Resource Correlation Modelling

For the correlation in a task, we use ontology to describe virtual resources firstly. The virtual resource model can be defined as a 3-tuple: VR(TRAS, CRAS, OAS), where TRAS denotes time related attributes of virtual resources, for example, capacity and resource provider. CRAS denotes cost related attributes of virtual resources, for example, resource provider and the location of corresponding resources. OAS denotes the other attributes, for example, the size of corresponding resources. In this paper, we realize virtual resources integration and optimal scheduling for multitask from two aspects: time and cost. For the other attributes such as the reliability of virtual resources, we could also handle using the proposed method.

Secondly, we can model the correlation of resources based on the virtual resource model. We take the cost of virtual resources C(VR) as an example to model the correlation of resources in a task, and the same as the time of virtual resources T(VR): where denotes the default value without considering the correlation and denotes the other candidate virtual resource sets in which the virtual resource is not included. denotes the cost related attributes; the Boolean function is the correlation function of resources. Therefore, denotes that if the of the selected resource in the makes the Boolean function true, the value of the will be . Obviously, the Boolean function has recursive operations; we only use NOT and AND operations as follows:

For the OR and XOR operations, we can use NOT and AND operations to realize. And NOT operation is prior to AND operation. If there are multiple correlation functions to meet at the same time, the value of the will be selected as the minimized value because the smaller the cost is the better. For other cases, such as reliability, it is the bigger the better.

Therefore, in this paper, the calculation model for time and cost based on resource correlation in a task is as follows:

We will take a detailed example to illustrate the correlation of resources in a task. We still take the cost of in the feasible solution as an example to model the correlation. Firstly, we build the ontology description model of as follows: , where the first set is TRAS, and the third set is OAS. The second set is the value of CRAS; that is to say the provider of is CNR, and the location is QiQiHaer. Then, we can build the cost calculation model as follows:

In the above model, the default cost of using is 300. If the provider of the selected resources of corresponding to the fifth subtask is also CNR, the cost of using will be 285. And further, if the provider of the sixth subtask is also CNR, the cost of using will be 270. If the location of the selected resources of corresponding to the fifth subtask is QiQiHaer, the cost of using will be 295. Obviously, if the provider of the fifth subtask is the same as the sixth subtask and also is the CNR, the second and the third correlation functions in the above model are met at the same time. According to the features of cost, the minimized value 270 (the third correlation function) will be selected.

For the correlation among tasks, we also take the cost of virtual resources as an example to model the correlation of resources among tasks, and the same as the time of virtual resources : where DefaultValue is calculated by formula (5). denotes that if the selected resources in a scheduling process satisfy the correlation function , the value of the will be . For example, the cost per use may be reduced according to the increased times of use. And then, we can simply define the as follows: where is the times of using and denotes cost decay rate.

Again, in this paper, the calculation model for time and cost based on resource correlation among tasks is as follows:

2.2.2. Problem Formulation

Taking account of all the above features, we give the problem description as follows.

Let denote the same type of tasks which the cloud manufacturing enterprise receives within a period of time. Each task has corresponding bid price . Let denote the number of days to delivery date for each task. And each task can be decomposed to subtasks. Let be a feasible solution. Each subtask can be executed by a resource of the corresponding candidate resource set . And there are resources in each candidate resource set . Then the feasible solution should be under the following constraints:

The constraint (10) means that some tasks may be not executed. In constraint (11), denotes the task corresponding to the feasible solution . And constraint (11) means that all the executed tasks must be finished before delivery date. Constraints (12) mean that the exclusivity and sharing are considered for each selected resource. If the was used by in the period of , it cannot be used in any other at the same time, but it can be used in any other period.

How to evaluate the feasible solution? From the perspective of cloud manufacturing enterprise, the following objects should be considered.(i)The more the profit the better: where .(ii)The bigger the number of tasks that can be executed the better:

The above two objects are not necessarily linear relations. For an extreme example, the profit of a task may be more than all the other tasks in an enterprise. In reality, it is also meaningful. For example, a start-up cloud manufacturing enterprise may reduce some profits to get more customers, then get more market share, and finally get more profits.

2.3. Model Analysis

Obviously, the problem of multitask oriented virtual resource integration and optimal scheduling in cloud manufacturing belongs to the multiobjective optimization problem. Such problems can usually be solved by Pareto optimal method and can also be transformed to single objective to solve by weighting method. In this paper, we transform the multiple objectives to single objective as follows by linear weighting method: where and are the corresponding weighted parameters to control the relative significance of each objective, and . The values will be given according to the target of the optimization.

In order to reduce the number of variables in the model and obtain more convenience to solve the problem, we normalize and handle the as follows:

The variables are given, where is Boolean value. If the value of is 1, the task will be executed. Otherwise, the task will not be executed. And then (15) can be transformed as follows:

Therefore, (11) can be transformed as follows:

In order to simplify (12), it is assumed that we will schedule tasks in the future period and divide into several equal parts. Therefore, in any period , we will give the Boolean variable which denotes that if the th virtual resource in the candidate resource set is selected to execute the task in the period , the variable will be true. Otherwise, the variable will be false. And then (12) will be transformed as follows:

Meanwhile, the variable should satisfy the following constraint to ensure that a subtask is only executed by a resource in the period :

Therefore, the mathematical formulations for multitask oriented virtual resource integration and optimal scheduling in cloud manufacturing are as follows: (17) subject to (18), (19), (20), and (21). Consider that

Apparently, the above problem belongs to NP-hard problem.

3. Virtual Resource Integration and Optimal Scheduling

GA is a population-based stochastic optimization technique inspired by the mechanism of natural selection and evolution. According to the code of solution space and the operation of the decision variables for the problem, GA can get the proximate optimal solution quickly by guided search in the total solution space. Therefore, GA is usually used to solve the problem of composition and optimal scheduling under the complex constraints.

In this paper, we adopt GA based on the real number matrix code to solve the problem of multitask oriented virtual resource integration and optimal scheduling in cloud manufacturing.

3.1. Chromosomal Representation

The solution is coded as the following real number matrix:

Each row of matrix denotes a task. The columns in matrix are divided into parts, each part indicates a period , and, in each part, there are columns which denote subtasks in each task. Therefore, there are columns in the matrix , and the subscript meanings of the element in the matrix are as follows:: the identification of the th task;: the th subtask of the task;: the th period.

The value of the matrix element is an integer from . It means that the th virtual resource in the th candidate resource set is selected to execute the task in the period where . Otherwise, the th subtask of the task in the period will not be executed.

The matrix is related to the variables as follows.(i)If the values of the th row in the matrix are all 0, the th task will not be executed, and then the variable equals 0. Otherwise, the value of the variable is 1.(ii)If in the period , the variable equals 1, and then the values of all the other rows in the th column of the th part cannot equal which is expressed as , where . Obviously, the constraint (19) is satisfied.(iii)If in the period , the variable equals 1, and then for the same and , , where and . Obviously, the constraint (20) is satisfied.

3.2. Initial Population

Each individual in the initial population is generated randomly column by column as follows so as to ensure the individual randomness and avoid the local optimization.(i)In the period of , we used the following method to generate the first column value. If the number of tasks is less than the number of virtual resources in the corresponding candidate resources set, that is, , we will randomly select values from to form a random sequence as the first column. Otherwise, we will select all of the values and zeros to form a random sequence as the first column. After that the value of all the other columns in the period of will be zero according to the rule that any task can be transformed to the sequence process [13].(ii)In the period of , we firstly see the corresponding column of the period . If the th subtask is not finished in the period , then . If the subtask is finished, then and at the same time. The value of the should be randomly picked from the remaining numbers after being finished by .

3.3. Crossover and Mutation

Because of the real number encoding of the solution, the traditional crossover and mutation operators of the Boolean value cannot be simply used in this paper. We design the crossover and mutation operators as follows.

(1) Row-Based Crossover. We will firstly generate an -dimension Boolean type column vector . We will swap the th row of the two parent matrices if , do nothing if , and finally generate the new two matrices. The constraints may not be satisfied, that there may be the same nonzero number in the same column after row-based crossover operating. Therefore, we must run the following fixed program to make the new two matrices satisfy the constraints. See Algorithm 1.

(1) For 1 to // looped by columns
(2) For 1 to //checked by rows
(3)  If , jump to Step  2;
(4)  Else
    If , jump to Step  2;
    Else
     If not existed the same non-zero number, jump to
     Step  2;
     Else
      Randomly selected a number from the difference
      set between the set and the current column
      value set to replay. If the difference sets is , then
      set ;
(5) For End
(6) For End

(2) Column-Based Crossover. Similar to the row-based crossover, we will firstly generate a -dimension Boolean type row vector . We will swap the th row of the two parent matrixes if , do nothing if , and finally generate the new two matrixes. Obviously, the new two matrixes also satisfy the constraints.

(3) Block-Based Crossover. Block-based crossover is operated for the unit of block corresponding to the period of . Therefore, we will generate a -dimension Boolean type row vector . We will swap the th block of the two parent matrixes if , do nothing if , and finally generate the new two matrices. Obviously, similar to the column-based crossover, the new two matrices also satisfy the constraints.

(4) Row-Based Mutation. Firstly, we give the mutation rules. We will change the value as follows if the value is not zero and do not change the value if the value is zero:

For the row-based mutation, we will firstly generate a -dimension Boolean type column vector . We will change all of nonzero number according to the above rule in the th row of the parent matrix if , do nothing if , and finally generate the new matrix. The constraints may not be satisfied that there may be the same nonzero number in the same column after row-based mutation operating. Therefore, we must run the above fixed program to make the new matrix satisfy the constraints.

(5) Column-Based Mutation. Similar to the row-based mutation, We will firstly generate a -dimension Boolean type row vector . We will change all of nonzero number according to the above rule in the th row of the parent matrix if , do nothing if , and finally generate the new matrix. Obviously, the new matrices also satisfy the constraints.

(6) Block-Based Mutation. Similar to the block-based crossover, block-based mutation is also operated for the unit of block corresponding to the period of . Therefore, we will generate a -dimension Boolean type row vector . We will change all of nonzero numbers according to the above rule in the th block of the parent matrix if , do nothing if , and finally generate the new matrix. The constraints may not be satisfied that there may be the same nonzero number in the same column after block-based mutation operating. Therefore, we must run the above fixed program to make the new matrix satisfy the constraints.

3.4. Fitness Function and Selection Strategy

Based on the objective function, the fitness function will be given in this paper as follows:

So as to select the new generation population, the penalty function for will be given as follows: where denotes penalty factor. If the constraint (18) is satisfied in the task , the penalty will not be carried out; that is to say the value of is 1. Otherwise, the penalty will be carried out, and if , the value of the is bigger, and the penalty factor is also bigger. Therefore, we can give the penalty function for the feasible solution as follows:

Based on the above function, the final fitness function in this paper is given as follows:

Apparently, we should reduce the number of the executed tasks or adjust the execution time or sequence of tasks if the constraint (18) is not satisfied in the feasible solution.

Traditional direct proportion selected strategy is adopted in this paper to generate offspring. In addition, we give the pressure factor for the fitness function so as to approach the optimal solution quickly.

For the individual in the population whose size is , the fitness value is , and the selection probability is where denotes pressure factor, and the value range is .

4. Experiments and Discussion

These experiments are performed based on the above example (described in Section 2.1) to test the effectiveness of the proposed method. We will perform the experiments with the conditions of enough resources and limited resources.

4.1. Experiments and Discussion with Enough Resources

We will evaluate the results affected by the correlation of resources with enough resources. The experiments are performed in the following 3 situations:(i)the correlations are not taken into account E1;(ii)only the correlations in a task are taken into account E2;(iii)both the correlations in a task and among tasks are taken into account E3.

The parameters of the model are given as follows: the population size , max generation is 100, the probability of crossover is 0.9, the probability of mutation is 0.05, the pressure factor , the penalty factor , and and . And the percent of correlation resources in a task is 30%; the percent of correlation resources among tasks is 40%.

The results of the experiments are shown in Figure 3.

In Figure 3, the -coordinate denotes the total profits of all executed tasks. The -coordinate denotes the number of tasks. With the number of tasks increased, the number of resources in corresponding candidate resources set is also increased to ensure that there are enough resources to execute all the tasks, but the percent of the correlation in a task and among tasks will not be changed.

As we can see in Figure 3, the total profit discrepancy in 3 situations is not bigger if the number of tasks is small (the number is less than 100). The reason is that the influence of the correlation of resources used in tasks is very small. But along with the increased number of tasks, the advantages of E2 and E3 which take correlations into account are huge, and the profits of E2 and E3 are much more than E1 for the same number of tasks, and the gap will be bigger and bigger. That is because the correlations both in a task and among tasks are considered, and the cost of selected resource will be lower than the default value. Therefore, it can be concluded that the proposed method that considered the correlations of resources has better performance than without considering the correlations.

4.2. Experiments and Discussion with Limited Resources

We will evaluate the results affected by the sharing of resources with limited resources. The experiments are performed in the following 2 situations:(i)the sharing is not taken into account E4;(ii)the sharing is taken into account E5.

The parameters of the model are given as follows: the population size , max generation is 200, the probability of crossover is 0.95, the probability of mutation is 0.03, the pressure factor , the penalty factor , and and . And the percent of correlation resources in a task is 30%; the percent of correlation resources among tasks is 40%. The number of resources in each candidate resources set is fixed to 16, and the number of the given tasks varies from 2 to 30 which is an increment of 2.

The results of the experiments are shown in Figure 4.

In Figure 4, the -coordinate denotes the total profits of the executed tasks. The -coordinate denotes the number of given tasks. The number beside lines denotes the number of the executed tasks.

As we can see in Figure 4, the total profit and the number of executed tasks in E4 are the same as E5 if the number of tasks is less than 16. The reason is that all of the tasks could be executed without considering the sharing of resources. But along with the increased number of tasks, the number of tasks will not increase and keep 16 without considering the sharing of resources. But all the tasks can be executed with considering the sharing of resources until the number of given tasks is 28, and the profits are much more than without considering the sharing of resources. That is because the sharing of resources is considered. Therefore, it can be concluded that the proposed method that considered the sharing of resources has better performance than without considering the sharing and can solve the problem better for multitask oriented virtual resource integration and optimal scheduling which resources are limited.

5. Conclusions and Future Works

In this paper, the correlation and sharing of resources are both considered during multitask oriented virtual resources integration and optimal scheduling in cloud manufacturing, and the correlation and sharing models are presented. The problem is proposed and formulized, and GA based on the real number matrix code is employed to solve the problem. The experimental results show that the proposed methods are more effective and efficient for the problem.

Only the cost and time of Qos are considered in this paper; actually, there are many other factors to be considered such as reliability and trust. In the algorithm, there are a lot of invalid solutions in the solution space. In the future, we should avoid the invalid solutions during the process of algorithm or reduce the solution space by optimizing the code of solution to make the algorithm more effective. In addition, only one cloud manufacturing enterprise is considered; in the future, we should solve the problem for multienterprises.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This paper is supported by the National Science and Technology Support Program (Grant no. 2012BAF12B16), the 973 Program of China (Grant no. 2010CB328000), the National Natural Science Foundation of China (Grant nos. U1201251 and 61133016), and the National 863 Plan of China (Grant no. 2012AA040906).