Exercise

Scheduling workers problem

You are looking to hire workers to work in a warehouse. Each worker is expected to work 5 consecutive days and then have two days off. The chart below has the estimated number of workers you will need each day. You are looking to hire the minimum number of workers to handle the workload for each day.

Expected Workload

Day of Week Employees Needed
0 = Monday 31
1 = Tuesday 45
2 = Wednesday 40
3 = Thursday 40
4 = Friday 48
5 = Saturday 30
6 = Sunday 25
  • The pulp module has been imported and the model has been initialized for you. Also, the variable days has been defined for you as a list of number from 0-6.

Instructions 1/3

undefined XP
    1
    2
    3
  • Complete the code to define the decision variable as the number of workers starting on a specific day using LpVariable.dicts(), and days.