San Sebastián Tram Company

Company Type:

Urban Public Transport

dbus case study

Javier Vallejo

Deputy Director DBUS

CODICE allows us to change the service in an agile way, maintaining our high productivity rates and equitable distribution of work.
It greatly facilitates the work of planners in situations as changeable as that experienced with COVID, ensuring service efficiency as no other planning tool has helped us before.




Quick changes


Located at the eastern end of the Cantabrian coast, very close to the border with France, Donostia is one of the most beautiful and picturesque towns in the Basque Country thanks to the charm of its streets, its renowned gastronomy and its well-known La Concha beach.

With 133 years of history, the San Sebastian Tramway Company operates public transport in the city.

DBUS has always been one of the most innovative public transport companies internationally recognized for the awards received. His experience introducing new technologies has been used as a guide by the sector in various fields.

The operation:

– More than 6.9 million kilometers.

– 136 buses that serve 40 lines.

– 38 hybrid buses and 3 fully electric.

– An average workforce made up of 521 people.

– It transports more than 29.5 million users per year.


Acquiring an Optimal Planning System
at DBUS I pursued two objectives:

From an optimization point of view

DBUS wanted to be able to automate the calculation of driver schedules (shifts) while maintaining the high levels of productivity that they have always had in their manually elaborated shifts.

From a management point of view

DBUS was looking for a tool that would streamline the entire process of preparing and communicating the drivers calendar, taking into account all the particularities of its personnel.


The planning process at DBUS presented several challenges. On the one hand, DBUS incorporates the driving break into its planning, that is, all services have an intermediate break that must be adjusted so that the bus does not leave the line and it is not necessary to paralyze it. This is achieved by changing drivers when each break arrives.

On the other hand, when preparing the service calendar there is a group of drivers who do not know their planning in advance because they are subject to the incidents of the rest of the drivers. The planning system must be adapted to this situation so that the work is shared between these drivers in an equitable way.


After the implementation of CODICE PT , DBUS has achieved:



Solutions with an average productivity of 95% (hours offered to users / hours to drivers).



Agile schedule changes facilitating assignments when the offer changes throughout the year. In special situations such as COVID 19, fast and effective response times facilitating constant service changes.



With the drivers of the services that are assigned to them every day with emails or notifying in the drivers APP.


To meet the proposed objectives,
different modules of CODICE PT, each one oriented
to one of the problems:


The scheduling module was adapted to the problem of DBUS so that the user can establish the number of services they want to obtain on each type of day so that the calculation adjusts the solution to that number of schedules, and subsequently maximizes productivity by reducing inactivity and travel hours,
and minimizing the total working hours of drivers.


Two goal-oriented algorithms were developed. One of them is in charge of planning the company’s fixed drivers who work on a pre-established service wheel.
The second algorithm works on the non-fixed staff of the company that covers incidents of the fixed staff.

Daily management

Daily incidents that occur on the driver staff are resolved; illness, accidents or personal requests. The system analyzes the available drivers between the different categories that are given in Dbus; fixed, available, eventual conductors, etc. and proposes the drivers in an optimal way, taking into account the calculation of the individualized working day of each one and distributing the hours equitably among all.


CODICE PUBLIC TRANSPORT drives efficiency, engagement and performance in large carriers. It integrates easily with human resources, payroll and other business applications to create the best solution that optimizes the performance of your company.

CODICE algorithms provide unprecedented cost reduction.

CODICE simplifies the planning process by automating repetitive tasks and reducing human intervention.