1. Learn
  2. /
  3. Courses
  4. /
  5. Supply Chain Analytics in Python

Exercise

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.

Instructions 1/3

undefined XP
    1
    2
    3
  • Using LpVariable.dicts() and hours define the decision variable as the number of saw blades starting to be used on a specific hour, choosing the appropriate lower bound and category.