A Computational Approach to Overtaking Station Track Layout Design Using Graphs: An Extension That Supports Special Turnouts—An Improved Alternative Track Layout Proposal

: The author recently designed, developed and implemented in Maple a package based on the use of digraphs that analyses the connectivity of an overtaking station on a double-track line. It was used to propose an alternative track layout for this kind of station, with advantages over the track layouts usually adopted. However, that package could only deal with “standard” turnouts (but neither with crossings nor with “special” turnouts, such as “single slip turnouts” or “scissors crossings”). This new article presents an improved version of the package. It uses a trick consisting in including virtual vertices in the associated digraph that are dead ends. This way it is possible to include the “special” turnouts in the track layout. It makes it possible to evaluate different alternative track layouts, including “special” turnouts; and to ﬁnally ﬁnd one track layout that has advantages over the standard one and over the one proposed in the previous article. Let us observe that the design of the track layout is key for the exploitation of the infrastructure. In fact, the Spanish infrastructure administrator is nowadays remodelling the track layout of some of its main railway stations, as well as other smaller facilities.


Introduction 1.Preliminary Railway Concepts
Railways are guided transportation systems.Trains run on tracks; they can move from one track to another only at some specific places where a device called "turnout", with a mobile part denoted "switch", is installed (note that in American English they are named "railroad switch" and "point", respectively).The switch of a turnout can be in two positions: "direct track" and "diverted track" [1] (see Figure 1).Railway traffic is controlled by light signals (see Figure 2), although old mechanical signals can still be found in many lines around the world.They are remotely controlled from rooms or buildings called "signal boxes" ("interlocking towers" in American English).All the train engineer has to do is read the signals and obey them.Railway traffic is controlled by light signals (see Figure 2), although old mechanical signals can still be found in many lines around the world.They are remotely controlled from rooms or buildings called "signal boxes" ("interlocking towers" in American English).All the train engineer has to do is read the signals and obey them.Railway traffic is controlled by light signals (see Figure 2), although old mechanical signals can still be found in many lines around the world.They are remotely controlled from rooms or buildings called "signal boxes" ("interlocking towers" in American English).All the train engineer has to do is read the signals and obey them.Traffic lights in roads change colour after fixed periods.Stopping a train takes a long distance; thus, safety is not based on time, but on booking space for the trains (sections of the track layout of the station or sections of the railway line) [1,2].
Moreover, human errors must be avoided; therefore, the logical compatibility of the position of the switches of the turnouts and the colour of the light signals (stop/proceed) is supervised by a device called "railway interlocking systems" that does not allow conflictive configurations to be set.They were initially mechanic, later based on the use of relays, and now computer-based.

Related Previous Works
"Overtaking stations" are stations on double-track lines with sidings on each of the two sides of the main line; and one or two, or more crossovers at the two throats of the overtaking station [3] (Figures 3 and 4).Almost all the small overtaking stations on double-track lines have the same track layouts everywhere (sometimes with fewer crossovers); they can be found on high-speed lines of countries such as Japan, France, Spain, etc. [4], as well as on classic lines (in fact, the track layouts of Figures 3 and 4 are considered standards in [4] (p. 155)).Observe that we are not considering in the track layout diagrams the frequently used dead-end sidings included for safety reasons; this is because they do not add anything to the connectivity of the station, which is the goal of this article.Traffic lights in roads change colour after fixed periods.Stopping a train takes a long distance; thus, safety is not based on time, but on booking space for the trains (sections of the track layout of the station or sections of the railway line) [1,2].
Moreover, human errors must be avoided; therefore, the logical compatibility of the position of the switches of the turnouts and the colour of the light signals (stop/proceed) is supervised by a device called "railway interlocking systems" that does not allow conflictive configurations to be set.They were initially mechanic, later based on the use of relays, and now computer-based.

