Research article Special Issues

An interlocking system determining the configuration of rail traffic control elements to ensure safety

  • Railway interlocking systems are essential safety components in rail transportation, designed to prevent train collisions. They regulate the transitions between sections of a railway station using rail traffic control elements. An interlocking system can assess whether the configuration of these control elements poses a collision risk. Over the years, researchers have developed various algebraic models to tackle this issue, highlighting the potential use of computer algebra systems in implementing interlocking systems. In this work, we aim to enhance these systems' capabilities. Not only will they indicate whether a situation is dangerous, but if it is, they will also provide guidance on how to configure certain rail traffic control elements to ensure safety. In this paper, we introduce an algebraic model that represents the railway station through polynomials. This approach transforms the task of identifying dangerous situations into calculating the residue of a polynomial over a set of polynomials. The monomials contained in this residue polynomial encode all possible configurations that would render the situation safe.

    Citation: Antonio Hernando, Gabriel Aguilera-Venegas, José Luis Galán-García, Sheida Nazary. An interlocking system determining the configuration of rail traffic control elements to ensure safety[J]. AIMS Mathematics, 2024, 9(8): 21471-21495. doi: 10.3934/math.20241043

    Related Papers:

    [1] Antonio Hernando, José Luis Galán-García, Gabriel Aguilera-Venegas . A fast and general algebraic approach to Railway Interlocking System across all train stations. AIMS Mathematics, 2024, 9(3): 7673-7710. doi: 10.3934/math.2024373
    [2] Alberto Almech, Eugenio Roanes-Lozan . A 3D proposal for the visualization of speed in railway networks. AIMS Mathematics, 2020, 5(6): 7480-7499. doi: 10.3934/math.2020479
    [3] Seok-Zun Song, Hee Sik Kim, Young Bae Jun . Commutative ideals of BCK-algebras and BCI-algebras based on soju structures. AIMS Mathematics, 2021, 6(8): 8567-8584. doi: 10.3934/math.2021497
    [4] Huizhang Yang, Wei Liu, Yunmei Zhao . Lie symmetry reductions and exact solutions to a generalized two-component Hunter-Saxton system. AIMS Mathematics, 2021, 6(2): 1087-1100. doi: 10.3934/math.2021065
    [5] Haijun Cao, Fang Xiao . The category of affine algebraic regular monoids. AIMS Mathematics, 2022, 7(2): 2666-2679. doi: 10.3934/math.2022150
    [6] Yingyu Luo, Yu Wang . Supercommuting maps on unital algebras with idempotents. AIMS Mathematics, 2024, 9(9): 24636-24653. doi: 10.3934/math.20241200
    [7] Shakir Ali, Ali Yahya Hummdi, Mohammed Ayedh, Naira Noor Rafiquee . Linear generalized derivations on Banach $ ^* $-algebras. AIMS Mathematics, 2024, 9(10): 27497-27511. doi: 10.3934/math.20241335
    [8] Bader Alshamary, Milica Anđelić, Edin Dolićanin, Zoran Stanić . Controllable multi-agent systems modeled by graphs with exactly one repeated degree. AIMS Mathematics, 2024, 9(9): 25689-25704. doi: 10.3934/math.20241255
    [9] Muhammad Anwar Chaudhry, Asfand Fahad, Yongsheng Rao, Muhammad Imran Qureshi, Salma Gulzar . Branchwise solid generalized BCH-algebras. AIMS Mathematics, 2020, 5(3): 2424-2432. doi: 10.3934/math.2020160
    [10] Murugan Palanikumar, Nasreen Kausar, Harish Garg, Aiyared Iampan, Seifedine Kadry, Mohamed Sharaf . Medical robotic engineering selection based on square root neutrosophic normal interval-valued sets and their aggregated operators. AIMS Mathematics, 2023, 8(8): 17402-17432. doi: 10.3934/math.2023889
  • Railway interlocking systems are essential safety components in rail transportation, designed to prevent train collisions. They regulate the transitions between sections of a railway station using rail traffic control elements. An interlocking system can assess whether the configuration of these control elements poses a collision risk. Over the years, researchers have developed various algebraic models to tackle this issue, highlighting the potential use of computer algebra systems in implementing interlocking systems. In this work, we aim to enhance these systems' capabilities. Not only will they indicate whether a situation is dangerous, but if it is, they will also provide guidance on how to configure certain rail traffic control elements to ensure safety. In this paper, we introduce an algebraic model that represents the railway station through polynomials. This approach transforms the task of identifying dangerous situations into calculating the residue of a polynomial over a set of polynomials. The monomials contained in this residue polynomial encode all possible configurations that would render the situation safe.


    Rail transport serves as a key component in global transportation networks, offering a dependable and effective means for the movement of both commodities and passengers across extensive distances. Insights from research on the robustness of rail transport systems highlight its significance as an essential infrastructure, underpinning both economic and societal functions. According to a literature review on resilience in railway transport systems, rail transportation is a critical infrastructure that plays a vital role in the economy and society [1,2].

    Railway Interlocking Systems are a crucial component of railway signalling. These systems consist of a set of signalling devices that prevent conflicting movements among trains. They ensure that trains are only granted authority to proceed when the routes have been set, locked, and detected to be clear of other trains. This intricate system plays a vital role in maintaining the safety and efficiency of rail traffic.

    These systems are designed with the foremost goal of minimizing human mistakes and guaranteeing a 'fail-safe' condition in case of malfunctions, thereby averting any potential hazards. This objective is accomplished via an intricate array of signals and switches that collectively manage the locomotion of trains. The signals serve to inform whether a track is available or in use, and the switches determine the trajectory of the train.

    Pachl's work offers a comprehensive guide to the principles of railway signaling [3]. Traditional interlocking systems in railways, which are established based on predetermined routes, often rely on human expertise for route compatibility decisions [4]. Despite this, historical instances have revealed significant flaws within these systems [5]. In contrast, contemporary interlocking systems boast the capability to adapt dynamically, enhancing flexibility as they are not confined to fixed routes. Nonetheless, it is imperative to verify that any alterations to signals or switch positions do not result in intersecting paths for trains, which could lead to collisions. Absent this assurance, modifications are withheld, potentially necessitating a delay until a train departs the station. The genesis of railway interlocking can be traced back to the 19th century, characterized by intricate mechanical constructs composed of levers and bars. By the mid-20th century, the advent of electric relays necessitated complex electrical circuitry to mirror the station's layout. The 1980s marked the debut of computerized control in railway interlocking systems [6,7,8,9], with Spain pioneering its first geographical railway interlocking system in 1993 [10].

    The intricate nature and critical significance of Railway Interlocking Systems render them an intriguing area for ongoing research and enhancement. Progress in technological capabilities has seen these systems transition from mechanical to electrical, and presently to computer-operated frameworks. Each stage of this evolution has contributed to heightened efficiency, dependability, and safety standards. Nonetheless, such progress is not without its hurdles. The assimilation of novel technologies demands meticulous attention to ensure they mesh seamlessly with the pre-existing structures. Moreover, the escalating complexity of these systems inherently raises the risk of malfunctions. Consequently, persistent research and development are imperative to perpetuate the advancement of safety and operational efficiency in Railway Interlocking Systems.

    Contemporary railway interlocking systems universally employ computerization, whether they are geographically oriented or route-based. Simple versions of geographical algorithms can encounter issues with exponential complexity, significantly impacting the time required to identify secure routes within the rail network. Studies have explored efficient data validation techniques for these systems [11]. Model checking, particularly with UMC, offers another method for validating geographically dispersed interlocking systems [12]. Diverse strategies have been utilized in the decision-making processes of railway interlocking, including, albeit somewhat outdated, a comprehensive annotated bibliography by Bjorner [13]. The complexity of this issue has spurred extensive research, with recent investigations focusing on artificial intelligence for fault detection [14] and comparing various safety verification techniques [15]. There have also been developments in formal model-based methods to aid engineers in defining and confirming the specifications of interlocking systems [16]. Morley's research employs a theorem prover based on higher-order logic for safety assessments [17], while Nakamatsu revisits this using temporal logic in annotated logic programs [18]. Winter's work utilizes ordered binary decision diagrams for modeling interlocking systems [4]. Notably, Janota's study for the Slovak National Railways employs Z notation[19], and Hansen's for the Danish State Railways uses the Vienna Development Method[20]. Montigel introduces an advanced early model capable of handling complex railway topologies, implemented using Petri nets, graphs, Objective-C, and PROLOG [21]. Yulin's component-based model represents the station as interconnected components [22,23,24]. Luteberget integrates CAD, RailML, and logic programming for application in Norwegian railway stations [25], and a Dutch station's topology is articulated using RailML alongside UML class diagrams in another notable study [26].

    Over the years, authors have developed various models to study this problem [27,28,29,30,31,32]. Some of these models are based on polynomials, ideals, and Groebner bases [33], similar to those used in Artificial Intelligence for implementing expert systems [34]. This approach bridges computational algebra and interlocking problems, suggesting that computer algebra systems can be used to implement interlocking systems.

    Recently, a groundbreaking algebraic model was unveiled [35] that improves the implementation of interlocking systems. This model provides a linear algorithm that significantly outperforms previous models and is suitable for large-scale railway stations. However this model determines only whether a situation is dangerous or not, in case that the situation is dangerous, this model does not provide any guide on how to configure certain rail traffic control elements to ensure safety. In this paper, we will extend this model to include this capacity.

    The paper is structured as follows. In Section 2, we outline the contributions of the present model in comparison to the one presented in [35]. In Section 3, we outline the approach of this paper. In Section 4, we present formal concepts of the interlocking systems and the problem we will focus on. In Section 5.1, we translate previous concepts into an algebraic model. In Section 6, we demonstrate how an interlocking system based on our model can be implemented by means of a Computer Algebra System. In Section 7, we provide our conclusions.

    Let us examine a case study involving interlocking systems to underscore the significance of our paper and demonstrate the advantages of our proposed model.

    Consider the railway station depicted in Figure 1, comprising eight sections (S1 to S8), two turnouts (D1 and D2), and eight traffic light signals (L1 to L8). This station is equipped with an interlocking system designed to detect the dangerous situation: the possibility of two trains colliding within the station's confines. In our prior research, detailed in [35], we introduced an algebraic model adept at swiftly identifying potential dangerous scenarios, proving especially effective for larger stations. The implementation of such systems is vital for maintaining safety within the railway station.

    Figure 1.  A railway station.

    For illustration, let us consider the scenario presented in the railway station shown in Figure 2. Here, two trains are positioned—one in section S1 and the other in section S10. The traffic light signals, labelled as L2 and L4, are set to red, while the rest display green. Moreover, the turnout switch D1 is adjusted to the diverging track setting, and the switch for turnout D2 is in the straight track position. The pressing concern is the potential collision between the train in section S1 and the one in S10. Specifically, the train in S1 could traverse from S1 to S10 via sections S2 and S9. Consequently, this scenario poses a hazard, necessitating modifications to the railway traffic control components—we must alter either the signal colors or the turnout positions.

    Figure 2.  A situation in the railway station.

    However, when faced with a dangerous situation like this, it falls upon an expert to configure certain control elements to ensure safety. The model proposed in [35] does not explicitly identify which control elements need adjustment. While we can simulate the situation to assess its danger level after making changes, this process can become cumbersome for large stations. In this paper, we aim to streamline this manual and tedious task by introducing a new algebraic model. Unlike previous models [27,28,29,30,31,32,35], our approach not only detects dangerous situations but also provides specific information on which rail traffic control elements must be modified to restore safety.

    To achieve this, we need to create a new model that addresses the problem. Although the model presented in this manuscript significantly differs from a previous one, we will build upon the groundwork laid by the earlier model described in [35]. Leveraging many of the results demonstrated in the previous paper, we will extend our new model to determine precisely which control elements must be modified to ensure a safe situation.

    The model presented in this paper shares several key points with the previous work described in [35]:

    ● Both models are algebraic, representing the situation in the railway station using polynomials.

    ● Both models allow us to determine whether a situation is safe by calculating the remainder of polynomial division against a list of polynomials.

    ● The fact that this model represents the railway station and train positions similarly to the approach in [35] enables us to leverage many of the results from that previous model for the current one.

    Although the current model builds upon the previous one and shares some characteristics, it represents a substantial departure from its predecessor, particularly from a mathematical perspective:

    ● In the previous model, there was no explicit representation of control elements. Polynomials were not associated with turnouts or traffic signals. This limitation prevented the model from determining which control elements needed adjustment.

    ● The current model allows us to determine the configuration of control elements to ensure safety, whereas the previous model did not provide this capability.

    ● While the previous model calculated the remainder of dividing a monomial by a list of polynomials, the current model requires dividing a polynomial (with multiple monomials) by that same list of polynomials.

    ● The representation of the railway station's configuration differs from the approach described in [35]. Here, we explicitly consider control element configurations using polynomials, whereas the previous model represented them through a monomial, losing information about potential control element configurations.

    In the current version of the paper, there are no sections duplicated from the work cited as [35]. We have retained its framework, but every theorem and proposition presented here is original to this paper and was not stated in [35].

    The methodology we present here provides a mathematical framework for assessing whether a situation at a railway station is dangerous, and if so, offers guidance on how to configure certain rail traffic control elements to ensure safety. Our approach is based on the following steps:

    (1). Representation of the Railway Station in algebraic terms: we define a polynomial ring is several variables, denoted as A, and a list E of polynomials in this ring A'.

    (2). Representation of a situation in the railway station in algebraic terms: for each situation at the railway station, we will define a monomial qA that represents the placement of the trains within the railway station, and a polynomial pfA that represents the configuration of the rail traffic control elements at the station.

    (3). Identification of dangerous situations: we can verify if a situation is dangerous by checking if NR(pfq,E) is zero, where NR is the remainder of dividing a polynomial over a set of polynomials.

    (4). Safety assurance through the configuration of some traffic control elements. If a situation is identified as dangerous, our system provides guidance on how to adjust certain control elements to ensure safety. This is done by updating the polynomial pf, which encodes the control elements that we allow to change. We then recalculate the polynomial NR(pfq,E) and analyze its monomials, as they encode all the possible configurations that can ensure safety.

    A railway station is characterized by a finite set of sections {S1Sn} and a set of rail traffic control elements (traffic lights and turnouts) that physically connect these sections. These connections enable us to define a binary relation E, defined in [35]:

    Definition 4.1. Given a railway station, we define the set EZ×Z as follows:

    E={(i,j)|Si  is  connected  to  Sj  or  Sj  is  connected  to  Siby  means  of  a  color  light  signal  or  a  turnout}

    This relation indicates whether there is a physical connection between two sections. Figure 1 provides an illustration of a railway station with 11 sections, where the set E is defined as follows:

    E={(1,2),(2,9),(9,10),(10,11),(11,6),(2,3),(3,4),(4,5),(5,6),(6,7),(7,8)(2,1),(9,2),(10,9),(11,10),(6,11),(3,2),(4,3),(5,4),(6,5),(7,6),(8,7)}

    As observed, (1,2)E signifies that S1 is connected to S2. However, it is crucial to note that the presence (1,2)E does not necessarily imply that a train can always transition from section S1 to section S2, as it depends on the indication of the color light signal L1.

    Railway stations incorporate rail traffic control elements to determine whether one section is accessible from another. These control elements fall into two categories: Color light signals which regulate train movements, and turnouts, which faciliate the switching of trains from one track to another. As can be seen, the railway station depicted in Figure 1 is equipped with eight color light signals and two turnouts. The following definition formalizes the concept of rail traffic control elements and their states within a railway station.

    Definition 4.2. A rail traffic control element within a railway station can be categorized into two types

    A color light signal L, represented as a pair of sections (Si,Sj).

    A turnout D, represented as a triple (Si,Sj,Sk).

    The set of these rail traffic control elements is symbolized by X.

    Each control element possesses two states, denoted by 1 or 2. Specifically,

    For a color light signal, the color green is represented by 1, while the color red is represented by 2.

    For a turnout, the straight track position of the switch is represented by 1, and the diverted track position of the switch is represented by 2.

    In Figure 1, the rail traffic control elements are:

    X={L1, L2, L3, L4, L5, L6, L7, L8, D1, D2}=={(1,2),(4,3),(4,5),(10,9),(10,11),(11,10),(6,7),(8,7)}{(2,3,9),(6,5,11)}

    The state of the rail traffic control elements determines a configuration of the railway station. Formally, a determined configuration is defined as a function g:X{1,2}.

    Definition 4.3. A determined configuration of the railway station is defined as a function:

    g:X{1,2}

    The determined configuration g for the situation depicted in Figure 2 is:

    g(L1)=g(L5)=g(L6)=g(L7)=g(L8)=1

    g(L2)=g(L3)=g(L4)=2

    g(D1)=2

    g(D2)=1

    Given g, a determined configuration of the railway station, we define the relation Pg for this configuration g. This relation indicates whether a train can transition from one section to another connected to it.

    Definition 4.4. Given a determined configuration, g, we define the set PgE as:

    Pg={(i,j)E|  if  a  train  can  pass  from  section  Si  to  section  Sj  for  this  configuration  g}

    Figure 2 depicts a possible configuration of the railway station. As can be observed, since the switch of the turnout connecting sections S2, S3 and S9 is in the diverted track position, it follows that (2,3)Pg and (2,9)Pg.

    There are certain pairs of sections (Si,Sj) that belong to Pg for all determined configurations. For instance in Figure 2, a train can always transition from section S2 to section S1. We define the set of these pairs as:

    Definition 4.5.

    PF={(i,j)E|if  a  train  can  always  pass  from  section  Si  to  section  Sj}

    In the situation depicted in Figure 1, we have that:

    PF={(2,1),(3,4),(5,4),(9,10),(7,8),(7,6)}

    By definition, PFPg for any determined configuration g of the railway station. The remaining elements in Pg are dictated by the state of the turnouts and the color light signals in the determined configuration g. We can formally express this as follows:

    Definition 4.6. Given a rail traffic control element x and a determined configuration g:X{1,2}, we have that:

    if x=(Si,Sj) is a color light signal and g(x)=1 (the color is green), then:

    (i,j)Pg

    if x=(Si,Sj) is a color light signal and g(x)=2 (the color is red), then:

    (i,j)Pg

    if x=(Si,Sj,Sk) is a turnout and g(x)=1 (the switch is in the straight track position), then:

    (i,j)Pg, (j,i)Pg, (i,k)Pg, (k,i)Pg.

    if x=(Si,Sj,Sk) is a turnout and g(x)=2 (the switch is in the diverted track position), then:

    (i,j)Pg, (j,i)Pg, (i,k)Pg, (k,i)Pg.

    In Proposition 4.1, we introduce a proposition that allows for the explicit computation of the set Pg given the configuration g.

    Proposition 4.1. Let g be a determined configuration. We have that:

    Pg=PFx:(Si,Sj)Xf(x)=1{(i,j)}x:(Si,Sj,Sk)Xf(x)=1{(i,j),(j,i)}x:(Si,Sj,Sk)Xf(x)=2{(i,k),(k,i)}

    Proof. This is an immediate consequence of Definition 4.4, Definition 4.5 and Definition 4.6.

    In the situation depicted in Figure 2, we have that:

    Pg={(2,1),(3,4),(5,4),(9,10),(7,8),(7,6)}{(1,2)}{(10,11)}{(11,10)}{(6,7)}{(8,7)}{(2,9),(9,2)}{(5,6),(6,5)}

    Trains may be positioned in various sections of the railway station. As multiple trains may occupy the same section, we will utilize a multiset Q to represent the information regarding the placement of the trains within the station.

    Definition 4.7. We define the multiset Q as the set of sections in which a train is placed: the number of times that element i appears in Q represents the number of trains located in section Si.

    In the scenario depicted in Figure 2, we have {1,10} because one train is in section S1 and another in section S10.

    Given a set Pg and a multiset Q, we can formulate the problem of determining whether the situation is dangerous or not*. In other words, we can assess if there is a possibility of two trains in the railway station colliding given the determined configuration g.

    *The pair (Pg,Q) is referred to as an Interlocking Problem, which is resolved algebraically using a linear algorithm [35].

    In this paper, we will focus on the broader issue of determining the state of a subset of rail traffic control elements to ensure safety. Specifically, we will set the state of some rail traffic control elements, while exploring the possibility of discovering the state of others. In the previous section we defined a determined configuration as a situation where the state of every rail traffic control element is fixed. For our purposes, we will employ an undefined configuration to represent scenarios where some of the rail traffic control elements' states need to be discovered.

    Definition 4.8. An undefined configuration is a function:

    f:X{0,1,2}

    Figure 3 depicts the concept under discussion: the states of traffic lights L1 and L4 are not determined, and our objective is to ascertain their states to ensure safety. The undefined configuration corresponding to this figure is as follows:

    f(L1)=f(L4)=0

    f(L5)=f(L6)=f(L7)=f(L8)=1; f(L2)=f(L3)=2; f(D1)=2; f(D2)=1

    Figure 3.  The state of some rail traffic control elements are not fixed.

    Given an undefined configuration, f we can identify those rail traffic control elements whose states we aim to ascertain for safety, as they are mapped to 0 by f. Formally, we define the set Uf as follows:

    Definition 4.9. Given an undefined configuration f:X{0,1,2}, we define the set Uf, as:

    Uf=f1(0)={xX|f(x)=0}

    In Figure 3 we find that Uf={L1, L4}.

    Given f, an undefined configuration, a determined configuration g is derived from it by setting the states of the rail traffic control elements in Uf. We define a potential configuration of f as follows:

    Definition 4.10. Given an undefined configuration f:X{0,1,2}, a potential configuration of f is is a determined configuration g:X{1,2} such that for every xX where f(x){1,2} it holds that g(x)=f(x).

    We denote Pf as the set of potential configurations of f. Among all potential configurations, our goal is to identify those that are safe. We denote Sf as the set of potential configurations of f that are safe.

    Given an undefined configuration f, and a multiset Q that denotes the placement of trains, our aim of this paper is to identify the set Sf. As we will explore in Section 5.3 we will compute a polynomial whose monomials encode all the elements in the set Sf (refer to Theorem 5.1)

    In the case illustrated in Figure 3, it is clear that if L1 and L4 are red, the situation is safe. Consequently, a safe potential configuration, g, is:

    g(L1)=g(L4)=2

    g(L5)=g(L6)=g(L7)=g(L8)=1; g(L2)=g(L3)=2; g(D1)=2; g(D2)=1

    Figure 4 presents another undefined configuration in which we also aim to ascertain the state of the switch of the turnout D1.

    Figure 4.  The state of some rail traffic control elements are not fixed.

    In this case, the undefined configuration, f, is as follows:

    f(L1)=f(L4)=f(D1)=0

    f(L5)=f(L6)=f(L7)=f(L8)=1; f(L2)=f(L3)=2; f(D2)=1

    There are several potential configurations of f that are safe (indeed, there are exactly five possibilities as we will see in Section 6). Two of these are:

    L1 and L4 are set to green and D1 is set to the straight track position. That is to say,

    g1(L1)=g1(L4)=1;g1(D1)=1;

    g1(L5)=g1(L6)=g1(L7)=g1(L8)=1;g1(L2)=g1(L3)=2; g1(D2)=1

    L1 is set to green, L4 is set to red and D1 is set to the straight track position. That is to say,

    g2(L1)=1;g2(L4)=2;g2(D1)=1;

    g2(L5)=g2(L6)=g2(L7)=g2(L8)=1; g2(L2)=g2(L3)=2; g2(D2)=1

    In this section, we will express the problem of determining Sf for any undefined configuration f and any multiset Q in algebraic terms. Specifically, we will represent the railway station using a list of polynomials in a ring A (refer to Section 5.1). In Section 5.2 we will represent a specific situation within this railway station using a monomial q (see Definition 4.7) and a polynomial pf (see Definition 4.5). Finally, in Section 5.3, we will present our main theorem 5.1, which states that the set Sf is encoded in the monomials of the polynomial obtained by the expression NR(pfq,E).

    Let us consider a railway station characterized by the set of sections {S1Sn}, a set of rail traffic control elements X={x1xk} and the relation E representing the potential connectivity of the railway station. We will depict the railway station using a list of polynomials with the following variables:

    ti. For each section Si in the railway station, we consider a variable ti.

    lij,mij. For each pair of sections Si and Sj where (i,j)E, we w consider two variables lij and mij. In other words, we consider the variables lij and mij if the station's topology allows passage from section Si to section Sj under configuration of the railway station.

    zx,1,zx,2: For each rail traffic control element, x, we consider two variables zx,1 and zx,2.

    In [35] we considered the polynomial ring:

    A=Z2[lij,,mij,,ti,]

    with the lexicographical order given by lij>mij>ti. Here we will extend the aforementioned polynomial ring to:

    A=Z2[zx,1,zx,2,,lij,,mij,,ti,]

    with the lexicographical order given by zx,1>zx,2>lij>mij>ti. Next, we will define a list E of polynomials representing the potential connectivity of the railway station. These polynomials are the same as the ones defined in the model proposed in [35], which serves as our starting point. Their application and underlying intuition necessitate comprehensive explanations that are beyond the scope of this paper, and we direct readers to that paper for an in-depth mathematical understanding of their role in E, which is essential for the model's functionality:

    Definition 5.1. Given E (see Definition 4.1), the list of polynomials E representing the railway station is composed of polynomials in A as follows:

    (i,j)E, the two polynomials:

    lijljiti+mijmjititjlijmjiti+mijmjititj

    For each variable ti:

    t2i

    In the railway station depicted in Figure 1, we have that:

    E=[l1,2l2,1t1+m1,2m2,1t1t2,l1,2m2,1t1+m1,2m2,1t1t2,l2,9l9,2t2+m2,9m9,2t2t9,l2,9m9,2t2+m2,9m9,2t2t9,l9,10l10,9t9+m9,10m10,9t9t10,l9,10m10,9t9+m9,10m10,9t9t10,l10,11l11,10t10+m10,11m11,10t10t11,l10,11m11,10t10+m10,11m11,10t10t11,l11,6l6,11t11+m11,6m6,11t11t6,l11,6m6,11t11+m11,6m6,11t11t6,l2,3l3,2t2+m2,3m3,2t2t3,l2,3m3,2t2+m2,3m3,2t2t3,l3,4l4,3t3+m3,4m4,3t3t4,l3,4m4,3t3+m3,4m4,3t3t4,l4,5l5,4t4+m4,5m5,4t4t5,l4,5m5,4t4+m4,5m5,4t4t5,l5,6l6,5t5+m5,6m6,5t5t6,l5,6m6,5t5+m5,6m6,5t5t6,l6,7l7,6t6+m6,7m7,6t6t7,l6,7m7,6t6+m6,7m7,6t6t7,l7,8l8,7t7+m7,8m8,7t7t8,l7,8m8,7t7+m7,8m8,7t7t8,l2,1l1,2t2+m2,1m1,2t2t1,l2,1m1,2t2+m2,1m1,2t2t1,l9,2l2,9t9+m9,2m2,9t9t2,l9,2m2,9t9+m9,2m2,9t9t2,l10,9l9,10t10+m10,9m9,10t10t9,l10,9m9,10t10+m10,9m9,10t10t9,l11,10l10,11t11+m11,10m10,11t11t10,l11,10m10,11t11+m11,10m10,11t11t10,l6,11l11,6t6+m6,11m11,6t6t11,l6,11m11,6t6+m6,11m11,6t6t11,l3,2l2,3t3+m3,2m2,3t3t2,l3,2m2,3t3+m3,2m2,3t3t2,l4,3l3,4t4+m4,3m3,4t4t3,l4,3m3,4t4+m4,3m3,4t4t3,l5,4l4,5t5+m5,4m4,5t5t4,l5,4m4,5t5+m5,4m4,5t5t4,l6,5l5,6t6+m6,5m5,6t6t5,l6,5m5,6t6+m6,5m5,6t6t5,l7,6l6,7t7+m7,6m6,7t7t6,l7,6m6,7t7+m7,6m6,7t7t6,l8,7l7,8t8+m8,7m7,8t8t7,l8,7m7,8t8+m8,7m7,8t8t7,t21,t22,t23,t24,t25,t26,t27,t28,t29,t210,t211]

    Like in [35], we will depict a situation with the railway station using a monomial qA to represent the multiset Q and a polynomial pfA to represent any undefined configuration f.

    For the multiset Q, we have {( like in [35])}:

    Definition 5.2. Given Q (see Definition 4.7), we define the monomial q as:

    q=iQti

    The definition of the set Pg is more intricate: initially, we will assign a monomial to each rail traffic control element (see Definition 5.3); subsequently, we will utilize the monomial of each control element to assign a monomial to any undefined configuration of the railway station (see Definition 5.5).

    Definition 5.3. Given xX, we define px:{0,1,2}A':

    px(v)={lijif  x=(i,j)  is  a  color  light  signal  and  v=1mijif  x=(i,j)  is  a  color  light  signal  and  v=2lijljimijmjiif  x=(i,j,k)  is  a  turnout  and  v=1mijmjilijljiif    x=(i,j,k)  is  a  turnout  and  v=2zx,1px(1)+zx,2px(2)ifv=0

    The monomial pF is allocated to the set PF (see Definition 4.5).

    Definition 5.4. We define the monomial pF as:

    pF=it is always possible to pass from i to j   lij

    Definition 5.5. Given an undefined configuration f:X{0,1,2}, we define:

    pf=pFxXpx(f(x))

    In the special case where the undefined configuration f is a determined configuration, we can readily define pf via the set Pf (see Definition 4.4).

    Proposition 5.1. Let g be a determined configuration. Let Pg be the set defined according to Definition 4.4. We have that pg is:

    pg=(i,j)Pglij(i,j)EPgmij

    Proof. This is an immediate consequence of Proposition 4.1, Definition 5.3, Definition 5.4 and Definition 5.5.

    For a general undefined configuration f, we can compute pf in terms of the monomials pg associated with the potential configurations g of f (see Proposition 5.2). However, before we present this proposition, we require a preceding definition, which will play a crucial role in our paper:

    Definition 5.6. Let g:X{1,2} be a potential configuration of an undefined configuration f. We define the following monomial:

    rf,g=xUfzx,g(x)

    Proposition 5.2. Let f be an undefined configuration. We have the following:

    pf=gPfrf,gpg

    Proof. We have the following:

    pf=pFxXpx(f(x))=pFxUfpx(f(x))xUfpx(f(x))==pFxUfpx(f(x))xUf(zx,1px(1)+zx,1px(2))==pFxUfpx(f(x))gPfxUf(zx,g(x)px(g(x))==pFxUfpx(f(x))gPfrf,gxUfpx(g(x))==gPfpFrf,gxUfpx(f(x))xUfpx(g(x))==gPfpFrf,gxUfpx(g(x))xUfpx(g(x))==gPfpFrf,gxXpx(g(x))=gPfrf,gpFxXpx(g(x))=gPfrf,gpg

    According to the following proposition, the monomial rf,g identifies the potential configuration g of the undefined configuration f.

    Proposition 5.3. Let f be an undefined configuration. Let rf,g be the monomial associated to the potential configuration g of f (see Definition 5.6), we can obtain g through f and rf,g by the following expression:

    g(x)={1if zx,1|rf,g2if zx,2|rf,gf(x)otherwise

    Proof. We will consider the following cases:

    Case zx,1|rf,g. By Definition 5.6, we have that g(x)=1 and xUf.

    Case zx,2|rf,g. By Definition 5.6, we have that g(x)=2 and xUf.

    Case zx,1|rf,g and zx,2|rf,g. Since g{1,2}, we have that (see Definition 5.6) xUf. Consequently g(x)=f(x).

    In the railway station depicted in Figure 1, we have:

    pF=l2,1l3,4l5,4l9,10l7,8l7,6

    In the scenario depicted in Figure 3, we have:

    pf=l2,1l3,4l5,4l9,10l7,8l7,6(z1,1l1,2+z1,2m1,2)m4,3m4,5(z4,1l109+z4,2m10,9)l10,11l11,10l6,7l8,7m2,3m3,2l2,9l9,2l6,5l5,6m6,11m11,6

    In the scenario depicted in Figure 4, we have:

    pf=l2,1l3,4l5,4l9,10l7,8l7,6(z1,1l1,2+z1,2m1,2)m4,3m4,5(z4,1l109+z4,2m10,9)l10,11l11,10l6,7l8,7(z9,1l2,3l3,2m2,9m9,2+z9,2m2,3m3,2l2,9l9,2)l6,5l5,6m6,11m11,6

    In this section, we will unveil the primary result of our paper. Given a multiset Q that represents the placement of the trains within the railway station and an undefined configuration f, the monomials of the polynomial derived by the expression NR(pfq,E) encode all the safe potential configurations of f. In other words, we can derive the set Sf.

    We introduce a preliminary lemma:

    Lemma 5.1. let g:X{1,2} be a potential configuration of f.

    i) We have that NR(pgq,E) is either 0 or a monomial without variables of type z.

    - NR(pgq,E) is a monomial without variables of type z

    - NR(pgq,E)=0gSf

    ii) We have that NR(rf,gpgq,E) is a monomial. Besides,

    NR(rf,gpgq,E)=rf,gNR(pgq,E)

    iii) Given GPf, we have that

    NR(gGrf,gpgq,E)=gGrf,gNR(pgq,E)

    Proof.

    i) This is the main result in [35].

    ii) This is a immediate consequence of the fact that the polynomials in E does not contain variables of type z.

    iii) We have that:

    NR(gGrf,gpgq,E)=NF(gGrf,gpgq,E)=gGNF(rf,gpgq,E)=gGNR(rf,gpgq,E)=gGrf,gNR(pgq,E)

    Theorem 5.2. Let f:X{0,1,2} be an undefined configuration of a railway station. Let Q be the multiset of the position of trains in the railway station. We have that:

    If Uf= we have that:

    NR(pfq,E)=0  the  situation  is  dangerous

    If Uf, then the polynomial NR(pfq,E) includes exactly |Sf| distinct monomials, each of which represents a safe potential configuration of f. Specifically, we have:

    NR(pfq,E)=gSfrf,gug

    where ug is a monomial in A.

    In the case that Sf= (the situation is dangerous regardless of the state of the traffic rail control elements in Uf), we have that:

    NR(pfq,E)=0

    Proof.

    ● Suppose that Uf=.

    We have that f is also a potential configuration of f (see Definition 4.10). We have that fSf if and only if NR(pfq,E)0. By definition, we have that fSf if and only if the situation is safe. Consequently, we have that the situation is dangerous if and only if NR(pfq,E)=0

    ● Suppose that Uf.

    NR(pfq,E)=(By Proposition 5.2)=NR(gPfrf,gpgq,E)=(by iii in Lemma 5.1)=gPfrf,gNR(pgq,E)=(by i in Lemma 5.1)=gSfrf,gNR(pgq,E)=gSfrf,gug

    where ug=NR(pgq,E)

    According to Proposition 5.3 all the terms rf,gug in the summand are monomials, they are different each other, and each one identifies each potential configuration g that is safe. Consequently, the size of Sf is given by the number of monomials of pf.

    In the scenario depicted in Figure 3, we have:

    NR(pfq,E)=z1,2z4,2l2,1l2,9l3,4l5,4l5,6l6,5l6,7l7,6l7,8l8,7l9,2l9,10m1,2m2,3m3,2m4,3m4,5m6,11m10,9m10,11m11,6m11,10t1t10t11

    As observed, the polynomial NR(pfq,E) is simply one monomial. Therefore, according to Theorem 5.2, there is only one safe potential configuration, g1. This implies that Sf={g1}. Given that rf,g1=z1,2z4,2, it follows that g1(L1)=g1(L4)=2. In other words, the color of the lights signals L1 and L4 must be set to red to ensure safety.

    In the situation depicted in Figure 4, we have:

    NR(pfq,E)=z1,1z4,1z9,1l5,4l5,6l6,5l6,7l7,6l7,8l8,7m1,2m2,1m2,3m2,9m3,2m3,4m4,3m4,5m6,11m9,2m9,10m10,9m10,11m11,6m11,10t1t2t3t4t9t10t11++z1,1z4,2z9,1l5,4l5,6l6,5l6,7l7,6l7,8l8,7l9,10m1,2m2,1m2,3m2,9m3,2m3,4m4,3m4,5m6,11m9,2m10,9m10,11m11,6m11,10t1t2t3t4t10t11++z1,2z4,1z9,1l2,1l2,3l3,2l3,4l5,4l5,6l6,5l6,7l7,6l7,8l8,7m1,2m2,9m4,3m4,5m6,11m9,2m9,10m10,9m10,11m11,6m11,10t1t9t10t11++z1,2z4,2z9,1l2,1l2,3l3,2l3,4l5,4l5,6l6,5l6,7l7,6l7,8l8,7l9,10m1,2m2,9m4,3m4,5m6,11m9,2m10,9m10,11m11,6m11,10t1t10t11++z1,2z4,2z9,2l2,1l2,9l3,4l5,4l5,6l6,5l6,7l7,6l7,8l8,7l9,2l9,10m1,2m2,3m3,2m4,3m4,5m6,11m10,9m10,11m11,6m11,10t1t10t11

    As observed, NR(pfq,E) is the sum of five monomial. Consequently, according to Theorem 5.2, there are five possibilities to ensure safety (the size of Sf is 5). Each monomial rf,g of pf identifies each potential configuration Sf={g1,g2,g3,g4,g5} (see Proposition 5.3). These are:

    rf,g1=z1,1z4,1z9,1: The color light signals L1 and L4 are set to green and the switch of the turnout D1 is set to the straight track position. That is to say, we have that:

    g1(L1)=g1(L4)=g1(D1)=1.

    rf,g2=z1,1z4,2z9,1: The color light signal L1 is set to green, the color light signal L4 is set to red and the switch of the turnout D1 is set to the straight track position. That is to say, we have that:

    g2(L1)=1;g2(L4)=2;g2(D1)=1.

    rf,g3=z1,2z4,1z9,1: The color light signal L1 is set to red, the color light signal L4 is set to green and the switch of the turnout D1 is set to the straight track position. That is to say, we have that:

    g3(L1)=2;g3(L4)=1;g3(D1)=1.

    rf,g4=z1,2z4,2z9,1: The color light signals L1 and L4 are set to red and the switch of the turnout D1 is set to the straight track position. That is to say, we have that:

    g4(L1)=1;g4(L4)=2;g4(D1)=1.

    rf,g5=z1,2z4,2z9,2: The color light signals L1 and L4 are set to red and the switch of the turnout D1 is set to the diverted track position. That is to say, we have that:

    g5(L2)=g5(L4)=2;g5(D1)=2.

    In this section, we will implement an interlocking system using CoCoA [36], a Computer Algebra System. The system will not only determine if a given situation poses a danger, but it will also identify the states of the turnouts and color light signals for undefined configurations to ensure safety. For illustrative purposes, we will delve into a specific railway station depicted in Figure 1. However, the principles and methods discussed can be seamlessly applied to any railway system.

    In this section, we will provide the instructions in CoCoA related to a railway station. Specifically, we will define the ring which polynomials and monomials lie, define the list E, declare the rail traffic control elements, and implement the function that assigns a polynomial to an undefined configuration in the railway station.

    We define the ring A for the railway station depicted in Figure 1.

    use ZZ/(2)[z[1..10, 1..2], l[1..11, 1..11], m[1..11, 1..11], t[1..11]], lex; 

    Next, we define the list E for this railway station, in accordance with Definition 5.1.

    E: = [l[1,2]*l[2,1]*t[1]+m[1,2]*m[2,1]*t[1]*t[2],  l[1,2]*m[2,1]*t[1]+m[1,2]*m[2,1]*t[1]*t[2],  l[2,9]*l[9,2]*t[2]+m[2,9]*m[9,2]*t[2]*t[9],  l[2,9]*m[9,2]*t[2]+m[2,9]*m[9,2]*t[2]*t[9],  l[9,10]*l[10,9]*t[9]+m[9,10]*m[10,9]*t[9]*t[10],  l[9,10]*m[10,9]*t[9]+m[9,10]*m[10,9]*t[9]*t[10],  l[10,11]*l[11,10]*t[10]+m[10,11]*m[11,10]*t[10]*t[11],  l[10,11]*m[11,10]*t[10]+m[10,11]*m[11,10]*t[10]*t[11],  l[11,6]*l[6,11]*t[11]+m[11,6]*m[6,11]*t[11]*t[6],  l[11,6]*m[6,11]*t[11]+m[11,6]*m[6,11]*t[11]*t[6],  l[2,3]*l[3,2]*t[2]+m[2,3]*m[3,2]*t[2]*t[3],  l[2,3]*m[3,2]*t[2]+m[2,3]*m[3,2]*t[2]*t[3],  l[3,4]*l[4,3]*t[3]+m[3,4]*m[4,3]*t[3]*t[4],  l[3,4]*m[4,3]*t[3]+m[3,4]*m[4,3]*t[3]*t[4],  l[4,5]*l[5,4]*t[4]+m[4,5]*m[5,4]*t[4]*t[5],  l[4,5]*m[5,4]*t[4]+m[4,5]*m[5,4]*t[4]*t[5],  l[5,6]*l[6,5]*t[5]+m[5,6]*m[6,5]*t[5]*t[6],  l[5,6]*m[6,5]*t[5]+m[5,6]*m[6,5]*t[5]*t[6],  l[6,7]*l[7,6]*t[6]+m[6,7]*m[7,6]*t[6]*t[7],  l[6,7]*m[7,6]*t[6]+m[6,7]*m[7,6]*t[6]*t[7],  l[7,8]*l[8,7]*t[7]+m[7,8]*m[8,7]*t[7]*t[8],  l[7,8]*m[8,7]*t[7]+m[7,8]*m[8,7]*t[7]*t[8],  l[2,1]*l[1,2]*t[2]+m[2,1]*m[1,2]*t[2]*t[1],  l[2,1]*m[1,2]*t[2]+m[2,1]*m[1,2]*t[2]*t[1],  l[9,2]*l[2,9]*t[9]+m[9,2]*m[2,9]*t[9]*t[2],  l[9,2]*m[2,9]*t[9]+m[9,2]*m[2,9]*t[9]*t[2],  l[10,9]*l[9,10]*t[10]+m[10,9]*m[9,10]*t[10]*t[9],  l[10,9]*m[9,10]*t[10]+m[10,9]*m[9,10]*t[10]*t[9],  l[11,10]*l[10,11]*t[11]+m[11,10]*m[10,11]*t[11]*t[10],  l[11,10]*m[10,11]*t[11]+m[11,10]*m[10,11]*t[11]*t[10],  l[6,11]*l[11,6]*t[6]+m[6,11]*m[11,6]*t[6]*t[11],  l[6,11]*m[11,6]*t[6]+m[6,11]*m[11,6]*t[6]*t[11],  l[3,2]*l[2,3]*t[3]+m[3,2]*m[2,3]*t[3]*t[2],  l[3,2]*m[2,3]*t[3]+m[3,2]*m[2,3]*t[3]*t[2],  l[4,3]*l[3,4]*t[4]+m[4,3]*m[3,4]*t[4]*t[3],  l[4,3]*m[3,4]*t[4]+m[4,3]*m[3,4]*t[4]*t[3],  l[5,4]*l[4,5]*t[5]+m[5,4]*m[4,5]*t[5]*t[4],  l[5,4]*m[4,5]*t[5]+m[5,4]*m[4,5]*t[5]*t[4],  l[6,5]*l[5,6]*t[6]+m[6,5]*m[5,6]*t[6]*t[5],  l[6,5]*m[5,6]*t[6]+m[6,5]*m[5,6]*t[6]*t[5],  l[7,6]*l[6,7]*t[7]+m[7,6]*m[6,7]*t[7]*t[6],  l[7,6]*m[6,7]*t[7]+m[7,6]*m[6,7]*t[7]*t[6],  l[8,7]*l[7,8]*t[8]+m[8,7]*m[7,8]*t[8]*t[7],  l[8,7]*m[7,8]*t[8]+m[8,7]*m[7,8]*t[8]*t[7],  t[1]^2, t[2]^2, t[3]^2, t[4]^2, t[5]^2, t[6]^2,  t[7]^2, t[8]^2, t[9]^2, t[10]^2, t[11]^2];

    Finally, we define the set of the rail traffic control elements, X, in accordance with Definition 4.2. This set includes eight color light signals, L1, , L8, and two turnouts, D1 and D2.

    L1: = [1,2];  L2: = [4,3]; L3: = [4,5];  L4: = [10,9];  L5: = [10,11]; L6: = [11,10];  L7: = [6,7]; L8: = [8,7];  D1: = [2,3,9]; D2: = [6,5,11];

     X: = [L1, L2, L3, L4, L5, L6, L7, L8, D1, D2];  NUM_LIGHTS: = 8;  Green: = 1; Red: = 2;  Straight: = 1; Diverted: = 2; 

    Now, we define the monomial pF, the polynomial assigned to each rail traffic control element and the polynomial assigned to an undefined configuration.

    ● According to Definition 5.4, the polynomial pF is:

     pF: = l[2,1]*l[3,4]*l[5,4]*l[7,6]*l[7,8]*l[9,10];

    ● According to Definition 5.3, we implement the function px:{0,1,2}A for each control element x.

    However, here we consider two arguments for the implementation of this function p_x:

    - i referring to the i-th control element in X.

    - v referring to the independent variable v in the function px (see Definition 5.3).

     Define p_x(i, v)      TopLevel X;      TopLevel l;      TopLevel m;      TopLevel z;      if v = 0 then return z[i, 1]*p_x(i, 1) + z[i, 2]*p_x(i, 2); endif;      x: = X[i];        if len(x) = 2 then          if v = 1 then          return l[x[1], x[2]];        else          return m[x[1], x[2]];        endif;      Elif len(x) = 3 then          if v = 1 then            return l[x[1], x[2]]*l[x[2], x[1]]*m[x[1], x[3]]*m[x[3], x[1]];          else           return m[x[1], x[2]]*m[x[2], x[1]]*l[x[1], x[3]]*l[x[3], x[1]];          endif;        endif;      EndDefine; 

    • According to Definition 5.5, we define the polynomial pf associated with an undefined configuration of the railway station:

     Define p_f(f)     TopLevel pF;      TopLevel X;      p: = pF;      for i: = 1 to len(X) do          p: = p*p_x(i, f[i]);      endfor;      return p;  EndDefine;

    In this section, we will provide the instructions in CoCoA related to analyze situations in the railway station.

    We will consider the scenario depicted in Figure 2: there are two trains (one in section S1 and another in section S10); the color light signals L2 and L4 are displaying red, while the rest are displaying green; the switch of the turnout D1 is set to the diverted track position, and the switch of the turnout D2 is set to the straight track position. We define q and the determined configuration f:

    f: = [Green, Red, Red, Red, Green, Green, Green, Green, Diverted, Straight]; q: = t[1]*t[10]; 

    According to part i) of Theorem 5.2 we can determine whether the situation is safe or dangerous by calculating NR(pf(f)q,E). The Computer Algebra System CoCoA includes the internal function NR to calculate this function NR.

     NR(p_f(f)*q, E); 

    Since the output in CoCoA is 0, the situation dangerous. Consequently, we need to change the state of some control elements in the railway station to make it safe. We will consider changing the state of the color light signals L1 and L4 as depicted in Figure 3.

     f[1]: = 0;  f[4]: = 0; NR(p_f(f)*q, E);

    The output is:

     z[1,2]*z[4,2]*l[2,1]*l[2,9]*l[3,4]*l[5,4]*l[5,6]*l[6,5]*l[6,7]*l[7,6]*  l[7,8]*l[8,7]*l[9,2]*l[9,10]*m[1,2]*m[2,3]*m[3,2]*m[4,3]*m[4,5]* m[6,11]*m[10,9]*m[10,11]*m[11,6]*m[11,10]*t[1]*t[10]*t[11] 

    According to part ii) of Theorem 5.2, since the variables z[1,2] and z[4,2] are present in the output, we can conclude that the situation will be safe if both L1 and L4 are set to red. Indeed, since the output polynomial contains only one monomial, this is the only possibility to make the situation safe.

    Now, we will consider that we could also change the state of the turnout D1 as depicted in Figure 4.

     f[1]: = 0;  f[4]: = 0;  f[1 + NUM_LIGHTS]: = 0;  NR(p_f(f)*q, E);

    The output is:

    z[1,1]*z[4,1]*z[9,1]*l[5,4]*l[5,6]*l[6,5]*l[6,7]*l[7,6]*l[7,8]*l[8,7]*m[1,2]* m[2,1]*m[2,3]*m[2,9]*m[3,2]*m[3,4]*m[4,3]*m[4,5]*m[6,11]*m[9,2]*m[9,10]* m[10,9]*m[10,11]*m[11,6]*m[11,10]*t[1]*t[2]*t[3]*t[4]*t[9]*t[10]*t[11] + + z[1,1]*z[4,2]*z[9,1]*l[5,4]*l[5,6]*l[6,5]*l[6,7]*l[7,6]*l[7,8]*l[8,7]*l[9,10]* m[1,2]*m[2,1]*m[2,3]*m[2,9]*m[3,2]*m[3,4]*m[4,3]*m[4,5]*m[6,11]*m[9,2]* m[10,9]*m[10,11]*m[11,6]*m[11,10]*t[1]*t[2]*t[3]*t[4]*t[10]*t[11] + + z[1,2]*z[4,1]*z[9,1]*l[2,1]*l[2,3]*l[3,2]*l[3,4]*l[5,4]*l[5,6]*l[6,5]*l[6,7]* l[7,6]*l[7,8]*l[8,7]*m[1,2]*m[2,9]*m[4,3]*m[4,5]*m[6,11]*m[9,2]*m[9,10]* m[10,9]*m[10,11]*m[11,6]*m[11,10]*t[1]*t[9]*t[10]*t[11] + + z[1,2]*z[4,2]*z[9,1]*l[2,1]*l[2,3]*l[3,2]*l[3,4]*l[5,4]*l[5,6]*l[6,5]*l[6,7]* l[7,6]*l[7,8]*l[8,7]*l[9,10]*m[1,2]*m[2,9]*m[4,3]*m[4,5]*m[6,11]*m[9,2]* m[10,9]*m[10,11]*m[11,6]*m[11,10]*t[1]*t[10]*t[11] + + z[1,2]*z[4,2]*z[9,2]*l[2,1]*l[2,9]*l[3,4]*l[5,4]*l[5,6]*l[6,5]*l[6,7]*l[7,6]* l[7,8]*l[8,7]*l[9,2]*l[9,10]*m[1,2]*m[2,3]*m[3,2]*m[4,3]*m[4,5]*m[6,11]* m[10,9]*m[10,11]*m[11,6]*m[11,10]*t[1]*t[10]*t[11] 

    According to part ii) of Theorem 5.2, since the output polynomial contains five monomials, there are five possibilities to make the situation safe.

    The polynomial NR(pf(f)q,E) might indeed be difficult to interpret because it contains monomials with many variables of a type other than z. In this section, we will provide an implementation in CoCoA of a function, PrintAllPotentialConfigurations that outputs a string describing the potential configurations of f.

    We need to first implement some auxiliary functions:

     Define PrintDescriptionName(v)      TopLevel NUM_LIGHTS;       num: = IndetSubscripts(v);       if num[1] < = NUM_LIGHTS then          print "L[", num[1], "]:";          if num[2] = 1 then print "Green"; else print "Red "; endif;      else        print "D[", num[1]-NUM_LIGHTS, "]:";        if num[2] = 1 then print "Straight"; else print "Diverted"; endif;      endif;  EndDefine;

    Define PrintOnePotentialConfiguration(m, f)      TopLevel z;      for i: = 1 to len(f) do        if f[i] = 0 then              r: = z[i, 1];              if IsDivisible(m, r) then            PrintDescriptionName(r); print " ";          else            r: = z[i, 2];            PrintDescriptionName(r); print " ";              endif;            endif;          endfor;          println;  EndDefine; 

    As may be seen, the implementation of the function PrintOnePotentialConfiguration requires IsDivisible, an internal function of CoCoA (implemented in any computer algebra system) which determines whether a polynomial m is divisible by r.

    The implementation of PrintAllPotentialConfigurations is as follows:

    Define PrintAllPotentialConfigurations(f, q)     TopLevel E;       r: = NR(p_f(f)*q, E);       if r = 0 then println "The situation is dangerous"; else println "The situation is safe for these cases:"; endif;       while r <>0 do         m: = LT(r);         PrintOnePotentialConfiguration(m, f);         r: = m+r;       EndWhile; EndDefine; 

    Now, we can easily identify the possibilities to make the situation safe. For the scenario depicted in Figure 4, we simply need to input the following into CoCoA:

     PrintAllPotentialConfigurations(f, q); 

    And CoCoA will output the results:

    The situation is safe for these cases:  L[1]:Green L[4]:Green D[1]:Straight L[1]:Green L[4]:Red D[1]:Straight L[1]:Red L[4]:Green D[1]:Straight L[1]:Red L[4]:Red D[1]:Straight L[1]:Red L[4]:Red D[1]:Diverted 

    These are the five possibilites to turn the situation safe. For example, we can set the color of traffic lights L1 and L4 to Green and set the switch of the turnout D1 in straight track position to turn the situation safe.

    We present an algebraic model for railway interlocking systems, which are crucial safety components in rail transportation. These systems regulate the transitions between sections of a railway station using rail traffic control elements and prevent train collisions. The model introduced in this paper enhances the capabilities of these systems by not only indicating whether a situation is dangerous but also providing guidance on how to configure certain rail traffic control elements to ensure safety if a dangerous situation is detected.

    The model represents the railway station and its situations algebraically through polynomials. It transforms the task of identifying dangerous situations into calculating the residue polynomial of a monomial division over a set of polynomials. The monomials contained in this residue polynomial encode all possible configurations that would render the situation safe.

    We extend a previous groundbreaking algebraic model that improved the implementation of interlocking systems by providing a linear algorithm suitable for large-scale railway stations. However, the previous model determined only whether a situation was dangerous or not and did not provide any guide on how to configure certain control elements to ensure safety in case of danger. We fill that gap by extending the model to include this capacity.

    In conclusion, this paper contributes significantly to the field of railway interlocking systems by introducing an enhanced algebraic model that not only identifies dangerous situations but also provides guidance on how to ensure safety in such situations. This work paves the way for more efficient and safer rail transportation.

    Antonio Hernando, Gabriel Aguilera-Venegas, José Luis Galán-García, Sheida Nazary: conceptualization, investigation, methodology, validation, formal analysis; Antonio Hernando: supervision, writing-original draft preparation; Gabriel Aguilera-Venegas, José Luis Galán-García: Software; Sheida Nazary: writing-review and editing.

    All authors have read and approved the final version of the manuscript for publication.

    The authors declare they have not used Artificial Intelligence (AI) tools in the creation of this article.

    Prof. José Luis Galán-García is the special issue editor for AIMS Mathematics and was not involved in the editorial review or the decision to publish this article. All authors declare that there are no competing interests.



    [1] N. Bešinović, Resilience in railway transport systems: A literature review and research agenda, Transport Rev., 40 (2020), 457–478. https://doi.org/10.1080/01441647.2020.1728419 doi: 10.1080/01441647.2020.1728419
    [2] Y. Zhou, J. Wang, H. Yang, Resilience of transportation systems: concepts and comprehensive review, IEEE T. Intell. Transp. Syst., 20 (2019), 4262–4276. https://doi.org/10.1109/TITS.2018.2883766 doi: 10.1109/TITS.2018.2883766
    [3] J. Pachl, Railway signalling principles, 2021. Available from: http://www.joernpachl.de/rsp.htm.
    [4] K. Winter, W. Johnston, P. Robinson, P. Strooper, L. van den Berg, Tool support for checking railway interlocking designs, in 10th Australian Workshop on Safety Re-lated Programmable Systems (SCS'05), Australian Computer Society, Sydney, 55 (2006), 101–107. Available from: https://crpit.scem.westernsydney.edu.au/confpapers/CRPITV55Winter.pdf.
    [5] A. Borälv, Case study: formal verification of a computerized railway interlocking, Formal Aspects Comput., 10 (1998), 338–360. https://doi.org/10.1007/s001650050021 doi: 10.1007/s001650050021
    [6] Anonymous, Proyecto y obra del enclavamiento electrónico de la estación de Madrid-Atocha, Proyecto Técnico, Siemens, Madrid, 1988.
    [7] Anonymous, Microcomputer interlocking hilversum, Siemens, Munich, 1986.
    [8] Anonymous, Microcomputer interlocking rotterdam, Siemens, Munich, 1989.
    [9] Anonymous, Puesto de enclavamiento con microcomputadoras de la estación de Chiasso de los SBB, Siemens, Munich, 1989.
    [10] L. Villamandos, Sistema informático concebido por Renfe para diseñar los enclavamientos, Vía Libre, 348 (1993), 65.
    [11] J. Peleska, N. Krafczyk, A. E. Haxthausen, R. Pinger, Efficient data validation for geographical interlocking systems, Formal Aspects Comput., 33 (2021), 925–955. https://doi.org/10.1007/s00165-021-00551-6 doi: 10.1007/s00165-021-00551-6
    [12] A. Fantechi, A. E. Haxthausen, M. B. R. Nielsen, Model checking geographically distributed interlocking systems using UMC, in 2017 25th Euromicro International Conference on Parallel, Distributed and Network-based Processing (PDP), (2017), 278–286. https://doi.org/10.1109/PDP.2017.66
    [13] D. Bjørner, The FMERail/TRain Annotated Rail Bibliography, 1999. Available from: http://www2.imm.dtu.dk/db/fmerail/fmerail/
    [14] H. Lian, X. Wang, A. Sharma, M. A. Shah, Application and study of artificial intelligence in railway signal interlocking fault, Informatica, 46 (2022), 343–354. https://doi.org/10.31449/inf.v46i3.3961 doi: 10.31449/inf.v46i3.3961
    [15] A. Fantechi, G. Gori, A. E. Haxthausen, C. Limbrée, Compositional verification of railway interlockings: comparison of two methods, in Reliability, Safety, and Security of Railway Systems. Modelling, Analysis, Verification, and Certification, (2022), 3–19. https://doi.org/10.1007/978-3-031-05814-1_1
    [16] G. Lukács, T. Bartha, Conception of a formal model-based methodology to support railway engineers in the specification and verification of interlocking systems, in 2022 IEEE 16th International Symposium on Applied Computational Intelligence and Informatics (SACI), (2022), 000283–000288. https://doi.org/10.1109/SACI55618.2022.9919532
    [17] M. J. Morley, Modelling British Rail's Interlocking Logic: Geographic Data Correctness, LFCS, Department of Computer Science, University of Edinburgh, 1991.
    [18] K. Nakamatsu, Y. Kiuchi, A. Suzuki, EVALPSN based railway interlocking simulator, in Knowledge-Based Intelligent Information and Engineering Systems, Berlin - Heidelberg, (2004), 961–967. https://doi.org/10.1007/978-3-540-30133-2_127
    [19] A. Janota, Using Z specification for railway interlocking safety, Period. Polytech. Transp. Eng., 28 (2000), 39–53. Available from: https://pp.bme.hu/tr/article/view/1963.
    [20] K. M. Hansen, Formalising railway interlocking systems, in Nordic Seminar on Dependable Computing Systems, Lyngby, (1994), 83–94.
    [21] M. Montigel, Modellierung und Gewährleistung von Abhängigkeiten in Eisenbahnsicherungsanlagen, Ph.D. Thesis, ETH Zurich, Zurich, 1994. Available from: http://www.inf.ethz.ch/research/disstechreps/theses.
    [22] X. Chen, H. Huang, Y. He, Automatic generation of relay logic for interlocking system based on statecharts, in 2010 Second World Congress on Software Engineering, (2010), 183–188. https://doi.org/10.1109/WCSE.2010.31
    [23] X. Chen, Y. He, H. Huang, An approach to automatic development of interlocking logic based on Statechart, Enterp. Inf. Syst., 5 (2011), 273–286. https://doi.org/10.1080/17517575.2011.575475 doi: 10.1080/17517575.2011.575475
    [24] X. Chen, Y. He, H. Huang, A component-based topology model for railway interlocking systems, Math. Comput. Simul., 81 (2011), 1892–1900. https://doi.org/10.1016/j.matcom.2011.02.007 doi: 10.1016/j.matcom.2011.02.007
    [25] B. Luteberget, C. Johansen, Efficient verification of railway infrastructure designs against standard regulations, Form. Method. Syst. Des., 52 (2018), 1–32. https://doi.org/10.1007/s10703-017-0281-z doi: 10.1007/s10703-017-0281-z
    [26] M. Bosschaart, E. Quaglietta, B. Janssen, R. M. P. Goverde, Efficient formalization of railway interlocking data in RailML, Inf. Syst., 49 (2015), 126–141. https://doi.org/10.1016/j.is.2014.11.007 doi: 10.1016/j.is.2014.11.007
    [27] E. Roanes-Lozano, L. M. Laita, An applicable topology-independent model for railway interlocking systems, Math. Comput. Simul., 45 (1998), 175–183. https://doi.org/10.1016/S0378-4754(97)00093-1 doi: 10.1016/S0378-4754(97)00093-1
    [28] E. Roanes-Lozano, E. Roanes-Macías, L. Laita, Railway interlocking systems and Gröbner bases, Math. Comput. Simul., 51 (2000), 473–481. https://doi.org/10.1016/S0378-4754(99)00137-8 doi: 10.1016/S0378-4754(99)00137-8
    [29] E. Roanes-Lozano, A. Hernando, J. A. Alonso, L. M. Laita, A logic approach to decision taking in a railway interlocking system using Maple, Math. Comput. Simul., 82 (2011), 15–28. https://doi.org/10.1016/j.matcom.2010.05.024 doi: 10.1016/j.matcom.2010.05.024
    [30] A. Hernando, E. Roanes-Lozano, R. Maestre-Martínez, J. Tejedor, A logic-algebraic approach to decision taking in a railway interlocking system, Ann. Math. Artif. Intell., 65 (2012), 317–328. https://doi.org/10.1007/s10472-012-9321-y doi: 10.1007/s10472-012-9321-y
    [31] E. Roanes-Lozano, J. A. Alonso, A. Hernando, An approach from answer set programming to decision making in a railway interlocking system, Rev. R. Acad. Cienc. Exactas, Fis. Nat. Ser. A Mat., 108 (2014), 973–987. https://doi.org/10.1007/s13398-013-0155-1 doi: 10.1007/s13398-013-0155-1
    [32] A. Hernando, R. Maestre, E. Roanes-Lozano, A new algebraic approach to decision making in a railway interlocking system based on preprocess, Math. Probl. Eng., 2018 (2018), 4982974. https://doi.org/10.1155/2018/4982974 doi: 10.1155/2018/4982974
    [33] D. Cox, J. Little, D. O'Shea, Ideals, Varieties and Algorithms, Springer, 2015. Available from: https://link.springer.com/book/10.1007/978-3-319-16721-3.
    [34] A. Hernando, E. Roanes-Lozano, An algebraic model for implementing expert systems based on the knowledge of different experts, Math. Comput. Simul., 107 (2015), 92–107. https://doi.org/10.1016/j.matcom.2014.05.003 doi: 10.1016/j.matcom.2014.05.003
    [35] A. Hernando, E. Roanes-Lozano, J. L. Galán-García, G. Aguilera-Venegas, Decision making in railway interlocking systems based on calculating the remainder of dividing a polynomial by a set of polynomials, Electron. Res. Arch., 31 (2023), 6160–6196. https://doi.org/10.3934/era.2023313 doi: 10.3934/era.2023313
    [36] J. Abbott, A. M. Bigatti, CoCoALib: a C++ library for doing Computations in Commutative Algebra, 2019. Available from: http://cocoa.dima.unige.it/cocoalib
  • This article has been cited by:

    1. Junhong Hu, Mingshu Yang, Yunzhu Zhen, Wenling Fu, Node Importance Evaluation of Urban Rail Transit Based on Signaling System Failure: A Case Study of the Nanjing Metro, 2024, 14, 2076-3417, 9600, 10.3390/app14209600
    2. Antonio Hernando, José Luis Galán–García, Yolanda Padilla–Domínguez, María Ángeles Galán–García, Gabriel Aguilera–Venegas, A library in CoCoA for implementing railway interlocking systems, 2025, 466, 03770427, 116594, 10.1016/j.cam.2025.116594
  • Reader Comments
  • © 2024 the Author(s), licensee AIMS Press. This is an open access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0)
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Metrics

Article views(939) PDF downloads(37) Cited by(2)

/

DownLoad:  Full-Size Img  PowerPoint
Return
Return

Catalog