An AIS-based hybrid algorithm for static job shop scheduling problem

A static job shop scheduling problem (JSSP) is a class of JSSP which is a combinatorial optimization problem with the assumption of no disruptions and previously known knowledge about the jobs and machines. A new hybrid algorithm based on artificial immune systems (AIS) and particle swarm optimization (PSO) theory is proposed for this problem with the objective of makespan minimization. AIS is a metaheuristics inspired by the human immune system. Its two theories, namely, clonal selection and immune network theory, are integrated with PSO in this research. The clonal selection theory builds up the framework of the algorithm which consists of selection, cloning, hypermutation, memory cells extraction and receptor editing processes. Immune network theory increases the diversity of antibody set which represents the solution repertoire. To improve the antibody hypermutation process to accelerate the search procedure, a modified version of PSO is inserted. This proposed algorithm is tested on 25 benchmark problems of different sizes. The results demonstrate the effectiveness of the PSO algorithm and the specific memory cells extraction process which is one of the key features of AIS theory. By comparing with other popular approaches reported in existing literatures, this algorithm shows great competitiveness and potential, especially for small size problems in terms of computation time.


Introduction
The job shop scheduling problem (JSSP), which is a combinatorial optimization problem, is well-known as a class of NP-hard problem which is unlikely to achieve the global optimal solution in polynomial time. In this work, we assume that most of the information of the system is predefined and there exists no other disturbances, such as machine breakdown, during the whole scheduling process in our system. This problem is called static JSSP. Due to its wide applicability in production and manufacturing industries, and its inherent complexity, it has attracted many researches in the field. As a result, a wide range of approaches and algorithms have been developed over the years.
Generally speaking, these approaches can be divided into two categories, namely, exact methods and approximate methods. The former identifies a precise solution. These methods mainly include enumeration, Lagrangian relaxation, integer programming, dynamic programming, branch and bound (B&B) method. Among these, B&B algorithm is the most popular one. Thus plenty of research has been focused on this method, and considerable advancement has been made (Lageweg et al. 1977;Carlier and Pinson 1989). The algorithm uses a dynamically constructed tree structure to represent all feasible schedules in the search space, and its basic principle is to enumerate all feasible solutions (Brucker et al. 1994). However, as the problem size grows, the exact methods become inefficient and time-consuming because of the computational complexity. They cannot solve large problems within a reasonable time. As such, the research focus has turned into the approximate approaches.
Although approximate methods cannot guarantee the achievement of the global optimal, they are able to find near-optimal solutions for problems of large sizes and even for some complex problems in moderate computing time. Glover and Greenberg (1989) suggested that the direct tree searching process is unacceptable for complex combinatorial problems, while the heuristics inspired by natural phenomenon and artificial intelligence are more applicable. Therefore, currently there are mainly four types of frequently-used approximation techniques: priority dispatching rules, bottleneck based heuristics, artificial intelligence and local search methods.
Approximation methods applied to static JSSP were first developed based on the priority dispatching rules (PDRs) because of their easy implementation and significant reduction in computational requirement (Baker 1974). In each step, all available operations that can be scheduled are assigned a priority according to the pre-defined rule, and the operation with the highest priority is selected to be executed. However, these methods only consider the current state of the scheduling process rather than the global optimal, and the solution quality is prone to suffer and degrade quickly as the problem size grows.
Subsequently the shifting bottleneck procedure (SBP) was proposed (Adams et al. 1988). It combines schedule construction with iterative improvement and is guided by the one-machine scheduling problem that one-machine relaxation is used to decide the scheduled machine sequence. But this method requires a high level of programming technique.
With the advancement of computer technology, researchers started to work on artificial intelligence and local search methods in the last decade. Artificial Intelligence (AI) methods are developed based on the biological knowledge and principles found in nature to obtain solutions for complex problems. One popular method for static JSSP is the neural network method (Jain and Meeran 1999). It is inspired by the brain structure of simple living entities that information processing is carried out through a huge interconnected network of parallel processing units. Wang and Brunn (1994) presented a review of the application of this method in the scheduling problem, and many researchers (Yahyaoui et al. 2011;Yang et al. 2010;Weckman et al. 2008) have applied it to the static JSSP. Alternatively, the local search method is constructed on the neighborhood structure and the rules which define the way to obtain a new solution from the current one. Its basic idea is to modify the current solutions in terms of the modification method defined by the neighborhood operator, so a new feasible solution is generated which promisingly performs better. Different neighborhood operators or rules generate different meta-heuristic approaches. The most famous ones applied to static JSSP include genetic algorithm (GA) (Pérez et al. 2010), tabu search (TS) (Nowicki and Smutnicki 1996;González et al. 2012;Geyik and Cedimoglu 2004), simulated annealing (SA) (Aydin and Fogarty 2004), and particle swarm optimization (PSO) (Niu et al. 2008), and ant colony optimization (ACO) (Puris et al. 2007). All these methods are well studied and their variations are successfully applied in different domains. As every single technique always exists with some drawbacks, hybridizing is a reasonable way to take strengths and avoid weakness. Hence, the hybrid methods become very popular for the combinatorial optimization problem. For static JSSP, hybrid methods are frequently used, such as hybrid genetic and ant colony heuristics (Girish and Jawahar 2009), hybrid GA-TS (Meeran and Morshed 2011), hybrid PSO with SA (Lin et al. 2010), and hybrid TS-ACO (Eswaramurthy and Tamilarasi 2009). Experiments show that all these hybrid methods perform better than its corresponding single technique because they help each other escape from the local optimal search space and accelerate the convergence rate. A comprehensive and detailed survey of job shop scheduling techniques can be found in (Jain and Meeran 1999).
In terms of the no free lunch (NFL) theory (Wolpert and Macready 1995), no algorithm is always superior to others when compared over all possible issues and every approach is able to exceed at least one subset of certain cases. Thus for the static JSSP, no one method is superior in all situations. Additionally, continuous increase in the problem size increases the complexity and difficulty of the problem for all methods. Therefore, there is still much room for researchers to make improvement and variations to the existing methods and propose new techniques for the problem. Recently, a relatively new theory, artificial immune systems (AIS), has attracted extensive attention owing to its successful applications to many combinatorial optimization problems. Inspired by the human immune system, AIS shows many appealing characteristics, including discrimination of self from non-self, selflearning, long lasting memory, cross reactive response, and strong adaptability to the environment (de Castro and Timmis 2002), which makes it unique from other evolutionary algorithms. It has been successfully applied to the fields of optimization, clustering, pattern recognition, anomaly detection, computer security, machine learning, scheduling, robotics, and control (de Castro and Timmis 2002;Hart and Timmis 2008;Dasgupta et al. 2011;Aydin et al. 2010). For the scheduling problem, AIS has been used in the flow shop scheduling problem (Kahraman et al. 2009), JSSP (Coello et al. 2003), resource constraint project scheduling problem (Mobini et al. 2011), multiprocessor scheduling (Wojtyla et al. 2006), etc. However, for the static JSSP, AIS mechanisms and theories are rarely adopted with only few hybrid AIS approaches (Ge et al. 2008;Zhang and Wu 2010). In this paper, a new hybrid AIS-based algorithm with the meta-heuristics PSO is proposed. Although Ge et al. (2008) have discussed a means to combine AIS with PSO for JSSP, our idea reveals marked differences in the PSO variation and hybrid mode. The proposed hybrid algorithm is studied and compared in terms of solution accuracy and computational efficiency.
The remainder of this paper is organized as follows: "Static job shop scheduling problem" section and "Underlying theory" section briefly introduce the static JSSP, AIS and PSO theories. In "A hybrid algorithm for static JSSP", the hybrid algorithm is proposed with each step being explained in detail. Based on the benchmark problems, "Experimental analysis" section presents the experimental results and analyzes the algorithm's performance from three aspects. Finally, conclusions are drawn in "Conclusion" section.

