# An Optimization Algorithm for Multipath Parallel Allocation for Service Resource in the Simulation Task Workflow

Authors: Zhiteng Wang; Hongjun Zhang; Rui Zhang; Yong Li; Xuliang Zhang
Journal: The Scientific World Journal
 (2014)

---

## Abstract

Service oriented modeling and simulation are hot issues in the field of modeling and simulation, and there is need to call service resources when simulation task workflow is running. How to optimize the service resource allocation to ensure that the task is complete effectively is an important issue in this area. In military modeling and simulation field, it is important to improve the probability of success and timeliness in simulation task workflow. Therefore, this paper proposes an optimization algorithm for multipath service resource parallel allocation, in which multipath service resource parallel allocation model is built and multiple chains coding scheme quantum optimization algorithm is used for optimization and solution. The multiple chains coding scheme quantum optimization algorithm is to extend parallel search space to improve search efficiency. Through the simulation experiment, this paper investigates the effect for the probability of success in simulation task workflow from different optimization algorithm, service allocation strategy, and path number, and the simulation result shows that the optimization algorithm for multipath service resource parallel allocation is an effective method to improve the probability of success and timeliness in simulation task workflow.


---

## Body

## 1. Introduction

With the development of web technology, web service technology, SOA, grid, and cloud computation, there is a great revolution in modelling and simulation field. A framework of modelling and simulation based on simulation service, that is, service oriented modelling and simulation, is being formed. Service oriented simulation task framework from service oriented idea depends on information grid infrastructure with unified simulation description, access, and share standard to complete simulation task with the way of dynamic creation and running in the simulation resource interlink and share environment. Compared with traditional simulation framework, one of the service oriented modeling and simulation framework main characteristics is supporting dynamic creation and running simulation application and dynamic integration and running simulation in network by calling simulation service resource according to the simulation task workflow need.In service oriented military modeling and simulation field, it is important to improve the probability of success and timeliness in simulation task workflow. Many researchers have done lots of research on how to improve the probability of success and timeliness in service composition in many stages. Some researchers try to improve the probability of simulation task workflow work success instead of failed service [1–3], but this method does not consider the timelessness of workflow. Therefore, it will produce extra time charge when the called service cannot respond or makes a mistake. Artificial intelligence (AI) planner is also applied to solve service composition combinatorial optimization problem [4–7]. But for the reason that it could immensely increase coupling between AI planner and other procedures when the special AI planner is used to solve automatic service composition problem, it will lead to limiting its web composition application filed. In addition, there are many differences in AI planner for applicability and designs performance, and this reason will result in biased service composition scheme and larger composition charge. Yajuan Song proposes a blend web service composition scheme based on buffer pool [8], in which dynamic service composition scheme is saved in buffer pool and user can use the composition scheme as well as use predefined workflow. But the composition algorithm should be improved. ZHANG Bo investigates a service composition algorithm based on sub-Web service, in which the multi-input and multioutput parameter of web service is divided into sub-Web service with multi-input and single output parameters. In this way, it reduces dependencies of a Web service for multiple outputs with higher composition efficiency. In this way, we reduce dependencies of a Web service on multiple-output with higher composition efficiency; however, there exists redundancy in the composition route. Genetic algorithm (GA) and particle swarm optimization (PSO) [9] are typical evolution algorithm in service composition optimization filed, and PSO is more effective than GA with advantages such as too few arguments specified and the faster convergence speed. However, the local particle in the swarm is easy to be regarded as global best position leading to quickly converging to local best value. Zheng et al. [10] and Zeng et al. [11] use objective programming method to find the best path satisfied with condition by building the objective function with the condition and the probability of success and time requisition. The shortcomings of which may not complete the workflow requests.Xiaohao et al. propose parallel allocation algorithm for service [12], in which one node starts many services to improve the probability of success and time requests in the simulation task workflow. The method gets good result but there exists exception probability in large-scale simulation task. Therefore, based on service parallel allocation in [12], this paper extends the scheme and proposes an optimization algorithm for multipath service resource parallel allocation scheme to further improve the probability of simulation task workflow work success and time and solve service scheduling problem.The following section will investigate the systematic structure of simulation task body from two perspectives, that is, the reference model and the framework structure of simulation task body.In service oriented military model and simulation field, it is important to ensure the timeliness and the probability of success in the simulation task workflow or it will greatly affect the workflow work efficiency and even lead to workflow which cannot complete the task. In fact, it could improve the timeliness and the probability of success by the optimization of the service composition in simulation task workflow. However, many optimization algorithms have deficiencies in solving this problem. For this reason, this paper proposes an optimization algorithm for multipath service resource parallel allocation for service resource to improve the timeliness and the probability of success in the simulation task workflow.


## 2. The Description of Service Composition Problem

### 2.1. The Concept of Service Scheduling and Simulation Task Workflow Framework

The concept of workflow originated from the organization of production and office automation field, in which work was separated into well-defined task, role, and the work is executed and monitored by specific rule and process to improve work probability and reduce production costs and raise enterprise competitive power. In military service oriented model and simulation field, workflow idea is introduced to arrange the role produce specific event under the simulation plot rule in simulation task. The event of role is related to simulation service agent, which is a service set and could call the simulation service by simulation service bus. The specific simulation service in service sets is eventual execution unit, and the purpose of service scheduling is to find the best path to allocate the simulation service in service sets to specific event of role in simulation plot. It can be shown in Figure1.Figure 1
Simulation task workflow running framework.The scheduling is to build a mapping relation from simulation event sets to simulation service sets by the scheduling algorithm. Its purpose is to choose the best service composition path under the simulation task limited condition to effectively complete the simulation. In the following part, a simulation task example of artillery firepower attacking is described. In this simulation task plot, artillery firepower attacking step is as follows.(1)
The artillery needs to get enemy's position by radar search service.
(2)
The artillery needs to get enemy's global situation by situation analysis service.
(3)
The artillery needs to prepare for firing by firing preparation service.
(4)
The artillery needs to fire allocation scheme by fire allocation service.In order to improve timeliness and the probability of success in simulation task, the probability of success and response time should be constrained. In the first phase, the longest echo time (LET) of radar service should be less than 10 seconds and the success call probability (SCP) should be more than 98%. In the second phase, for situation analysis service and firing preparation service, LET is required less than 30 seconds and SCP is required more than 98%. In the third phase, for situation analysis service and firing preparation service, LET is required less than 30 seconds and SCP is required more than 98%. For the whole of simulation task, LET is less than 40 seconds and SCP is required more than 98%. It can be shown in Figure2.Figure 2
The service composition model under condition.


