• 沒有找到結果。

CHAPTER 2 Review of Related Works

2.3 Operators of GAs

Ribeiro et al. [22] proposed five kinds of crossover operators including One Point Crossover (OX), Similar Job Order Crossover (SJOX), Uniform Order-based Crossover (UOBX), Partially Mapped Crossover (PMX) and Relative Job Order

used fuzzy assessment for job processing time and proposed a new Hybrid Crossover (HX) operator that was a combination of the four typical crossover operators: PMX, OX, Circle Crossover (CX) and Uniform Crossover (UN), to solve the single machine earliness and tardiness problem.

CHAPTER 3 Problem Definitions

3.1 Problem Statement

In this study, the scheduling problem to be dealt with is to assign a set of n jobs to a set of m parallel machines, each of which can be mounted with a specific set of molds, respectively. Each job requires one of the given molds to be processed on a machine.

The processing time of each job is predefined, and is assumed to be the same on each of the machines. The molds have their limitation for being mounted on the given machines. There are an arbitrary number of identical ones for each mold. The setup time is required when the first job on a machine starts or when a job assigned on a machine needs mold change. Here, the setup time is assumed to be a constant for simplicity, but it is easily extended to handle different setup times. Besides, the scheduling problem considered here is non-preemptive. One job can be processed by one machine at a time. A simple example is given below to illustrate the scheduling problem to be solved.

Example 3.1. Assume a scheduling requirement includes ten jobs which are assigned

on three machines to process while using four molds. Table 3.1 shows the profiles of the ten jobs to be scheduled. The processing time and the used mold candidates for each job are given in the rows. For instance, Job 1 takes six units of time and requires a machine mounted with Mold 2 or 4. Job 2 can only be processed by a machine with Mold 1 and needs seven units of processing time.

Table 3.1 The ten jobs in Example 3.1

Job 1 2 3 4 5 6 7 8 9 10

Processing

Time 6 7 4 5 8 6 6 4 5 8

Molds 2, 3 1 2, 4 2 1, 3, 4 1, 2, 3 3, 4 2, 3, 4 4 3

The numbers of molds can be different. In this example, the amounts of the molds are shown in Table 3.2.

Table 3.2 The amounts of the molds

Mold 1 2 3 4

Amount 1 2 2 1

Machines are unrelated here, and thus each of them can be mounted with a specified set of molds. Table 3.3 depicts the set of molds which can be adopted for

machines. For instance, Machine A can use either Mold 1 or Mold 3.

Table 3.3 The adoptable molds for each machine

Machine A B C

Adoptable molds 1, 3 2, 3, 4 1, 2

The elapsed time from the start to the finish of all the jobs in a schedule is known as makespan. When the setup time is given as 5, a scheduling result for Example 3.1 is shown in Figure 3.1, and the makespan of the schedule is 33.

Figure 3.1 A scheduling result for Example 3.1

3.2 Notation

The notation used in this paper is listed as follows.

J: a set of n jobs to be processed;

M: a set of m machines to assign jobs for processing;

H: a set of h mold types with arbitrary amounts;

H(i): a subset of molds is suitable for job i, where H(i)  H;

M(l): a subset of molds is adoptable to machine l, where M(l)  M;

tj: the processing time of job j;

hk: the amount of mold k;

s: the setup time;

J(i): the subset of jobs assigned to machine i, where i  M and J(i)  J;

Li: the complete time of jobs executed on machine i.

3.3 Some Properties in Scheduling

In parallel machine scheduling problems with or without constraints, a set J of n

jobs is to be processed on a set M of m machines. Assume a machine can process at most one job at a time and a job can only be assigned to a machine. That is, if i  j, then J(i)  J(j) = , where i, j  M. Besides, J(1)  J(2)  ...  J(m) = J, where J is the set

of all jobs. The processing time for a job j  J is tj  . The final complete time of all the jobs on the machines is called the makespan. Let Li be the complete time of jobs loaded on machine i. Thus,

𝐿𝑖 = ∑𝑗∈𝐽(𝑖)𝑡𝑗, where i  M.