Static job shop scheduling problem
The JSSP is a traditional and classical problem. It is defined as follows: given n jobs and m machines in the system with each job consists of m operations, which should be processed by one machine exactly once. At the beginning of the process, all jobs are released and all machines are available. Each machine can manage only one operation at a time, and each job cannot be operated simultaneously by more than one machine. The task is to schedule all the jobs on each machine to achieve the scheduling objective. From a different point of view, the scheduling goal may vary. In this paper, one of the most popular problems-makespan minimization is considered.
Our study focuses on the static JSSP that most of the information about the system is previously known without any unexpected events or machine breakdown during the scheduling process. To simplify the problem, the following assumptions are made: (1) Once an operation has begun on a machine, it cannot be interrupted. (2) The processing time and precedence order of operations for each job are predefined. (3) The jobs can wait between two machines and the intermediate storage is unlimited. (4) Other factors, including machine setup time for two consecutive jobs, transportation time and resource cost, are ignored.

Underlying theory
This paper proposes a new hybrid algorithm based on AIS theory and PSO mechanism for the static JSSP. In the following sections, the two theories are introduced briefly.

Artificial immune systems (AIS)
Artificial immune systems (AIS) is a diverse and maturing artificial intelligence methodology that attempts to bridge the gap between immunology and engineering. It is developed through the application of techniques including mathematical and computational modeling of immunology, abstraction from these models into algorithms, and system design and implementation in the context of engineering (de Castro and Timmis 2002). It has become known as a kind of biologically inspired approach that applies the human immune system metaphors for the creation of novel solutions. The human immune system is an effective and efficient defense mechanism that protects its host from the invading foreign bodies, called antigens. It behaves as a general and immediate pathogen defense mechanism which combats against a wide variety of foreign invasions without requiring previous exposure to them through the innate immune system, and recognizes previously unknown pathogens (learning) and remembers them for future invasions (memory) through the adaptive immune system (Twycross 2007). The work of the adaptive immune system is performed by two types of lymphocytes, namely, B-cell and T-cell. The former is responsible for the humoral immunity that secretes antibodies binding to antigens by clonal proliferation, while the latter aims at destroying the pathogens directly. These immune cells collaborate in a corporative environment to fight against antigen invasion in the process of recognition, categorization and memorization (de Castro and Timmis 2002).
Inspired by the underlying capability of the human immune system, AIS develops four immunological theories: clonal selection, immune network, negative selection, and dendritic cell algorithm. In this paper, the proposed algorithm integrates clonal selection theory and immune network theory, which encompasses the recognition, selection, maturation, learning and memory processes of the human immune system.