### 2.2. The Description of Service Scheduling Model

Simulation task plot is used to arrange role completion action in specific time and position and it is important measure for workflow service scheduling. In fact, service scheduling is to optimize the simulation service composition, and service scheduling model can be simply described as the relation of simulation service composition optimization according to the simulation plot. Therefore, service scheduling optimization model can be described as:P
=
{
S
,
P
,
C
} wherein S is representative of the service sets according to the event in plot, S
=
{
S
1
,
S
2
,
S
3
,
…
,
S
n
}; P is representative of the mapping from the event relation to simulation service relation; C is representative of the constrained condition in the whole process.


### 2.3. The Optimization of Service Composition Path

The service composition path is selected one by one from simulation service sets to form a service composition path to complete simulation task. It can be shown in Figure3.Figure 3
Service composition path choosing.From Figure3, we can see that many paths can be selected by the methods of exhaustion, intelligence algorithm, and so forth to compile statistics quality of service and get the service composition path. However, these methods cannot ensure that the path is the best choice, because these methods are only considering the ideal condition without considering unexpected exception in practice.


## 2.1. The Concept of Service Scheduling and Simulation Task Workflow Framework

The concept of workflow originated from the organization of production and office automation field, in which work was separated into well-defined task, role, and the work is executed and monitored by specific rule and process to improve work probability and reduce production costs and raise enterprise competitive power. In military service oriented model and simulation field, workflow idea is introduced to arrange the role produce specific event under the simulation plot rule in simulation task. The event of role is related to simulation service agent, which is a service set and could call the simulation service by simulation service bus. The specific simulation service in service sets is eventual execution unit, and the purpose of service scheduling is to find the best path to allocate the simulation service in service sets to specific event of role in simulation plot. It can be shown in Figure1.Figure 1
Simulation task workflow running framework.The scheduling is to build a mapping relation from simulation event sets to simulation service sets by the scheduling algorithm. Its purpose is to choose the best service composition path under the simulation task limited condition to effectively complete the simulation. In the following part, a simulation task example of artillery firepower attacking is described. In this simulation task plot, artillery firepower attacking step is as follows.(1)
The artillery needs to get enemy's position by radar search service.
(2)
The artillery needs to get enemy's global situation by situation analysis service.
(3)
The artillery needs to prepare for firing by firing preparation service.
(4)
The artillery needs to fire allocation scheme by fire allocation service.In order to improve timeliness and the probability of success in simulation task, the probability of success and response time should be constrained. In the first phase, the longest echo time (LET) of radar service should be less than 10 seconds and the success call probability (SCP) should be more than 98%. In the second phase, for situation analysis service and firing preparation service, LET is required less than 30 seconds and SCP is required more than 98%. In the third phase, for situation analysis service and firing preparation service, LET is required less than 30 seconds and SCP is required more than 98%. For the whole of simulation task, LET is less than 40 seconds and SCP is required more than 98%. It can be shown in Figure2.Figure 2
The service composition model under condition.


## 2.2. The Description of Service Scheduling Model

Simulation task plot is used to arrange role completion action in specific time and position and it is important measure for workflow service scheduling. In fact, service scheduling is to optimize the simulation service composition, and service scheduling model can be simply described as the relation of simulation service composition optimization according to the simulation plot. Therefore, service scheduling optimization model can be described as:P
=
{
S
,
P
,
C
} wherein S is representative of the service sets according to the event in plot, S
=
{
S
1
,
S
2
,
S
3
,
…
,
S
n
}; P is representative of the mapping from the event relation to simulation service relation; C is representative of the constrained condition in the whole process.


## 2.3. The Optimization of Service Composition Path

The service composition path is selected one by one from simulation service sets to form a service composition path to complete simulation task. It can be shown in Figure3.Figure 3
Service composition path choosing.From Figure3, we can see that many paths can be selected by the methods of exhaustion, intelligence algorithm, and so forth to compile statistics quality of service and get the service composition path. However, these methods cannot ensure that the path is the best choice, because these methods are only considering the ideal condition without considering unexpected exception in practice.


## 3. The Strategy of Multipath Parallel Allocation for Service

When the simulation service is called, various problems may occur in the simulation task workflow during run time and the task may not be completed. In order to solve this problem, many researchers have taken a variety of approaches such as failed service instead, recall service again, and reselection of the path of service composition. The method of failed service instead is to replace the simulation service which is unable to continue to provide the service in process of the simulation task, and then another appropriate simulation service which has the same function in the service sets is called to complete the service function which the exception simulation service should complete. It can be shown in Figure4.Figure 4
Failed service instead sketch.The method of recall service is to recall service when the simulation service cannot complete the appropriate service function and surpass maximum response time. This method can be applied when the simulation service in service sets is not enough or it requires a higher limitation of simulation to use. Because the time expense for this method is small, if we recall the service again, it will restore the function promptly, so the simulation task workflow may restore the work in the shortest time.The method of reselection of the path of service composition is to choose a service composition path again under the constrained condition and then run the simulation task again. This method’s time expenses are large. Because it means the simulation service in original path should complete the task again in the new service composition path, so this method is used in the situation in which both of the expiration substitution method and recall service method are unable to complete the simulation task.In fact, although these methods may reduce the influence to some extent on the simulation task workflow when the simulation service makes the mistake, it also takes time expenses as price. This is not permitted for real time simulation task, so it needs to use a more nimble method to solve this problem. In order to improve the probability of success and timeliness in simulation task workflow, this paper proposes an optimization algorithm for multipath service resource parallel allocation to handle service failure to be called in the service composition process, and each path is a parallel distribution services allocation plot. In the practice, various traditional methods such as failed service instead and recall service can be used synthetically. For example, two paths are selected and each node has two parallel services in each path. It can be shown in Figures5(a) and 5(b).(a) The first path for multiple service parallel allocation. (b) The second path for multiple service parallel allocation.
(a)
(b)This method is simultaneously calling many paths, and in each path simulation service simultaneously is called with many parallel services in service sets. The shortest response time of the first path in a number of paths can be selected as the main implementation of the path, in which any service can be selected as a main service when it has the shortest response time. If other main service is failed, other parallel service will be selected as main service. The difference from traditional instead methods is the parallel services running, and the workflow work cannot be effected even if one service is exception. Therefore, it nearly does not spend other expenses. In particular, because many paths run simultaneously, if the service in the main path produces an unexpected result, the service in another path can also run instead of it in time to effectively improve probability of success and timeliness for simulation task.


