Metadata-Version: 2.4
Name: simple-job-shop
Version: 0.1.0
Summary: Solve job shop problem or flow shop problem
Author: Saito Tsutomu
Author-email: Saito Tsutomu <tsutomu7@hotmail.co.jp>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 1 - Planning
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Requires-Dist: ortools>=9.15
Requires-Python: >=3.14
Project-URL: homepage, https://github.com/SaitoTsutomu/job-shop
Description-Content-Type: text/markdown

# simple-job-shop

PythonでJob Shop問題とFlow Shop問題を解くための小さなライブラリです。内部では[Google OR-Tools](https://developers.google.com/optimization)のCP-SATソルバを利用します。

## 特長

- Job Shop問題を解く: `solve_job_shop`
- Flow Shop問題を解く: `solve_flow_shop`
- 結果を`Result`データクラスで受け取れる

## 使い方

### 1. Flow Shop問題

`time_list`は「ジョブごと × 機械ごと」の処理時間です。各ジョブは同じ機械順で処理されます。

```python
from simple_job_shop import solve_flow_shop

time_list = [
    [3, 2, 2],  # job 0
    [2, 1, 4],  # job 1
    [4, 3, 1],  # job 2
]

print(solve_flow_shop(time_list))
```

### 2. Job Shop問題

`id_list`は「ジョブごと × 処理順」の機械番号、`time_list`は対応する処理時間です。ジョブごとに処理する機械を指定します。

```python
from simple_job_shop import solve_job_shop

id_list = [
    [0, 1],  # job 0 の機械の番号
    [0, 2, 1],  # job 1 の機械の番号
    [1, 2, 0],  # job 2 の機械の番号
]
time_list = [
    [3, 2],
    [2, 1, 4],
    [4, 3, 1],
]
print(solve_job_shop(id_list, time_list))
```