Clonal selection theory
The clonal selection theory presents the fundamental properties of an adaptive immune response to an antigenic stimulus (Timmis 2007). When an antigen invades, the immune system repertoire goes through a selection mechanism that only those antibodies which are capable of recognizing an antigenic stimulus proliferate and differentiate into effective cells. Then these cells suffer somatic hypermutation during reproduction to increase their repertoire diversity and also to become gradually better in their capability of recognizing the selective antigens. During the clonal expansion and mutation process of antibodies, the average antibody affinity increases for the antigen that makes the immune response more effective. This phenomenon is called affinity maturation. In this procedure, the proliferation of antibodies is directly proportional to the affinity of the antigen it binds, and the mutations suffered by the antibodies are inversely proportional to this affinity. That is to say, the higher the antigenic affinity is, the more clones are generated, and the less mutation the antibody occurs. After the cloning and hypermutation process, a percentage of the antibodies with high antigenic affinity are stored as the memory cells to form a large initial specific and efficient antibodies for subsequent re-infections, and some low antigenic affinity antibodies are assigned to undergo the receptor editing process, in which these less efficient antibodies are replaced by new ones. In terms of the memory cells, the immune system presents the reinforcement learning capability. The receptor editing mechanism develops new antibodies that correspond to new search space, which encourages the algorithm to escape from local optimal.
Immune network theory Jerne (1974) proposed the immune network theory that presents a novel perspective to important emergent properties of the immune system, such as learning, self-tolerance, and diversity of immune repertoires. It is well used in the machine learning and clustering problems. The premise of this theory is that any antibody molecule could be recognized by the matched antigens and a set of other antibody molecules within the immune system. It is suggested that the immune system is composed of a regulated and stable network of cells that recognizes one another even in the absence of antigens. According to the research in immunology, the recognition of an epitope, which is the decision part of antigen, by a paratope-the recognition part of antibody, results in the reproduction of antibodies with the paratope (stimulation), and the probabilistic reduction of antibodies with the idiotope-the epitope of antibodies (suppression) (de Castro and Timmis 2002). Therefore, the immune system displays a status resulting from interactions among its components and foreign substances.
When translating this feature into an immune-inspired algorithm, it is to compute the affinity amongst all the antibodies and then eliminate those antibodies whose affinity with each other is less than a pre-defined threshold. This action helps to increase diversity of the antibody set.