Related Previous Works
"Overtaking stations" are stations on double-track lines with sidings on each of the two sides of the main line; and one or two, or more crossovers at the two throats of the overtaking station [3] (Figures 3 and 4).Almost all the small overtaking stations on doubletrack lines have the same track layouts everywhere (sometimes with fewer crossovers); they can be found on high-speed lines of countries such as Japan, France, Spain, etc. [4], as well as on classic lines (in fact, the track layouts of Figures 3 and 4 are considered standards in [4] (p. 155)).Observe that we are not considering in the track layout diagrams the frequently used dead-end sidings included for safety reasons; this is because they do not add anything to the connectivity of the station, which is the goal of this article.The author is a mathematician and computer scientist with a long experience in th design, development, and implementation of software for railways.Some of these work [5] have been developed in cooperation with or commissioned by the "Fundación de lo Ferrocarriles Españoles" (Spanish Railway Foundation) [6].
Regarding track layout design [7], he implemented in the computer algebra system (CAS) [8,9] Maple (Maple is a trademark of Waterloo Maple Inc.) [10][11][12][13] a small topolo gy-independent package [14] based on the use of cycles in an undirected graph [15 which could find compatible routes in overtaking stations on double-track lines (of an topology).Let us observe that the compatibility of routes has to be very carefully checke during the design of a railway interlocking system.
A collateral result found was the existence of an alternative track layout for sma overtaking stations on double-track lines (Figure 5), with advantages and disadvantage over the standard track layout.The disadvantage is that only half of the tracks ar reachable from each throat of the station.The advantage is that section 0 allows t maintain a bidirectional use of the station on a degraded scenario where the tracks on on side of the main line are unavailable.The author is a mathematician and computer scientist with a long experience in the design, development, and implementation of software for railways.Some of these works [5] have been developed in cooperation with or commissioned by the "Fundación de los Ferrocarriles Españoles" (Spanish Railway Foundation) [6].
Regarding track layout design [7], he implemented in the computer algebra system (CAS) [8,9] Maple (Maple is a trademark of Waterloo Maple Inc.) [10-13] a small topologyindependent package [14] based on the use of cycles in an undirected graph [15]; which could find compatible routes in overtaking stations on double-track lines (of any topology).Let us observe that the compatibility of routes has to be very carefully checked during the design of a railway interlocking system.
A collateral result found was the existence of an alternative track layout for small overtaking stations on double-track lines (Figure 5), with advantages and disadvantages over the standard track layout.The disadvantage is that only half of the tracks are reachable from each throat of the station.The advantage is that section 0 allows to maintain a bidirectional use of the station on a degraded scenario where the tracks on one side of the main line are unavailable.The next goal was to design, develop, and implement an ad hoc package focused on comparing different track layouts of overtaking stations on a double-track line (of an topology) [16].The software chosen was also Maple.The key idea was to compare alter native track layouts and to calculate the number of pairs of non-conflicting routes (one in each direction) in each case; simulating the ones that could be simultaneously authorized by a railway interlocking system.
The approach in [16] was not based upon looking for cycles (that was the strategy i [14]) and directed graphs were used instead of graphs (in order to avoid considerin trains going forward and backward).Note that using digraphs did not condition th movements of the trains: the routes were always considered from the same throat of th The next goal was to design, develop, and implement an ad hoc package focused on comparing different track layouts of overtaking stations on a double-track line (of any topology) [16].The software chosen was also Maple.The key idea was to compare alternative track layouts and to calculate the number of pairs of non-conflicting routes (one in each direction) in each case; simulating the ones that could be simultaneously authorized by a railway interlocking system.The approach in [16] was not based upon looking for cycles (that was the strategy in [14]) and directed graphs were used instead of graphs (in order to avoid considering trains going forward and backward).Note that using digraphs did not condition the movements of the trains: the routes were always considered from the same throat of the station to the other throat (despite the trains traversed the routes in one direction or the other; as the key fact is that the routes, considered as sets of sections, are disjoint).
The package developed, denoted Estaciones, was based on Maple's GraphTheory package [17,18]; it made extensive use of its commands IsReachable and ShortestPath.The main procedures of the package Estaciones are: IsReachableThrough, NumberTrailsExcept Through, ShortestPathThrough and TotalNumberTrailsExceptThrough, the names of which clearly reveal their purpose.
In [16], it was shown that the traditional railway station track layout of a small overtaking station on a double-track line (Figure 4) is not optimal.In fact, the alternative layout of Figure 6 has clear advantages over the traditional one (Figure 4) in degraded scenarios.
topology) [16].The software chosen was also Maple.The key idea was to compare alter native track layouts and to calculate the number of pairs of non-conflicting routes (one in each direction) in each case; simulating the ones that could be simultaneously authorized by a railway interlocking system.
The approach in [16] was not based upon looking for cycles (that was the strategy in [14]) and directed graphs were used instead of graphs (in order to avoid considering trains going forward and backward).Note that using digraphs did not condition the movements of the trains: the routes were always considered from the same throat of the station to the other throat (despite the trains traversed the routes in one direction or the other; as the key fact is that the routes, considered as sets of sections, are disjoint).
The package developed, denoted Estaciones, was based on Maple's GraphTheory package [17,18]; it made extensive use of its commands IsReachable and Short-estPath.The main procedures of the package Estaciones are: IsReachableThrough, NumberTrailsExceptThrough, ShortestPathThrough and TotalNumber-TrailsExceptThrough, the names of which clearly reveal their purpose.
In [16], it was shown that the traditional railway station track layout of a smal overtaking station on a double-track line (Figure 4) is not optimal.In fact, the alternative layout of Figure 6 has clear advantages over the traditional one (Figure 4) in degraded scenarios.A restriction of the approach proposed in [16] was that that Estaciones package could only deal with "standard" turnouts; and neither with crossings nor with "special" turnouts, such as "single slip turnouts" and "scissors crossings" (see Section 2).

