Note
Click here to download the full example code
Example Train Annex 4 v1¶
A train with three routes each composed of two sections.
Given this infrastructure:
The following routing specification describes the initial planned routes for the rain with ID1. As you can see, there is no route section needed which mentions Station M. This station does not play a role in the routing planning process because it is no origin, destination or handover.
from networkx import DiGraph
from tom.plot import *
from tom.tom import make_train_from_yml, RouteSection, Route
from tom.util import example, dump_routing_info_as_xml
Load example annex 4 from yaml specification
_, t_spec_file = example('../tests/data', 'annex-4.yml')
print(t_spec_file.read_text())
Out:
---
coreID: ID1
lead_ru: RU1
version: 1 # RoutingInfo version
sections:
- id: 10
version: 1 # RouteSection version
departure_station: S
departure_time: '00:10:00' # => Route Construction Start
arrival_station: H1
travel_time: &s1-tt '24:20:00'
calendar:
begin: '2021-02-01'
end: '2021-02-07'
color: green
succ:
- 11
- id: 11
version: 1
departure_station: H1
arrival_station: T
travel_time: &s2-tt '07:30:00'
- id: 20
version: 1
departure_station: S
departure_time: '23:50:00' # => Route Construction Start
arrival_station: H1
travel_time: *s1-tt
color: blue
calendar:
begin: '2021-02-07'
end: '2021-02-13'
succ:
- 21
- id: 21
version: 1
departure_station: H1
arrival_station: T
travel_time: *s2-tt
# Shorten calender of D-T
- id: 30
version: 1
departure_station: D
departure_time: '02:00:00' # => Route Construction Start
arrival_station: H1
travel_time: '22:30:00'
color: salmon
calendar:
begin: '2021-02-15'
end: '2021-02-20'
succ:
- 31
- id: 31
version: 1
departure_station: H1
arrival_station: T
travel_time: *s2-tt
Notice the route sections which have a departure time. These are considered as route construction starts. Only one section in a route may be a construction start.
Now create train object and show its train id.
t = make_train_from_yml(t_spec_file)
t.train_id()
Out:
'TR/8350/ID1/00/2021'
Timetable¶
This is the timetable of version 1 of TR-ID1. Notice the two train runs with ID TR/8350/ID1/10/2021/2021-02-07 and TR/8350/ID1/20/2021/2021-02-07. They both start on 07/02. To make the daily train ID unique on this operating day, we propose to add the section_id to be part of TrainRun.train_id(). Here 10 for the train starting at 00:10 and 20 for the train departing at 23:50 at station S.
df = t.to_dataframe()
df
Route Sections¶
From which sections the train is composed?
section: RouteSection
for section in t.sections:
print(section.description(), "\n")
Out:
ID : 10.v1
Calender : 01/02 to 07/02 1111111
Start at: 00:10 in S
Arrival at: 00:30 in H1
Successors: [11]
ID : 11.v1
Calender : 02/02 to 08/02 1111111
Start at: 00:30 in H1
Arrival at: 08:00 in T
Successors: []
ID : 20.v1
Calender : 07/02 to 13/02 1111111
Start at: 23:50 in S
Arrival at: 00:10 in H1
Successors: [21]
ID : 21.v1
Calender : 09/02 to 15/02 1111111
Start at: 00:10 in H1
Arrival at: 07:40 in T
Successors: []
ID : 30.v1
Calender : 15/02 to 20/02 111111
Start at: 02:00 in D
Arrival at: 00:30 in H1
Successors: [31]
ID : 31.v1
Calender : 16/02 to 21/02 111111
Start at: 00:30 in H1
Arrival at: 08:00 in T
Successors: []
Section graph¶
The section graph is computed using the successor relation.
sg: DiGraph = t.section_graph()
plot_graph(sg)
Routes¶
Print all possible routes. Routes are calculated from all possible paths in the section graph.
route: Route
for route in t.routes():
print(route.description(), "\n")
Out:
Route : S-H1-T
Key : 10-11
Calendar : 01/02 to 07/02 1111111
Start at: 00:10 in S
Arrival at: 00:30 in H1
Arrival at: 08:00 in T
Route : S-H1-T
Key : 20-21
Calendar : 07/02 to 13/02 1111111
Start at: 23:50 in S
Arrival at: 00:10 in H1
Arrival at: 07:40 in T
Route : D-H1-T
Key : 30-31
Calendar : 15/02 to 20/02 111111
Start at: 02:00 in D
Arrival at: 00:30 in H1
Arrival at: 08:00 in T
Section runs¶
For each day of the calendar of a section a SectionRun is created. The section runs are the rows of RouteSection.to_dataframe:
for section in t.sections:
print(f"{section.section_id}: {section}")
print(section.to_dataframe(), "\n")
Out:
10: S-H1
ID S H1
2021-02-01 10 2021-02-01 00:10:00 2021-02-02 00:30:00
2021-02-02 10 2021-02-02 00:10:00 2021-02-03 00:30:00
2021-02-03 10 2021-02-03 00:10:00 2021-02-04 00:30:00
2021-02-04 10 2021-02-04 00:10:00 2021-02-05 00:30:00
2021-02-05 10 2021-02-05 00:10:00 2021-02-06 00:30:00
2021-02-06 10 2021-02-06 00:10:00 2021-02-07 00:30:00
2021-02-07 10 2021-02-07 00:10:00 2021-02-08 00:30:00
11: H1-T
ID H1 T
2021-02-02 11 2021-02-02 00:30:00 2021-02-02 08:00:00
2021-02-03 11 2021-02-03 00:30:00 2021-02-03 08:00:00
2021-02-04 11 2021-02-04 00:30:00 2021-02-04 08:00:00
2021-02-05 11 2021-02-05 00:30:00 2021-02-05 08:00:00
2021-02-06 11 2021-02-06 00:30:00 2021-02-06 08:00:00
2021-02-07 11 2021-02-07 00:30:00 2021-02-07 08:00:00
2021-02-08 11 2021-02-08 00:30:00 2021-02-08 08:00:00
20: S-H1
ID S H1
2021-02-07 20 2021-02-07 23:50:00 2021-02-09 00:10:00
2021-02-08 20 2021-02-08 23:50:00 2021-02-10 00:10:00
2021-02-09 20 2021-02-09 23:50:00 2021-02-11 00:10:00
2021-02-10 20 2021-02-10 23:50:00 2021-02-12 00:10:00
2021-02-11 20 2021-02-11 23:50:00 2021-02-13 00:10:00
2021-02-12 20 2021-02-12 23:50:00 2021-02-14 00:10:00
2021-02-13 20 2021-02-13 23:50:00 2021-02-15 00:10:00
21: H1-T
ID H1 T
2021-02-09 21 2021-02-09 00:10:00 2021-02-09 07:40:00
2021-02-10 21 2021-02-10 00:10:00 2021-02-10 07:40:00
2021-02-11 21 2021-02-11 00:10:00 2021-02-11 07:40:00
2021-02-12 21 2021-02-12 00:10:00 2021-02-12 07:40:00
2021-02-13 21 2021-02-13 00:10:00 2021-02-13 07:40:00
2021-02-14 21 2021-02-14 00:10:00 2021-02-14 07:40:00
2021-02-15 21 2021-02-15 00:10:00 2021-02-15 07:40:00
30: D-H1
ID D H1
2021-02-15 30 2021-02-15 02:00:00 2021-02-16 00:30:00
2021-02-16 30 2021-02-16 02:00:00 2021-02-17 00:30:00
2021-02-17 30 2021-02-17 02:00:00 2021-02-18 00:30:00
2021-02-18 30 2021-02-18 02:00:00 2021-02-19 00:30:00
2021-02-19 30 2021-02-19 02:00:00 2021-02-20 00:30:00
2021-02-20 30 2021-02-20 02:00:00 2021-02-21 00:30:00
31: H1-T
ID H1 T
2021-02-16 31 2021-02-16 00:30:00 2021-02-16 08:00:00
2021-02-17 31 2021-02-17 00:30:00 2021-02-17 08:00:00
2021-02-18 31 2021-02-18 00:30:00 2021-02-18 08:00:00
2021-02-19 31 2021-02-19 00:30:00 2021-02-19 08:00:00
2021-02-20 31 2021-02-20 00:30:00 2021-02-20 08:00:00
2021-02-21 31 2021-02-21 00:30:00 2021-02-21 08:00:00
TrainRuns¶
Each TrainRun defines a row in the timetable of the train above
tr: TrainRun
for tr in t.train_run_iterator():
print(tr)
for sr in tr.sections_runs:
print(sr)
print("\n")
Out:
TR/8350/ID1/10/2021/2021-02-01
10.v1:2021-02-01 00:10 OTR=0 S-H1 2021-02-02 00:30 OTR=1
11.v1:2021-02-02 00:30 OTR=1 H1-T 2021-02-02 08:00 OTR=1
TR/8350/ID1/10/2021/2021-02-02
10.v1:2021-02-02 00:10 OTR=0 S-H1 2021-02-03 00:30 OTR=1
11.v1:2021-02-03 00:30 OTR=1 H1-T 2021-02-03 08:00 OTR=1
TR/8350/ID1/10/2021/2021-02-03
10.v1:2021-02-03 00:10 OTR=0 S-H1 2021-02-04 00:30 OTR=1
11.v1:2021-02-04 00:30 OTR=1 H1-T 2021-02-04 08:00 OTR=1
TR/8350/ID1/10/2021/2021-02-04
10.v1:2021-02-04 00:10 OTR=0 S-H1 2021-02-05 00:30 OTR=1
11.v1:2021-02-05 00:30 OTR=1 H1-T 2021-02-05 08:00 OTR=1
TR/8350/ID1/10/2021/2021-02-05
10.v1:2021-02-05 00:10 OTR=0 S-H1 2021-02-06 00:30 OTR=1
11.v1:2021-02-06 00:30 OTR=1 H1-T 2021-02-06 08:00 OTR=1
TR/8350/ID1/10/2021/2021-02-06
10.v1:2021-02-06 00:10 OTR=0 S-H1 2021-02-07 00:30 OTR=1
11.v1:2021-02-07 00:30 OTR=1 H1-T 2021-02-07 08:00 OTR=1
TR/8350/ID1/10/2021/2021-02-07
10.v1:2021-02-07 00:10 OTR=0 S-H1 2021-02-08 00:30 OTR=1
11.v1:2021-02-08 00:30 OTR=1 H1-T 2021-02-08 08:00 OTR=1
TR/8350/ID1/20/2021/2021-02-07
20.v1:2021-02-07 23:50 OTR=0 S-H1 2021-02-09 00:10 OTR=2
21.v1:2021-02-09 00:10 OTR=2 H1-T 2021-02-09 07:40 OTR=2
TR/8350/ID1/20/2021/2021-02-08
20.v1:2021-02-08 23:50 OTR=0 S-H1 2021-02-10 00:10 OTR=2
21.v1:2021-02-10 00:10 OTR=2 H1-T 2021-02-10 07:40 OTR=2
TR/8350/ID1/20/2021/2021-02-09
20.v1:2021-02-09 23:50 OTR=0 S-H1 2021-02-11 00:10 OTR=2
21.v1:2021-02-11 00:10 OTR=2 H1-T 2021-02-11 07:40 OTR=2
TR/8350/ID1/20/2021/2021-02-10
20.v1:2021-02-10 23:50 OTR=0 S-H1 2021-02-12 00:10 OTR=2
21.v1:2021-02-12 00:10 OTR=2 H1-T 2021-02-12 07:40 OTR=2
TR/8350/ID1/20/2021/2021-02-11
20.v1:2021-02-11 23:50 OTR=0 S-H1 2021-02-13 00:10 OTR=2
21.v1:2021-02-13 00:10 OTR=2 H1-T 2021-02-13 07:40 OTR=2
TR/8350/ID1/20/2021/2021-02-12
20.v1:2021-02-12 23:50 OTR=0 S-H1 2021-02-14 00:10 OTR=2
21.v1:2021-02-14 00:10 OTR=2 H1-T 2021-02-14 07:40 OTR=2
TR/8350/ID1/20/2021/2021-02-13
20.v1:2021-02-13 23:50 OTR=0 S-H1 2021-02-15 00:10 OTR=2
21.v1:2021-02-15 00:10 OTR=2 H1-T 2021-02-15 07:40 OTR=2
TR/8350/ID1/30/2021/2021-02-15
30.v1:2021-02-15 02:00 OTR=0 D-H1 2021-02-16 00:30 OTR=1
31.v1:2021-02-16 00:30 OTR=1 H1-T 2021-02-16 08:00 OTR=1
TR/8350/ID1/30/2021/2021-02-16
30.v1:2021-02-16 02:00 OTR=0 D-H1 2021-02-17 00:30 OTR=1
31.v1:2021-02-17 00:30 OTR=1 H1-T 2021-02-17 08:00 OTR=1
TR/8350/ID1/30/2021/2021-02-17
30.v1:2021-02-17 02:00 OTR=0 D-H1 2021-02-18 00:30 OTR=1
31.v1:2021-02-18 00:30 OTR=1 H1-T 2021-02-18 08:00 OTR=1
TR/8350/ID1/30/2021/2021-02-18
30.v1:2021-02-18 02:00 OTR=0 D-H1 2021-02-19 00:30 OTR=1
31.v1:2021-02-19 00:30 OTR=1 H1-T 2021-02-19 08:00 OTR=1
TR/8350/ID1/30/2021/2021-02-19
30.v1:2021-02-19 02:00 OTR=0 D-H1 2021-02-20 00:30 OTR=1
31.v1:2021-02-20 00:30 OTR=1 H1-T 2021-02-20 08:00 OTR=1
TR/8350/ID1/30/2021/2021-02-20
30.v1:2021-02-20 02:00 OTR=0 D-H1 2021-02-21 00:30 OTR=1
31.v1:2021-02-21 00:30 OTR=1 H1-T 2021-02-21 08:00 OTR=1
RoutingInformation as TrainInformation¶
An XML Dump of the routing information of this example according a new version of the TSI XSD.
See Routing planning for more details.
print(dump_routing_info_as_xml(t))
Out:
<TrainInformation xmlns="http://taf-jsg.info/schemes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://taf-jsg.info/schemes file:///../tests/data/xml/taf_cat_complete_sector.xsd" RouteInfoVersion="1">
<RouteSection SectionVersion="1" HasReferenceCalender="true">
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>10</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10004</LocationPrimaryCode>
<PrimaryLocationName>S</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:10:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:30:00</Time>
<Offset>1</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedCalendar>
<BitmapDays>1111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-01T00:00:00</StartDateTime>
<EndDateTime>2021-02-07T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
<Successors>
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>11</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
</Successors>
</RouteSection>
<RouteSection SectionVersion="1">
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>11</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:30:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10006</LocationPrimaryCode>
<PrimaryLocationName>T</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>08:00:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedCalendar>
<BitmapDays>1111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-02T00:00:00</StartDateTime>
<EndDateTime>2021-02-08T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
</RouteSection>
<RouteSection SectionVersion="1" HasReferenceCalender="true">
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>20</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10004</LocationPrimaryCode>
<PrimaryLocationName>S</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>23:50:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:10:00</Time>
<Offset>2</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedCalendar>
<BitmapDays>1111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-07T00:00:00</StartDateTime>
<EndDateTime>2021-02-13T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
<Successors>
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>21</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
</Successors>
</RouteSection>
<RouteSection SectionVersion="1">
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>21</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:10:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10006</LocationPrimaryCode>
<PrimaryLocationName>T</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>07:40:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedCalendar>
<BitmapDays>1111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-09T00:00:00</StartDateTime>
<EndDateTime>2021-02-15T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
</RouteSection>
<RouteSection SectionVersion="1" HasReferenceCalender="true">
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>30</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10003</LocationPrimaryCode>
<PrimaryLocationName>D</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>02:00:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:30:00</Time>
<Offset>1</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedCalendar>
<BitmapDays>111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-15T00:00:00</StartDateTime>
<EndDateTime>2021-02-20T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
<Successors>
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>31</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
</Successors>
</RouteSection>
<RouteSection SectionVersion="1">
<SectionID>
<ObjectType>RS</ObjectType>
<Company>8350</Company>
<Core>---------ID1</Core>
<Variant>31</Variant>
<TimetableYear>2021</TimetableYear>
</SectionID>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:30:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation>
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10006</LocationPrimaryCode>
<PrimaryLocationName>T</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>08:00:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedCalendar>
<BitmapDays>111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-16T00:00:00</StartDateTime>
<EndDateTime>2021-02-21T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
</RouteSection>
<Route key="10-11">
<PlannedCalendar>
<BitmapDays>1111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-01T00:00:00</StartDateTime>
<EndDateTime>2021-02-07T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
<PlannedJourneyLocation JourneyLocationTypeCode="01">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10004</LocationPrimaryCode>
<PrimaryLocationName>S</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:10:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation JourneyLocationTypeCode="04">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:30:00</Time>
<Offset>1</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation JourneyLocationTypeCode="03">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10006</LocationPrimaryCode>
<PrimaryLocationName>T</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>08:00:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
</Route>
<Route key="20-21">
<PlannedCalendar>
<BitmapDays>1111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-07T00:00:00</StartDateTime>
<EndDateTime>2021-02-13T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
<PlannedJourneyLocation JourneyLocationTypeCode="01">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10004</LocationPrimaryCode>
<PrimaryLocationName>S</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>23:50:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation JourneyLocationTypeCode="04">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:10:00</Time>
<Offset>2</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation JourneyLocationTypeCode="03">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10006</LocationPrimaryCode>
<PrimaryLocationName>T</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>07:40:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
</Route>
<Route key="30-31">
<PlannedCalendar>
<BitmapDays>111111</BitmapDays>
<ValidityPeriod>
<StartDateTime>2021-02-15T00:00:00</StartDateTime>
<EndDateTime>2021-02-20T00:00:00</EndDateTime>
</ValidityPeriod>
</PlannedCalendar>
<PlannedJourneyLocation JourneyLocationTypeCode="01">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10003</LocationPrimaryCode>
<PrimaryLocationName>D</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>02:00:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation JourneyLocationTypeCode="04">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10005</LocationPrimaryCode>
<PrimaryLocationName>H1</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>00:30:00</Time>
<Offset>1</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
<PlannedJourneyLocation JourneyLocationTypeCode="03">
<CountryCodeISO>DE</CountryCodeISO>
<LocationPrimaryCode>10006</LocationPrimaryCode>
<PrimaryLocationName>T</PrimaryLocationName>
<TimingAtLocation>
<Timing>
<Time>08:00:00</Time>
<Offset>0</Offset>
</Timing>
</TimingAtLocation>
</PlannedJourneyLocation>
</Route>
</TrainInformation>
Total running time of the script: ( 0 minutes 0.986 seconds)