Particle swarm optimization (PSO)
Particle swarm optimization (PSO), a population based optimization algorithm proposed by Kennedy and Eberhart (1995), is one of the latest evolutionary optimization techniques for continuous optimization problems. It simulates the social interaction and communication in a flock of birds or fishes. In this social group, there is a leader who presents the best performance and guides the movement of the whole swarm. The movement of each particle is directed by the leader and its own knowledge. Thus, the behavior of each particle is a compromise between its individual memory and a collective memory.
In the standard PSO algorithm, each particle in the swarm represents a potential solution. Particle k starts with a random position X k and a random velocity V k . During the searching procedure, the particle gains the knowledge about which position P t k it has reached presents the best performance, and which position P g has achieved the best overall performance among all particles. In each iteration t, the behavior of each particle is a compromise among three possible alternatives and its position is updated according to its velocity, shown in Eqs. (1) and (2): where ω is the inertia weight that controls the impact of the previous velocity on the current velocity. c 1 and c 2 represent the weights of the stochastic acceleration effect when the next position is attracted to the previous best location of the current particle and the whole particle swarm. r 1 and r 2 are two random numbers within the range from 0 to 1. In each iteration, the particle moves according to the reset velocity and position, and the best locations of each particle and the whole swarm are updated for the next generation according the performance of newly generated positions (Xia and Wu 2006). The searching procedure stops when the termination criterion is met. From the equations, it is seen that the standard PSO is especially suitable for the continuous solution space. Therefore, when applying for the JSSP, a discrete problem, it is necessary to make suitable modifications for PSO to hybridize with AIS. This is discussed in the next section.

A hybrid algorithm for static JSSP
In this section, the hybrid algorithm based on AIS theory and PSO is described for the static JSSP. The flow chart showing the main procedures of the algorithm is shown in Fig. 1. To accelerate the convergence speed of the search algorithm, a neighborhood search mechanism is formulated especially for this problem.
The following paragraphs discuss the key steps in the flow chart in detail.

Antibody generation
In the context of static JSSP, the problem is regarded as the antigen while the antibody corresponds to the scheduling plan. Thus, generating an antibody is equal to creating an initial solution for the problem. The first consideration is how to encode the antibody to represent a feasible schedule. Referring to previous research on the chromosome representation in GA, this algorithm adopts the operation-based representation. Its main advantage is that this representation scheme guarantees that any possible permutation of the random numbers produces a feasible schedule, so the repair mechanism for the infeasible schedule always generated in the antibody mutation process, such as the deadlock schedule In the operation-based representation approach, the antibody encodes a schedule as a sequence of operations, and defines all the operations for a job as the same number and then interprets it according to the order of occurrence in the given antibody. Thus, an antibody consists of n × m numbers for an n jobs and m machines problem. Each job index appears m times in the antibody, and each repeated number represents a unique operation of the job. For example, given an antibody [1, 2, 2, 1, 1, 2], the numbers 1 and 2 represent job 1 and job 2 respectively. In this case, there are three machines and two jobs, and a total of six operations. Each job number is repeated three times. The first integer 2 represents the first operation of job 2, and the second integer 2 represents job 2's second operation. Hence in general, this antibody represents [O 11 , O 21 where O i j stands for the jth operation of job i. However, this representation method produces redundancy in the search space whose size is expanded to (n × m)!/(m!) n , i.e., different antibodies may represent the same schedule. Therefore, all generated antibodies should be standardized to re-map their relationships with the schedules from many-to-one to oneto-one relationships. This standardization is introduced in "Affinity calculation of antibody" section according to the scheduling plan generated by the antibody.
According to the operation-based representation, the antibodies for the problem with n jobs and m machines are easily produced by ranking n × m random numbers. Take the 2 jobs and 3 machines problem as an example, we generate a random numerical string [4.5, 0.7, −3.5, 77, −9.2, 6.1] and then rank it in an ascending sequence [4, 3, 2, 6, 1, 5], i.e. the smallest number is −9.2 and we grant the serial number 1 to it; the second one is −3.5 and we grant serial number 2 to it and so on. Finally, divide each serial number by m and round the quotient upwards to the nearest integer. Then the antibody is mapped as [2, 1, 1, 2, 1, 2]. As this random string generation method is prone to create redundant antibody, the newly generated antibody should be compared with existing antibodies such that only a new antibody that is different from the existing ones is accepted.

