Typical problem and execution method
Process the given $ n $ jobs $ V = \ {1, \ dots, n \} $ on $ m $ machines. A machine can only process one job at a time. Find a schedule that minimizes the end time of all jobs. When the processing order of machines is fixed for any job, it is called a flow shop problem.
usage
Signature: two_machine_flowshop(p)
Docstring:
2 Machine flow shop problem
Find a job schedule for two flow shops(Johnson method)
input
p: (Pre-process processing time,Post-process processing time)List by product
output
List of processing time and processing order
python
from ortoolpy import two_machine_flowshop
two_machine_flowshop([(4, 3), (3, 1), (1, 4)])
result
(9, [2, 0, 1])
python
# pandas.DataFrame
from ortoolpy.optimization import TwoMachineFlowshop
TwoMachineFlowshop('data/flowshop.csv')[1]
first | second | |
---|---|---|
2 | 1 | 4 |
0 | 4 | 3 |
1 | 3 | 1 |
Recommended Posts