I'm working on Bus Driver Schedule with multiple add-on constraints that are complex and hence trying to figure out how this can be achieved.
Reference of Bus Driver Scheduling using OR-Tools:- https://github.com/google/or-tools/blob/stable/examples/notebook/examples/bus_driver_scheduling_sat.ipynb
- I'm having more than one depot and more than one office where a driver can take break. A depot and nearest Crew Office are considered as one Region.
- Now coming to constraints: the driver can only take a break at Crew Office (any) and start next no_break_driving from same Crew Office only.
- Driver needs to Sign/On and Sign/Off in the same Region, he can pick bus from Depot and off his duty at Crew Office but they should fall under the same Region.
- No breaks are required between shifts as we already have included boarding times in shifts.
- Breaks are not fixed, after no_break_driving Driver can be given a meal break of one hour or a tea break of half an hour. However, one meal break is necessary.
So shift looks like:
[0, '05:18', '06:00','Depot','Region1', 318, 360, 42]
[1, '05:20', '05:55','Crew Office','Region1', 320, 355, 35]