Metadata-Version: 2.4
Name: dsbx
Version: 0.2.0
Summary: A benchmark and simulation platform for dynamic job shop scheduling.
Author-email: cls1277 <cls1277@buaa.edu.cn>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/cls1277/DynaSchedBench
Project-URL: Documentation, https://dynaschedbench.readthedocs.io/
Project-URL: Repository, https://github.com/cls1277/DynaSchedBench
Project-URL: Issues, https://github.com/cls1277/DynaSchedBench/issues
Keywords: dynamic scheduling,job shop scheduling,benchmark,simulation,ICML
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: simpy>=4.0.0
Requires-Dist: numpy>=1.21.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: pyarrow>=10.0.0
Requires-Dist: jinja2>=3.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: openai>=1.0.0
Requires-Dist: matplotlib>=3.5.0
Requires-Dist: seaborn>=0.12.0
Requires-Dist: flask>=3.0.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: adamod>=0.0.3
Requires-Dist: tenacity>=8.0.0
Requires-Dist: typing-extensions>=4.8.0
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pytest-timeout>=2.2.0; extra == "dev"
Requires-Dist: pymoo>=0.6.0; extra == "dev"
Requires-Dist: psutil>=5.9.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints>=2.0.0; extra == "docs"
Dynamic: license-file

# DynaSchedBench

[![PyPI](https://img.shields.io/pypi/v/dsbx.svg)](https://pypi.org/project/dsbx/)
[![Python](https://img.shields.io/pypi/pyversions/dsbx.svg)](https://pypi.org/project/dsbx/)
[![Docs](https://readthedocs.org/projects/dynaschedbench/badge/?version=latest)](https://dynaschedbench.readthedocs.io/)
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)

DynaSchedBench is an ICML-accepted benchmark and simulation platform for
dynamic job shop scheduling. It provides a reproducible instance generator,
an event-driven simulator, a unified single-agent environment, trajectory-based
evaluation, visualization tools, and lightweight scheduling baselines.

## Highlights

- Event-driven dynamic scheduling simulator with explicit state snapshots.
- Unified single-agent environment for heuristic, RL, and LLM schedulers.
- Reproducible generator for dynamic job shop scheduling instances.
- Trajectory metrics, hard-constraint checks, and visual diagnostics.
- Lightweight `dsbx-*` command-line tools for generation, simulation,
  evaluation, visualization, and agent rollouts.
- Research assets kept separate from the PyPI wheel for fast installation.

## Installation

Install the public package:

```bash
pip install dsbx
```

Install from source for development:

```bash
git clone https://github.com/cls1277/DynaSchedBench.git
cd DynaSchedBench
python -m pip install -e .[dev,docs]
```

## Quickstart

```python
from pathlib import Path

from DynaSchedBench.Agents import SPTAgent
from DynaSchedBench.Env import DynaSchedEnv
from DynaSchedBench.Eval.Metrics import evaluate_trajectory
from DynaSchedBench.Gen import load_input_model

model = load_input_model(Path("data/example.json"))
env = DynaSchedEnv(model)
agent = SPTAgent()

obs = env.reset()
done = False

while not done:
    legal_actions = env.legal_actions()
    if not legal_actions:
        obs = env.advance_if_idle()
        continue

    action = agent.act(obs, legal_actions, env)
    obs, reward, done, info = env.step(action)

metrics = evaluate_trajectory(env.get_trajectory())
print(metrics)
```

## Command Line

```bash
dsbx-gen --help
dsbx-agent --help
dsbx-eval --help
dsbx-vis --help
dsbx-sim --help
```

A typical workflow is:

```bash
dsbx-gen gen -i data/example.json -o runs/example
dsbx-agent run -c data/example.json -o runs/spt -a spt
dsbx-eval --help
dsbx-vis --help
```

## Repository Layout

```text
src/DynaSchedBench/   # Release Python package
docs/                # Sphinx and Read the Docs documentation
research/agents/     # Heavy research agents and third-party experiment assets
data/                # Benchmark data and generated instance collections
tests/               # Release and package guard tests
```

## Documentation

The documentation is maintained with Sphinx and Read the Docs. It includes
quickstart material, CLI references, benchmark notes, release instructions, and
API pages generated from docstrings.

## Citation

```bibtex
@inproceedings{dynaschedbench2026,
  title = {DynaSchedBench: A Dynamic Scheduling Benchmark and Simulation Platform},
  author = {DynaSchedBench Contributors},
  booktitle = {Proceedings of the International Conference on Machine Learning},
  year = {2026}
}
```

## License

DynaSchedBench is released under the Apache License 2.0.
