{"id":15546731,"url":"https://github.com/th-rpy/jackson_job_shop_scheduling","last_synced_at":"2025-04-23T18:10:25.761Z","repository":{"id":38209405,"uuid":"497086010","full_name":"th-rpy/jackson_job_shop_scheduling","owner":"th-rpy","description":"PyJackson:Implementation of a mathematical model in Python to solve an assignment problem in Job Shop environments. With its respective Gantt chart.","archived":false,"fork":false,"pushed_at":"2024-04-30T18:41:19.000Z","size":217,"stargazers_count":6,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-09T13:13:57.167Z","etag":null,"topics":["cookiecutter","job-scheduler","json-file","numpy","optimisation-algorithms","oriented-object-programming","python","python-package","reportlab"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/th-rpy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-27T17:40:24.000Z","updated_at":"2024-09-02T04:55:27.000Z","dependencies_parsed_at":"2023-02-16T15:00:27.648Z","dependency_job_id":"a392d019-b860-4edf-889d-79a966a91448","html_url":"https://github.com/th-rpy/jackson_job_shop_scheduling","commit_stats":{"total_commits":61,"total_committers":3,"mean_commits":"20.333333333333332","dds":0.09836065573770492,"last_synced_commit":"bdeacead6247c2f5e7f153c4662ea683a72bae40"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/th-rpy%2Fjackson_job_shop_scheduling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/th-rpy%2Fjackson_job_shop_scheduling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/th-rpy%2Fjackson_job_shop_scheduling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/th-rpy%2Fjackson_job_shop_scheduling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/th-rpy","download_url":"https://codeload.github.com/th-rpy/jackson_job_shop_scheduling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250487531,"owners_count":21438612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cookiecutter","job-scheduler","json-file","numpy","optimisation-algorithms","oriented-object-programming","python","python-package","reportlab"],"created_at":"2024-10-02T13:04:00.288Z","updated_at":"2025-04-23T18:10:25.740Z","avatar_url":"https://github.com/th-rpy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyJackson : Python Job Shop Scheduling Library\n\nJob Shop Scheduling Problem (JSS) with Jackson's Algorithm solving using Python \u003e= 3.6.\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build status](https://github.com/th-rpy/jackson_job_shop_scheduling/workflows/build/badge.svg?branch=master\u0026event=push)](https://github.com/th-rpy/jackson_job_shop_scheduling/actions?query=workflow%3Abuild)\n[![Python Version](https://img.shields.io/pypi/pyversions/jackson_job_shop_scheduling.svg)](https://test.pypi.org/project/PyJackson/1.3.0/)\n[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white)](https://github.com/th-rpy/jackson_job_shop_scheduling/blob/master/.pre-commit-config.yaml)\n[![License](https://img.shields.io/github/license/th-rpy/jackson_job_shop_scheduling)](https://github.com/th-rpy/jackson_job_shop_scheduling/blob/master/LICENSE)\n\n\u003c/div\u003e\n\n\u003cp\u003e\nImplementation of a mathematical model in Python to solve an assignment problem in Job Shop environments. With its respective Gantt chart.\nA job shop consists of a set of distinct machines that process jobs. Each job is a series of tasks that require use of particular machines for known durations, and which must be completed in specified order. The job shop scheduling problem is to schedule the jobs on the machines to minimize the time necessary to process all jobs (i.e, the makespan) or some other metric of productivity. Job shop scheduling is one of the classic problems in Operations Research.\n\u003c/p\u003e\n\n## Very first steps\n\nFirst of all, you need to install a few dependencies.\n\n- [Reportlab](https://pypi.org/project/reportlab/) : for generation PDF file.\n\n```bash\npip install reportlab\n```\n\n- [numpy](https://pypi.org/project/numpy/) : for matrix operations.\n\n```bash\npip install numpy\n```\n\n- [pandas](https://pypi.org/project/pandas/) : for data manipulating.\n\n```bash\npip install pandas\n```\n\n- [matplotlib](https://pypi.org/project/matplotlib/) : for plotting Gantt Chart.\n\n```bash\npip install matplotlib\n```\n\n## 🚀 Features\n\n- Worked with multiple data formats: CSV, JSON and TEXT files.\n- Plotting Gantt Chart for each solution found for all sub-problems(Virtual).\n- Generate a PDF file with the Gantt Charts for each solution found for all sub-problems(Virtual) and the optimal solution as well.\n\n## Installation\n\n```bash\npip install PyJacksonAlgo\n```\n\n## Usage\n\n```python\nfrom jacksonpy import JacksonAlgo\n\n########################## Example using text file ##########################\n\n# Reading and manipulating data\ndata_path = \"YOUR_PATH/input.txt\"  # path to the data file\nd = JacksonAlgo.Data(data_path)  # create a Data object with the path to the data file\ndata = (\n  d.get_job_durations()\n)  # get the durations: list of list of integers [[J1, dur1, dur2, dur3], [J2, dur1, dur2, dur3] ...]\n\n# Solving the problem\nal = JacksonAlgo.JackAlgo(data)  # create a JackAlgo object with the data\n\nprint(al)  # print the problem details\n\npreparedData = al.prepare_data()  # prepare the data for the algorithm\ncmaxVirtual, _, __ = al.get_cmax_virtual(\n  preparedData\n)  # get the cmaxVirtual result of the virtual sub-problems\nresult = al.solve(\n  cmaxVirtual\n)  # solve the problem and save the result in the result variable\nal.generate_pdf_file(\n  results=result\n)  # generate a pdf file with the result of the problem\n\n########################## Example using Json file ##########################\n\n# Reading and manipulating data\ndata_path = \"YOUR_PATH//input.json\"  # path to the data file\nd = JacksonAlgo.Data(data_path)  # create a Data object with the path to the data file\ndata = (\n  d.get_job_durations()\n)  # get the durations: list of list of integers [[J1, dur1, dur2, dur3], [J2, dur1, dur2, dur3] ...]\nprint(data)  # print the data\n\n# Solving the problem\nal = JacksonAlgo.JackAlgo(data)  # create a JackAlgo object with the data\n\nprint(al)  # print the problem details\n\npreparedData = al.prepare_data()  # prepare the data for the algorithm\ncmaxVirtual, _, __ = al.get_cmax_virtual(\n  preparedData\n)  # get the cmaxVirtual result of the virtual sub-problems\nresult = al.solve(\n  cmaxVirtual\n)  # solve the problem and save the result in the result variable\nal.generate_pdf_file(\n  results=result\n)  # generate a pdf file with the result of the problem\n\n########################## Example using 2d array ##########################\n\n# Reading and manipulating data (defined as a lis of lists of integers)\ndata = [\n  [1, 7, 5, 6, 9, 10],\n  [2, 4, 6, 5, 8, 1],\n  [3, 8, 2, 4, 3, 7],\n  [4, 6, 3, 9, 7, 5],\n  [5, 5, 7, 3, 5, 9],\n]  # list of list of integers [[J1, dur1, dur2, dur3], [J2, dur1, dur2, dur3] ...]\n\n# Solving the problem\nal = JacksonAlgo.JackAlgo(data)  # create a JackAlgo object with the data\n\nprint(al)  # print the problem details\n\npreparedData = al.prepare_data()  # prepare the data for the algorithm\ncmaxVirtual, _, __ = al.get_cmax_virtual(\n  preparedData\n)  # get the cmaxVirtual result of the virtual sub-problems\nresult = al.solve(\n  cmaxVirtual\n)  # solve the problem and save the result in the result variable\nal.generate_pdf_file(\n  results=result\n)  # generate a pdf file with the result of the problem\n\n########################## Example using dictionary ##########################\n\n# Reading and manipulating data (defined as a lis of lists of integers)\ndata = {\n  \"Task 1\": [3, 4, 6, 5],\n  \"Task 2\": [2, 3, 6, 9],\n  \"Task 3\": [8, 9, 2, 6],\n  \"Task 4\": [7, 6, 3, 2],\n  \"Task 5\": [3, 6, 4, 5],\n  \"Task 6\": [5, 8, 7, 9],\n}  # dictionary of lists of integers {'Task 1': [3, 4, 6, 5], 'Task 2': [2, 3, 6, 9], ...}\n\n# Solving the problem\nal = JacksonAlgo.JackAlgo(data)  # create a JackAlgo object with the data\n\nprint(al)  # print the problem details\n\npreparedData = al.prepare_data()  # prepare the data for the algorithm\ncmaxVirtual, _, __ = al.get_cmax_virtual(\n  preparedData\n)  # get the cmaxVirtual result of the virtual sub-problems\nresult = al.solve(\n  cmaxVirtual\n)  # solve the problem and save the result in the result variable\nal.generate_pdf_file(\n  results=result\n)  # generate a pdf file with the result of the problem\n```\n\n## Results\n\n- \u003ch5\u003eGantt Chart for the optimal solution:\u003c/h5\u003e\n  \u003cimg alt=\"\" title=\"Gantt Diagram\" src=\"https://github.com/th-rpy/jackson_job_shop_scheduling/raw/main/example/output/ImagesOutput/Gantt_Chart_virtual1_cmax_47.png\"/\u003e\n\n- \u003ch5\u003ePDF file with the Gantt Charts for each solution found for all sub-problems(Virtual):\u003c/h5\u003e\n    \u003cp\u003ePlease download the PDF to view it: \u003ca href=\"https://github.com/th-rpy/jackson_job_shop_scheduling/blob/main/example/output/Algo_Cds_Output.pdf\"\u003eDownload PDF\u003c/a\u003e.\u003c/p\u003e\n\n## 🛡 License\n\n[![License](https://img.shields.io/github/license/th-rpy/jackson_job_shop_scheduling)](https://github.com/th-rpy/jackson_job_shop_scheduling/blob/master/LICENSE)\n\nThis project is licensed under the terms of the `GNU GPL v3.0` license. See [LICENSE](https://github.com/th-rpy/jackson_job_shop_scheduling/blob/master/LICENSE) for more details.\n\n## 📃 Citation\n\n```bibtex\n@misc{PyJackson,\n  author = {Saraei Thamer},\n  title = {Implementation of a mathematical model in Python to solve an assignment problem in Job Shop environments. With its respective Gantt chart.},\n  Github = {th-rpy},\n  year = {2022},\n  howpublished = {\\url{https://github.com/th-rpy/jackson_job_shop_scheduling}}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fth-rpy%2Fjackson_job_shop_scheduling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fth-rpy%2Fjackson_job_shop_scheduling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fth-rpy%2Fjackson_job_shop_scheduling/lists"}