Materials and Methods
Railway station track layout is an important issue.For instance, the Spanish infra structure administrator (Adif) [19] is modifying the track layouts of the two main stations of Madrid (Madrid Chamartín [20,21] and Madrid Atocha [22]), Barcelona Sants [23,24] and Sevilla Santa Justa [25]; as well as several other minor facilities [26,27].Most of the latter ones are overtaking stations that are similar to those in Figures 3 and 4; or passing A restriction of the approach proposed in [16] was that that Estaciones package could only deal with "standard" turnouts; and neither with crossings nor with "special" turnouts, such as "single slip turnouts" and "scissors crossings" (see Section 2).

Materials and Methods
Railway station track layout is an important issue.For instance, the Spanish infrastructure administrator (Adif) [19] is modifying the track layouts of the two main stations of Madrid (Madrid Chamartín [20,21] and Madrid Atocha [22]), Barcelona Sants [23,24], and Sevilla Santa Justa [25]; as well as several other minor facilities [26,27].Most of the latter ones are overtaking stations that are similar to those in Figures 3 and 4; or passing loops or small stations with sidings on single-track lines.In fact, some Spanish railway authorities are interested in our works.

The "Special" Turnouts
The track apparatuses are not restricted to turnouts, although they are the most frequently used by far.We could underline: crossings, the simplest, that allow two tracks to cross; without allowing to switch tracks (there are no mobile parts); double-slip turnouts, that allow two tracks to cross; also allowing to switch tracks from each end of the two tracks, something such as two overlapping opposite turnouts (Figure 7); single-slip turnouts, that allow two tracks to cross; also allowing to switch tracks, but just from one of the two ends at each side of the apparatus; something such as half a crossing and an overlapping turnout; scissors crossings, a set consisting of four turnouts and a crossing (Figure 8).double-slip turnouts, that allow two tracks to cross; also allowing to switch tracks from each end of the two tracks, something such as two overlapping opposite turnouts (Figure 7); single-slip turnouts, that allow two tracks to cross; also allowing to switch tracks, but just from one of the two ends at each side of the apparatus; something such as half a crossing and an overlapping turnout; scissors crossings, a set consisting of four turnouts and a crossing (Figure 8).

