# Multiple Depot/Crew Office Bus Driver Scheduling Modelling

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]
• Please, describe the problem, thence we will be able to understand what you are facing. Commented Jul 25, 2021 at 16:57
• @MatheusDiógenesAndrade I'm trying to achieve Trip Charting only as it was achieved in Example I linked in query, only thing is that that example don't take into consideration stabling and induction locations of buses as buses gets stabled in Depot or other locations at night and inducted from those locations in morning for operations. On top of it we have multiple locations and depot where buses get stabled and inducted from and hence we divide those locations in regions on basis of distance as Driver for example who goes Depot1 [cont] Commented Jul 26, 2021 at 8:32
• [cont] per say won't be Signing off from duty from far off distance from home. All these conditions are considered and hence we want that if Driver starts his first shift from location that falls under Region1 which can be a depot or Crew office should end his last Trip in same Region only. Also if Driver takes break at Crew Office1 then he would pick next shift from Crew Office1 only as on route we have generally two to three such Crew Offices and hence we can't simply use that code as node based constraints are not modelled and I can't figure out how I can model them. Commented Jul 26, 2021 at 8:32
• does your problem has any similarity with this doi.org/10.1016/j.promfg.2020.01.270? Commented Jul 27, 2021 at 20:19
• More like tracsisops.com/services/software/operations-planning-software/…. I googled and i guess they do something like this one. As they call it Crew Rostering, like assigning shifts to drivers based on labor laws (one’s Ive already mentioned) keeping in mind add on constraints. Commented Jul 28, 2021 at 15:14