https://github.com/cair/per-jsp

Performant execution runtime for JSP

https://github.com/cair/per-jsp

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Performant execution runtime for JSP

Basic Info
  • Host: GitHub
  • Owner: cair
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 324 KB
Statistics
  • Stars: 0
  • Watchers: 3
  • Forks: 2
  • Open Issues: 3
  • Releases: 0
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Performant Job Shop Scheduling (PER-JSP)

A high-performance Job Shop Scheduling Problem (JSSP) solver with C++ core and Python bindings. The project provides both a fast C++ library and intuitive Python interface for solving JSSP using various algorithms including Q-Learning and Actor-Critic methods.

Features

  • 🚀 High-performance C++ core with Python bindings
  • 🐍 Pure Python fallback implementation
  • 🔧 Flexible environment configuration
  • 📊 Built-in visualization
  • 📈 Support for standard benchmark problems (Taillard)
  • 🧮 Multiple solver algorithms

Implemented Algorithms

| Algorithm | Status | Implementation | |-----------|:------:|----------------| | Q-Learning | ✅ | C++/Python | | Actor-Critic | ✅ | C++/Python | | SARSA | ❌ | Planned | | DQN | ❌ | Planned | | PPO | ❌ | Planned | | DDPG | ❌ | Planned |

Environment Features

| Feature | Status | Notes | |---------|:------:|-------| | Jobs/Operations | ✅ | Full support | | Taillard Benchmarks | ✅ | Built-in | | Custom Environments | ✅ | JSON format | | Machine Breakdowns | 🚧 | In progress | | Tool Management | 🚧 | In progress | | Priority Scheduling | 🚧 | Planned |

Installation

There are two ways to install PER-JSP:

1. Python-Only Installation (Fast Install)

For users who only need the Python implementation without C++ optimizations:

bash PYTHON_ONLY=1 pip install .

This installation: - ✅ No C++ compiler needed - ✅ No system dependencies required - ✅ Quick installation - ❌ Lower performance compared to C++ version

2. Full Installation (With C++ Extensions)

For users who want maximum performance:

First, install system dependencies:

```bash

Ubuntu/Debian

sudo apt-get update && sudo apt-get install -y \ build-essential \ cmake \ ninja-build \ git \ pkg-config \ libgl-dev \ libglu1-mesa-dev \ libxrandr-dev \ libxinerama-dev \ libxcursor-dev \ libxi-dev \ python3-dev

macOS

brew install cmake ninja pkg-config

Windows (with Visual Studio installed)

No additional dependencies needed

```

Then install the package: bash pip install .

This installation: - ✅ Maximum performance - ✅ All features available - ❓ Requires system dependencies - ❓ Longer installation time

Quick Start

```python from per_jsp import Environment, QLearning

Create environment

env = Environment.from_taillard(1) # Load Taillard instance 1

Create solver

solver = QLearning( env, learningrate=0.1, discountfactor=0.9, exploration_rate=0.1 )

Train

solver.train(episodes=1000)

Get solution

schedule = solver.getbestschedule() schedule.visualize() ```

Advanced Usage

Custom Problem Instance

```python from per_jsp import Environment

Define your problem

problem = { "jobs": [ {"operations": [ {"machine": 0, "processingtime": 10}, {"machine": 1, "processingtime": 20} ]}, {"operations": [ {"machine": 1, "processingtime": 15}, {"machine": 0, "processingtime": 25} ]} ] }

Create environment

env = Environment.from_dict(problem) ```

Using Different Solvers

```python from per_jsp import Environment, ActorCritic

env = Environment.from_taillard(1)

Actor-Critic solver

solver = ActorCritic( env, actorlr=0.001, criticlr=0.001, discount_factor=0.99 )

Train with specific settings

solver.train( episodes=1000, max_steps=10000, verbose=True ) ```

Performance Comparison

| Problem Size | Python-Only | With C++ | Speedup | |-------------|-------------|----------|---------| | 6x6 | 1.00x | 8.45x | 8.45x | | 10x10 | 1.00x | 12.3x | 12.3x | | 20x20 | 1.00x | 15.7x | 15.7x |

Contributing

Contributions are welcome! See our Contributing Guide for details.

Development Setup

```bash

Clone repository

git clone https://github.com/cair/per-jsp cd per-jsp

Create virtual environment

python -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows

Install in development mode

pip install -e ".[dev]" ```

License

This project is licensed under the MIT License - see LICENSE for details.

Citation

If you use this software in your research, please cite:

bibtex @software{andersen2024perjsp, author = {Andersen, Per-Arne}, title = {PER-JSP: A Performant Job Shop Scheduling Framework}, year = {2024}, url = {https://github.com/cair/per-jsp} }

Support

Owner

  • Name: Centre for Artificial Intelligence Research (CAIR)
  • Login: cair
  • Kind: organization
  • Email: cair-internal@uia.no
  • Location: Grimstad, Norway

CAIR is a centre for research excellence on artificial intelligence at the University of Agder. We attack unsolved problems, seeking superintelligence.

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 3
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • perara (1)
  • reshma-maharjan (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/wheels.yml actions
  • actions/checkout v4 composite
  • actions/download-artifact v4 composite
  • actions/setup-python v5 composite
  • actions/upload-artifact v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.devcontainer/Dockerfile docker
  • ubuntu 24.04 build
pyproject.toml pypi
setup.py pypi
per_jsp/examples/cpp/requirements.txt pypi
  • gymnasium *
  • loguru *
  • numpy *
  • sb3-contrib *
  • stable-baselines3 *
  • tqdm *
  • wandb *
per_jsp/cpp/vcpkg.json vcpkg
  • curl >=8.8.0#2
  • effolkronium-random >=1.5.0
  • glew >=2.2.0#3
  • imgui >=1.90.7
  • indicators >=2.3
  • nlohmann-json >=3.11.3#1
  • spdlog >=1.12.0
  • stb >=2023-04-11#1