Study on the application of genetic algorithm in Jobshop (Part 1)

Source: Internet
Author: User

1. What is the jobshop problem
    1. Job, Chinese translation into artifacts. A workpiece is also processed by several processes.
    2. Resource, resources. In this paper, the workshop scheduling resources refers to the machine, each process to be on a particular machine processing.
    3. Constraint, Constraints. There are two main constraints in shop scheduling:
      1. The sequence of operations included in the same artifact is sequential.
      2. Each machine cannot handle two operations at the same time, so the machine must be serial and not parallel when it completes the operation.
    4. Objective, Target. A common goal of the jobshop problem is to minimize the total time of completion of all artifacts, the total time English is called Makespan.

A jobshop problem can be depicted in a table, such as the following table:

   θ (All) θ   θ (2,1)    θ (2,2)
 r (i,j)  1  2  2  1
 d (i,j)  3  2  5   1

θ represents an operation, for example, θ , which represents the 1th operation of a 1th workpiece.

R (i,j) indicates the machine number, for example, R (1), which represents the first operation of the first workpiece with a machining machine number of 1.

D (i,j) indicates the processing time, for example, D (3), which indicates that the first work of the first workpiece requires 3 units of processing time.

A solution to the jobshop problem can be represented by a weighted, non-circular graph, as shown in the following direction-free graph:

This weighted, non-circular graph represents a solution to the above jobshop problem, and we can see that each operation appears as a node in the graph, and the weight is the corresponding processing time of the node. The sequence of operations is indicated by Arrows , which need to be noted here: In addition to the same workpiece under the sequence of operations, the same machine on the processing of the process will be serial. In addition, we have added two virtual nodes, θI and θf, respectively, to indicate the start and end. From the θi there are arrows pointing to the first operation of each workpiece, starting from the last operation of each workpiece with an arrow pointing to θf. The processing time of the virtual node is 0.

There are several paths from θi to θf in a direction-free graph , in which we find out the maximum weight of all the nodes on that path, and this maximum weight is the corresponding makespan of the solution, that is, the time required for all the workpieces to be finished.

2. Genetic Algorithms and Jobshop

Genetic algorithm is a random search algorithm, it is divided into six major functional modules: coding, crossover, mutation, decoding, evaluation, selection . The process for the entire algorithm is as follows:

    1. Coding:

We use the arrangement of the workpiece numbers to denote the sequence of operations , for example: 1212 The first 1 of the first workpiece is represented in the permutation, the second 1 represents the second operation of the first workpiece, the first 2 represents the first operation of the second workpiece, The second 2 represents the second operation of the 2nd workpiece. Visible, 1212 This arrangement can fully reflect the above the direction of the non-circular diagram embodied in the node sequence.

It should be explained that a direction-free graph may correspond to multiple workpiece numbers arrangement, for example, 1212,2121,1221,2112 are corresponding to the above-mentioned non-circular graph.

The first thing to do in a genetic algorithm is to encode, which randomly generates a number of part numbers, and these randomly generated permutations are called populations, and each permutation is called a chromosome.

, the population size is 4, the population contains 4 chromosomes, respectively, 2211,1212,1122,2121. Consider why 1111 is an illegal chromosome?

Study on the application of genetic algorithm in Jobshop (Part 1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.