Affinity calculation of antibody
The antibody's affinity is partly determined by its performance measures, i.e., the makespan of its generated schedule. This is to decode the antibody to the corresponding scheduling plan. By scanning the number of the antibody from left to right, the operation is arranged at the maximum time between the earliest available time of the desired machine and the completion time of the job last preceding operation. This type of schedule is known as semi-active schedule without any excess idle time, but with some "holes". These "holes" can be deleted by shifting some operations to the front without delaying others. This operation is called the "finding and reducing holes procedure", which searches idle time of the working machine and inserts the operation into the idle period without violating the operation precedence constraints. Taking Fig. 2 as an example, the second operation of job 0 working on machine 1 is shifted to fill the holes, and the makespan is reduced by 2 units. This improved schedule is called the active schedule.
According to the generated scheduling plan, the performance measure (makespan) is obtained, i.e., the finish time of the last operation completed in the schedule. Additionally, the antibody can be standardized by reordering the antibody sequence on the basis of the start time of each operation. If the start time is the same, the order is determined by its job index. Thus each schedule corresponds to only one antibody.
In short, the antibody decoding process arranges the active schedule in terms of operation start time, standardizes the antibody to be unique to each schedule, and obtains the makespan value.
Inspired by the immune network theory, it is necessary to consider the population diversity in terms of the antibody similarity with other antibodies to adjust the antibody's affinity. This helps to maintain a high diversity of the antibody set to keep the variety of search space and prevent premature convergence. One method is to delete the antibodies whose affinity amongst all the antibodies, i.e., the reciprocal of concentration, is less than a predefined threshold. However, this operation may leave out some potential good solutions. Therefore, another method which aims to use the antibody's concentration to adjust the antibody's antigenic affinity that is determined by its performance measure is adopted, shown in Eq. (3): The antibody with a higher concentration is assigned a lower affinity with the antigen. The antibody concentration is obtained by averaging the similarity with all other standardized antibodies, which is always measured by the distance Fig. 2 Converting from semi-active scheduling to active scheduling between them. As each position of an antibody is represented by a job number without any quantitative meaning and physical association, the commonly adopted distance calculation method-Euclidean distance, cannot measure the difference between two antibodies. Here, the similarity of two antibodies is computed based on the percentage of the same positions between two standardized antibodies. For an n jobs and m machines problem, the concentration of the antibody Ab i is expressed as SC i shown in Eq. (4): where N Ab is the number of antibodies whose affinities are calculated, and the similarity count at the kth locus among the standardized antibody Ab i and Ab j is expressed as Ab k i j shown in Eq. (5): 1 if the jobs at the k locus of Ab i and Ab j are identical 0 else (5) Then the antibody affinity with the antigen is normalized in the range of [0, 1] after all antibodies' affinities with the antigen are computed.

Antibody selection and cloning
The sorted antibodies are selected based on their affinity values to go through the cloning process. The number of antibodies to be selected is s% × N, where s% is the selection rate and N is the antibody population size. Compared to the Elitist Selection Approach that only selects the best ones, the Roulette Wheel Selection Method is adopted for its better performance. In this method, the probability of selecting an antibody in the population is directly proportional to its affinity value. Preserving some poorer antibodies with lower affinity values to proliferate is able to advance the diversity of the antibody set and expand the search space. The selected antibodies will then be cloned. The whole clone population is set as the product of three pre-defined parameters, namely, antibody population size N , selection rate s% and clone amount C. The number of clones of each selected antibody is directly proportional to its affinity value. Hence the number of clones of the selected antibody i(C i ) is calculated as: where A f f i is the affinity value of the selected antibody i.