The Approach of Estaciones Package
Let us apply the approach of Estaciones package [16] to the track layout diagram of Figure 4.The track is firstly divided into sections and names are assigned to them (Figure 9).Then, a digraph reflecting the connectivity of the station (from one throat to the other) is constructed (Figure 10).double-slip turnouts, that allow two tracks to cross; also allowing to switch tracks from each end of the two tracks, something such as two overlapping opposite turnouts (Figure 7); single-slip turnouts, that allow two tracks to cross; also allowing to switch tracks, but just from one of the two ends at each side of the apparatus; something such as half a crossing and an overlapping turnout; scissors crossings, a set consisting of four turnouts and a crossing (Figure 8).

The Approach of Estaciones Package
Let us apply the approach of Estaciones package [16] to the track layout diagram of Figure 4.The track is firstly divided into sections and names are assigned to them (Figure 9).Then, a digraph reflecting the connectivity of the station (from one throat to the other) is constructed (Figure 10).

The Approach of Estaciones Package
Let us apply the approach of Estaciones package [16] to the track layout diagram of Figure 4.The track is firstly divided into sections and names are assigned to them (Figure 9).Then, a digraph reflecting the connectivity of the station (from one throat to the other) is constructed (Figure 10).1a2b, 1z2y, and 1x2y is not strictly necessary; however, they were considered in [16] in order closely resemble the connectivity of the turnouts.Unfortunately, the Estaciones package cannot handle all the "special" turnouts (on the double-slip turnout).Let us consider afterwards, for instance, a scissors crossover.

Unsuccessful Attempts to Handle a Scissors Crossover
First attempt: the crossing in the scissors crossing is represented by two direct arcs: (1y,2z) and (2y,1z) (Figure 11).The connectivity of the scissors crossing is correctly represented in the digrap however, there is no way to detect whether the two routes intersect or not at t crossing.Unfortunately, the Estaciones package cannot handle all the "special" turnouts (only the double-slip turnout).Let us consider afterwards, for instance, a scissors crossover.

Unsuccessful Attempts to Handle a Scissors Crossover
First attempt: the crossing in the scissors crossing is represented by two directed arcs: (1y,2z) and (2y,1z) (Figure 11).  4 divided into sections.Considering vertice 1a2b, 1z2y, and 1x2y is not strictly necessary; however, they were considered in [16] in or closely resemble the connectivity of the turnouts.Unfortunately, the Estaciones package cannot handle all the "special" turnouts the double-slip turnout).Let us consider afterwards, for instance, a scissors crossov

Unsuccessful Attempts to Handle a Scissors Crossover
First attempt: the crossing in the scissors crossing is represented by two dir arcs: (1y,2z) and (2y,1z) (Figure 11).The connectivity of the scissors crossing is correctly represented in the dig however, there is no way to detect whether the two routes intersect or not crossing.The connectivity of the scissors crossing is correctly represented in the digraph; however, there is no way to detect whether the two routes intersect or not at the crossing.Second attempt: a new vertex, denoted, for instance, 0yz, is included at the center of the scissors crossing (Figure 12); and the directed arcs (1y,2z) and (2y,1z) are substituted by (1y,0yz), (0yz,2z), (2y,0yz), and (0yz,1z).This way, it is straightforward to detect whether the two routes intersect or not at the crossing (just checking whether vertex 0yz belongs to both routes or not).Unfortunately, the connectivity of the digraph would not be correct, allowing, for instance, the route 1y→0yz→1z if there was a problem in the directed arc (1y,1z); as if the crossing was a double-slip turnout (which, by the way, would be absurd here to install and impossible to install-due to the short length of the crossing).
detect whether the two routes intersect or not at the crossing (just checking wh vertex 0yz belongs to both routes or not).Unfortunately, the connectivity of th graph would not be correct, allowing, for instance, the route 1y→0yz→1z if ther a problem in the directed arc (1y,1z); as if the crossing was a double-slip tu (which, by the way, would be absurd here to install and impossible to installto the short length of the crossing).

