Get startedGet started for free

Preventative maintenance scheduling

At a quarry they use diamond saws to cut slabs of marble. For preventative maintenance the saws are only allowed to run for 4 consecutive hours, afterwards a 1 hour inspection is completed before they are allowed to go back into service. The quarry operates 10-hour shifts. At the end of the shift if the saw blades have not been used for 4 consecutive hours the remaining time will be used at the start of the next shift. The expected number of saw blades needed for each hour is listed below. Our goal is to determine the minimum number of saw blades are needed for the shift.

Expected Workload - (Note that the chart at hour 0)

Hour Saws Needed
0 7
1 7
2 7
3 6
4 5
5 6
6 6
7 7
8 7
9 6
  • The model has been initialized for you.

This exercise is part of the course

Supply Chain Analytics in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# The class has been initialize, and hours defined
model = LpProblem("Minimize Staffing", LpMinimize)
hours = list(range(10))

# Define Decision Variables
x = LpVariable.dicts('saws_', ____, lowBound=0, cat=____)
Edit and Run Code