Skip to main content

simple-job-shop

PythonでJob Shop問題とFlow Shop問題を解くための小さなライブラリです。内部ではGoogle OR-ToolsのCP-SATソルバを利用します。

特長

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

使い方

1. Flow Shop問題

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

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は対応する処理時間です。ジョブごとに処理する機械を指定します。

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))

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 Distribution

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

simple_job_shop-0.1.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file simple_job_shop-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_job_shop-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 495e75f775c011cd5f6d2773abec947c45cf6046099bd3140f578dd0825e9e3c
MD5 4894701493c329d81bda4199c4242458
BLAKE2b-256 83de008eb4e634c9f911e2b0426dc894486ffcf5b9345712f446d53254a63579

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 file

0.1.0

1 file

Supported by

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