Antibody mutation
In the antibody mutation step, all clones go through the mutation process to convert into some new ones. The mutation rate (u%) is pre-defined. The clonal selection theory suggests that the mutation suffered by the clones is inversely proportional to their antigenic affinity, so the mutation rate of each clone should be further adjusted in a way that is inversely proportionally to its affinity. To keep the mutation procedure in a more diverse manner, three different mutation approaches are applied with different probability. They are the PSO algorithm, point mutation and fragment inverse mutation. Inspired by the principles of PSO, the proposed algorithm hybridizes with PSO to improve the somatic hypermutation process of the clones to obtain better variations. In the hybrid algorithm, the particle is the antibody. The operators in a classical PSO model, namely, addition and subtraction operators are translated into selection, crossover and mutation processes as shown in Eq. (7).
Here, the meaning of each variable is the same as for the classical PSO model, while the operations are significantly different. The subtraction operator means the crossover process between the two items. [X k (t)] represents the random mutation process of X k (t). And the addition operator means the selection process among all individuals. Therefore, the newly generated particle X k (t + 1) is set as the best one among P k (t)− X k (t), P g (t)− X k (t) and [X k (t)] . The coefficients c i (i = 1, 2 and 3) are randomly generated numbers that are controlled by the adjusted mutation rate in the range of [0, 1] for controlling the degree of crossover and mutation process. To simplify the selection process for more efficient runtime, when computing the three items sequentially, once a better item is generated compared with X k (t), it is assigned as the new particle X k (t + 1) while the others will not be further calculated. This modified PSO model aims to optimize the mutation process by speeding up the search process in a more efficient way based on the internal acceleration of each particle rather than using random search.
Another two mutation methods are classical ones. One is the point mutation which interchanges two randomly selected jobs of the antibody. The other is the fragment inverse mutation that randomly picks up a continuous fragment of the antibody and reverses the sequence. These two methods are illustrated by Figs. 3 and 4. As the mapping relationship between the non-standardized antibody and the schedule is many-to-one in the operation-based representation, the mutated antibody by exchanging two near jobs or reversing a short fragment of the antibody may yield the To minimize such occurrences, the randomly selected two positions in the antibody for exchange should be far away from each other, and the inversed fragment should not be too short. Here, a parameter called "mutation range" (L), is introduced to define the least distance that two exchanged positions should be separated from each other and the least length of the inversed fragment. The larger L is, the more global search effect occurs.
In the mutation process, there are three different mutation approaches. Each clone randomly adopts one of them. Being a novel approach of hybridizing PSO with AIS, it is worthwhile to investigate the effect of PSO on the proposed algorithm. Thus another parameter, called the PSO utilization rate p%, is introduced to define the probability that PSO is applied in the mutation process for a clone. The other two classical mutation methods are used under the same probability, i.e., (1 − p%)/2.
When all the clones finish their mutation processes, there are two choices to reserve the better mutated ones in the repertoire. One way is to pick up a number of the best ones with the highest affinity among all clones and their original antibodies. Another way is to replace each antibody with its own most efficient clone. This approach is better than the former one as it collects only the best one among the mutated clones from each antibody to keep the diversity of the antibody set. So the second method is adopted.

Neighborhood search mechanism
When decoding the antibody to obtain the scheduling plan, the active schedule is adopted instead of the semi-active one by "finding and reducing holes procedure". Here, another neighborhood search mechanism is introduced to find better neighborhood solutions for the active schedule.
This method defines a neighborhood solution based on the concept of blocks. A block is defined as the consecutive operations processed on the same machine in the critical path, that is, the longest continuous path in the corresponding Gantt Chart of the schedule. It has three characteristics: the operations in the block belong to the critical path; each block contains the operations processed on the same machine; the operations in two consecutive blocks are processed on different machines. By moving the operations nearer to the border line of blocks on the critical path, a better neighbor solution may be generated. This is done by swapping the last two operations in the first block, or the first two operations in the last block, or the first two or the last two operations for other blocks, because swapping other adjacent operations in blocks has been demonstrated to be ineffective (Nowicki and Smutnicki 1996). Taking Figs. 5 and 6 as an example, the operations in the critical path are labeled by the red " √ ". There are four blocks in Fig. 5, and three blocks in Fig. 6. Only the third block in Fig. 5 and the first and second block in Fig. 6 are applicable to the neighborhood search mechanism. Exchange two operations in the third block of Fig. 5, i.e., the third operation of job 1 and the third operation of job 2. A new schedule is generated as shown in Fig. 6. The makespan is as a result shortened by three units.
As this neighborhood search mechanism is computationally complex and relatively time-consuming, it is applied only when the algorithm is trapped in a local optimum. Therefore, in this algorithm, this method and the following parameter adjustment step are executed only when the best performance measure, i.e., minimal makespan, in the antibody set has not improved in consecutive t iterations.

Parameters adjustment
A large number of parameters including antibody population size N , clone amount C, selection rate s%, mutation rate u%, mutation range L, and replacement rate r% are used in the next step. As mentioned previously, when the solution is trapped in a local optimum, the parameters are modified to increase the search fluctuation so as to help the algorithm escape from the stagnation stage and widen the search space globally. The parameter adjustment algorithm therefore increases the values of u%, L , C and r% by 10 %.

