Computational Intelligence In Manufacturing Handbook P10

35 320 0
Computational Intelligence In Manufacturing Handbook P10

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Cheng, Runwei et al "Production Planning and Scheduling Using Genetic Algorithms" Computational Intelligence in Manufacturing Handbook Edited by Jun Wang et al Boca Raton: CRC Press LLC,2001 ©2001 CRC Press LLC 10 Production Planning and Scheduling Using Genetic Algorithms 10.1 Introduction 10.2 Resource-Constrained Project Scheduling Problem 10.3 Parallel Machine Scheduling Problem 10.4 Job-Shop Scheduling Problem 10.5 Multistage Process Planning 10.6 Part Loading Scheduling Problem 10.1 Introduction Production scheduling problems concern the allocation of limited resources over time to perform tasks to satisfy certain criteria. Resources can be of a very different nature, for example, manpower, money, machines, tools, materials, energy, and so on. Tasks can have a variety of interpretations from machining parts in manufacturing systems up to processing information in computer systems. A task is usually characterized by some factors, such as ready time, due date, relative urgency weight, processing time, resource consumption, and so on. Moreover, a structure of a set of tasks, reflecting precedence constraints among them, can be defined in different ways. In addition, different criteria that measure the quality of the performance of a schedule can be taken into account. Many scheduling problems from manufacturing industries are characterized as combinatorial optimi- zation problems subject to highly complex constraints, which are very difficult to solve by conventional optimization techniques. This has led to the recent interest in using genetic algorithms to address the problem. In the following sections, we explain how to solve them with genetic algorithms, including resource-constrained project scheduling, parallel machine scheduling, job-shop scheduling, multistage process planning, and part loading scheduling problem. 10.2 Resource-Constrained Project Scheduling Problem The problem of scheduling activities under resource and precedence restrictions with the objective of minimizing the project duration is referred to as a resource constrained project scheduling problem in literature [Baker, 1974]. The basic type of the problem can be stated as follows: A project consists of a number of interrelated activities. Each activity is characterized by a known duration and given resource requirements. Resources are available in limited quantities but renewable from period to period. There is no substitution between resources and activities cannot be interrupted. A solution is to determine the start times of activities with respect to the precedence and resource constraints so as to optimize the objective. Runwei Cheng Ashikaga Institute of Technology Mitsuo Gen Ashikaga Institute of Technology ©2001 CRC Press LLC The problem can be stated mathematically as follows: Equation (10.1) Equation (10.2) Equation (10.3) Equation (10.4) where t i is the starting time of activity i , d i the duration (processing time) of activity i , S i the set of successors of activity i , r ik the amount of resource k required by activity i , b k the total availability of resource k , the set of activities in process at time t i , and m the number of different resource types. Activities 1 and n are dummy activities that mark the beginning and end of the project. The objective is to minimize total project duration. Constraint 10.2 ensures that none of the procedence constraints are violated. Constraint 10.3 ensures that the amount of resource k used by all activities does not exceed its limited quantity in any period. The earliest attempts were made to find an exact optimal solution to the problem by using standard solution techniques of mathematical programming. Because the resource-constrained project scheduling problem is NP-hard, for large projects, the size of the problem may render optimal methods computa- tionally impracticable. In such cases, the problem is most amenable to heuristic problem solving, using fairly simple scheduling rules capable of producing reasonably good suboptimal schedules [Alvarez-Valdés and Tamarit, 1989]. Most heuristic methods known so far can be viewed as priority dispatching rules that assign activity priorities in making sequencing decisions for resolution of resource conflicts according to either temporally related heuristic rules or resource-related heuristic rules. In essentials, the problem consists of the following two basic issues: (i) to determine the processing order of activities without violating the precedence constraints and (ii) subsequently to determine the start time for each activity without violating the resource constraint. How to determine the order of activities is critical to the problem, because if the order of activities is determined, a schedule then can be easily constructed with some determining procedures according to the order. Cheng and Gen [1998] have proposed a hybrid genetic algorithm to the resource-constrained project scheduling problem. The basic idea of the approach is to (i) use genetic algorithms to evolve an appro- priate processing order of activities and (ii) use a fit-in-best procedure to calculate the start times of activities. Their study focuses on how to handle the precedence constraint existing in the problem. A new encoding method is proposed, which is essentially capable of representing all feasible permutations of activities for a given instance. 10.2.1 Priority-Based Encoding The key issue of the problem is to find an appropriate processing order of activities. This is a permutation problem in nature. Due to the existence of precedence constraints among activities, an arbitrary permu- tation may yield an infeasible processing order. Making an encoding that can treat the precedence constraint efficiently is a critical step and conditions all subsequent steps. A priority-based encoding method is proposed by Cheng and Gen to handle this difficulty, which is based on the concepts of a directed acyclic graph (DAG) model. A sample project can be represented with a directed acyclic graph. A directed acyclic graph G ϭ ( V , A ) consists of a set of nodes V representing activities and a set of directed edges A representing the precedence constraints among activities. The terms node and activity will be used interchangeably in the following sections. For a given directed graph, a topological sort is a linear ordering of all its nodes such that for any min t n s.t. t j t i Ն d i , j᭙ S i ʦϪ r ik Յ b k , k ϭ 1, 2,…,m t i A t i ʦ Α t i Ն 0, i ϭ 1, 2,…,n A t i ©2001 CRC Press LLC directed edge ( u , v ) ʦ A , node u appears before node v in the ordering. In other words, a topological sort corresponds to a feasible ordering of activities, that is, a feasible solution. Cheng and Gen suggest a new encoding method, priority-based encoding, which is capable of representing all possible topological sort for a given instance. Recall that a gene contains two kinds of information: locus, the position of the gene located within the structure of a chromosome, and allele, the value the gene takes. Here, the position is used to denote an activity ID and the value is used to denote the priority associated with the activity, as shown in Figure 10.1. The value of a gene is an integer exclusively within [1, n ]. The larger the integer, the higher the priority. A one-pass procedure is used to generate a topological sort from a chromosome: to determine activities from left to right. When making a decision for a position, several activities may compete for the position and the one with the highest priority wins the position. The encoding does not explicitly represent a topological sort for a given DAG. It just contains some message for resolution of conflicts. A topological sort can be uniquely determined according to the encoding. Any changes in priorities usually result in a different topological sort. Therefore, this encoding is essentially capable of representing all possible topological sort for a given DAG. Let us see how to generate a topological sort from the encoding. Consider the example given in Figure 10.2. An array A [ • ] is used to store the generated topological sort. At the beginning, A [1] ϭ 1. Three activities, 2, 3, and 4, compete for A [2]. Their priorities as defined in above encoding are 7, 1, and 6, respectively. Activity 2 wins the position because it has the highest priority. After fixing A [2] ϭ 2, the candidates for the next position, A [3], are activities 3, 4, and 5. Activity 4 wins for the position and fixs A [3] = 4. Repeat these two steps: (i) construct the set of candidates for current position and (ii) select the highest-priority activity, until we obtain a topological sort, as shown in Figure 10.3 The tricky part, of course, is how to find a set of eligible nodes. The following definitions and theorems give us a better understanding about how to make such a set and how the procedure works. A partial topological sort is the one under development, which just contains the first t ( t Ͻ | V |) nodes with fixed orders. Let PS t ʚ V be the set of nodes corresponding to a given partial topological sort, where FIGURE 10.1 Priority-based encoding. FIGURE 10.2 Network representation of a project. FIGURE 10.3 The topological sort of the DAG shown in Figure 10.2. 12 34 56 7 3716452 1 2 3 4 5 6 7 1 2 3 4 5 6 7 ©2001 CRC Press LLC the subscript t denotes the cardinal number of the set, that is, | PS t | ϭ t . Let C ( PS t , V Ϫ PS t ) ϭ {( i , j ) | i ʦ PS t , j ʦ V Ϫ PS t } be the cut of the directed graph with respect to the given partial topological sort. Then we have the following lemma: L EMMA 1 (eligible node) For a given partial topological sort with nodes PS t , a node j ʦ V Ϫ PS t is eligible if and only if we can have a set S(j) ϭ {( i, j ) | ( i, j ) ʦ A } of edges incident to j such that S(j) ʕ C(PS t , V Ϫ PS t ). P ROOF . For a given node j ʦ V Ϫ PS t , if there is an edge ( x , j ) incident to j , the node x is a parent node of j . If all such edges belong to the cut C (PS t , V Ϫ PS t ), it means that all the parent nodes of j belong to the set PS t , that is, they are the sorted node, therefore, the node j is eligible. Assume that there is an eligible node j and not all the edges incident to j belong to the cut. That is, |C(PS t , V Ϫ PS t ) ʜ S(j)|Ͼ|C(PS t , V Ϫ PS t )|. Then at least one of its parent node belongs to set V Ϫ PS t , that is, at least one of its parent node is not the sorted node. This is a contradiction to the definition of eligible node. ᭿ Theoretically, we can check whether a node is eligible with the lemma, but it is usually not easy for programming to check if a set is a subset of others. The following theorem provides a criterion to determine an eligible node. T HEOREM 1 (criterion of eligible node) For an eligible node j ʦ V Ϫ PS t , let S t (j) be a proper subset of cut C(PS t , V Ϫ PS t ) containing all edges incident to j, we have . P ROOF . For an eligible node, we have, according to Lemma 1, S t (j) ʝ S(j) ϭ S(j) and S t (j) ʜ S(j) ϭ S(j). Because , we prove the theorem. ᭿ Now we can identify an eligible node simply by checking whether the number of edges incident to it in the cut equals its indegree. This criterion is easy for programming. Let us consider the example given in Figure 10.4. The partial topological sort is PS 3 ϭ {1, 2, 3} and the cut contains the directed edges C(PS 3 , V Ϫ PS 3 ) ϭ {(1, 4), (2, 5), (2, 6), (3, 6), (3, 7)}. Node 6 is an eligible one because its indegree d IN (6) ϭ 2 and the two edges incident to node 6 belong to the cut. Node 5 is a free node because its indegree is 2 and only one edge incident to it belongs to the cut. Its other parent node is 4, which is an eligible one but not a sorted one. 10.2.1.1 Procedure of Topological Sort The basic idea of the topological sort procedure is, at each step as the procedure progresses, to (i) identify the set of eligible nodes with Theorem 1, (ii) remove the one with the highest priority from the set, and (iii) fix the removed node in the partial topological sort. Let t be the iteration index of the procedure. Let V be the set of all node. Let Q i be the set of all direct successors of activities i. Let PS[ • ] be the array for storing topological sort. Let CUT[i] be the number of edges incident to node i in cut. Let S t be the set of eligible nodes at step t. The procedure for generating a topological sort from a chromosome is given as below: procedure: topological sort step 1: (initialization) (iteration index) (initial topological sort) (initial priority queue) (initial number of edges in the cut) FIGURE 10.4 Partial topological sort, cut, and eligible nodes. 1 2 3 4 5 6 8 7 S t j() d IN j()ϭ Sj() d IN j()ϭ t 1← PS t[] 1← S t Q 1 ← CUT i[] 1, i ʦ Q 1 ᭙← ©2001 CRC Press LLC step 2: (termination test) If PS[t] ϭ n, go to step 6; otherwise , continue. step 3: (fixing the tth node) Remove the highest priority node i ء from priority queue S t and put it in array PS[t]. step 4: (cut set update) step 5: (eligible node set update) For all , if , then put i in priority queue S t . Go back to step 2. step 6: (topological sort) Return a complete topological sort PS[ • ]. 10.2.2 Genetic Operators Genetic search is implemented through genetic operators and directed by selection pressure. Usually, a crossover operator is used as the main genetic operator, and the performance of a genetic system depends heavily on it; a mutation operator is used as a background operator, which produces spontaneous random changes in various chromosomes. Gen and Cheng [1997] proposed an alternative approach to design genetic operators: one operator is designed to perform a widespread search to explore the area beyond local optima; the other is designed to perform an intensive search to hunt for an improved solution. Two kinds of search approaches, the intensive search and the widespread search, form the mutual complementary components of genetic search. With this approach, the crossover operator and mutation operator play the same important role in the genetic search. 10.2.2.1 Position-Based Crossover The nature of the proposed encodings can be viewed as a kind of permutation encodings. A number of recombination operators have been investigated for permutation representation. The position-based crossover operator proposed by Syswerda [1991] was adopted, shown in Figure 10.5. Essentially, it takes some genes from one parent at random and fills vacuum positions with genes from the other parent by a left-to-right scan. 10.2.2.2 Swap Mutation The swap mutation operator used here simply selects two positions at random and swaps their contents, as shown in Figure 10.6. FIGURE 10.5 The position-based crossover operator. CUT i[] 0, i ʦ VQ 1 Ϫ᭙← tt1ϩ← CUT i[] CUT i[] 1, iQ iء ʦ᭙ϩ← iQ iء ʦ CUT i[] d IN i()ϭ 31 7 6 45 2 6 1 7 2 45 3 6 5 7 14 2 3 ©2001 CRC Press LLC 10.2.2.3 Local Search-Based Mutation Local search methods seek improved solutions to a problem by searching in the neighborhood of an incumbent solution. The implementation of local search requires an initial incumbent solution, the definition of a neighborhood for an incumbent solution, and a method for choosing the next incumbent solution. The idea of hunting for an improved solution by making a small change can be used in mutation operator. A neighborhood of a chromosome is then defined as a set of chromosomes generated by pairwise interchanges. For a pair of genes, one is called pivot, which is fixed for a given neighborhood, and the other is selected at random, as shown in Figure 10.7. For a given neighborhood, a chromosome is called a local optima if it is better than any other chromosomes according to the fitness value. The size of a neighborhood affects the quality of the local optima. There is a clear trade-off between small and large neighborhoods: if the number of neighbors is larger, the probability of finding a good neighbor may be higher, but looking for it takes more time. 10.2.3 Evaluation and Selection During each generation, chromosomes are evaluated, using some measure of fitness. The following four major steps are included in the evaluation phase: (i) convert chromosomes to topological sorts, (ii) generate schedules from the topological sorts, (iii) calculate objective values for each schedule, and (iv) convert objective values into fitness values. Because a topological sort gives a feasible order of activities, we construct a schedule by selecting the activities in order of their appearance in the topological sort and scheduling them one at a time as early as resource availabilities permit. Let i be the iteration index of the procedure. Let V be the set of all node. Let P i be the set of all direct predecessors of activities i. Let PS[ • ] be the array for storing topological sort. Let ␴ j and ␾ j be start and finish times associated with activity j. Let b k [l] be the array for storing available FIGURE 10.6 The swap mutation operator. FIGURE 10.7 The incumbent chromosome and its neighborhood. 3 1 7 64 5 2 3 4 7 6 1 52 parent child 317 6 4 5 2 3 4 6 71 5 2 317 4652 31762 5 4 314 6 752 neighborhood ©2001 CRC Press LLC amount of resource k in time l. Let d j be the duration associated with activity j. Let r jk be the consumption of resource k associated with activity j. The procedure for determining start and finish times of each activity from a given topological sort is given below: procedure: start and finish times of activities step 1: (initialization) (iteration index) (initial activity) (start and finish times for initial activity) (initial resources) step 2: (termination test) If i ϭ n, go to step 5; otherwise , continue. step 3: (start and finish times) step 4: (available resources update) go back to step 2. step 5: (stop) return ␴ j and ␾ j . Because we use the measure of project duration, the finish time of the last activity is the objective value. Since we deal with a minimization problem, we have to convert the original objective value to a fitness value in order to ensure that the fitter individual has a larger fitness value. Let ␷ k be the kth chromosome in the current generation, g(␷ k ) be the fitness function, f(␷ k ) be the objective value, that is, the project duration, f max and f min be the maximum and minimum values of the objective values in current generation. The transformation is given as follows: Equation (10.5) where ␥ is a positive real number that is usually restricted within the open interval (0, 1). The purpose of using it is twofold: (1) to prevent Equation 10.5 from zero division and (2) to make it possible to adjust the selection behaviors from fitness-proportional selection to pure random selection. When the difference of fitness among chromosomes is relatively large, the selection is fitness-proportional; when the difference becomes too small, the selection tends to pure random among relatively competitive chromosomes. The roulette wheel approach was adopted as the selection procedure that is one of the fitness- proportional selection. The elitist selection method was combined with this approach in order to preserve the best chromosome in the next generation and overcome the stochastic errors of sampling. With the elitist selection, if the best individual in the current generation is not reproduced into the new generation, one individual is randomly removed from the new population and the best one added to the new population. i 1← jPSi[]← ␴ j 0, ␾ j 0←← b k l[] b k , l← 1, 2,…, ͚ jϭ1 n d j , k 1, 2,…, mϭϭ ii1ϩ← jPSi[]← ␴ j min max ␾ l l ʦ P j {}← ␴ j min tt Ն ␴ j min , b k l[] Յ r jk , lt, t 1,…, td j , k 1, 2,…,mϭϩϩϭ{}← ␾ j ␴ j d j ϩ← b k l[] b k l[] r jk , lϪ← t, t 1,…, td j , kϩϩ 1, 2,…,mϭϭ g ␷ k () f max f ␷ k () ␥ ϩϪ f max f min Ϫ ␥ ϩ --------------------------------------- ϭ ©2001 CRC Press LLC 10.2.4 Experimental Results To investigate how population size affects the performance of genetic algorithms, experiments on param- eter tuning were conducted. Fix maximum generation as 100, crossover and mutation ratios as 0.1, respectively. Under the condition of lower ratio of crossover and mutation, population size becomes one of the leading factors for the performance of genetic algorithms. Population size was varied from 10 to 100. Figure 10.8 shows the best, worst, and average values of objective over 100 random runs for each parameter setting. From the results we can see that when pop_size is larger than 50, any increase of it has no significant influence on the performance of the genetic algorithm. Comparison between crossover and mutation operators was also performed to confirm which plays a more important role in the genetic search. Genetic algorithms were tested in the following two cases: (i) fix mutation ratio as 0 and vary crossover ratio from 0.1 to 0.9; (ii) fix crossover ratio as 0 and vary mutation ratio from 0.1 to 0.9. In both cases, fix max_ gen ϭ 100 and pop_size ϭ 20. The best values of objective function over 200 random runs for each different parameter setting are given in Figure 10.9, From the results we can see that the chance for obtaining an optimal solution is much higher when running genetic algorithms with mutation only than when running with crossover only. The results reveal that mutation plays a critical role in this genetic system, contradicting conventional beliefs. In conventional genetic algorithms, crossover is used as the main operator and mutation is just used as a subsidiary means. Although the mechanism of swap mutation is very simple, it provides the FIGURE 10.8 Comparison on the best value, worst value, and average values of objective under different pop_size. FIGURE 10.9 The best values over 200 random runs under different ratios of crossover and mutation. 0 20 30 40 10 50 60 70 80 90 66 64 76 100 68 70 72 74 worst value average value best value 0 0.2 0.3 0.4 0.1 0.5 0.6 0.7 0.8 0.9 1 64 66 68 run GA only with crossover run GA only with mutation ©2001 CRC Press LLC exploitation on the neighborhood of a given chromosome. This is the reason that mutation can have a high probability of obtaining the optimal solution. To demonstrate the behavior of local search-based mutation in the genetic search, a comparative experiment was conducted by running with the swap mutation only and running with the local search- based mutation only. To give a fair comparison, for the cases of swap mutation, population size was fixed as 50, maximum generation was fixed as 200; for the case of local search-based mutation, population size was fixed as 20, maximum generation was fixed as 100. For each case, the ratio was fixed as 0.3. The size of the neighborhood for local search-based mutation was fixed as 6 so that the total number of examined chromosomes for each case was nearly the same. The solution distribution over 200 runs is given in Figure 10.10 for the case where only the swap mutation was used and in Figure 10.11 for the case where only the local search-based mutation was used. It is easy to see that the local search-based mutation has a significant impact on the performance of the genetic algorithms. 10.3 Parallel Machine Scheduling Problem The machine scheduling problem is a rich and promising field of research with applications in manu- facturing, logistics, computer architecture, and so on. The parallel machine scheduling problem is concerned with how to construct a schedule of a set of jobs on several machines in order to ensure the execution of all jobs in a reasonable amount of time. All machines are assumed to be identical such that the processing time of a job is independent of the machine. A job is characterized by a processing time FIGURE 10.10 Solution distribution over 200 runs with the swap mutation only. FIGURE 10.11 Solution distribution over 200 runs with the local search-based mutation only. 65 6664 67 68 69 71 7270 73 0 0.1 0.2 0.3 0.4 0.5 0.6 p m p c = = 0.3 0.0 p m p c = = 0.3 0.0 65 6664 67 68 69 71 7270 73 0 0.1 0.2 0.3 0.4 0.5 0.6 [...]... building blocks and intend to use such crossover to maintain building blocks in offspring in much the same manner as Holland described The method has the following major steps: (i) Identify a partial schedule in one parent randomly and in the other parent accordingly (ii) Exchange the partial schedules to generate proto-offspring (iii) Determine the missed and exceeded genes for the proto-offspring... number In other words, duplication is prohibited in a pure literal string, whereas the same symbol can coexist in a general literal string Among the ten encoding methods discussed above, the job-based encoding, the machine-based encoding, the random key encoding, and the completion time-based encoding are the pure literal string; the operation-based encoding, the preference list-based encoding, the... directed to preventing a crossover operator from producing illegal offspring Among literal string encodings, preference list-based encoding, job-based encoding, and machine-based are of this type In the last case, neither order relation, but some guild information, is encoded in the chromosome Such encoding is a pure permutation of literal strings Although the duplication of some genes results in illegality,... attention in response to increasing competitive pressure in domestic and international markets There are two nonregular performance measures commonly used in machine scheduling problems: minsum measure and minmax measure The minsum measure attempts to minimize the sum of weighted absolute deviations of job completion times about the due date to reduce the aggregate disappointment of customers; the minmax... other scheduling problems in modern flexible manufacturing systems and other difficult-to-solve combinatorial optimization problems 10.5 Multistage Process Planning Mulistage process planning (MPP) problems are common among manufacturing systems The problem, in general, provides a detailed description of manufacturing capabilities and requirements for transforming a raw stock of materials into a completed... forged, in general it is necessary to change same tools stored in the tool magazines The parts loading scheduling problem can be considered as a single-machine scheduling problem with sequence-dependent changeover costs and precedence constraints It is equivalent to the traveling salesman problem The problem can be formulated as the following mixed-integer programming problem: n Α Αc x z ϭ min n ij... Exchange these subsequences machine by machine among parents to create offspring Because it is difficult to maintain the precedence relation among operations in either initial population or offspring by use of the job sequence matrix encoding, a Giffler and Thompson algorithm is used to carefully adjust job orders on each machine to resolve the infeasibility and to convert offspring into active schedules 10.4.3.8... weightier job in an optimal schedule From the above properties we know that there exists at least one optimal schedule where jobs in the set T of the dominant machine are in nondecreasing order of weights while jobs in the set E of the dominant machine are in nonincreasing order of weights for most cases The exception may occur if a weightier and longer job does not satisfy the condition given in Property... heuristic in order to resolve the precedence constraints and to convert each offspring into an active schedule 10.4.5.3 Combining Genetic Algorithm with Bottleneck Shifting Heuristic In this hybrid approach, genetic algorithm is used to evolve a sequence of machines and shifting bottleneck heuristic is used to deduce a schedule from the encoding of machine sequence [Dorndorf and Pesch, 1995] The shifting... where the following condition holds true for the dominant machine: Αp Ն Αp i iʦE j jʦT Equation (10.14) PROOF There are four possible patterns in which the dominant jobs may occur on the dominant machine 1 2 3 4 One job is in the head of E while the other is in the tail of T One job is in the head of E while the other is in the middle of T One job is in the middle of E while the other is in the tail of . et al "Production Planning and Scheduling Using Genetic Algorithms" Computational Intelligence in Manufacturing Handbook Edited by Jun Wang et. on. Tasks can have a variety of interpretations from machining parts in manufacturing systems up to processing information in computer systems. A task is

Ngày đăng: 06/11/2013, 09:15

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan