IJCSI International Journal of Computer Science Issues, Vol. 11, Issue 5, No 1, September 2014
ISSN (Print): 1694-0814 | ISSN (Online): 1694-0784
www.IJCSI.org
64
Standard Swarm Optimization to Solve Machine Scheduling
Problem with Fuzzy Starting Time
Y. M. Assem1, A. A. El-sawy2 and Y. A. Nada3
1,3
Computer Engineering Dept., Faculty of Computers and Information Technology, Taif University
Taif, KSA.
2
Computer Science Dept., Faculty of Computers and Information, Benha University
Egypt.
Abstract
One of machine scheduling problems called machine time
scheduling. The starting time in this problem will be assumed
fuzzy with trapezoid membership function. A standard particle
swarm optimization algorithm with constriction factor has been
developed to find the best shape of membership function to find
best starting time for each machine in each cycle by mean max
defuzzification method.
Keywords: Machine Time Scheduling, Particle Swarm
optimization, Fuzzy, Time Window, Trapezoid membership
function, mean max defuzzification method.
1. Introduction
solution than GA and max-separable technique. In [9]
discusses how to solve the MTSP when the processing
time for each machine is stochastic. To solve this problem,
the Monte Carlo simulation is suggested to handle the
given stochastic processing times. In this paper we will
introduce an algorithm to find best starting time for each
machine in each cycle when starting time is fuzzy. We
assumed that the starting time follow trapezoid
memberships function. We will develop an algorithm by
using particle swarm optimization algorithm (with
constriction factor) to adapt the shape of the membership
function for each starting time for each machine then mean
max defuzzification method well be used to find the crisp
value.
2. Problem Formulation
A great deal of research has been focused on solving
scheduling problems. One of the most important
scheduling problems is the Machine Time Scheduling
Problem (MTSP). This problem was investigated in [14]
as a parameterized version of the MTSP, which was
defined in [8], with penalized earliness in starting and
lateness in the completion of the operation. The authors in
[14] applied the optimal choice concept which is given in
[11] and some theoretical results from [12] to obtain the
optimal values of the given parameters.
In [4] the authors investigated two cycles MTSP and
introduced an algorithm to find the optimal choice of
parameters, which represent the earliest possible starting
time for the second cycle. In [3] an algorithm was
developed (MTSP Algorithm (MTSPA)) for multi-cycles
MTSP which found the starting time for each machine in
each cycle by using the max-separable technique. The
processing times in the previous researches were
deterministic. A generalization was introduced in [2] to
overstep the cases at which an empty feasible set of
solutions is described by the system.
In [1] introduced an algorithm by using the PSO and GA
to solve MTSP, and compared between PSO, GA and
max-separable technique (using numerical example). The
Authors found that PSO algorithm reach to the best
In machine time scheduling problem there are n
machines, each machine carries out one operation j with
processing time pj for j N {1,...,n} and the machines
work in k cycles. Let
~
x jr represent starting time of the jth
machine in cycle r for all j N , r K {1,...,k} (k number
of cycles) and is random variable with certain distribution.
Machine j can start its work in cycle r only after the
N ( N is the set
machines in a given set N , N
of precedence machines) had finished their work in the (r1)th cycle, so we can define the starting time in the (r-1)th
cycle as follows:
( j)
( j)
( j)
~
x ir 1 max ( x jr p jr ) i N , r K
(i )
jN
(1)
Assuming that the starting time xjr is constrained by a
time interval [ljr, Ljr] for each j N , rK and, then the
set of feasible starting times
~
x jr is described by the
following system for each rK :
max (~
x p ) ~
x
i N,
jN(i )
jr
jr
l jr ~
x jr L jr
ir 1
j N
Copyright (c) 2014 International Journal of Computer Science Issues. All Rights Reserved.
(2)
IJCSI International Journal of Computer Science Issues, Vol. 11, Issue 5, No 1, September 2014
ISSN (Print): 1694-0814 | ISSN (Online): 1694-0784
www.IJCSI.org
Assume also that for some echological reasons there
are a given recommended time interval [ajr, bjr], iN ,
rK so:
[~
x jr , ~
x jr p j ] [a jr , b jr ],
(3)
The violation of the Eq. (3) will be penalized by the
following penalty function
(4)
f (~
x ) max f jr ( ~
x jr ) min
rK
j N
Where the penalty function in a certain cycle r is given by:
f jr ( ~
x jr ) max { f jr(1) ( ~
x jr ), f jr( 2 ) ( ~
x jr p jr ), 0} j N Wher
e f jr(1) : R R is decreased continuous function such that
f jr(1) (ajr)=0,
And f jr(2) : R R is increasing continuous function such
that f jr(2) (b jr ) =0
To minimize the maximum penalty in each cycle r, we
should solve the following problem:
f (~
x ) min
subject to :
max ( ~
x jr p jr ) ~
xir 1 i N
j N
(5)
(i )
l jr ~
x jr L jr
jN
v (jt, )g =velocity of particle j at iteration t,
w = inertia weight factor;
c1, c2 = cognitive and social acceleration factors,
respectively;
r1, r2 = random numbers uniformly distributed in the range
(0, 1);
x (jt, )g = current position of j at iteration t;
pbestj = pbest of particle j;
gbest = gbest of the group.
The index of best particle among all of the particles in
the group is represented by the gbest. In PSO, each particle
moves in the search space with a velocity according to its
own previous best solution and its group’s previous best
solution. The velocity update in a PSO consists of three
parts; namely momentum, cognitive and social parts. The
balance among these parts determines the performance of
a PSO algorithm. The parameters c1 & c2 determine the
relative pull of pbest and gbest and the parameters r1 & r2
help in stochastically varying these pulls [10]. [6] Showed
that combining them by setting the inertia weight, , to
the constriction factor, v, improved performance across a
wide range of problems as follows:
v (jt,g1) {w * v (jt, )g c1 * r1 * ( pbest j , g x (jt, )g )
The PSO method is a member of wide category of
Swarm Intelligence methods for solving the optimization
problems. It is a population based search algorithm where
each individual is referred to as particle and represents a
candidate solution. Each particle in PSO flies through the
search space with an adaptable velocity that is dynamically
modified according to its own flying experience and also
the flying experience of the other particles. Further, each
particle has a memory and hence it is capable of
remembering the best position in the search space ever
visited by it. The position corresponding to the best fitness
is known as pbest and the overall best out of all the
particles in the population is called gbest [10].
The modified velocity and position of each particle
can be calculated using the current velocity and the
distance from the pbestj to gbest as shown in the following
formulas:
c2 * r2 * ( gbest j , g x (jt,)g )
x(jt, g1) x(jt,)g v(jt, g1)
(8)
c2 * r2 * ( gbest j , g x (jt, )g )}
3. Particle Swarm Optimization
v (jt,g1) w * v (jt,)g c1 * r1 * ( pbest j , g x (jt,)g )
65
2
2 c c 2 4c
(9)
where c c1 c 2 , c 4.
4. Trapezoid membership function
From the purely mathematical viewpoint, we can have
many different shapes of membership functions. In most
practical applications, however, simple “trapezoid”
membership functions work well, for which we use linear
interpolation to get both endpoints of the interval [5].
Trapezoidal function: defined by a lower limit a, an upper
limit d, a lower support limit b, and an upper support
limit c, where a < b < c < d [7 ].
(6)
(10)
(7)
With j=1, 2, …,n and g=1, 2, …, m
n =number of particles in a group;
m = number of members in a particle;
t = number of iterations (generations);
Copyright (c) 2014 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 11, Issue 5, No 1, September 2014
ISSN (Print): 1694-0814 | ISSN (Online): 1694-0784
www.IJCSI.org
66
(i.e., the maximum membership can be a plateau rather
than a single point), as described in fig. 4. This method is
given by the expression [13]
ab
z*
.
(13)
2
f
1
Fig. 1 Trapezidal function
There are two special cases of a trapezoidal function,
which are called R-functions and L-functions:
R-functions: with parameters a = b = - ∞
0
a z*
b
z
Fig. 4 Mean max membership defuzzification method
6. Solving fuzzy MSTP by PSO algorithm
Now, we will develop an algorithm to solve machine
time scheduling problem where the starting time for each
machine in each cycle is fuzzy with trapezoid membership
function by using particle swarm optimization algorithm
with construction factor. The new algorithm will be called
PSO-FMTSP, follow the next steps:
(11)
1- Reformulation:
Each machine boundaries will be reformulate
(calculate the new boundaries) based on its' successors
machines boundaries. For each machine the new
lower boundary called h and the new upper boundary
called H.
Fig. 2 Trapezidal R-function
L-Functions: with parameters c = d = + ∞
(12)
2- Initial iteration:
First, the particle defines as a set of starting times
for the machines in all cycles. The particle is
represented by D-dimensional, where D equal to N
multiplies by K (where N number of machine and K
number of cycles). The xirpt is the starting time for
machine i in cycle r in particle p, p 1,2,..,Q in
iteration t, t 1,2,..,T (where Q is number of particles
in the swarm and T is number of iterations) which
satisfy
the
constraints
in
eq.
(5).
.
Determine
the
pbest
xirpt max ( x
pj)
p
jN ( i )
j ( r 1) pt
which is the best position of particle p that make the
best value of the objective function. Then determine
the gbest which is the best particle that make the best
value of the objective function in all iterations.
Fig. 3 Trapezidal L-function
5. Defuzzification method
One of defuzzification methods is Mean max
membership: This method (also called middle-of-maxima)
is closely related to the first method, except that the
locations of the maximum membership can be non-unique
3- Other iterations:
The next iteration created by modifying the
velocity of each particle by eq. (8), (9). Then the
particle position will be update by the following eq.
(7).
Copyright (c) 2014 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 11, Issue 5, No 1, September 2014
ISSN (Print): 1694-0814 | ISSN (Online): 1694-0784
www.IJCSI.org
4- Calculate the objective function then find the
pbestp and gbest
5- Repeat step 3 to step 5 until the T.
67
p = {2,4.5,6.25,4,5}. The machines boundaries in each
cycle in table 1 and the machines predecessor relation
show in table 2 as follows:
Table 1: Machine Boundaries
PSO-FMTSP algorithm:
Cycle (r)
Now, the PSO-MTSP algorithm will be used to deals
with the fuzzy MTSP as follows:
PSO-FMTSP Algorithm:
A1: Reformulate the boundaries for each machine in each cycle as
follows:
Put H L
i N , h jr l
j N ,
ik
ik
i U j
ir 1
{4,6,6,5,6}
{10,11,12,9,1
1.5}
{5,4,3,5,6}
{6.5,7,7.5,7.25
,6.5}
{13,12,15,12,
14}
A7: Generate random number for
I
xirpt where h ir x irpt H ir .
A8: If i < n then i = i + 1, go to A6.
A9: If r < k then r = r + 1, go to A5.
A10: pbestp = f( xirpt ), i 1,.., N , r 1,.., K .
p min
3
4
5
N(i)
{1,2,3}
{2}
{2,3}
{1,4,5}
{1,3,5}
Uj
{1,4,5}
{1,2,3}
{1,3,5}
{4}
{4,5}
Assume
further
that
f jr ( x jr ) max ( a jr x jr , x jr p jr b jr ,0 )
Where aj, bj are for all
have
in
our
j N
j N given constants so
case
for
that we
all j N
f jr( 2 ) ( x jr p jr ) x jr p jr b jr
Input values of air and bir for each cycle
A14: t = t + 1.
A15: Put p = 1.
virpt w * virp ( t 1) c1 * r1 * ( pbest p xirp ( t 1) )
c2 * r2 * ( gbest xirp ( t 1) ) .
2 c c 2 4c
2
f jr(1) ( x jr ) a jr x jr
A11: If p < Q then p = p + 1, go to A4.
A12: find min(f(pbestp)), p 1 ,.., Q .
A13: gbest pbest .
2
1
j ( r 1) pt
j N ( i )
where c c1 c2 , c 4.
Table 3: Machines Penalty Boundaries
Cycle (r)
air
i=1,2,…,5
bir
i=1,2,…,5
xirpt xirp (t 1) virpt .
A18: if
r=3
Table 2: Machine Relations
where U j { i N : j N }, r k 1,..., 2,1
A2: Put t = 1.
A3: Put p = 1.
A4: Put r = 1.
A5: Put i = 1.
A6: If r 1 then h max ( x
pj) .
ir
A17:
r=2
{1,0,0,3,1}
p j )),
(i )
r=1
jr
H jr min(L jr , ( min H
A16:
lir
i=1,2,…,
5
Lir
i=1,2,…,
5
r=1
r=2
r=3
{1,1,1,3,3}
{5,7,6,5,7}
{11,12,11,10,13}
{4,6,8,5,5}
{8,9,8,6.5,8}
{13,15,14,12,14}
xirpt is not feasible then go to A20.
A19: if f( xirpt ) > f( xirpt
1 ) then pbestp = xirpt
After Reformulation of the problem will obtain the
following new boundary vectors:
A20: if p < Q then p = p + 1, go to A16.
A21: if f (gbest) > f ( pbest ) then gbest pbest p .
pmin
min
A22: f (gbest t) < f (gbest t-1) then go to 15.
A23: if f (gbest) > f (
x ir 1t
) then gbest =
Table 4: Reformulated Machine Boundaries
Cycle (r)
x ir 1t
.
A24: If t < T then go to A15.
A25: The solution is gbest.
r=1
r=2
r=3
hir
i=1,2,…,5
{1,0,0,3,1}
{4,6,6,5,6}
{10,11,12,9,
11.5}
Hir
i=1,2,…,5
{4.5,2,0.25,3.25,
1.5}
{6.5,7,7.5,7.25,
6.5}
{13,12,15,12,
14}
7. Numerical Example
Consider a problem with the following values of
parameters n = 5 so N = {1,2,3,4,5}, and processing time
We applied the HPSOM-SMTSP algorithm on this
example. We found that, the best parameters for the
Copyright (c) 2014 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 11, Issue 5, No 1, September 2014
ISSN (Print): 1694-0814 | ISSN (Online): 1694-0784
www.IJCSI.org
algorithm are swarm size equal 80, the value of w equal
0.5 and the value c1 and c2 equal 1.7. We run the program
100 trials.
After applying the previous algorithm on our
example, we found that the shapes of memberships
function for each machine in all cycle as follow as shown
in fig. 5.
To find the value of starting time for each machine
in each cycle, the membership function for each machine
will be defuzzified. We will defuzzify the membership
function by mean max method
[2] A. Tharwat and A. Abuel-Yazid: "Generalized Algorithm For
[3]
[4]
[5]
[6]
The starting time for the each machine in each
cycle is as in the following table 6:
[7]
Table 5: The crisp value for the fuzzy starting time variable
C1
C2
C3
M1
1.7
6.2
12.49
M2
1.65
6.1
11.3
M3
0.05
6.2
12.49
M4
3.1
6.8
11.3
M5
1.2
6.3
12.49
8. Conclusion
[8]
[9]
[10]
An algorithm has been developed for solving machine
time scheduling problem when starting time is fuzzy
and has trapezoid membership function. particle swarm
optimization with construction factor has been used to
adapted the shape of the trapezoid membership. Then
the mean max method has been used to find the crisp
value for the fuzzy starting time for each machine.
[11]
[12]
[13]
References
[1] A. A. Sawy and A. A. Tharwat, " Comparison of Particle SWARM
Optimization, Genetic Algorithm and Max separable Technique for
Machine Time Scheduling Problem ", 5th international Conference
on Mathematics and Engineering Physics, May 2010.
68
[14]
Muulti-Cycle Machine Time Scheduling", Proceeding of Meatip3
Conference, Assuit, Egypt, 2002.
A. Tharwat and A. Abuel-Yazid: “Multi-Cycles Machine Time
Scheduling Problem”, First International Conference on Informatics
and Systems, Cairo, Egypt, 2002.
A. Tharwat and K. Zimmermann: “Optimal Choice of Parameters in
Machine Time Scheduling Problems Case I,” Conference MMEI,
Liberc, Czech Republic, 1998.
Aditi Barua, Lalitha Snigdha Mudunuri, and Olga Kosheleva "Why
Trapezoidal and Triangular Membership Functions Work So Well:
Towards a Theoretical Explanation"Journal of Uncertain Systems
Vol.8, 2014
Alec Banks, Jonathan Vincent, Chukwudi Anyakoha “A review of
particle swarm optimization. Part II: hybridisation, combinatorial,
multicriteria and constrained optimization, and indicative
applications” NATURAL COMPUTING Volume 7, Number 1,
109-124.
http://www.dma.fi.upm.es/java/fuzzy/fuzzyinf/funpert_en.htm: june
2014.
M. Vlach and K. Zimmermann, “Machine Time Scheduling
Synchronization of Starting
Times”, the Proceeding of the
MME’99 Conference, Prague, Czech Republic, 1999.
S. A. Hassan, A.A. Tharwat, I.A. El-Khodary, A. A. El-Sawy
"Using Monte Carlo Simulation to Solve Machine Time Scheduling
Problems With Stochastic Processing Time", Mathematical
Methods in Economics conference: MME’2003, Prague , Czech
Republic , 10-12 Sept.
S. Panda and N. P. Padhy, "Comparison of Particle Swarm
Optimization and Genetic Algorithm for TCSC-based Controller
Design", International Journal of Computer Science and
Engineering, Volume 1 Number 1, 2007
S. Zlobec: “Input Optimization I: Optimal Realizations of
Mathematical Models,” Mathematical Programming, V 31, pp.245268, 1985.
S. Zlobec: “Input Optimization III: Optimal Realizations of
Mathematical Models,” Mathematical Programming, V 17, No 4,
pp.429-445, 1986.
T. J. Ross, "Fuzzy Logic with Engineering Application", Second
Edition, John Wiley&Sons Ltd, 2004.
Y. Sok and K. Zimmermann: “Optimal Choice of Parameters in
Machine Time Scheduling Problems with Penalized Earliness in
Starting Time and Lateness”, AUC-Mathematica et Physica, V33,
No 1, pp.53-61. 1992.
Copyright (c) 2014 International Journal of Computer Science Issues. All Rights Reserved.
IJCSI International Journal of Computer Science Issues, Vol. 11, Issue 5, No 1, September 2014
ISSN (Print): 1694-0814 | ISSN (Online): 1694-0784
www.IJCSI.org
69
f(x)
1
x1
0
1
2
3
4
5
6
7
8
9
10 11
12 13 14
15
f(x)
1
x2
0
1
2
3
4
5
6
7
8
9
10 11
12 13 14
15
f(x)
1
x3
0
f(x)
1
2
3
4
5
6
7
8
9
10 11
12 13 14
15
1
x4
0
1
2
3
4
5
6
7
8
9
10 11
12 13 14
15
1
2
3
4
5
6
7
8
9
10 11
12 13 14
15
f(x)
1
x5
0
Fig. 5 The shape of membership function for xi.
Copyright (c) 2014 International Journal of Computer Science Issues. All Rights Reserved.
© Copyright 2026 Paperzz