The Inspiration
Finally, a successful attempt was found, mixing both previous attempts.The attempt only lacks recognizing whether the two routes are disjoint or not.Then, a p ble solution is (Figure 13): The two directed arcs, (1y,2z) and (2y,1z), are not split; A new virtual end vertex, 0y, is included; Two new virtual directed arcs, (1y,0y) and (2y,0y), are added to the graph.This way, no new routes are added, as (1y,0y) and (2y,0y) take to nowhere but and the membership of 0y to the two routes allow to decide whether they intersect crossing or not.This approach can be applied to all the "special" turnouts and requires no ch in Estaciones code.

An Independent Improvement to Estaciones Package
In the Estaciones package, the procedure TotalNumberTrailsExceptThr (graph, initial1,final1, initial2,final2,list) counted the numb directed trails from initial1 to final1 that are disjoint with the shortest path initial2 to final2.This number was proposed as a flexibility index for the layout.(A directed graph is considered.For the sake of brevity we shall write "path "trail" meaning "directed path" and "directed trail", respectively.Directed path distinguished from directed trails in this paper because the topology of some railw cilities like reversing loops and reversing triangles could require a train to pass through the same vertex.)

The Inspiration
Finally, a successful attempt was found, mixing both previous attempts.The first attempt only lacks recognizing whether the two routes are disjoint or not.Then, a possible solution is (Figure 13): The two directed arcs, (1y,2z) and (2y,1z), are not split; A new virtual end vertex, 0y, is included; Two new virtual directed arcs, (1y,0y) and (2y,0y), are added to the graph.
to the short length of the crossing).

The Inspiration
Finally, a successful attempt was found, mixing both previous attempts.Th attempt only lacks recognizing whether the two routes are disjoint or not.Then, a ble solution is (Figure 13): The two directed arcs, (1y,2z) and (2y,1z), are not split; A new virtual end vertex, 0y, is included; Two new virtual directed arcs, (1y,0y) and (2y,0y), are added to the graph.This way, no new routes are added, as (1y,0y) and (2y,0y) take to nowhere but and the membership of 0y to the two routes allow to decide whether they intersect crossing or not.This approach can be applied to all the "special" turnouts and requires no ch in Estaciones code.