## 4. The Model of Multipath Service Parallel Allocation

Suppose there existn agents in accordance with n service sets in workflow. S
i
(
i
=
1,2
,
3
,
…
,
n
) represents the service in accordance with the ith service agent. S
i
j
(
j
=
1,2
,
3
,
…
,
m
) represents the ith service agent in accordance with m services in simulation service bus and the j represents the jth service in m services called. Suppose the probability of success service S
i
j is f
(
i
,
j
) and its completion time follows a normal distribution under mean as u
i
j and variance as σ
i
j
2. When the workflow simultaneously call m service in S
i, its probability can be shown in the following formula:
(1)
Suc
(
i
)
=
1
-
∏
j
=
1
m
(
1
-
f
(
i
,
j
)
)
.M
i
=
Min
⁡
(
t
i
,
1
,
t
i
,
2
,
…
,
t
i
,
m
) is used to represent time distribution function in accordance with the ith service agent, where t
i
,
j is the ith service in m services called by service agent. It is normal distribution and can be shown in the following formula:
(2)
T
i
(
t
,
j
)
=
Suc
(
M
i
≤
t
)
=
1
-
Suc
(
M
i
≥
t
)
=
1
-
Suc
[
⋂
j
=
1
m
(
t
i
.
j
≥
t
)
]
=
1
-
∏
j
=
1
m
Suc
(
t
i
,
j
≥
t
)
=
1
-
∏
j
=
1
m
[
1
-
Suc
(
t
i
,
j
<
t
)
]
=
1
-
∏
j
=
1
m
[
1
-
T
i
,
j
(
t
)
]
=
1
-
∏
j
=
1
m
[
1
-
1
2
π
σ
i
,
j
∫
0
t
e
-
(
t
-
u
i
,
j
)
2
/
2
σ
i
,
j
2
d
t
]
.The success probability of simulation serviceS
i in the ith simulation in the waiting time of d
i is as follows:
(3)
Suc
T
i
(
d
i
,
i
)
=
Suc
(
i
)
*
T
i
(
t
,
j
)
=
[
1
-
∏
j
=
1
m
(
1
-
f
(
i
,
j
)
)
]
×
[
1
-
∏
j
=
1
m
(
1
-
1
2
π
σ
i
,
j
h
h
h
h
h
h
h
h
h
h
h
×
∫
0
d
i
e
-
(
t
-
u
i
,
j
)
2
/
2
σ
i
,
j
2
d
t
)
-
∏
j
=
1
m
(
1
-
1
2
π
σ
i
,
j
]
.Supposen events according to n services in a service composition path. Let m
=
〈
m
1
,
m
2
,
…
,
m
n
〉, where m
i
(
i
=
1,2
,
…
,
n
) represents the number of parallel called services in this node. Suppose simulation service bus could support A
i
(
m
i
∈
A
i
) service for the ith node, and the system expense in the parallel running m
i services can be shown by the following formula:
(4)
C
i
(
m
i
)
=
e
(
m
i
/
A
i
)
2
.Therefore, the whole process of parallel service running expense can be shown as(5)
C
(
m
)
=
∑
i
=
1
n
e
(
m
i
/
A
i
)
2
.The ultimate optimization goal is to select properm which is satisfied with constraint condition for service time and probability, and the service running expense is the lowest. Suppose the weighting for the ith service in the whole service is W
i, ∑
i
=
1
n
W
i
=
1 and the ultimate optimization model can be represented as
(6)
Min
⁡
(
c
(
m
)
)
=
Min
⁡
∑
i
=
1
n
W
i
e
(
m
i
/
A
i
)
2
s
.
t
.
hhh
Suc
T
j
(
Suc
T
1
(
d
1
,
m
1
)
,
Suc
T
2
(
d
2
,
m
2
)
h
h
h
h
h
h
h
h
h
h
h
⋯
Suc
T
n
(
d
n
,
m
n
)
)
>
SC
P
j
hhhhhh
0
<
T
j
(
d
1
,
d
2
,
…
,
d
n
)
<
LE
T
j
.


## 5. Service Scheduling Optimization Based on Quantum Optimization Algorithm

In fact, the problem of multiple services parallel allocation is service resource scheduling problem which is a NP problem. Many methods have been proposed to solve this problem: GA, PSO, and so forth. However, there always exist many disadvantages in partial convergence or slow optimization. Quantum computation is based on the principal concepts of the quantum theory [13, 14]. Numerous researchers have devoted increasing interests to quantum computation, a novel interdisciplinary field that covers quantum mechanics and information science [15–24]. This paper tries to use a quantum optimization algorithm with multiple chain coding schemes to solve this problem and mainly use four-chain quantum-inspired evolutionary algorithm (FCQIEA) to solve.


### 5.1. Expanded Encoding Method for Quantum Chromosome

From [24] we can know that multiple chains can be required in Figure 6.Figure 6
Schematic diagram of the qubit probability amplitude decomposition.From Figure6, we can get (7) as follows:
(7)
|
φ
>
=
[
cos
⁡
θ
,
cos
⁡
θ
sin
θ
,
sin
θ
sin
θ
]
T
.To describe the quantum dynamics behavior objectively, comprehensively, and unambiguously, we can use a new angleφ (0
<
φ
<
π), which is called “supporting role,” to replace θ and obtain vector sin
θ as follows:
(8)
[
sin
φ
×
sin
θ
,
cos
⁡
φ
×
sin
θ
,
cos
⁡
θ
]
T
.
Equation (8) also satisfies the normalization condition. In fact, (8) also corresponds to the three-chain encoding method:
(9)
p
i
=
|
sin
φ
i
1
sin
θ
i
1
cos
⁡
φ
i
1
sin
θ
i
1
cos
⁡
φ
i
1
|
⋯
|
sin
φ
in
sin
θ
i
j
cos
⁡
φ
in
sin
θ
i
j
cos
⁡
φ
i
j
|
.Likewise, we can obtain vectorsin
φ
sin
θ by adding the “supporting role” β to form the four-chain encoding method as follows:
(10)
[
cos
⁡
β
×
cos
⁡
φ
×
sin
θ
,
sin
β
sin
φ
×
sin
θ
,
cos
⁡
φ
sin
θ
,
cos
⁡
θ
]
T
,
p
i
=
|
cos
⁡
β
i
1
sin
φ
i
1
sin
θ
i
1
sin
β
i
1
sin
φ
i
1
sin
θ
i
1
cos
⁡
φ
i
1
sin
θ
i
1
cos
⁡
θ
i
1
|
⋯
|
cos
⁡
β
i
j
sin
φ
i
j
sin
θ
i
j
sin
β
i
j
sin
φ
i
j
sin
θ
i
j
cos
⁡
φ
i
j
sin
θ
i
j
cos
⁡
θ
i
j
|
.We can obtain four optimal solutions, which are expressed as follows:(11)
p
i
1
=
(
cos
⁡
β
i
1
sin
φ
i
1
sin
θ
i
1
,
…
,
cos
⁡
β
in
sin
φ
in
sin
θ
in
)
p
i
2
=
(
sin
β
i
1
sin
φ
i
1
sin
θ
i
1
,
…
,
sin
β
in
sin
φ
in
sin
θ
in
)
p
i
3
=
(
cos
⁡
φ
i
1
sin
θ
i
1
,
…
,
cos
⁡
φ
in
sin
θ
in
)
p
i
4
=
(
cos
⁡
θ
i
1
,
…
,
cos
⁡
θ
in
)
.With the same principle, we can getN
+
1 chains’ coding scheme as follows:
(12)
p
i
=
|
(
sin
θ
n
)
i
1
(
sin
θ
n
-
1
)
i
1
⋯
(
sin
θ
2
)
i
1
(
sin
θ
1
)
i
1
(
cos
⁡
θ
n
)
i
1
(
sin
θ
n
-
1
)
i
1
⋯
(
sin
θ
2
)
i
1
(
sin
θ
1
)
i
1
⋮
(
cos
⁡
θ
3
)
i
1
(
sin
θ
2
)
i
1
(
sin
θ
1
)
i
1
(
cos
⁡
θ
2
)
i
1
(
sin
θ
1
)
i
1
(
cos
⁡
θ
1
)
i
1
|
⋯
|
(
sin
θ
n
)
i
j
(
sin
θ
n
-
1
)
i
j
⋯
(
sin
θ
2
)
i
j
(
sin
θ
1
)
i
j
(
cos
⁡
θ
n
)
i
j
(
sin
θ
n
-
1
)
i
j
⋯
(
sin
θ
2
)
i
j
(
sin
θ
1
)
i
j
⋮
(
cos
⁡
θ
3
)
i
j
(
sin
θ
2
)
i
j
(
sin
θ
1
)
i
j
(
cos
⁡
θ
2
)
i
j
(
sin
θ
1
)
i
j
(
cos
⁡
θ
1
)
i
j
|
.


### 5.2. Solution Space Transformation

In the quantum evolution progress, all qubits have limited values within  –1 to 1. Thus, we need to transform all qubit values from unit spaceI
n
=
[
-
1,1
]
n to space Ω of the continuous optimization problem (1) by using linear transformation. Each gene value corresponds to an optimization variable in the solution space. If thejth qubit on chromosome p
i is [
x
i
j
4
,
x
i
j
3
,
x
i
j
2
,
x
i
j
1
], then the corresponding variables in the solution space are computed as follows:
(13)
X
i
1
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
X
i
2
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
X
i
3
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
X
i
4
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
,
where i
=
1,2
,
3
,
…
,
m and j
=
1,2
,
3
,
…
,
n. Thus, each chromosome maps to four approximate solutions of the optimization problem.


### 5.3. Quantum Chromosome Update

Considering thatm quantum chromosomes are present in the colony and we can obtain 4
m approximate solutions by solution space transformation, we can then compute the fitness of these approximate solutions and define the solution with the maximum fitness as the current optimum solution in the quantum evolution progress. The chromosome corresponds to the current optimum solution called the optimum chromosome. By computing the fitness, we can obtain both optimum solution and optimum chromosome and subsequently update the colony by using the quantum rotation gate to obtain the optimal solution. In this updated process, the new optimum chromosome can be produced such that the colony can likely evolve. The present study proposes the quantum rotation gate U to update the individual qubit as follows:
(14)
U
=
[
u
11
u
12
u
13
u
14
u
21
u
22
u
23
u
24
u
31
u
32
u
33
u
34
u
41
u
42
u
43
u
44
]
,
u
11
=
[
cos
⁡
Δ
β
cos
⁡
Δ
φ
(
cos
⁡
Δ
θ
-
sin
Δ
θ
cos
⁡
θ
sin
θ
)
]
T
,
u
12
=
[
sin
Δ
β
cos
⁡
Δ
φ
(
sin
Δ
θ
cos
⁡
θ
sin
θ
-
cos
⁡
Δ
θ
)
]
T
,
u
13
=
[
sin
Δ
φ
cos
⁡
Δ
θ
(
sin
β
sin
Δ
β
-
cos
⁡
β
cos
⁡
Δ
β
)
]
T
,
u
14
=
[
cos
⁡
φ
sin
Δ
φ
(
cos
⁡
β
cos
⁡
Δ
β
-
sin
β
sin
Δ
β
)
]
T
,
u
21
=
[
-
sin
Δ
β
sin
Δ
φ
(
cos
⁡
Δ
θ
+
sin
Δ
θ
cos
⁡
θ
sin
θ
)
]
T
,
u
22
=
[
-
cos
⁡
Δ
β
sin
Δ
φ
(
cos
⁡
Δ
θ
+
sin
Δ
θ
cos
⁡
θ
sin
θ
)
]
T
,
u
23
=
[
cos
⁡
Δ
φ
cos
⁡
Δ
φ
(
sin
β
cos
⁡
Δ
β
+
cos
⁡
β
sin
Δ
β
)
]
T
,
u
24
=
[
cos
⁡
φ
cos
⁡
Δ
φ
cos
⁡
Δ
φ
(
sin
β
cos
⁡
Δ
β
+
cos
⁡
β
sin
Δ
β
)
]
T
,
u
31
=
-
sin
Δ
φ
cos
⁡
β
,
u
32
=
0
,
u
33
=
cos
⁡
Δ
φ
cos
⁡
Δ
θ
,
u
34
=
[
sin
Δ
θ
(
cos
⁡
φ
cos
⁡
Δ
φ
-
sin
φ
sin
Δ
φ
)
]
T
,
u
41
=
u
42
=
0
,
u
43
=
sin
Δ
θ
cos
⁡
φ
,
u
44
=
cos
⁡
Δ
θ
,
U
[
cos
⁡
β
sin
φ
sin
θ
sin
β
sin
φ
sin
θ
cos
⁡
φ
sin
θ
cos
⁡
θ
]
=
[
cos
⁡
⁡
(
β
+
Δ
β
)
sin
⁡
(
φ
+
Δ
φ
)
sin
⁡
(
θ
+
Δ
θ
)
sin
⁡
(
β
+
Δ
β
)
sin
⁡
(
φ
+
Δ
φ
)
sin
⁡
(
θ
+
Δ
θ
)
cos
⁡
⁡
(
φ
+
Δ
φ
)
sin
⁡
(
θ
+
Δ
θ
)
cos
⁡
⁡
(
θ
+
Δ
θ
)
]
.


### 5.4. Mutation Operation

Quantum nongate is applied to exchange the probability amplitudes to avoid local optimal solution in a certain qubit as follows:(15)
[
0
1
1
0
]
[
cos
⁡
θ
sin
θ
]
=
[
sin
θ
cos
⁡
θ
]
.Such influence as expressed in (15) can be considered as the phase mutation of a qubit, in which θ is mutated to (
π
/
2
)
-
θ. In this case, a quantum nongate V is proposed to mutate the quantum as follows:
(16)
V
=
[
tan
β
cot
φ
cot
θ
0
0
0
0
tan
β
cot
φ
cot
θ
0
0
0
0
tan
φ
cot
θ
0
0
0
0
tan
θ
]
.


### 5.5. The Procedure of FCQIEA

It can be summarized as follows.Step 1 (initialize the population).
Let the current generationt
=
0; generate an initial population Q
(
t
)
=
{
q
1
t
,
q
2
t
,
…
,
q
m
t
}, which has m individual qubits. Set the magnitude of the rotational angle |
Δ
β
|
=
β
0, |
Δ
φ
|
=
φ
0, and |
Δ
θ
|
=
θ
0, respectively. Set p
m as the mutation and Max_gen as the maximum generation.Step 2 (transform the solution space).
Four approximate solutions in each chromosome are transformed from the unit spaceI
n
=
[
-
1,1
]
n to the solution space Ω of the continuous optimization problem (1); thus, the set of approximate solution X
(
t
) can be obtained.Step 3 (compute the fitness).
By computing the fitness of4
m approximate solutions, obtain the best solution B
e
s
t
X in the current solution and the best chromosome B
e
s
t
C in the current chromosome. Store B
e
s
t
X as the global optimum solution G
X and store B
e
s
t
C as the global optimum chromosome G
C.Step 4 (sett
=
t
+
1).
Update and mutateQ
(
t
-
1
). Calculate the new population Q
(
t
).Step 5.
Transform the solution space again and obtain a set of approximate solutionX
(
t
).Step 6.
By computing the fitness ofQ
(
t
), determine the current optimum solution B
e
s
t
X and the current optimum chromosome B
e
s
t
C. If fit
(
B
e
s
t
X
)
<
fit
(
G
X
), then update the current optimum solution B
e
s
t
X
=
G
X; at the same time, update the current optimum chromosome B
e
s
t
C
=
G
C to avoid population degradation. Otherwise, let G
X
=
B
e
s
t
X and G
C
=
B
e
s
t
C so that the algorithm approaches the global optimum solution.Step 7.
If the algorithm does not converge and ift < Max_gen, then go back to Step 4 until the algorithm becomes convergent or until t > Max_gen.


## 5.1. Expanded Encoding Method for Quantum Chromosome

From [24] we can know that multiple chains can be required in Figure 6.Figure 6
Schematic diagram of the qubit probability amplitude decomposition.From Figure6, we can get (7) as follows:
(7)
|
φ
>
=
[
cos
⁡
θ
,
cos
⁡
θ
sin
θ
,
sin
θ
sin
θ
]
T
.To describe the quantum dynamics behavior objectively, comprehensively, and unambiguously, we can use a new angleφ (0
<
φ
<
π), which is called “supporting role,” to replace θ and obtain vector sin
θ as follows:
(8)
[
sin
φ
×
sin
θ
,
cos
⁡
φ
×
sin
θ
,
cos
⁡
θ
]
T
.
Equation (8) also satisfies the normalization condition. In fact, (8) also corresponds to the three-chain encoding method:
(9)
p
i
=
|
sin
φ
i
1
sin
θ
i
1
cos
⁡
φ
i
1
sin
θ
i
1
cos
⁡
φ
i
1
|
⋯
|
sin
φ
in
sin
θ
i
j
cos
⁡
φ
in
sin
θ
i
j
cos
⁡
φ
i
j
|
.Likewise, we can obtain vectorsin
φ
sin
θ by adding the “supporting role” β to form the four-chain encoding method as follows:
(10)
[
cos
⁡
β
×
cos
⁡
φ
×
sin
θ
,
sin
β
sin
φ
×
sin
θ
,
cos
⁡
φ
sin
θ
,
cos
⁡
θ
]
T
,
p
i
=
|
cos
⁡
β
i
1
sin
φ
i
1
sin
θ
i
1
sin
β
i
1
sin
φ
i
1
sin
θ
i
1
cos
⁡
φ
i
1
sin
θ
i
1
cos
⁡
θ
i
1
|
⋯
|
cos
⁡
β
i
j
sin
φ
i
j
sin
θ
i
j
sin
β
i
j
sin
φ
i
j
sin
θ
i
j
cos
⁡
φ
i
j
sin
θ
i
j
cos
⁡
θ
i
j
|
.We can obtain four optimal solutions, which are expressed as follows:(11)
p
i
1
=
(
cos
⁡
β
i
1
sin
φ
i
1
sin
θ
i
1
,
…
,
cos
⁡
β
in
sin
φ
in
sin
θ
in
)
p
i
2
=
(
sin
β
i
1
sin
φ
i
1
sin
θ
i
1
,
…
,
sin
β
in
sin
φ
in
sin
θ
in
)
p
i
3
=
(
cos
⁡
φ
i
1
sin
θ
i
1
,
…
,
cos
⁡
φ
in
sin
θ
in
)
p
i
4
=
(
cos
⁡
θ
i
1
,
…
,
cos
⁡
θ
in
)
.With the same principle, we can getN
+
1 chains’ coding scheme as follows:
(12)
p
i
=
|
(
sin
θ
n
)
i
1
(
sin
θ
n
-
1
)
i
1
⋯
(
sin
θ
2
)
i
1
(
sin
θ
1
)
i
1
(
cos
⁡
θ
n
)
i
1
(
sin
θ
n
-
1
)
i
1
⋯
(
sin
θ
2
)
i
1
(
sin
θ
1
)
i
1
⋮
(
cos
⁡
θ
3
)
i
1
(
sin
θ
2
)
i
1
(
sin
θ
1
)
i
1
(
cos
⁡
θ
2
)
i
1
(
sin
θ
1
)
i
1
(
cos
⁡
θ
1
)
i
1
|
⋯
|
(
sin
θ
n
)
i
j
(
sin
θ
n
-
1
)
i
j
⋯
(
sin
θ
2
)
i
j
(
sin
θ
1
)
i
j
(
cos
⁡
θ
n
)
i
j
(
sin
θ
n
-
1
)
i
j
⋯
(
sin
θ
2
)
i
j
(
sin
θ
1
)
i
j
⋮
(
cos
⁡
θ
3
)
i
j
(
sin
θ
2
)
i
j
(
sin
θ
1
)
i
j
(
cos
⁡
θ
2
)
i
j
(
sin
θ
1
)
i
j
(
cos
⁡
θ
1
)
i
j
|
.


## 5.2. Solution Space Transformation

In the quantum evolution progress, all qubits have limited values within  –1 to 1. Thus, we need to transform all qubit values from unit spaceI
n
=
[
-
1,1
]
n to space Ω of the continuous optimization problem (1) by using linear transformation. Each gene value corresponds to an optimization variable in the solution space. If thejth qubit on chromosome p
i is [
x
i
j
4
,
x
i
j
3
,
x
i
j
2
,
x
i
j
1
], then the corresponding variables in the solution space are computed as follows:
(13)
X
i
1
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
X
i
2
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
X
i
3
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
X
i
4
j
=
0.5
×
[
b
j
(
1
+
x
i
j
)
+
a
j
(
1
-
x
i
j
)
]
,
where i
=
1,2
,
3
,
…
,
m and j
=
1,2
,
3
,
…
,
n. Thus, each chromosome maps to four approximate solutions of the optimization problem.


## 5.3. Quantum Chromosome Update

Considering thatm quantum chromosomes are present in the colony and we can obtain 4
m approximate solutions by solution space transformation, we can then compute the fitness of these approximate solutions and define the solution with the maximum fitness as the current optimum solution in the quantum evolution progress. The chromosome corresponds to the current optimum solution called the optimum chromosome. By computing the fitness, we can obtain both optimum solution and optimum chromosome and subsequently update the colony by using the quantum rotation gate to obtain the optimal solution. In this updated process, the new optimum chromosome can be produced such that the colony can likely evolve. The present study proposes the quantum rotation gate U to update the individual qubit as follows:
(14)
U
=
[
u
11
u
12
u
13
u
14
u
21
u
22
u
23
u
24
u
31
u
32
u
33
u
34
u
41
u
42
u
43
u
44
]
,
u
11
=
[
cos
⁡
Δ
β
cos
⁡
Δ
φ
(
cos
⁡
Δ
θ
-
sin
Δ
θ
cos
⁡
θ
sin
θ
)
]
T
,
u
12
=
[
sin
Δ
β
cos
⁡
Δ
φ
(
sin
Δ
θ
cos
⁡
θ
sin
θ
-
cos
⁡
Δ
θ
)
]
T
,
u
13
=
[
sin
Δ
φ
cos
⁡
Δ
θ
(
sin
β
sin
Δ
β
-
cos
⁡
β
cos
⁡
Δ
β
)
]
T
,
u
14
=
[
cos
⁡
φ
sin
Δ
φ
(
cos
⁡
β
cos
⁡
Δ
β
-
sin
β
sin
Δ
β
)
]
T
,
u
21
=
[
-
sin
Δ
β
sin
Δ
φ
(
cos
⁡
Δ
θ
+
sin
Δ
θ
cos
⁡
θ
sin
θ
)
]
T
,
u
22
=
[
-
cos
⁡
Δ
β
sin
Δ
φ
(
cos
⁡
Δ
θ
+
sin
Δ
θ
cos
⁡
θ
sin
θ
)
]
T
,
u
23
=
[
cos
⁡
Δ
φ
cos
⁡
Δ
φ
(
sin
β
cos
⁡
Δ
β
+
cos
⁡
β
sin
Δ
β
)
]
T
,
u
24
=
[
cos
⁡
φ
cos
⁡
Δ
φ
cos
⁡
Δ
φ
(
sin
β
cos
⁡
Δ
β
+
cos
⁡
β
sin
Δ
β
)
]
T
,
u
31
=
-
sin
Δ
φ
cos
⁡
β
,
u
32
=
0
,
u
33
=
cos
⁡
Δ
φ
cos
⁡
Δ
θ
,
u
34
=
[
sin
Δ
θ
(
cos
⁡
φ
cos
⁡
Δ
φ
-
sin
φ
sin
Δ
φ
)
]
T
,
u
41
=
u
42
=
0
,
u
43
=
sin
Δ
θ
cos
⁡
φ
,
u
44
=
cos
⁡
Δ
θ
,
U
[
cos
⁡
β
sin
φ
sin
θ
sin
β
sin
φ
sin
θ
cos
⁡
φ
sin
θ
cos
⁡
θ
]
=
[
cos
⁡
⁡
(
β
+
Δ
β
)
sin
⁡
(
φ
+
Δ
φ
)
sin
⁡
(
θ
+
Δ
θ
)
sin
⁡
(
β
+
Δ
β
)
sin
⁡
(
φ
+
Δ
φ
)
sin
⁡
(
θ
+
Δ
θ
)
cos
⁡
⁡
(
φ
+
Δ
φ
)
sin
⁡
(
θ
+
Δ
θ
)
cos
⁡
⁡
(
θ
+
Δ
θ
)
]
.


## 5.4. Mutation Operation

Quantum nongate is applied to exchange the probability amplitudes to avoid local optimal solution in a certain qubit as follows:(15)
[
0
1
1
0
]
[
cos
⁡
θ
sin
θ
]
=
[
sin
θ
cos
⁡
θ
]
.Such influence as expressed in (15) can be considered as the phase mutation of a qubit, in which θ is mutated to (
π
/
2
)
-
θ. In this case, a quantum nongate V is proposed to mutate the quantum as follows:
(16)
V
=
[
tan
β
cot
φ
cot
θ
0
0
0
0
tan
β
cot
φ
cot
θ
0
0
0
0
tan
φ
cot
θ
0
0
0
0
tan
θ
]
.


## 5.5. The Procedure of FCQIEA

It can be summarized as follows.Step 1 (initialize the population).
Let the current generationt
=
0; generate an initial population Q
(
t
)
=
{
q
1
t
,
q
2
t
,
…
,
q
m
t
}, which has m individual qubits. Set the magnitude of the rotational angle |
Δ
β
|
=
β
0, |
Δ
φ
|
=
φ
0, and |
Δ
θ
|
=
θ
0, respectively. Set p
m as the mutation and Max_gen as the maximum generation.Step 2 (transform the solution space).
Four approximate solutions in each chromosome are transformed from the unit spaceI
n
=
[
-
1,1
]
n to the solution space Ω of the continuous optimization problem (1); thus, the set of approximate solution X
(
t
) can be obtained.Step 3 (compute the fitness).
By computing the fitness of4
m approximate solutions, obtain the best solution B
e
s
t
X in the current solution and the best chromosome B
e
s
t
C in the current chromosome. Store B
e
s
t
X as the global optimum solution G
X and store B
e
s
t
C as the global optimum chromosome G
C.Step 4 (sett
=
t
+
1).
Update and mutateQ
(
t
-
1
). Calculate the new population Q
(
t
).Step 5.
Transform the solution space again and obtain a set of approximate solutionX
(
t
).Step 6.
By computing the fitness ofQ
(
t
), determine the current optimum solution B
e
s
t
X and the current optimum chromosome B
e
s
t
C. If fit
(
B
e
s
t
X
)
<
fit
(
G
X
), then update the current optimum solution B
e
s
t
X
=
G
X; at the same time, update the current optimum chromosome B
e
s
t
C
=
G
C to avoid population degradation. Otherwise, let G
X
=
B
e
s
t
X and G
C
=
B
e
s
t
C so that the algorithm approaches the global optimum solution.Step 7.
If the algorithm does not converge and ift < Max_gen, then go back to Step 4 until the algorithm becomes convergent or until t > Max_gen.


## 6. Simulation Experiment and Analysis

### 6.1. Comparisons of the Different Optimization Result

Under the hypothesis condition as Figure2, four events are in accordance with service as S
1, S
2, S
3, and S
4, and the specific constraint conditions can be shown as in Table 1.Table 1
Service constrained condition.
Constrained condition
Service node
S
1
S
2
S
3
S
4
Execution time distribution
[5 s, 15 s] uniform distribution
[10 s, 20 s] uniform distribution
[10 s, 25 s] uniform distribution
[2 s, 8 s] uniform distribution
Probability of success
A random number from 0.94 to 1
A random number from 0.94 to 1
A random number from 0.92 to 1
A random number from 0.93 to 1
The number of parallel services
30
20
30
20
The maximum waiting time
10
30
5
40
The minimum probability of success
98%
98%
98%
98%
W
i
0.2
0.3
0.1
0.4In order to compare the different optimization results between different optimization algorithms, FCQIEA, GA, and PSO, optimize the service scheduling, respectively. In both of FCQIEA and GA, the generation set is 100 and intersection probability and mutation set are 0.6 and 0.1, respectively. The number of coding chains is 4, and maximum rotate angle setΔ
θ
=
0.04
π. In PSO, regulatory factor set w
=
0.5 and study factor set C
1
=
0.7 and C
2
=
1.2. In order to avoid the influence of random factors, we performed the calculation 10 times in each algorithm and obtained the average value as the optimization result. The global constraint time of each service node is added with 5 seconds as base unit; the optimization result can be shown in Figure 7.Figure 7
Comparison of the optimization result with different algorithms.From Figure7, obviously, FCQIEA has best performance compared with GA and PSO and its service running costs most rapid decline than other algorithms.


### 6.2. Comparisons of the Service Allocation Strategy

The different service allocation strategy, that is, selection best service, failed service instead, services parallel allocation, and multipath services parallel allocation, is compared under the constraint condition in Table1. The failed service is produced randomly with probability of 1%. The failed service instead strategy is that the service can be called failure when waiting time is beyond the 3 times of δ (3 times δ rule) service execution time and it should select another service to replace the failed service. In service parallel allocation strategy, 20 percent of service sets are randomly selected as parallel execution service. In the multipath service parallel allocation strategy, the number of path set 3 and 20 percent of service sets are randomly selected as parallel execution service. After long running time, the relation between the probability of success and execution of different service allocation strategy is investigated. It can be shown in Figure 8.Figure 8
The probability of success of different service allocation strategy.Different service execution costs can be shown in Figure9.Figure 9
Comparison of task execution costs with different service allocation strategy.From analysis, it can be found that the probability of success of multipath service parallel allocation strategy is obviously higher than other strategies; however, it also results in extra system costs than other service allocation strategies.


### 6.3. The Effect of Probability of Success from the Number of Paths

Service parallel allocation and multipath services parallel allocation are used to execute simulation task and the number of paths is 1, 2, 3, and 4. The failed service is produced randomly with probability of 1%. After running in long time, the relation between the probability of success and execution time is investigated. It can be shown in Figures10 and 11.Figure 10
Comparison of the effect for the probability of success simulation task with different paths.Figure 11
Comparison of simulation task execution costs among different paths.From Figures10 and 11, we can get the conclusion that we can improve probability of success by adding the number of service paths in service parallel allocation, but it will not always get the best probability of success when increasing the number of service paths, and there exist the best value. From the simulation experiment, it can be seen that the probability of success for completion task is improved obviously with the numbers of 2 and 3, but when the number of path set is 4, the probability of success for completion task is not improved and the simulation execution costs are raised. Therefore, three paths are proper.


## 6.1. Comparisons of the Different Optimization Result

Under the hypothesis condition as Figure2, four events are in accordance with service as S
1, S
2, S
3, and S
4, and the specific constraint conditions can be shown as in Table 1.Table 1
Service constrained condition.
Constrained condition
Service node
S
1
S
2
S
3
S
4
Execution time distribution
[5 s, 15 s] uniform distribution
[10 s, 20 s] uniform distribution
[10 s, 25 s] uniform distribution
[2 s, 8 s] uniform distribution
Probability of success
A random number from 0.94 to 1
A random number from 0.94 to 1
A random number from 0.92 to 1
A random number from 0.93 to 1
The number of parallel services
30
20
30
20
The maximum waiting time
10
30
5
40
The minimum probability of success
98%
98%
98%
98%
W
i
0.2
0.3
0.1
0.4In order to compare the different optimization results between different optimization algorithms, FCQIEA, GA, and PSO, optimize the service scheduling, respectively. In both of FCQIEA and GA, the generation set is 100 and intersection probability and mutation set are 0.6 and 0.1, respectively. The number of coding chains is 4, and maximum rotate angle setΔ
θ
=
0.04
π. In PSO, regulatory factor set w
=
0.5 and study factor set C
1
=
0.7 and C
2
=
1.2. In order to avoid the influence of random factors, we performed the calculation 10 times in each algorithm and obtained the average value as the optimization result. The global constraint time of each service node is added with 5 seconds as base unit; the optimization result can be shown in Figure 7.Figure 7
Comparison of the optimization result with different algorithms.From Figure7, obviously, FCQIEA has best performance compared with GA and PSO and its service running costs most rapid decline than other algorithms.


## 6.2. Comparisons of the Service Allocation Strategy

The different service allocation strategy, that is, selection best service, failed service instead, services parallel allocation, and multipath services parallel allocation, is compared under the constraint condition in Table1. The failed service is produced randomly with probability of 1%. The failed service instead strategy is that the service can be called failure when waiting time is beyond the 3 times of δ (3 times δ rule) service execution time and it should select another service to replace the failed service. In service parallel allocation strategy, 20 percent of service sets are randomly selected as parallel execution service. In the multipath service parallel allocation strategy, the number of path set 3 and 20 percent of service sets are randomly selected as parallel execution service. After long running time, the relation between the probability of success and execution of different service allocation strategy is investigated. It can be shown in Figure 8.Figure 8
The probability of success of different service allocation strategy.Different service execution costs can be shown in Figure9.Figure 9
Comparison of task execution costs with different service allocation strategy.From analysis, it can be found that the probability of success of multipath service parallel allocation strategy is obviously higher than other strategies; however, it also results in extra system costs than other service allocation strategies.


## 6.3. The Effect of Probability of Success from the Number of Paths

Service parallel allocation and multipath services parallel allocation are used to execute simulation task and the number of paths is 1, 2, 3, and 4. The failed service is produced randomly with probability of 1%. After running in long time, the relation between the probability of success and execution time is investigated. It can be shown in Figures10 and 11.Figure 10
Comparison of the effect for the probability of success simulation task with different paths.Figure 11
Comparison of simulation task execution costs among different paths.From Figures10 and 11, we can get the conclusion that we can improve probability of success by adding the number of service paths in service parallel allocation, but it will not always get the best probability of success when increasing the number of service paths, and there exist the best value. From the simulation experiment, it can be seen that the probability of success for completion task is improved obviously with the numbers of 2 and 3, but when the number of path set is 4, the probability of success for completion task is not improved and the simulation execution costs are raised. Therefore, three paths are proper.


## 7. Conclusions

In military modeling and simulation field, it is important to improve the probability of success and timeliness in simulation task workflow. This paper established the multipath service parallel allocation optimization mathematical model to investigate service scheduling optimization algorithm in which FCQIEA is used. Through the simulation experiment, this paper investigates the effect for the probability of success in simulation task workflow from different optimization algorithm, service allocation strategy, and path number, and the simulation result shows that the optimization algorithm for multipath service resource parallel allocation is an effective method to improve the probability of success and timeliness in simulation task workflow. In the next step, multipath service parallel allocation will be used in military modeling and simulation field, and this theory can be improved in practice.



---

*Source: 507517-2014-05-12.xml*