Skip to content

Formulas ​

Route & timetable builder ​

buffer_time ​

Safety margin added to the timetable, sized by how delay-prone each country's network is.

The formula ​

tbuffer,l=tdrive,l×qbuffer,country(l)t_{buffer,l} = t_{drive,l} \times q_{buffer,country(l)}

SymbolMeaningUnitWhere it comes from
Inputt_drive,lDriving time on one country leg (the part of a segment within one country)mincomputed upstream
Inputq_buffer,country(l)That country's schedule buffer, as a share of driving timefractiontrack_buffer_quota_per
Resultt_buffer,lBuffer time added for this country legmin—

Feeds into: total_time_per_leg

total_time_per_leg ​

Scheduled time for one country leg: driving, stop braking and acceleration, and buffer.

The formula ​

ttotal,l=tdrive,l+tdyn,l+tbuffer,lt_{total,l} = t_{drive,l} + t_{dyn,l} + t_{buffer,l}

SymbolMeaningUnitWhere it comes from
Inputt_drive,lDriving time at cruise speedmincomputed upstream
Inputt_dyn,lTime lost braking into and accelerating out of stops on this legminstop_dynamics_time_loss
Inputt_buffer,lSchedule buffer for this legminbuffer_time
Resultt_total,lScheduled time for the country legmin—

Feeds into: auto_stop_added_time, total_time_per_segment

total_time_per_segment ​

Scheduled time between two neighbouring stops, summed over its country legs.

The formula ​

tseg=∑l∈segttotal,l+tslack,segt_{seg} = \sum_{l \in seg} t_{total,l} + t_{slack,seg}

SymbolMeaningUnitWhere it comes from
Inputt_total,lScheduled time of each country leg in the segmentmintotal_time_per_leg
Inputt_slack,segSlack time from night-window stretching (usually zero)mincomputed upstream
Resultt_segScheduled time between the two stopsmin—

Feeds into: arrival_time, total_time

avg_speed ​

Distance over pure driving time, buffers excluded — shown for orientation only.

The formula ​

vˉkmh=dkmtdrive,h\bar{v}_{kmh} = \frac{d_{km}}{t_{drive,h}}

SymbolMeaningUnitWhere it comes from
Inputd_kmDistancekmcomputed upstream
Inputt_drive,hPure driving timehcomputed upstream
Resultv̄_kmhAverage speedkm/h—

dwell_time_boarding ​

How long the train waits at a stop where passengers only board.

The formula ​

tdwell=max⁡(tboard,comp, tboard,infra)t_{dwell} = \max(t_{board,comp},\ t_{board,infra})

SymbolMeaningUnitWhere it comes from
Inputt_board,compMinimum boarding time the train composition needsmincomposition_type_min_boarding_time
Inputt_board,infraMinimum boarding time the station needsmintrack_min_boarding_time
Resultt_dwellWaiting time at the stopmin—

dwell_time_alighting ​

How long the train waits at a stop where passengers only get off.

The formula ​

tdwell=max⁡(talight,comp, talight,infra)t_{dwell} = \max(t_{alight,comp},\ t_{alight,infra})

SymbolMeaningUnitWhere it comes from
Inputt_alight,compMinimum alighting time the train composition needsmincomposition_type_min_alighting_time
Inputt_alight,infraMinimum alighting time the station needsmintrack_min_alighting_time
Resultt_dwellWaiting time at the stopmin—

dwell_time_both ​

How long the train waits at a stop where passengers both board and get off.

The formula ​

tdwell=max⁡(tboard,comp, tboard,infra, talight,comp, talight,infra)t_{dwell} = \max(t_{board,comp},\ t_{board,infra},\ t_{alight,comp},\ t_{alight,infra})

SymbolMeaningUnitWhere it comes from
Inputt_board,compMinimum boarding time the train composition needsmincomposition_type_min_boarding_time
Inputt_board,infraMinimum boarding time the station needsmintrack_min_boarding_time
Inputt_alight,compMinimum alighting time the train composition needsmincomposition_type_min_alighting_time
Inputt_alight,infraMinimum alighting time the station needsmintrack_min_alighting_time
Resultt_dwellWaiting time at the stopmin—

Feeds into: crew_eur, driver_eur, auto_stop_added_time, departure_time

auto_stop_added_time ​

Extra travel time an additional stop would cost: detour, stop dynamics and the wait itself.

The formula ​

Δtcand=(∑l∈reroute(a,cand,b)ttotal,l)−ttotal,(a,b)+tdwell,cand\Delta t_{cand} = \left(\sum_{l \in reroute(a, cand, b)} t_{total,l}\right) - t_{total,(a,b)} + t_{dwell,cand}