The makespan is the maximum total processing time on any machine. Therefore, the makespan of a scheduling task is [39]:

𝐿 = max𝑖𝐿𝑖, where i  M.

The goal of the makespan scheduling problem is to find the solution J* with

minimum makespan L*. Therefore,

𝐿* = min(max𝑖∈𝑀𝐿𝑖), where M is the set of given machines.

There are several good properties for scheduling problems with the makespan criterion. The first one is the property of makespan lower bound in a feasible schedule [39], which is shown below.

Property 1. Let M be the set of given machines, m be the number of machines,

and Li be the complete time of jobs loaded on machine I. Then, for any feasible schedule (including the optimal schedule), the lower bound of the makespan L in the

𝐿 ≥ ∑𝑖∈𝑀𝐿𝑖 𝑚 .

The rationale of the above property can be shown below.

Proof. Let m be the number of machines. The complete time Li of each machine i will satisfy the following condition:

Li  max(L1, L2, …, Lm), 1  i  m.

The total complete time of all machines is thus:

∑ 𝐿𝑖 ≤ 𝑚 ∙ max(𝐿1, 𝐿2, ⋯ , 𝐿𝑚)

𝑚

𝑖=1

.

Rewrite the above equation and we can get

𝑖∈𝑀𝐿𝑖

𝑚 ≤ max(𝐿1, 𝐿2, ⋯ , 𝐿𝑚) = max𝑖∈𝑀𝐿𝑖 = 𝐿.

Therefore, there is a lower bound, 𝑖∈𝑀𝑚𝐿𝑖, for the makespan L of a feasible schedule.

Example 3.2. Assume that seven jobs (job 1 to job 7) are assigned to three

machines (machine A, B, C). The processing time of each job is shown in Table 3.4.

Table 3.4 The processing time of each job in Example 3.2

Job 1 2 3 4 5 6 7

Processing Time 5 7 4 3 9 3 5

Assume there are no additional constraints on the example. A scheduling result is shown as Figure 3.2. Since the complete time of each machine are: LA = t1 + t5 = 14, LB

= t3 + t2 = 11, and LC = t4 + t6 + t7 = 11. Therefore, the makespan can be found as L =

max(14, 10, 12) = 14. The makespan of the scheduling result cannot be smaller than the lower bound (14+10+12)/3, which is 12.

Figure 3.2 The scheduling result of Example 3.2

Below, we will describe the second property for improving a schedule for a better makespan.

Property 2. Assume machine k processes a set J(k) of jobs, and it takes the

longest complete time among all the machines, i.e. Lk = max𝑖∈𝐽(𝑘)𝐿𝑖 = L. Assume that a job p  J(k) is processed on machine k with processing time tp, and another job q J(j) is processed on another machine j with processing time tq. When 0 < tp – tq < Lk – Lj

exists and no constraints are violated, a new smaller makespan L’ < L will be found after jobs p and q are exchanged between machines k and j.

Proof. It is known that machine k takes the longest complete time among all the

machines. Thus, Lk = max𝑖∈𝐽(𝐾)𝐿𝑖 = L. Since machine k processes job p  J(k) with processing time tp, its complete time can be rewritten as:

𝐿𝑘 = ∑ 𝑡𝑖

After jobs p and q are swapped between machines k and j, if no constraints are violated, the new complete times, Lk’ and L j’, of machine k and machine j will become:

𝐿𝑘′ = ( ∑ 𝑡𝑖

𝑖∈𝐽(𝑘)

− 𝑡𝑝) + 𝑡𝑞,

