Code Monkey home page Code Monkey logo

job-shop-scheduling's Introduction

Job shop scheduling

Basic information (including the GitHub repository)

Job-shop scheduling or the job-shop problem (JSP) is an optimization problem in computer science and operations research.

I would try to use genetic-algorithm solve the JSP.

GitHub repository: https://github.com/BoWeii/job-shop-scheduling

Problem to solve

In a general job scheduling problem, we are given n jobs J1, J2, ..., Jn of varying processing times,each job consists of a set of operations O1, O2, ..., On which need to be processed in a specific order (known as precedence constraints). Each operation has a specific machine that it needs to be processed on and only one operation in a job can be processed at a given time. We need to schedule the jobs on m machines with varying processing power, while trying to minimize the makespan. image0

Perspective users

Some automated processing factories or people with similar needs will need this algorithm

System architecture

  • Requure parameters and datas

    1. population size
    2. crossover rate
    3. mutation rate
    4. number of iteration
    5. processing table for Jobs/Operations (Job size <=1000)
    6. machine sequence table for Jobs/Operations (machine size <=100)
  • Python:

    1. initialize the informantion and parameters
    2. output the time consume
    3. render the result as Gantt Chart
  • C++:

    All of Genetic-Algorithm working

    1. make the problem could be a representation to solved
    2. make evaluation function, In our case, the fitness of each individual is evaluated as the following total elapsed time of the corresponding schedule: f(Si) = max{ ft(j) | 1<= j <= N} Where ft(j) is the finishing time of job j.
    3. make a Crossover, delete relatively excessive genes or to add relatively necessary genes to make them become to the legal offsprings.
    4. make a Mutation: generate randomly two positions in the list and exchange their genes, and if the two genes are same one, retry to select new positions.
    5. select the best pop-size individuals conforming their fitness for next generation
    6. keep the best individual
  • Workflow:

image1

API description

  • Python
    1. __init__(): init the params and table data
    2. Gen_gantt() : generate the Grantt Chart by plotly
  • C++
    1. Gen_init_group() : random the Initializaion group.
    2. Evaluate() : evaluation function rating solutions in terms of their fitness
    3. Keep_best(): all individuals are compared with the best one, if an individual which is better than the current best individual, the individual is kept as the new best one.
    4. Crossover() : propose a partial schedule of exchanging crossover.
    5. Mutation() : generate randomly two positions in the list and exchange their genes, and if the two genes are same one, retry to select new positions.
    6. Elitist_select(): select the best pop-size individuals conforming their fitness for next generation

Engineering infrastructure

  • Build System

    make

  • Testing Tool

    1. Python: pytest
  • Version Control

    git

References

job-shop-scheduling's People

Contributors

boweii avatar

Watchers

 avatar

job-shop-scheduling's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.