SymbolMeaningUnitWhere it comes from
InputΣ t_total (reroute)Travel time of the leg rerouted via the candidate stopmintotal_time_per_leg
Inputt_total,(a,b)Travel time of the original leg without the stopmintotal_time_per_leg
Inputt_dwell,candWaiting time at the candidate stopmindwell_time_both
ResultΔt_candAdded travel time if the stop is includedmin—

stop_dynamics_time_loss ​

Time lost braking into and accelerating out of every stop, which routing alone ignores.

The formula ​

Δtleg=v2 adec⏟braking+tacc(v)−dacc(v)v⏟acceleration,tacc,dacc from F(u)=min⁡ ⁣(Floco, Plocou), m=mcoaches+mloco\Delta t_{leg} = \underbrace{\frac{v}{2\,a_{dec}}}_{braking} + \underbrace{t_{acc}(v) - \frac{d_{acc}(v)}{v}}_{acceleration},\quad t_{acc},d_{acc}\ \text{from}\ F(u)=\min\!\left(F_{loco},\ \frac{P_{loco}}{u}\right),\ m = m_{coaches} + m_{loco}

SymbolMeaningUnitWhere it comes from
InputvCruise speed on the line before and after the stopkm/hcomputed upstream
Inputa_decComfortable service braking decelerationm/s²TRACTION_BRAKE_DECELERATION_MS2
InputF_locoLocomotive pulling force from standstillkNTRACTION_LOCO_TRACTIVE_EFFORT_KN
InputP_locoLocomotive powerkWTRACTION_LOCO_POWER_KW
Inputm_coachesWeight of all coaches of the compositiontcoach_type_weight_gross_t
Inputm_locoWeight of the assumed standard locomotivetloco_type_weight_t
ResultΔt_legTime lost per stop compared to passing at constant speedmin—

Feeds into: total_time_per_leg

arrival_time ​

When the train reaches a stop.

The formula ​

tarr,i=tdep,i−1+tseg,i−1t_{arr,i} = t_{dep,i-1} + t_{seg,i-1}

SymbolMeaningUnitWhere it comes from
Inputt_dep,i-1Departure time at the previous stophh:mmdeparture_time
Inputt_seg,i-1Scheduled travel time of the segment in betweenmintotal_time_per_segment
Resultt_arr,iArrival time at the stophh:mm—

Feeds into: departure_time

departure_time ​

When the train leaves an intermediate stop.

The formula ​

tdep,i=tarr,i+tdwell,it_{dep,i} = t_{arr,i} + t_{dwell,i}

SymbolMeaningUnitWhere it comes from
Inputt_arr,iArrival time at the stophh:mmarrival_time
Inputt_dwell,iWaiting time at the stopmindwell_time_both
Resultt_dep,iDeparture time at the stophh:mm—

Feeds into: arrival_time

total_distance ​

Total trip distance across all country legs.

The formula ​

dtotal=∑seg∑l∈segdm,ld_{total} = \sum_{seg} \sum_{l \in seg} d_{m,l}

SymbolMeaningUnitWhere it comes from
Inputd_m,lDistance of each country legmcomputed upstream
Resultd_totalTotal trip distancem—

total_driving_time ​

Pure driving time across all country legs, without buffers or waiting times.

The formula ​

tdrive,total=∑seg∑l∈segtdrive,lt_{drive,total} = \sum_{seg} \sum_{l \in seg} t_{drive,l}

SymbolMeaningUnitWhere it comes from
Inputt_drive,lDriving time of each country legmincomputed upstream
Resultt_drive,totalTotal driving time of the tripmin—

total_time ​

Total scheduled trip time, including buffers, waiting times and stop dynamics.

The formula ​

ttotal=∑segtsegt_{total} = \sum_{seg} t_{seg}

SymbolMeaningUnitWhere it comes from
Inputt_segScheduled time of each segmentmintotal_time_per_segment
Resultt_totalTotal scheduled trip timemin—

Energy model ​

energy_per_leg ​

Electricity used on one country leg: traction, rolling and air resistance, and on-board power.

The formula ​

EkWh,l=A⋅mt+dkm,l(B+C⋅mt+(Kmmt+KLLm)⋅vˉkmh,l2)+(Ploco+Photel⋅ncoach)⋅th,lE_{kWh,l} = A \cdot m_t + d_{km,l} \left( B + C \cdot m_t + (K_m m_t + K_L L_m) \cdot \bar{v}^2_{kmh,l} \right) + (P_{loco} + P_{hotel} \cdot n_{coach}) \cdot t_{h,l}