𝐿𝑗′ = ( ∑ 𝑡𝑖

Furthermore, the complete times of all the other machines except machines p and q are certainly less than L since they are not changed. A new makespan L’, which is

the maximum of the complete time, is thus less than L according to the above proof.

The above property can thus be used to effectively decrease the value of makespan.

Example 3.3. Following Example 3.2, assume there is no constraint violated when

in Figure 3.3. According to Property 2, the swapping will be beneficial to the

makespan improvement, because LA – LB = 14 – 10 > t1 – t3 = 5 – 4. The new makespan L’ of the scheduling result is improved from 14 to 13.

Figure 3.3 Jobs swapping result in Example 3.3

Job exchanges will stop when the condition of 0 < tp – tq < Lk – Lj in Property 2 or some constraints are not matched. Example 3.4 is given to illustrate the situation of no job being swapped.

Example 3.4. Continuing from above example, the makespan is updated again

when jobs 3 and 4 are swapped between machines A and C, as shown in Figure 3.4.

After the swap, the makespan improves from 13 to 12. Since the condition of 0 < tp – tq

< Lk – Lj in Lemma 2 does not exist, No more job swapping is done will be done.

Figure 3.4 Jobs swapping result in Example 3.4

3.4 Scheduling with Mold Constraints

In real applications, machines need to be mounted with some molds to be able to process jobs. This thesis thus considers the scheduling problems with mold constraints.

The mold setup time is considered in two situations: (1) a machine loads its first job with a start mold; (2) molds change when jobs with different mold requirement are consecutively executed.. Therefore, the makespan of a schedule will increase when the

molds installed on machines are changed often. For simplicity, the setup time is assumed to be a constant in this thesis. But arbitrary setup times for different modes can also be easily handled. Below, an example is given to illustrate the mold constraints.

Example 3.5. Five jobs are to be assigned on three machines, and the molds used

by the jobs are shown in Table 3.5. Besides, assume that the molds can be installed on each machine. Job 3 can use molds 1 or 2 for processing, and job 5 can use molds 3 or 4.

Different mold selection strategies for two scheduling results are presented in Figure 3.5, where s stands for setup time and a job is denoted by a job-mold pair which means that a specific mold is used by a job. For instance, job 1 assigned on machine A using mold 1 is denoted as 1-1 following a setup time in Figure 3.5(a).

Assume that the setup time is given as 3 time units in this example. Each machine needs a setup time for installing the mold used by the first job. Since job 5 using mold 4 on machine C is different from job 4 using mold 3, a setup time for mold change is required in Figure 3.5(a). Therefore, the makespan of the scheduling result in Figure 3.5(a) is L = LC = 13. On the other hand, the makespan is L = LB = 11 when job 5 uses mold 3. There is no additional setup time needed for arranging job 5 to machine C in Figure 3.5(b). Therefore, to reduce the makespan, the setup time required on machines

needs to take as little as possible. That means, the frequency for mold change needs to be as small as possible.

Table 3.5 Five jobs and the used molds in Example 3.5

Job 1 2 3 4 5

Processing Time 6 3 5 4 3

Mold 1 2 1, 2 3 3, 4

Figure 3.5 Scheduling results with different mold selections in Example 3.5

As mentioned above, to reduce the makespan of the scheduling task, the cost of setup time on a machine should be as little as possible. Therefore, the mold selection for a job is important. Since the setup time is considered in this study, the lower bound of the makespan L in a feasible schedule is modified as:

𝐿 ≥∑𝑖∈𝑀𝐿𝑖 + 𝑠 ∗ 𝑚

𝑚 =∑𝑖∈𝑀𝐿𝑖 𝑚 + 𝑠.

The reason is that at least one setup time is required for installing the mold for the first job on each machine.

CHAPTER 4

The Proposed Algorithm

To deal with the scheduling problem as defined in Chapter 3. A GA-based algorithm is introduced in this chapter to find the optimal makespan on parallel machines while considering mold constraint. The mold constraint in this study is that each job can be processed by one of a set of specified molds on a machine and each type of mold has a given number of quantities. Besides, molds can only be installed on the specified machines, and the setup time is needed when the first job starts on a machine, or a job assigned on a machine when the installed mold is not matched with it. The setup time here is assumed the same for simplicity.

The proposed GA-based scheduling algorithm is described in this section to solve the scheduling problem where a set of non-preemptive jobs and a set of machines with a set of molds are given to find the minimum for the completion time of each machine.

The processing time of each job is assigned respectively, and it is the same while processing on each of the machines. The mold constraints and setup time mentioned above are also given. Therefore, the goal of the algorithm is to find the minimum makespan defined in Chapter 3.

4.1 Chromosome Presentation

To present a possible solution in our GA-based algorithm, the encoded schema adopted in this study is shown in Figure 4.1. A possible solution is encoded as a chromosome with n gens, n is the number of jobs for scheduling, and each gene includes a triple of a job ji, a machine ki, and a mold mi, where i =1 to n. A gene of a chromosome stands for job ji which uses the mold mi being processed on a machine ki, where ji  J. Since a set of adoptable molds for each job are given as the mold constraints, the mold in each gene must be one of the adoptable molds for job ji, that is mi  H(i). Besides, jobs are assigned to machines according to the load of machines,

and the machine with the lowest load is assigned jobs first. An example is given below for demonstrating the adopted encoding schema.

Figure 4.1 The encoding schema

Example 4.1. Assume that there is a set of five jobs and a set of three machines, and

four kinds of molds are given for scheduling. Also assume that the number of each kind of mold is one. The chromosome shown in Figure 4.2 presents job 3 uses mold 2 on

machine A, and job 5 uses mold 1 on machine B, and so on.

Figure 4.2 The representation of the chromosome in Example 4.1

As the scheduling assignment encoded by the chromosome, the processing order of the jobs is job 3, job 5, job 1, job 4 and job 2. The scheduling result is shown in Figure 4.3 for the above chromosome. The first three jobs, job 3, job 5 and job 1, are assigned to machine A, machine B and machine C respectively in alphabetical order, and setup time is needed on each machine. Since the load of machine B is lowest when it turns to job 4 to be assigned, job 4 is then assigned to machine B. job 2 is processed on machine C which has the lowest load in turn to job 2. An additional setup time is needed between job 1 and job 2 on machine C, since they use different molds.

Figure 4.3 The scheduling result in Example 4.1

4.2 Initialization

The first set of feasible solutions is required for updating during the evolution processes of a GA-based algorithm. Therefore, a set of chromosomes are randomly generated according to the above encoding schema, and each chromosome is mapped to be a corresponding possible schedule. The set of the n given jobs are randomly assigned to n genes of a chromosome, and the mold of each gene is randomly picked from the adoptable molds of respective jobs. No genes are assigned to the same job. The initially generated p chromosomes are formed as the initial population, where p is the defined size of a population. The method of generating chromosomes for a population is introduced as follows.

The chromosome generating procedure

INPUT: A set of n jobs with processing times and their adoptable molds, a set of m

machines, a set of h molds with given amounts.

OUTPUT: A set of p chromosomes, where p is the size of the population.

STEP 1: Set i = 1, where i is an index of the i-th chromosome with n genes being generated.

STEP 2: Set q = 1, where q is an index of the q-th gene with the triple of job, machine,

and mold, jq-kq-mq, being generated.

STEP 3: Randomly select a job r from the given set J of jobs, r  J, and let jq = r.

STEP 4: Set t is the machine with the lowest loading, t  M. Let kq = t. If the lowest

loading is kept by multiple machines, then t is set in alphabetical order.

STEP 5: Randomly select a mold s from the given set of molds adoptable to job r, s 

H(r), and let mq= s.

STEP 6: If q = n, then go to next step; otherwise, set q = q + 1, and return to STEP 3.

STEP 7: Check if the contradiction about mold constraint happens, then the adjustment operator introduced in Section 4.3 is executed.

STEP 8: If i = p, then stop the generating processes and output the n generated chromosomes; otherwise, set i = i + 1, and return to STEP 3.

4.3 Contradiction Avoidance

4.3.1 The contradictions with mold constraints

To keep chromosomes away from violation of the given mold constraints when new chromosomes are generated at initialization, or at reproduction, by executing the genetic operators, some contradictions may be found when mold constraints are considered. Therefore, the chromosome tuning operators is adopted to adjust the

may happen on a chromosome, and they are (1) the mold assigned to a job in a chromosome cannot be installed on the machine that processes the job; (2) the number of a mold is not enough to install on the machines that process the jobs using the same mold. Example 4.2 is given below to demonstrate these two contradictions.

Example 4.1. Assume the mold constraints are given as Table 4.1, Table 4.2 and

Table 4.3. The adoptable molds for respective jobs are given in Table 4.1. In Table 4.2, the molds installed on respective machines are shown. The number of each mold can then be found in Table 4.3. Also assume that a chromosome, 1A4-3B2-2C1-4A1-5C1, is generated from the chromosome generating procedure in Section 4.3. And this chromosome represents the scheduling result which is shown in Figure 4.4.

Table 4.1 Jobs and their adoptable molds in Example 4.2

Job 1 2 3 4 5

Time 4 4 8 10 3

Molds 3, 4 1, 2 2 1 1, 2, 4

Table 4.2 The molds for each machine in Example 4.2

Machine A B C

Molds 1, 3 2, 3 1, 4

Table 4.3 The number of molds in Example 4.3

Mold 1 2 3 4

The number

of molds 1 3 2 1

There are two contradictions being observed from in Figure 4.4. One is the first gene 1A4 of the chromosome, job 1 using mold 4 on machine A, violates the given mold constraint, since mold 4 used by job1 cannot be installed on machine A. The other is both gene 4A1 and gene 5C1 need mold 1 at the same time but there is only one mold 1 according to Table 4.3.

Figure 4.4 The scheduling result violating the mold constraints

4.3.2 The adjustment operator for avoiding contradictions

The contradictions that illustrated in Section 4.4.1 could happen, when a chromosome is generated or it reproduces from the crossover operator and the mutation operator. To deal with the contradictions, an adjustment operator is proposed to avoid a chromosome violating the given mold constraints. The adjustment operator scans the genes of a chromosome one by one to check if they satisfy the given mold constraints. A gene is made of a triple, <j, k, m>, which means that job j is processed on machine k with mold m. Each gene is checked if job j with mold m is able to be processed on machine k. There are two situations for job j with mold m can be processed on machine k. The first is the used mold m cannot be installed on machine k, since mold m is not an adoptable mold of machine k. The second, the amount of the mold is not enough for installing on machines at the same time. In the proposed adjustment operator, the first situation is handled by replacing another suitable mold for the gene. After the first situation of contradictions is handled, if the contradictions are still found in the chromosome, the second situation is then dealt with. Another available machine that is suitable for job j is selected. If there are multiple choices of suitable machines, then find the lowest loading one.

The adjustment operator for avoiding contradiction

Input: A generated chromosome, C; the given mold constraints.

Output: A chromosome without violating the mold constraints.

STEP 1: Set C’= null, Tq1 = null, and Tq2 = null, where C’, Tq1 and Tq2 are temporal queues.

STEP 2: Pop a gene from C, and set the gene as g. The triple of the gene g is denoted as a triple <j, k, m>.

STEP 3: If the mold m of gene g is not adoptable to the assigned machine k, then push g to Tq1; otherwise, push g to C’.

STEP 4: If C is empty, then go to STEP 5; otherwise, go to STEP 2.

STEP 5: If Tq1 is empty, then go to STEP 7; otherwise, pop the a gene from Tq1 and

set the gene as g.

STEP 6: Select one of the suitable molds m’ of job j, where m’  H(j) ∩ M(k). The

mold m is then substituted by m’. If there is no suitable mold for job j, then push g to Tq2; otherwise, push g to C’. Go to STEP 5.

STEP 7: If Tq2 is empty, then go to STEP 9; otherwise, pop a gene from Tq2, and set the gene as g.

STEP 8: Select one of the available machine k’ that is suitable for job j. If there are multiple choices of suitable machines, then find the lowest loading one. Set

k = k’, and push g to C’. Go to STEP 7.

STEP 9: Set C = C’, and output the chromosome C.

4.3.3 An example of dealing with the contradictions

Example 4.2. Continue with Example 4.1, assume that the chromosome,

Example 4.2. Continue with Example 4.1, assume that the chromosome,

相關文件