Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
LongxingTan committed Dec 20, 2022
1 parent 718e686 commit 82f6dcb
Show file tree
Hide file tree
Showing 24 changed files with 99 additions and 30 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,6 @@ coverage.xml
/reference/
/data/
/weights/
/examples/data/*
/examples/jobshoppro/*
/business/*
/examples/*
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[license-url]: https://opensource.org/licenses/Apache-2.0
[pypi-image]: https://badge.fury.io/py/lekin.svg
[pypi-url]: https://pypi.python.org/pypi/lekin
[pepy-image]: https://pepy.tech/badge/lekin
[pepy-image]: https://pepy.tech/badge/lekin/month
[pepy-url]: https://pepy.tech/project/lekin
[build-image]: https://github.com/LongxingTan/python-lekin/actions/workflows/test.yml/badge.svg?branch=master
[build-url]: https://github.com/LongxingTan/python-lekin/actions/workflows/test.yml?query=branch%3Amaster
Expand Down Expand Up @@ -30,8 +30,11 @@

**[Documentation](https://python-lekin.readthedocs.io)** | **[Tutorials](https://python-lekin.readthedocs.io/en/latest/tutorials.html)** | **[Release Notes](https://python-lekin.readthedocs.io/en/latest/CHANGELOG.html)** | **[中文](https://github.com/LongxingTan/python-lekin/blob/master/README_zh_CN.md)**

**python-lekin** is a Flexible Job Shop Scheduler Library, named after and inspired by [Lekin](https://web-static.stern.nyu.edu/om/software/lekin/). As a core function in **APS (advanced planning and scheduler)**, it helps to improve factory efficiency.
**python-lekin** is a rapid-to-implement and easy-to-use Flexible Job Shop Scheduler Library, named after and inspired by [Lekin](https://web-static.stern.nyu.edu/om/software/lekin/). As a core function in **APS (advanced planning and scheduler)**, it helps manufacturers optimize the allocation of raw materials and production capacity optimally to balance demand and capacity.

- accelerate by
- Changeover Optimization
- Ready for demo, research and production

# DRATFING- NOT FINISHED AND DON'T USE IT NOW!
## Tutorial
Expand All @@ -57,17 +60,28 @@ scheduler.draw()

## Examples

- dispatching rules
In real world, Lekin integrates with MES to deploy production plans on the shop floor. Integration with ERP system is also required to exchange information on demand, inventory, and production

- Exhaustive search
- branch and bound

- Construction heuristics
- [SPT]()

- heuristics
- Meta heuristics
- [local search]()
- [hill climbing]()
- [tabu search]()
- [evolutionary algorithms]()
- [genetic algorithms]()

- operation search
- Operation search
- [or-tools]()

- reinforcement learning
- Reinforcement learning

Metaheuristics combined with Construction
Heuristics to initialize is the recommended choice.

## Citation
```
Expand All @@ -80,6 +94,3 @@ scheduler.draw()
howpublished = {\url{https://github.com/longxingtan/python-lekin}},
}
```

## Reference
- https://github.com/paulkastel/JobShopPRO
3 changes: 3 additions & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[license-url]: https://opensource.org/licenses/Apache-2.0
[pypi-image]: https://badge.fury.io/py/python-lekin.svg
[pypi-url]: https://pypi.python.org/pypi/python-lekin
[pepy-image]: https://pepy.tech/badge/lekin/month
[pepy-url]: https://pepy.tech/project/lekin
[build-image]: https://github.com/LongxingTan/python-lekin/actions/workflows/test.yml/badge.svg?branch=master
[build-url]: https://github.com/LongxingTan/python-lekin/actions/workflows/test.yml?query=branch%3Amaster
[lint-image]: https://github.com/LongxingTan/python-lekin/actions/workflows/lint.yml/badge.svg?branch=master
Expand All @@ -17,6 +19,7 @@

[![LICENSE][license-image]][license-url]
[![PyPI Version][pypi-image]][pypi-url]
[![Download][pepy-image]][pepy-url]
[![Build Status][build-image]][build-url]
[![Lint Status][lint-image]][lint-url]
[![Docs Status][docs-image]][docs-url]
Expand Down
13 changes: 13 additions & 0 deletions docs/source/constraints.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Constraints
============

下标,机器k kk加工为任务i ii后加工任务j jj

其中,:math:`A_\text{c} = (\pi/4) d^2`


subject to:

.. math:: \alpha{}_t(i) = P(O_1, O_2, … O_t, q_t = S_i \lambda{})


2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ python-lekin documentation

**python-lekin** is a Flexible Job shop Scheduler Library, named after and inspired by `Lekin <https://web-static.stern.nyu.edu/om/software/lekin/>`_.

Finite Capacity Planning

.. toctree::
:maxdepth: 5
:caption: Contents:
Expand Down
11 changes: 0 additions & 11 deletions examples/run_heuristics_spt.py

This file was deleted.

11 changes: 6 additions & 5 deletions lekin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from lekin.datasets.get_data import get_data
from lekin.lekin_struct.job import Job
from lekin.lekin_struct.machine import Machine
from lekin.lekin_struct.operation import Operation
from lekin.lekin_struct.route import Route

# from lekin.lekin_struct.job import Job
# from lekin.lekin_struct.machine import Machine
# from lekin.lekin_struct.operation import Operation
# from lekin.lekin_struct.route import Route
from lekin.scheduler import Scheduler
from lekin.solver.dispatching_rules import Rules
from lekin.solver.heuristics import Heuristics
from lekin.solver.meta_heuristics import Heuristics

__all__ = ["Job", "Machine", "Route", "Operation", "Scheduler", "get_data"]

Expand Down
2 changes: 1 addition & 1 deletion lekin/datasets/check_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Check the input data format and necessary information"""
"""Check the input job shop format and necessary information"""

import logging

Expand Down
2 changes: 1 addition & 1 deletion lekin/datasets/get_data.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Generate the example data"""
"""Generate the example jobshoppro"""

import json
import logging
Expand Down
8 changes: 8 additions & 0 deletions lekin/lekin_struct/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""
https://gitee.com/EnCode/APS?_from=gitee_search#%E5%BB%BA%E6%A8%A1
"""

from lekin.lekin_struct.job import Job
from lekin.lekin_struct.machine import Machine
from lekin.lekin_struct.operation import Operation
from lekin.lekin_struct.route import Route
6 changes: 6 additions & 0 deletions lekin/lekin_struct/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,18 @@
- job/mo/operation/activity
property
- 已完成活动
- 待完成活动
- processing time
- due date
- weight
- slack time remaining
- critical ratio
- priority
- 属于哪个订单
method
"""

from typing import Any, Callable, Dict, List, Optional, Tuple
Expand Down
4 changes: 4 additions & 0 deletions lekin/lekin_struct/machine.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"""
Struct Machine/机器
property
method
"""


Expand Down
5 changes: 5 additions & 0 deletions lekin/lekin_struct/operation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"""
Struct Operation/工序
property
method
"""


Expand Down
9 changes: 9 additions & 0 deletions lekin/lekin_struct/order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
"""
[可选] 订单
- 便于订单过程追踪
"""


class Order(object):
def __init__(self):
pass
5 changes: 5 additions & 0 deletions lekin/lekin_struct/route.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
"""
Struct Route/工艺流程
property
method
"""


Expand Down
8 changes: 8 additions & 0 deletions lekin/lekin_struct/timeslot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""
资源日历
"""


class Timeslot(object):
def __init__(self):
pass
1 change: 0 additions & 1 deletion lekin/solver/heuristics/shifting_bottle_neck.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions lekin/solver/meta_heuristics/shifting_bottle_neck.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Shifting bottle neck meta_heuristics"""
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""variable neighborhood search"""
3 changes: 3 additions & 0 deletions lekin/solver/operation_research/job_shop.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""
https://gitee.com/hdyyznpc/znpcserver/blob/master/src/test/java/com/znpc/OrtoolsTest.java
"""
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ black = 1
[tool.poetry]
name = "lekin"
readme = "README.md" # Markdown files are supported
version = "0.0.1" # is being replaced automatically
version = "0.0.2" # is being replaced automatically

authors = ["Longxing Tan"]
classifiers = [
Expand Down

0 comments on commit 82f6dcb

Please sign in to comment.