Departmental vehicle

Departmental vehicles, also called departmental wagons or engineering vehicles, are special railway vehicles used to support the engineering functions of the railway. Thus they serve the internal purposes of the railway company and are not used for general passenger or goods traffic. They are typically used to maintain railway facilities, not least the overhead catenary.
Typical departmental vehicles include:
Railway vehicles.
Railway departmental vehicles are hauled by departmental locomotives and are usually railway wagons used for the transport of works material for the maintenance of railway facilities or wagons used for other internal purposes that have been converted or specially built. They usually travel in special work trains, frequently at low speeds. Only by exception, and under special measures, do they form part of standard goods trains.
Commonly used as departmental vehicles are those wagons or coaches that, on account of their age and design, are no longer suited to or permitted to be used in normal service. Sometimes they are converted for specific roles. Certain departmental vehicles are built for a specific purpose e.g. the transport of ballast or as construction machines.
Railcars that have been taken out of regular service are often assigned as railway inspection vehicles, used to inspect trackage or transport construction workers. The Hamburg Port Railway has a museum version of such a vehicle.
Trams and trolleybuses.
Tramway systems also have departmental vehicles, however they sometimes operate under different rules. For example, in Germany, whilst they are considered secondary vehicles by the railways, they are considered regular vehicles by the tramways and trolleybuses and have to be operated under the normal regulations that govern the construction and operation of tramways.