SymbolMeaningUnitWhere it comes from
Inputm_tCoach train weight at 80% load, locomotive excludedttrain_weight
InputL_mCoach rake length, locomotive excludedmcomputed upstream
Inputn_coachNumber of coaches1computed upstream
Inputd_km,lDistance of the country legkmcomputed upstream
Inputv̄_kmh,lAverage speed on the legkm/havg_speed
Inputt_h,lDriving time on the leg, dynamics includedhcomputed upstream
InputA, B, C, K_m, K_L, P_loco, P_hotelCalibrated coefficients, fleet-wide. Fitted against DB Trassenfinder technical runs; the values live in models/energy/calibrated_coefficients.py and are regenerated by calib/02_energy_calibration.ipynbsee models/energy/calibrated_coefficients.pycomputed upstream
ResultE_kWh,lElectricity used on the country legkWh—

Feeds into: energy_eur, energy_per_km, total_energy

energy_per_km ​

Energy use per kilometre on a country leg, for display and comparison between countries.

The formula ​

ekWh/km,l=EkWh,ldkm,le_{kWh/km,l} = \frac{E_{kWh,l}}{d_{km,l}}

SymbolMeaningUnitWhere it comes from
InputE_kWh,lElectricity used on the country legkWhenergy_per_leg
Inputd_km,lDistance of the country legkmcomputed upstream
Resulte_kWh/km,lEnergy use per kilometrekWh/km—

total_energy ​

Total electricity used across the whole trip.

The formula ​

Etotal=∑seg∑l∈segEkWh,lE_{total} = \sum_{seg} \sum_{l \in seg} E_{kWh,l}

SymbolMeaningUnitWhere it comes from
InputE_kWh,lElectricity used on each country legkWhenergy_per_leg
ResultE_totalTotal trip energy usekWh—

avg_speed ​

Average speed on a country leg; feeds the air-resistance term of the energy model.

The formula ​

vˉkmh,l=dkm,ltdrive,h,l\bar{v}_{kmh,l} = \frac{d_{km,l}}{t_{drive,h,l}}

SymbolMeaningUnitWhere it comes from
Inputd_km,lDistance of the country legkmcomputed upstream
Inputt_drive,h,lDriving time on the leghcomputed upstream
Resultv̄_kmh,lAverage speed on the legkm/h—

Feeds into: energy_per_leg

train_weight ​

Train weight as the energy model uses it: coaches at 80% load, locomotive excluded.

The formula ​

mt=∑coachmcoach,tm_t = \sum_{coach} m_{coach,t}

SymbolMeaningUnitWhere it comes from
Inputm_coach,tWeight of each coachtcoach_type_weight_gross_t
Resultm_tCoach train weight, locomotive excludedt—

Feeds into: energy_per_leg

Cost allocation to accommodation classes ​

Cost share by accommodation class — class_main_allocation ​

How costs shared by the whole train are split between accommodation classes.

The formula ​

sc=(1−fsvc)(XLcLrev+(1−X)WcWrev)+fsvcPcPs_{c} = (1-f_{svc})\left(X \frac{L_c}{L_{rev}} + (1-X)\frac{W_c}{W_{rev}}\right) + f_{svc}\frac{P_c}{P}

SymbolMeaningUnitWhere it comes from
InputL_cLength of the class's sections in the trainmsection_length_m
InputL_revLength of all passenger space in the trainmcoach_type_length_wo_service_m
InputW_cWeight of the class's sections in the traintsection_weight_t
InputW_revWeight of all passenger space in the traintcoach_type_weight_wo_service_t
InputXWeighting between length and weight (0.7 = 70% length)fractioncomposition_type_length_cost_prop
Inputf_svcShare of the train that is service area (dining etc.)fractioncomputed upstream
InputP_cPlaces of this class on the trainplacescoach_type_class_places
InputPAll places on the trainplacescoach_type_class_places
Results_cShare of a shared cost carried by the classfraction—

Feeds into: per_sold_place_km_by_class

Cost per sold place-km, by class — per_sold_place_km_by_class ​

A class's cost per sold place-kilometre; empty berths make the sold ones dearer.

The formula ​

cc=sc⋅Cpkmcsoldc_{c} = \frac{s_{c} \cdot C}{pkm^{sold}_{c}}