An Independent Improvement to Estaciones Package
In the Estaciones package, the procedure TotalNumberTrailsExceptThr (graph, initial1,final1, initial2,final2,list) counted the numb directed trails from initial1 to final1 that are disjoint with the shortest path initial2 to final2.This number was proposed as a flexibility index for the layout.(A directed graph is considered.For the sake of brevity we shall write "path "trail" meaning "directed path" and "directed trail", respectively.Directed path distinguished from directed trails in this paper because the topology of some railw cilities like reversing loops and reversing triangles could require a train to pass through the same vertex.)This way, no new routes are added, as (1y,0y) and (2y,0y) take to nowhere but to 0y; and the membership of 0y to the two routes allow to decide whether they intersect at the crossing or not.
This approach can be applied to all the "special" turnouts and requires no changes in Estaciones code.

An Independent Improvement to Estaciones Package
In the Estaciones package, the procedure TotalNumberTrailsExceptThrough (graph, initial1,final1, initial2,final2,list) counted the number of directed trails from initial1 to final1 that are disjoint with the shortest path from initial2 to final2.This number was proposed as a flexibility index for the track layout.(A directed graph is considered.For the sake of brevity we shall write "path" and "trail" meaning "directed path" and "directed trail", respectively.Directed paths are distinguished from directed trails in this paper because the topology of some railway facilities like reversing loops and reversing triangles could require a train to pass twice through the same vertex.) However, the trails disjoint with the shortest path were considered even if there was no possible path from initial2 to final2.Therefore, this procedure was changed as it seems more accurate not to consider the existence of an alternative trail to an inexistent one.The new procedure is: TotalNumberTrailsExceptThrough:=proc(graph,initial1,final1, initial2,final2,list) local I,num; num:=0; for i in list do num:=num + NumberTrailsExceptThrough(graph,initial2,final2, [op({i,op(ShortestPathThrough(G,initial1, final1,i))})],list,0); end do; end proc: (the line before the end do; is the new one).This code is cryptic for a reader that does not use Maple; however, it is included only to clarify the changes made in the package.The use of the package will be duly commented.
Therefore, the flexibility index proposed in [16] that used this procedure is affected by this change.
The new package is denoted Estaciones2, and is freely available from the author.

Results
With the trick described in Section 2.4, the track layout of any overtaking stations on double-track lines can be analysed.
From the point of view of a mathematician, the track layout diagram of Figure 6 lacks symmetry and route compatibility does not seem trivial to visually check.Would it be possible to conceive something similar, but symmetric and simpler; for instance, using scissors crossings?The answer is yes (Figure 14).
TotalNumberTrailsExceptThrough:=proc(graph,initial1,final1, initial2,final2,list) local I,num; num:=0; for i in list do num:=num + NumberTrailsExceptThrough(graph,initial2,final2, [op({i,op(ShortestPathThrough(G,initial1, final1,i))})],list,0); end do; end proc: (the line before the end do; is the new one).This code is cryptic for a reader that does not use Maple; however, it is included only to clarify the changes made in the package.The use of the package will be duly commented.
Therefore, the flexibility index proposed in [16] that used this procedure is affected by this change.
The new package is denoted Estaciones2, and is freely available from the author.

Results
With the trick described in Section 2.4, the track layout of any overtaking stations on double-track lines can be analysed.
It is a good idea to allocate the vertices (it has to be done manually), so that the plot of the digraph resembles the railway station; for instance: The accessibility is not perfect in this case (one track of the six tracks of the station is not accessible from each throat); for instance, section 6 cannot be reached from section 1x: AreReachableList(G,"1x",["1","2","3","4","5","6"]); "1", true "2", true "3", true "4", true "5", true "6", false (observe that the inputs are left-aligned while the outputs are centered, as is usual in Maple).

Discussion
This article is a natural continuation of [16], and shows how to address all kinds of turnouts; therefore, allowing now to treat all kinds of overtaking stations on double-track lines.Note that [16] was inspired by [14], where the objective was to find compatible routes in the railway interlocking systems of overtaking stations.In all of these works, the stations can have any topology.
Apart from these articles, we have only found a very close article [29], where a terminus station (instead of an overtaking station) is analysed using graph theory (with a matrix-style notation).The topology is fixed in this case (three tracks).
Different branches of computer science have direct applications in railway engineering [30][31][32].Graph theory is the underlying theory in many cases and CAS is often the digital tool chosen.
We believe that we present in this article a very useful and flexible tool for the track layout design of overtaking stations of any topology (it can handle all types of turnouts).
Moreover, it was successfully used to propose alternative advantageous track layout for overtaking stations on double-track lines with two sidings on each side of the main tracks.We claim that the track layout proposal of Figure 14 has advantages over the classic one (Figure 4) because there are more disjoint trails in the proposal (see Table 1); what is key in the case of operating the station in a degraded scenario.The computations were carried out using the package introduced in this article.
We know of no station with the track layout proposed in Figure 14 (let us remember that the scissors crossovers can be substituted by two crossovers at the same position on each side of the station).For instance, in [4], a detail of all the stations in the world's high-speed lines in 2015 can be found.Scissors crossings are relatively frequent in Japanese high-speed lines between the two main tracks; however, they are not used exactly as proposed here.In the Spanish high-speed stations, they are used in the middle of the tracks of some terminus stations to allocate one short train after another one; allowing the one in the back to leave the station through the adjacent track.In France, they can be found in one of the stations of the Rhin-Rhône high-speed line.

Algorithms 2022 , 13 Figure 1 .
Figure 1.A turnout with its switch in the "direct track" position.

Figure 1 .
Figure 1.A turnout with its switch in the "direct track" position.

Figure 1 .
Figure 1.A turnout with its switch in the "direct track" position.

Figure 2 .
Figure 2. A light signal in a main station.

Figure 2 .
Figure 2. A light signal in a main station.

Algorithms 2022 , 1 Figure 3 .
Figure 3. Track layout diagram of a small overtaking station on a double-track line.It has one sid ing on each of the sides of the main line and two crossovers at the two throats of the station.Fo example, in the Spanish high-speed network, the following stations have exactly this track layou Bujaraloz, Ballobar, L'Espluga, El Prat (Spanish high-speed line Madrid-Barcelona [4] (p. 62) Puente Genil (Spanish high-speed line Córdoba-Málaga [4] (p. 66)); Requena-Utiel (Spanis high-speed line Madrid-Valencia [4] (p. 68)).

Figure 3 .
Figure 3. Track layout diagram of a small overtaking station on a double-track line.It has one siding on each of the sides of the main line and two crossovers at the two throats of the station.For example, in the Spanish high-speed network, the following stations have exactly this track layout: Bujaraloz, Ballobar, L'Espluga, El Prat (Spanish high-speed line Madrid-Barcelona [4] (p. 62)); Puente Genil (Spanish high-speed line Córdoba-Málaga [4] (p. 66)); Requena-Utiel (Spanish high-speed line Madrid-Valencia [4] (p. 68)).

Figure 3 .
Figure 3. Track layout diagram of a small overtaking station on a double-track line.It has one sid ing on each of the sides of the main line and two crossovers at the two throats of the station.Fo example, in the Spanish high-speed network, the following stations have exactly this track layou Bujaraloz, Ballobar, L'Espluga, El Prat (Spanish high-speed line Madrid-Barcelona [4] (p. 62) Puente Genil (Spanish high-speed line Córdoba-Málaga [4] (p. 66)); Requena-Utiel (Spanis high-speed line Madrid-Valencia [4] (p. 68)).

Figure 4 .
Figure 4. Track layout diagram of another small overtaking station on a double-track line (it ha two sidings on each of the sides of the main line and two crossovers at the two throats of the sta tion).For example, the station Cuenca Fernando Zobel (on the Spanish high-speed line Madrid Valencia) has exactly this track layout [4] (p. 68).Fukushima station (on the Japanese Tohok Shinkansen line) is very close to this one; the only difference is that it has only one crossover at on of the throats of the station [4] (p. 36).Similarly, Camp de Tarragona station (on the Spanis high-speed line Madrid-Barcelona [4] (p. 62)) has three sidings on each of the sides of the main lin however, it has crossovers only on one throat of the station.

Figure 4 .
Figure 4. Track layout diagram of another small overtaking station on a double-track line (it has two sidings on each of the sides of the main line and two crossovers at the two throats of the station).For example, the station Cuenca Fernando Zobel (on the Spanish high-speed line Madrid-Valencia) has exactly this track layout [4] (p. 68).Fukushima station (on the Japanese Tohoku Shinkansen line) is very close to this one; the only difference is that it has only one crossover at one of the throats of the station [4] (p. 36).Similarly, Camp de Tarragona station (on the Spanish high-speed line Madrid-Barcelona [4] (p. 62)) has three sidings on each of the sides of the main line; however, it has crossovers only on one throat of the station.

Algorithms 2022 , 1 Figure 5 .
Figure 5.An alternative track layout diagram for a small overtaking station on a double-track line

Figure 5 .
Figure 5.An alternative track layout diagram for a small overtaking station on a double-track line.

Figure 6 .
Figure 6.A better alternative track layout diagram for a small overtaking station on a double-track line.

Figure 6 .
Figure 6.A better alternative track layout diagram for a small overtaking station on a double-track line.

Figure 8 .
Figure 8.A scissors crossover.It consists of four turnouts and a crossing.

Figure 8 .
Figure 8.A scissors crossover.It consists of four turnouts and a crossing.

Figure 8 .
Figure 8.A scissors crossover.It consists of four turnouts and a crossing.

Algorithms 2022 ,Figure 9 .
Figure 9.The track layout diagram of Figure 4 divided into sections.Considering vertices 1c2b, 1a2b, 1z2y, and 1x2y is not strictly necessary; however, they were considered in[16] in order to closely resemble the connectivity of the turnouts.

Figure 9 .
Figure 9.The track layout diagram of Figure 4 divided into sections.Considering vertices 1c2b, 1a2b, 1z2y, and 1x2y is not strictly necessary; however, they were considered in[16] in order to closely resemble the connectivity of the turnouts.

Figure 9 .
Figure 9.The track layout diagram of Figure 4 divided into sections.Considering vertices 1c1a2b, 1z2y, and 1x2y is not strictly necessary; however, they were considered in[16] in order closely resemble the connectivity of the turnouts.

Figure 10 .
Figure 10.Graphical representation in Maple of the digraph corresponding to the connectivity the track layout diagram of Figure 9 (the direction considered is from right to left).The coordina of the vertices of the digraph were manually introduced in order for the plot of the graph to semble the shape of the railway station.

Figure 11 .
Figure 11.Graphical representation of the first attempt to codify a scissors crossing.

Figure 10 .
Figure 10.Graphical representation in Maple of the digraph corresponding to the connectivity of the track layout diagram of Figure 9 (the direction considered is from right to left).The coordinates of the vertices of the digraph were manually introduced in order for the plot of the graph to resemble the shape of the railway station.

Figure 9 .
Figure 9.The track layout diagram of Figure4divided into sections.Considering vertice 1a2b, 1z2y, and 1x2y is not strictly necessary; however, they were considered in[16] in or closely resemble the connectivity of the turnouts.

Figure 10 .
Figure 10.Graphical representation in Maple of the digraph corresponding to the connectiv the track layout diagram of Figure 9 (the direction considered is from right to left).The coord of the vertices of the digraph were manually introduced in order for the plot of the graph semble the shape of the railway station.

Figure 11 .
Figure 11.Graphical representation of the first attempt to codify a scissors crossing.

Figure 11 .
Figure 11.Graphical representation of the first attempt to codify a scissors crossing.

Figure 12 .
Figure 12.Graphical representation of the second attempt to codify a scissors crossing.

Figure 13 .
Figure 13.Graphical representation of a successful attempt to codify a scissors crossing.

Figure 12 .
Figure 12.Graphical representation of the second attempt to codify a scissors crossing.

Figure 12 .
Figure 12.Graphical representation of the second attempt to codify a scissors crossing.

Figure 13 .
Figure 13.Graphical representation of a successful attempt to codify a scissors crossing.

Figure 13 .
Figure 13.Graphical representation of a successful attempt to codify a scissors crossing.

Figure 14 .
Figure 14.The new track layout diagram proposal.The Maple 2022 code necessary to analyse a new track layout proposal with the Es-taciones2 package is included below.It is advisable to begin restarting the session before loading the built-in Graph-Theory package and the package described in this article: restart; with(GraphTheory): read(`C:/…/Estaciones2.mpl`):The names of the vertices of the digraph and their connectivity can be introduced afterwards:

Figure 14 .
Figure 14.The new track layout diagram proposal.The Maple 2022 code necessary to analyse a new track layout proposal with the Estaciones2 package is included below.It is advisable to begin restarting the session before loading the built-in GraphTheory package and the package described in this article:

Figure 15 .
Figure 15.Plot of the digraph associated to the track layout diagram of Figure 13.

Figure 17 .
Figure 17.Two disjoint routes found in a degraded scenario.

Figure 17 .
Figure 17.Two disjoint routes found in a degraded scenario.

Table 1 .
Comparison of alternative trails in the different track layouts.The acronym "t.s.p.t." means here "the shortest path through".