Memory cells extraction
The antibodies with the highest affinity are assigned to differentiate into memory cells for future re-infections. Rather than "starting from scratch" every time, the memory cells help both the speed and accuracy of the solution process as the immune response becomes increasingly stronger after each infection. Thus the system continuously learns from the direct interaction with the environment. As such, the memory cells extraction process is adopted to advance the antibody (scheduling plan) to accelerate the convergence in the proposed method.
In each iteration, there always exists more than one best antibody (solution) with the same highest affinity value (the predominant objective value). During the search procedure, all these best antibodies are selected for memory cells extraction. The characteristic of the best antibodies to be picked up as the memory cells is decided by the problem to be solved.
The static JSSP's solution is to identify the start operating time of each job on each machine. But the start time of each operation is changeable because it always varies for all antibodies even with the same objective value. In addition, the operation start time cannot take a fixed value as it is controlled and constrained by the job sequence and processing time constraints. A small fluctuation of one operation start time may result in a totally different scheduling plan with the same performance. As such, each operation start time is not suitable to be the memory cells. Therefore, another factor is considered. From each solution, we also get the job sequence for each machine and this information provides important information for the scheduling plan. Suppose a schedule is efficient, its corresponding job sequences on each machine are also good. For a certain machine, different best solutions always have the same job sequence. Thus this sequence can be considered good for this machine, and be used in other solutions to improve their quality. Moreover, unlike the operation start time, any jobs permutation on a machine is feasible because it is not restricted by the problem's constraints. Therefore, the sequence of processing jobs on each machine can be a good candidate of memory cells.
At the end of each iteration, all the best antibodies are collected. Their corresponding job sequences on each machine are obtained. Suppose there are m machines in the problem, the memory cells are therefore divided into m groups. Each group represents a machine and consists of several memory cells. Each memory cell represents a job sequence on this machine, and it is assigned an affinity value represented by the frequency that it appears in all the best antibodies. Then these memory cells are used to generate new antibodies in the next step.

Receptor editing
The receptor editing process aims to generate new antibodies to escape from the unsatisfactory local optimum. In this step, r % (replacement rate) less efficient antibodies which gains the lowest affinity are replaced by the new ones generated from the memory cells.
The number of the selected memory cells should be in the range of [0, m], because there are only m memory cell groups and the cells in each group are incompatible. It is known that the memory cells become more mature in later iterations. Therefore, the number of memory cells picked up from the memory cell set is proportional to the iteration number. Hence, the later iterations will extract more memory cells, i.e., more machines' job sequence will be pre-defined. In the last iteration, all machines' job sequences are determined by the memory cells, while in the first iteration, relatively few machines' job sequences (m/T) are defined, and others should be generated randomly that are complied with the job sequence constraints.
In the memory cells selection step, only one memory cell is picked from each memory cell group. In each memory cell group, the selection rate of each memory cell is proportional to its affinity value. The higher affinity a memory cell has, the higher probability this memory cell is to be selected. Then the selected memory cells are combined to generate a new antibody. In some cases, some memory cells from different groups are incompatible because of the logical paradox in the job sequence. In such cases, this combination is ignored, and the memory cells are re-selected.
As the novelty of this algorithm lies in the integration of AIS and PSO, it is necessary to perform sensitivity analysis for the parameter-PSO utilization rate p%, to show the effect of PSO in the hybrid algorithm. Additionally, one of the distinct features of AIS, memory cells which are exacted from previous outstanding antibodies for the next immune response, is investigated. The experiments are designed to consider the following three perspectives: firstly, to perform sensitivity analysis on p%; secondly, to evaluate the hybrid algorithm and compare it with other similar approaches; and thirdly, to demonstrate the effectiveness of the memory cells mechanism.

