Application of Firefly Algorithm and Its Parameter Setting For Job Shop Scheduling
Application of Firefly Algorithm and Its Parameter Setting For Job Shop Scheduling
Abstract— Job shop scheduling problem (JSSP) is one of the Bound [3-4] and Lagrangian Relaxation [5-6]) can guarantee
most famous scheduling problems, most of which are categorised the optimum solution. They have been successfully used to
into Non-deterministic Polynomial (NP) hard problem. The solve JSSP. However, these methods may highly consume
objectives of this paper are to i) present the application of a computational time and resources even for solving a
recent developed metaheuristic called Firefly Algorithm (FA)
moderate-large problem size and therefore impractical if the
for solving JSSP; ii) investigate the parameter setting of the
proposed algorithm; and iii) compare the FA performance using computational limitation is exist. Approximation optimisation
various parameter settings. The computational experiment was methods or metaheuristics (e.g. Tabu Search [7] and
designed and conducted using five benchmarking JSSP datasets Simulated Annealing [8]), that usually conduct stochastic
from a classical OR-Library. The analysis of the experimental steps in their search process, have therefore been recently
results on the FA performance comparison between with and received more attention for solving a large-size problem in the
without using optimised parameter settings was carried out. The last few decades. However, it does not guarantee the optimum
FA with appropriate parameters setting that got from the solution. Firefly Algorithm (FA) was recently introduced by
experiment analysis produced the best-so-far schedule better Yang [9], who was inspired by firefly behaviours. FA has
than the FA without adopting parameter settings.
been widely applied to solve continuous mathematical
Keywords: Scheduling, Job shop, Metaheuristics, Firefly
functions [9, 10]. FA seems promising for dealing with
Algorithm, Experimental design, Parameter setting combinatorial optimisation problem, but has been rarely
reported. FA is a type of metaheuristic algorithm therefore
I. INTRODUCTION quality of problem solutions depends on setting parameters in
the algorithm.
Scheduling problem is a decision making process involving There is however no report on international scientific
the allocation of resources over time to perform a set of databases related to the investigation of the FA parameters’
activities or tasks. Scheduling problems in their static and setting and its application on the JSSP. The popular Job shop
deterministic forms are simple to describe and formulate, but scheduling problems that were used to test metaheuristic
are difficult to solve as it involves complex combinatorial algorithm regularly are the datasets from OR-Library [11].
optimisation. For example, if there are m machines, each of The objectives of this paper are to: i) presents the application
which is required to perform n independent operations. The of a recent developed metaheuristic called Firefly Algorithm
combination can be potentially exploded up to (n!)m for solving JSSP; ii) explore the parameters of the proposed
operational sequences. Job shop scheduling is one of the most algorithm; and iii) investigate the performance of the FA with
famous scheduling problems, most of which are categorised different parameter setting and compare with best known
into NP hard problem. This means that due to the solution from literature review. A job shop scheduling tool
combinatorial explosion, even a computer can take was written in modular style using Tcl/Tk programming
unacceptably large amount of time to seek a satisfied solution language. The computational experiment was designed and
on even moderately large scheduling problem. Another conducted using five benchmarking datasets of the JSSP
potential issue of complexity is the assembly relationship [1- instance from the well-recognised OR-Library published by
2]. Job shop scheduling problem (JSSP) is comprised of a set Beasley [11]. The remaining sections in this paper are
of independent jobs or tasks (J), each of which consists of a organised as follows. Section 2 reviews the literature relating
sequence of operations (O). Each operation is performed on to job shop scheduling problems. Section 3 describes the
machine (M) without interruption during processing time. procedures of the Firefly Algorithm (FA) and its pseudo code
The main purpose of JSSP is usually to find the best machine for solving the JSSP. Section 4 presents the experimental
schedule for servicing all jobs in order to optimise either design and analyses results. Finally, Section 5 draws the
single criterion or multiple scheduling objectives (measures conclusions of the research and suggests possible further
of performance) such as the minimisation of the makespan work.
(Cmax) or the penalty costs of tardiness and/or earliness. Comparison of Performance with Tracking Collector”
Various optimisation approaches have been widely applied to European Journal of Scientific Research, ISSN 1450-216X
solve the JSSP. Conventional methods based on mathematical Vol.40 No.1, pp.144 -155, Euro Journals Publishing, Inc.
model and/or full numerical search (for example, Branch and 2010.
All Rights Reserved © 2017 IJARMATE 7
ISSN (ONLINE): 2454-9762
ISSN (PRINT): 2454-9762
Available online at www.ijarmate.com
5. Wattana Ratismith (2012), “A Novel Non-Tracking Solar all pre-defined jobs in order to optimise either single or
Collector for High Temperature Application.”, proceedings multiple scheduling objectives, which is used for identifying a
of ecos 2012 - the 25th international conference on efficiency, goodness of schedule such as the minimisation of the
cost, optimization, simulation and environmental impact of makespan (Cmax).
energy systems, Perugia, Italy. Figure 1 shows another example on machine routings of a
6. Kristina Uzuneanu, Alexandrina Teodoru, Tanase Panait, larger size of (3×6) job shop scheduling problem.
“Optimum Tilt Angle for Solar Collectors with Low Table 1 An example of 2-jobs 3-machines scheduling
Concentration Ratio”. Vol. 32 No.1, pp. 134-168. problem with processing times.
II. JOB SHOP SHEDULING PROBLEMS (JSSP) Job Operation Time Machine (Mk)
(Jj) (Ojk) (tjk) M1 M2 M3
Shop floor scheduling problems can be classified into four J1 O11 5 5 - -
main categories [12]: (i) single-machine scheduling (ii) O12 4 - 4 -
flow-shop scheduling (iii) job-shop scheduling and (iv) O13 9 - - 9
open-shop scheduling. Single-machine scheduling is the J2 O23 5 - - 5
simplest shop scheduling problem, in which there is only one O21 6 6 - -
available machine for servicing the arriving jobs. In flowshop O22 7 - 7 -
scheduling, jobs are processed on multiple machines in an
identical sequence. Job-shop scheduling is a general case of
flow-shop scheduling, in which the sequencing of each job
through the machines is not necessarily identical. The
open-shop scheduling is similar to the job-shop scheduling
except that a job may be processed on the machines in any
sequence the job needs. Since the job-shop scheduling is
commonly found in many real-world businesses and/or
manufacturing industry, this problem was proposed in this
paper. Although JSSP is common found but it is very difficult
work to construct the best schedule within limited resources.
The complexity of JSSP is increasing with the number of
constraints defined and the size of search space operated.
JSSP is known as one of the most difficult Non-deterministic
Polynomial (NP) hard problems [13-14], in which the amount
of computation required increases exponentially with
problem size. The JSSP can be described as follow: a classical
n-job m-machine (n×m) JSSP consists of a finite set [Jj] 1 ≤ j
≤ n of n independent jobs or tasks that must be processed in a
finite set [Mk] 1 ≤ k ≤ m of m machines. The problem can be
characterised as follows [15]: each job j ∈ J must be processed
by every machines k ∈ M; the processing of job Jj on machine Fig. 1. Another example of the machine routings for 3-jobs
Mk is called the operation Ojk; operation Ojk requires the 6-machines scheduling problem.
exclusive use of machine Mk for an uninterrupted duration
tjk, its processing time; each job consists of a sequence of xj There has been a number of research works focused on the
operations; Ojk can be processed by only one machine k at a JSSP reported in the literature. The recent published research
time (disjunctive constraint); each operation, which has works related to JSSP by classifying those articles into four
started, runs to completion (nonpreemption condition); and categories [16]: heuristic rules (for example, dispatching
each machine performs operations one after another heuristics/priority rule [17-18]), mathematical programming
(resource/capacity constraint). An example of two jobs to be techniques (e.g. branch and bound method, Lagrangian
performed three machines (2×3) job shop scheduling problem relaxation based approaches, queuing network model and etc.
is illustrated in Table 1. In this problem, each job requires [3-6]), neighbourhood search methods (for instances, Tabu
three operations to be processed on a pre-defined machine Search, Simulated Annealing [7-8]), and artificial intelligence
sequence. The first job (J1) need to be initially operated on techniques (such as, expert/knowledge based systems,
the machine M1 for 5 time units and then sequentially artificial neural network, fuzzy logic, petri net based
processed on M2 and M3 for 4 and 9 time units, respectively. approaches [19-22]).
Likewise, the second job (J2) has to be initially performed on
M3 for 5 time units and sequentially followed by M1 and M2
for 6 and 7 time units, respectively. The design task for
solving JSSP is to search for the best schedule(s) for operating
III. FIREFLY ALGORITHM FOR SOLVING JOB SHOP SCHEDULING Evaluate new solutions and update light intensity
PROBLEMS End if
Firefly Algorithm (FA) is a nature inspired algorithms, which End for j
is based on the flashing light of fireflies. The flashing light End for i
helps fireflies for finding mates, attracting their potential prey Rank the fireflies and find the current best
and protecting themselves from their predators. The swarm of End while
fireflies will move to brighter and more attractive locations by Post process on the best-so-far results and
the flashing light intensity that associated with the objective visualisation
function of problem considered in order to obtain efficient Fig. 2.The pseudo code of the FA procedure adopted from
optimal solutions. [9].
The development of firefly-inspired algorithm was based on
three idealised rules [9]: i) artificial fireflies are unisex so that 3.2 Firefly evaluation
sex is not an issue for attraction; ii) attractiveness is The next stage is to measure the flashing light intensity of the
proportional to their flashing brightness which decreases as firefly, which depends on the problem considered. In this
the distance from the other firefly increases due to the fact that work, the evaluation on the goodness of schedules is
the air absorbs light. Since the most attractive firefly is the measured by the makespan, which can be calculated using
brightest one, to which it convinces neighbours moving equation (1), where Ck is completed time of job k.
toward. In case of no brighter one, it freely moves any
direction; and iii) the brightness of the flashing light can be Minimises Cmax =max(c1,c2,…,ck) (1)
considered as objective function to be optimised. The main
steps of the FA start from initialising a swarm of fireflies, each 3.3 Distance
of which is determined the flashing light intensity. During the The distance between any two fireflies i and j at xi and xj,
loop of pairwise comparison of light intensity, the firefly with respectively, can be defined as a Cartesian distance (rij) using
lower light intensity will move toward the higher one. The equation (2), where xi,k is the kth component of the spatial
moving distance depends on the attractiveness. After moving, coordinate xi of the ith firefly and d is the number of
the new firefly is evaluated and updated for the light intensity. dimensions [9, 23].
During pairwise comparison loop, the best-so-far solution is
iteratively updated. The pairwise comparison process is rij=||xi-xj||
repeated until termination criteria are satisfied. Finally, the
best-so-far solution is visualised. The pseudo code of FA
applied to solve the JSSP is shown in Fig. 2. The main
processes are described in the following subsections.
two fireflies, β0 is the initial attractiveness at r = 0, and γ is an IV. EXPERIMENTAL DESIGN AND ANALYSIS
absorption coefficient which controls the decrease of the light Firefly Algorithm (FA) is a nature inspired algorithms, which
intensity [9, 23]. is based on the flashing light of fireflies. The flashing light
helps fireflies for finding mates, attracting their potential prey
and protecting themselves from their predators. The swarm of
fireflies will move to brighter and more attractive locations by
3.5 Movement the flashing light intensity that associated with the objective
The movement of a firefly i which is attracted by a more function of problem considered in order to obtain efficient
attractive (i.e., brighter) firefly j is given by the following optimal solutions.
equation (4), where xi is the current position or solution of a The development of firefly-inspired algorithm was based on
firefly, the β0*exp( −γrij2)*( xj –xi)is attractiveness of a firefly three idealised rules [9]: i) artificial fireflies are unisex so that
to seen by adjacent fireflies. The α (rand – 1/2) is a firefly’s sex is not an issue for attraction; ii) attractiveness is
random movement. The coefficient α is a randomisation proportional to their flashing brightness which decreases as
parameter determined by the problem of interest with α є the distance from the other firefly increases due to the fact that
[0-1], while rand is a random number obtained from the the air absorbs light. Since the most attractive firefly is the
uniform distribution in the space [0,1] [9][23]. brightest one, to which it convinces neighbours moving
toward. In case of no brighter one, it freely moves any
Xi = xi + β0× exp(− γrij2)* ( xj – xi) +α(rand −1/2) (4) direction; and iii) the brightness of the flashing light can be
Because the FA was recently developed, there have been a considered as objective function to be optimised. The main
few research works applied the FA for solving optimisation steps of the FA start from initialising a swarm of fireflies, each
problems, most of which has been formulated into of which is determined the flashing light intensity. During the
mathematical equations. In the previous works, the settings of loop of pairwise comparison of light intensity, the firefly with
FA parameters, including the amount of fireflies (n), the lower light intensity will move toward the higher one. The
number of generations (G), the light absorption coefficient moving distance depends on the attractiveness. After moving,
(γ), the randomisation parameter (α) and the attractiveness the new firefly is evaluated and updated for the light intensity.
value (β0), have been defined in an ad hoc fashion. Table 2 During pairwise comparison loop, the best-so-far solution is
summarises the FA parameter settings used in previous iteratively updated. The pairwise comparison process is
researches for solving various optimisation problems. repeated until termination criteria are satisfied. Finally, the
Unfortunately, most of the work has not reported on the best-so-far solution is visualised. The pseudo code of FA
investigation of the appropriate setting of FA parameters via a applied to solve the JSSP is shown in Fig. 2. The main
proper statistical design and analysis. The computational processes are described in the following subsections.
experiments described in the next section were therefore
proposed to identify the appropriate setting of FA parameters 3.1 Population initialisation
for solving scheduling problem. Figs. 3-5 illustrate a typical firefly representation for the
scheduling with nine operations. All operations required to
Table 2 Examples of FA parameters’ setting used in produce jobs are encoded using alphanumeric strings. Each
encoded operation is randomly selected and sequenced until
previous researches.
all operations are drawn in order to create a firefly, which
FA parameters represents a candidate solution. This random selection is
Authors Problems repeated to generate a swarm of fireflies with the required
nG γ α β0 size. The length of slots in a firefly is equal to the total number
of operations to be performed. The size of the firefly
Apostolopoulos Economic population determines the number of candidate solutions or
and Vlachos emissions 12*50 1.0 0.2 1.0 the amount of search in the solution space.
[24] load dispatch
Lukasik and Continuous
40*250 1.0 0.01 1.0
Zak [10] equation Objective function f(x), x = (x1, ..., xd)T
Generate initial population of fireflies xi (i = 1, 2, ...,
Horng and Image vector
n)
50*200 1.0 0.01 1.0
Light intensity Ii at xi is determined by f(xi)
Jiang [25] quantisation
Define light absorption coefficient γ
While t < Max Generation (G)
For i = 1 : n all n fireflies
For j = 1 : i all n fireflies
If (Ij > Ii ), Move firefly i towards j in d-dimension;
Attractiveness varies with distance rij via exp[−γrij] two fireflies, β0 is the initial attractiveness at r = 0, and γ is an
Evaluate new solutions and update light intensity absorption coefficient which controls the decrease of the light
End if intensity [9, 23].
End for j
End for i
Rank the fireflies and find the current best
End while 3.5 Movement
Post process on the best-so-far results and The movement of a firefly i which is attracted by a more
visualisation attractive (i.e., brighter) firefly j is given by the following
Fig. 2.The pseudo code of the FA procedure adopted from equation (4), where xi is the current position or solution of a
[9]. firefly, the β0*exp( −γrij2)*( xj –xi)is attractiveness of a firefly
to seen by adjacent fireflies. The α (rand – 1/2) is a firefly’s
3.2 Firefly evaluation random movement. The coefficient α is a randomisation
The next stage is to measure the flashing light intensity of the parameter determined by the problem of interest with α є
firefly, which depends on the problem considered. In this [0-1], while rand is a random number obtained from the
work, the evaluation on the goodness of schedules is uniform distribution in the space [0,1] [9][23].
measured by the makespan, which can be calculated using
equation (1), where Ck is completed time of job k. Xi = xi + β0× exp(− γrij2)* ( xj – xi) +α(rand −1/2) (4)
Because the FA was recently developed, there have been a
Minimises Cmax =max(c1,c2,…,ck) (1) few research works applied the FA for solving optimisation
problems, most of which has been formulated into
3.3 Distance mathematical equations. In the previous works, the settings of
The distance between any two fireflies i and j at xi and xj, FA parameters, including the amount of fireflies (n), the
respectively, can be defined as a Cartesian distance (rij) using number of generations (G), the light absorption coefficient
equation (2), where xi,k is the kth component of the spatial (γ), the randomisation parameter (α) and the attractiveness
coordinate xi of the ith firefly and d is the number of value (β0), have been defined in an ad hoc fashion. Table 2
dimensions [9, 23]. summarises the FA parameter settings used in previous
researches for solving various optimisation problems.
rij=||xi-xj|| Unfortunately, most of the work has not reported on the
investigation of the appropriate setting of FA parameters via a
proper statistical design and analysis. The computational
experiments described in the next section were therefore
proposed to identify the appropriate setting of FA parameters
for solving scheduling problem.
FA parameters
Authors Problems
nG γ α β0
Apostolopoulos Economic
Fig.4. Sort random number and follow with job operation. and Vlachos emissions 12*50 1.0 0.2 1.0
[24] load dispatch
Lukasik and Continuous
40*250 1.0 0.01 1.0
Zak [10] equation
Horng and Image vector
50*200 1.0 0.01 1.0
Jiang [25] quantisation
Very recently, an FF-LBG algorithm for vector For phase equilibrium calculations and stability
quantization of digital image compression was based analysis, FA was found to be the most reliable
on the firefly algorithm, which proves to be faster compared with other techniques.
than other algorithms such as PSO-LBG and ix. Clustering
HBMO-LBG (particle swarm optimization and Performance study for clustering also suggested that
honey-bee mating optimization; variations on firefly algorithm is very efficient.
the Linde-Buzo-Gray algorithm for minimum cross
entropy thresholding, firefly-based algorithm uses
the least computation time. Also, for gel VI. CONCLUSION
electrophoresis images, FA-based method is very Firefly Algorithm (FA) was applied to find the lowest
efficient. makespan (Cmax) of five benchmarking JSSP datasets
ii. Eigenvalue optimization adopted from the OR-Library. Experimental design and
analysis were carried out to investigate the appropriate
Eigenvalue optimization of isospectral systems has
parameters setting of the FA. The one-third fractional
solved by FA and multiple optimum points have factorial experimental design can reduce the number of
been found efficiently. experimental runs by 66.67% compared with the conventional
iii. Feature selection and fault detection full factorial design. Ranges of FA parameters used by
Feature selection can be also carried out successfully previous research were reviewed and investigated. The
investigation was aimed to study the effect of the FA
using firefly algorithm. Real-time fault identification parameter setting on its performance before comparing the
in large systems becomes viable, based on the recent FA results between using and not using optimised parameter
work on fault identification with binary adaptive settings. In this research, the optimised setting of the FA
firefly optimization. parameters of nG, α, β0, and γ parameters was suggested at
100*25, 0.5, 1, and 0.1, respectively.
iv. Antenna Design
Moreover, the proposed algorithm with appropriate
Firefly algorithms outperforms ABC for optimal parameters setting produced the best-so-far schedule better
design of linear array of isotropic sources and than the FA without adopting parameter settings. It also found
digital controllable array antenna. the best known solution in some cases. It should be noted that
v. Structural Design the appropriate parameter settings of the proposed algorithms
may be case specific based on the nature and complexity of
For mixed-variable problems, many optimization the problem domain
algorithms may struggle. However, firefly algorithm
can efficiently solve optimization problems with
mixed variables.
REFERENCE
vi. Scheduling and TSP
Firefly-based algorithms for scheduling task graphs
and job shop scheduling requires less computing [1]. P.Pongcharoen, C. Hicks, P. M.Braiden and D. J.
than all other metaheuristics. A binary firefly Stewardson, "Determining optimum Genetic Algorithm
algorithm has been developed to tackle the knapsack parameters for scheduling the manufacturing and assembly of
complex products", International Journal of
cryptosystem efficiently Recently, an evolutionary Production Economics, 78, 2002, pp. 311-322.
discrete FA has been developed for
solving travelling salesman problems Further [2]. Pongcharoen, C. Hicks and P. M. Braiden, "The
improvement in performance can be obtained by development of genetic algorithms for the finite capacity
scheduling of complex products, with multiple levels of
using preferential directions in firefly movements.
product structure", European Journal of Operational
vii. Semantic Web Composition Research, 152, 2004, pp. 215-225.
A hybrid FA has been developed by Pop et al. for
selecting optimal solution in semantic web service [3]. Artigues and D. Feillet, "A branch and bound method for
the job-shop problem with sequence dependent
composition.
setup times", Annals of Operations Research, 159, 2007,
viii. Chemical Phase equilibrium pp.135-159.
[8]. R. Zhang and C. Wu, "A simulated annealing algorithm [17]. O. Holthaus and C. Rajendran, "Efficient dispatching
based on block properties for the job shop scheduling rules for scheduling in a job shop", International Journal of
problem with total weighted tardiness objective", Computers Production Economics, 48, 1997, pp. 87-105.
& Operations Research, 38, 2011, pp. 854- 867.
[9].X.-S. Yang, "Firefly Algorithms for multimodal [18] O. Bilkay, O. Anlagan and S. E. Kilic, "Job shop
optimization", Lecture Notes in Computer Science, scheduling using fuzzy logic", International Journal of
5792, 2009,pp. 169-178. Advanced Manufacturing Technology, 23, 2004, pp.
606-619.
[10]. S. Lukasik and S. Zak, "Firefly Algorithm for [19] M. Nakamura, K. Hachiman, H. Tohme, T. Okazaki and
continuous constrained optimization Tasks", Lecture Notes in S. Tamaki, "Evolutionary computing of Petri Net structure for
Computer Science, 5796, 2009, pp. 97-106. [11] J. E. cyclic job shop scheduling", IEICE Transactions on
Beasley, "OR-library: distributing test problems by electronic Fundamentals of Electronics,
mail", Journal of the Operational Research Society, 41, 1990,
pp. 1069-1072.
[20](N. Kawasaki, “Parametric study of thermal and chemical
[12]. X.-J. Wang, C.-Y. Zhang, L. Gao and P.-G. Li, "A
nonequilibrium nozzle flow,” M.S. thesis, Dept. Electron.
survey and future trend of study on multi-objective
Eng., Osaka Univ., Osaka, Japan, 1993.
scheduling", Proceedings of the 4th International Conference
(Patent style)
on Natural Computation, 2008., pp. 382-391.