Skip to main content

Job Shop Scheduling Algorithms

Project description

Job Shop Scheduling Algorithms

This project implements various algorithms for solving the Job Shop Scheduling Problem (JSSP), including Q-Learning and Actor-Critic methods. It provides both a C++ library and Python bindings for easy integration into different environments.

Features

  • Job Shop Environment simulation
  • Q-Learning algorithm implementation
  • Actor-Critic algorithm implementation
  • Taillard problem instance generator
  • Visualization of scheduling results
  • Python bindings for easy integration

Implemented Algorithms

Algorithm Implemented Notes
Q-Learning
SARSA
DQN (Deep Q-Network)
Double DQN
Dueling DQN
Actor-Critic
A2C (Advantage Actor-Critic)
A3C (Asynchronous Advantage Actor-Critic)
PPO (Proximal Policy Optimization)
TRPO (Trust Region Policy Optimization)
SAC (Soft Actor-Critic)
DDPG (Deep Deterministic Policy Gradient)
TD3 (Twin Delayed DDPG)
MADDPG (Multi-Agent DDPG)
QMIX (Q-Mixing)
VDN (Value Decomposition Networks)
Genetic Algorithms
Particle Swarm Optimization
Simulated Annealing
Ant Colony Optimization

Implemented Simulator Features

Feature Implemented Notes
Jobs
Operations
Actions
Bindings
Taillard
Manual Environment Creator
Tool Changing
Tool Properties
Machine Breakdowns
Job Priority
Setup Times
Due Dates

Dependencies

This project uses vcpkg to manage C++ dependencies. The dependencies are specified in the vcpkg.json manifest file in the root directory of the project.

Before building the project, ensure you have the following installed:

Build Tools

sudo apt-get install build-essential pkg-config cmake git curl zip unzip tar autoconf autoconf-archive libtool

GLEW

sudo apt-get install libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev

GLFW3

sudo apt-get install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

Python3

sudo apt-get install python3 python3-dev

Performance Tools (for WSL2)

sudo apt-get install linux-tools-common linux-tools-generic
sudo /usr/lib/linux-tools-6.8.0-36/perf

vcpkg Setup

To install vcpkg:

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh

Set the VCPKG_ROOT environment variable to the vcpkg installation directory:

export VCPKG_ROOT=/path/to/vcpkg

Building the Project

This project uses CMakePresets.json to manage build configurations. There are two main configurations: debug and release.

  1. Clone the repository:

    git clone https://github.com/cair/job-shop-simulator.git
    cd job-shop-simulator
    
  2. To configure and build the project in debug mode:

    cmake --preset=debug
    cmake --build --preset=debug
    
  3. To configure and build the project in release mode:

    cmake --preset=release
    cmake --build --preset=release
    

Installing the Python Package

To install the Python package, first ensure that the VCPKG_ROOT environment variable is set, then run:

pip install .

This will automatically use CMakePresets.json to build the project and install the Python package.

Usage

C++ Library

To use the C++ library in your project, include the necessary headers and link against the library:

#include <jobshop/job_shop_environment.h>
#include <jobshop/job_shop_qlearning.h>

// Your code here

Python Module

After installing the Python package, you can use it in your Python code:

import jobshop

# Create a job shop environment
env = jobshop.JobShopEnvironment(jobs)

# Create a Q-Learning agent
agent = jobshop.JobShopQLearning(env, alpha=0.1, gamma=0.9, epsilon=0.3)

# Train the agent
agent.train(num_episodes=1000)

# Print the best schedule
agent.printBestSchedule()

Project Structure

  • src/: Contains the C++ source files
  • include/: Contains the header files
  • bindings/: Contains the Python bindings
  • CMakeLists.txt: The main CMake configuration file
  • CMakePresets.json: Defines the build presets
  • vcpkg.json: Specifies the project dependencies for vcpkg

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Contact

If you have any questions or feedback, please open an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

jobshop-0.0.0-cp313-cp313-manylinux_2_28_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

jobshop-0.0.0-cp312-cp312-manylinux_2_28_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

jobshop-0.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

File details

Details for the file jobshop-0.0.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for jobshop-0.0.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 02b229a8ab3d72b412e5306dfa820fae094f4882b116a4ce2546c5af7cf6b66c
MD5 7a6263c5be296d5abf39a9598fc7497e
BLAKE2b-256 e2e63602294879f099f7d846cc01000f368831174cec210722b50d2baf97573a

See more details on using hashes here.

File details

Details for the file jobshop-0.0.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for jobshop-0.0.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2382fd91e1c1c30b121b838225779b2c1ee63f8a40562e825cd8e12ebbf49e7
MD5 baea535234c05f7b125c42c10a9d075a
BLAKE2b-256 ff4d04191b6bd3d4f823597927f8a61072c4fb89b35264c1b65ae92969622978

See more details on using hashes here.

File details

Details for the file jobshop-0.0.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for jobshop-0.0.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 058ef52220f19c3d057fcd7df5a02197568b29a640af76ff9285e4eda402120f
MD5 27a4d0284465431c88969f87ac349303
BLAKE2b-256 42a5e080efb47e337a4d5c568b095bcccefbe68c13e42078961b2c02383ba2ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page