Simulates the production process of unrelated parallel machines.
- Customize the number of machines and jobs, and randomly generate arrival times, machine processing times, and due dates
- Includes 7 different dispatching rules
- Displays the arrival, start processing, and completion times for each job and generates a Gantt chart
- Shows the tardiness for each job, machine utilization, and makespan
- Python
- NumPy
- Simpy
- Matplotlib
- Pandas
- XlsxWriter
-
Install Dependencies
- Install basic dependencies:
pip install -r requirements.txt
-
Setup Parameters
- In
test_instance_generator.py, set the setup time limit, processing time limit, and arrival time factor:
SETUP_UL = 20 PT_UL = 100 AT_FACTOR = 50
- In
main.py, set the number of jobs and machines:
N = 8 M = 3
- In
-
Decide Scheduling Rules
- Modify the
main.pyfile to set the scheduling rule by changing theactionvariable.
action = 0
- The scheduling rules corresponding to different numbers are as follows:
if action == 0: # First In First Out (FIFO) elif action == 1: # Last In First Out (LIFO) elif action == 2: # Shortest Processing Time (SPT) elif action == 3: # Minimize Setup Time (MST) elif action == 4: # Earliest Due Date (EDD) elif action == 5: # Latest Slack Time (LST) elif action == 6: # Critical Ratio (CR)
- Modify the
-
Run the Simulation
python main.py