Sensitivity analysis on parameter p%
This experiment aims to demonstrate the usefulness and effectiveness of PSO in the proposed hybrid algorithm. If the hybrid algorithm shows the best performance when p% is set as zero, PSO will be regarded as redundant. Here, six problems with four different sizes, namely, ORB02, ORB04 and ORB06 (10 × 10), LA06 (15 × 5), LA21 (15 × 10), and FT20 (20 × 5) are used to investigate the impact of PSO on the hybrid algorithm. The PSO utilization rate p% is tested on 11 cases. They are 0, 0.1, 0.2, 0.3, …, 1.0. For each case, these six problems are solved by the algorithm for 50 times repeatedly and independently with the same parameters. Figure 7 shows the relationship between p% and the average makespan value. The curve is in a "V" shape showing the algorithm performs well when p% is in the range of [0.4, 0.7]. When p% is less than 0.4, the average objective value decreases as p% grows. This exemplifies that the PSO variation has a positive influence to the mutation process in helping the antibodies move to a more favorable search space. On the other hand, when p% is greater than 0.7, the average makespan value increases rapidly with increasing p%. This illustrates the negative impact on the performance when PSO is excessively used in the mutation process. In summary, PSO helps the proposed algorithm accelerate the hypermutation process of the clones, though the mutation process should be varied and be controlled by different mutation methods, otherwise, the algorithm is prone to converge to some local optimum in the search space. Thus an optimal value of p% should be set in the range of [0.4, 0.7]. The proposed algorithm is evaluated by solving the benchmark problems. Initially, the parameter p% is set to 60 %. Depending on the performance of the algorithm, the value of p% is adjusted within the range of [0.4, 0.7]. For each case, the algorithm is executed 50 times independently to compute the average value (Avg.), standard deviation (SD) and average relative error (Avg. RE). The results are summarized in Table 1. In our experiments, the relative error is defined as the percentage deviation from the best known solution, as shown in Eq. (8).
Relative Error (%) = (heuristic solution − best solution)/ best solution × 100 (8) The performance of the algorithm is compared with the greedy randomized adaptive search procedure (GRASP), modified genetic algorithm (GA), best-so-far artificial bee colony (best-so-far ABC), multi-modal immune algorithm, and other AIS based or hybrid algorithms discussed in the references (Binato et al. 2002;Wang and Zheng 2002;Luh and Chueh 2009;Chandrasekaran et al. 2006;Ge et al. 2008;Coello et al. 2003). From Table 1 and related literatures from those references, the algorithm performs competitively in all cases as it achieves the global optimal solution even for largesize problems. In terms of the computation time, it is in the acceptable range. With this parameter setting, the average computation time for problem sizes of 6 × 6, 10 × 5, 10 × 10, System. To reduce the computation time without deteriorating the performance, it is possible to decrease the maximal iteration number T as the algorithm always converges to the optimal solution in less than T iterations for some instances, especially for small size problems. For example, when solving the cases FT06 (6 × 6), LA01 (10 × 5), LA06 (15 × 5) and LA11 ∼ LA14 (20 × 5), the algorithm obtains the optimal solution in the first iteration. Thus the computation time for these problems is actually about 0.56, 0.6, 2 and 2.4 s to achieve the best solutions. Moreover, the proposed algorithm is able to obtain multiple optimal solutions with the same objective value as in each  iteration the antibodies in the repertoire can be different. This provides alternative scheduling plans for the decision maker who can take into account other practical factors and adopt the most suitable and appropriate optimal setting. For example, the algorithm obtains 22 different scheduling plans for the problem FT06 (6 × 6) with the same minimal makespan value of 55 where two of these are shown in Figs. 8 and 9.
To improve the robustness of the scheduling system in real situations, it is suggested to increase the adaptability and flexibility of each operation by maximizing the slack time of each operation. This helps the scheduling process reduce the negative effect caused by some unexpected events, such as the fluctuation of each operation's processing time and machine breakdown. Thus the first solution is selected from Figs. 8 and 9.

Effectiveness of memory cells
To show the effectiveness of introducing the memory cells, an experiment based on the benchmark problems is designed to compare the proposed algorithm with its modified version where memory cells extraction step is taken out. The results are shown in Table 2, where only the cases with positive average relative error are presented. It is obvious that the introduction of memory cells increases the chance to obtain the optimal solution. Additionally, for the cases where both approaches achieve the optimal solution in all the runs, it is necessary to compare the number of iterations when the approach first achieves the optimal solution. The experiments results, as shown in Table 3, illustrate that the algorithm with memory cells introduced obtains the best schedule in fewer iterations. Therefore, it is concluded that the use of memory cells accelerates the convergence rate of the algorithm and reduces the computation time.

Conclusions
This paper proposes a new hybrid algorithm based on the clonal selection, immune network, and PSO theories for solving static JSSP. The algorithm simulates the clonal selection process of antibodies with improvement of the mutation process by PSO. To demonstrate its feasibility and efficiency, experiments are designed with the benchmark problems under three perspectives. Firstly, PSO is demonstrated to make a positive impact on the mutation process to a certain degree as excessive use deteriorates the objective value. Secondly, the algorithm is tested on 25 benchmark problems and compared with other popular approaches. The results demonstrate the competitiveness of the proposed algorithm where multiple optimal solutions are obtained within reasonable computation time, especially for some small size problems in which the algorithm achieves the optimal solution in less than 3 s. Thirdly, one of the key features of AISimmune cells extraction is demonstrated to have the ability to accelerate the convergence.
As AIS show good learning and memory capabilities and strong adaptability to the dynamic environment, it is possible to adapt other immune theories that are associated with selfregulation and control of dynamic situations, such as dendritic cell algorithm and idiotypic network, to deal with dynamic JSSP where unexpected disturbances are considered in the scheduling process. We find that this research direction is fruitful in practice in our current research.