SymbolMeaningUnitWhere it comes from
Inputs_cShare of the cost carried by the classfractionclass_main_allocation
InputCThe cost being normalised€/yearcomputed upstream
Inputpkm_sold,cSold place-kilometres of the class per yearplace-km/yearset by you
Resultc_cCost per sold place-kilometre of the class€/place-km—

Upstream derivations ​

Roster efficiency (Dienstplanwirkungsgrad) — roster_efficiency_driver ​

The share of paid staff hours that is actually productive.

The formula ​

η=ηref⋅ttrain,httrain,h+trelief⋅(nduty−1),nduty=⌈tbasis,htduty,max⌉\eta = \eta_{ref} \cdot \frac{t_{train,h}}{t_{train,h} + t_{relief} \cdot (n_{duty} - 1)}, \quad n_{duty} = \left\lceil \frac{t_{basis,h}}{t_{duty,max}} \right\rceil

SymbolMeaningUnitWhere it comes from
Inputeta_refEfficiency when the trip fits a single shift (operator_crew_roster_eff_ref for onboard staff)–operator_driver_roster_eff_ref
Inputt_train,hTime the staff member is on the trainhcomputed upstream
Inputt_basis,hHours measured against the shift cap — driving time for drivers, time on train for onboard staffhcomputed upstream
Inputt_duty,maxLongest permitted shift (operator_crew_max_duty_h for onboard staff)hoperator_driver_max_duty_h
Inputt_reliefUnproductive hours added per crew handoverhoperator_relief_allowance_h
ResultetaProductive share of paid hours for this trip–—

Feeds into: crew_eur, driver_eur

Night share of a country run (track access) — tac_night_share ​

How much of a country run is charged at that country's night track rate.

The formula ​

νc={0no night tariff1widening applies∣[tin,tout)∩Bnight,c∣tout−tinotherwise\nu_c = \begin{cases} 0 & \text{no night tariff} \\ 1 & \text{widening applies} \\ \dfrac{|[t_{in}, t_{out}) \cap B_{night,c}|}{t_{out} - t_{in}} & \text{otherwise}\end{cases}

SymbolMeaningUnitWhere it comes from
Inputt_in, t_outWhen the train enters and leaves the country on this segmentmincomputed upstream
InputB_night,cThe country's night tariff band (band end: track_tac_night_band_end)time of daytrack_tac_night_band_start
Resultnu_cShare of the country run priced at the night rate–—

Feeds into: tac_eur

Rush-hour share of a country run (track access) — tac_peak_share ​

How much of a country run falls inside a rush-hour surcharge window.

The formula ​

πc=w⋅∑j∣[tin,tout)∩Bpeak,c,j∣tout−tin,w=57 if weekdays only, else 1\pi_c = w \cdot \frac{\sum_{j} |[t_{in}, t_{out}) \cap B_{peak,c,j}|}{t_{out} - t_{in}}, \quad w = \tfrac{5}{7} \text{ if weekdays only, else } 1

SymbolMeaningUnitWhere it comes from
Inputt_in, t_outWhen the train enters and leaves the country on this segmentmincomputed upstream
InputB_peak,c,jThe country's two daily peak bands (track_tac_peak_band1_* and track_tac_peak_band2_*)time of daytrack_tac_peak_band1_start
InputwWeekday blend, applied where the bands run Monday to Friday only–WEEKDAY_BLEND
Resultpi_cShare of the country run falling in rush hour–—

Feeds into: tac_eur

Night share of a country run (electricity) — energy_night_share ​

How much of a country leg's electricity is billed at the night rate.

The formula ​

νcE=∣[tin,tout]∩BcE∣tout−tin\nu^{E}_{c} = \frac{|[t_{in},t_{out}] \cap B^{E}_{c}|}{t_{out}-t_{in}}

SymbolMeaningUnitWhere it comes from
Inputt_in, t_outWhen the train enters and leaves the country on this segmentmincomputed upstream
InputB^E_cThe country's electricity night band (track_energy_night_band_start and _end)time of daytrack_energy_night_band_start
Resultnu^E_cShare of the country leg billed at the night rate–—

Feeds into: energy_eur

Generic aggregation ​

Generic level total — total_eur ​

The sum of the items directly below this one in the breakdown.

The formula ​

xtotal=∑ixix_{total} = \sum_i x_i

SymbolMeaningUnitWhere it comes from
Inputx_iThe individual items on that level€/yearcomputed upstream
Resultx_totalSum of the level's items€/year—

Published by Back-on-Track. Every number on this site is generated from the model that produces the tool’s results. Text, figures and charts: CC BY 4.0 · code: GPL-3.0-or-later · map data © OpenStreetMap contributors.