Model for Risk Calculation and Reliability Comparison of Level Crossings

There is not a single country in the world that is so rich that it can remove all level crossings or provide their denivelation in order to absolutely avoid the possibility of accidents at the intersections of railways and road traffic. In the Republic of Serbia alone, the largest number of accidents occur at passive crossings, which make up three-quarters of the total number of crossings. Therefore, it is necessary to constantly find solutions to the problem of priorities when choosing level crossings where it is necessary to raise the level of security, primarily by analyzing the risk and reliability at all level crossings. This paper presents a model that enables this. The calculation of the maximal risk of a level crossing is achieved under the conditions of generating the maximum entropy in the virtual operating mode. The basis of the model is a heterogeneous queuing system. Maximum entropy is based on the mandatory application of an exponential distribution. The system is Markovian and is solved by a standard analytical concept. The basic input parameters for the calculation of the maximal risk are the geometric characteristics of the level crossing and the intensities and structure of the flows of road and railway vehicles. The real risk is based on statistical records of accidents and flow intensities. The exact reliability of the level crossing is calculated from the ratio of real and maximal risk, which enables their further comparison in order to raise the level of safety, and that is the basic idea of this paper.


Introduction
There is a large and significant number of elements that define and influence the concept of safety. Therefore, it is difficult to express these terms in any engineering quantity or certain indicator that would be completely unambiguous and clear. Therefore, the usual approach to safety analysis is deductive, starting from the phenomenon of an accident in which its numerous attributes are synthesized.
Accidents at road crossings occur in disproportionate ratios of kinetic energies, with a pronounced dominance of the consistency of railway vehicles. Large undesirable balances of accidents at road crossings have direct consequences: Loss of human lives, physical disabilities and psychological trauma that are prevalent in road traffic at the expense of destroyed vehicles and signaling and safety devices. Indirect costs include disruptions in the timetable of railway traffic and suspension of road traffic. Therefore, the topic of safety at road crossings is prominent. This paper proposes a new mathematical model that, by calculating the maximal risk, introduces a new reference value in the calculation of the reliability of level crossings. The given model uses the conventional notation of the queuing theory, Kendall notation [1] or Kendal-Lee notation [2,3]. The model is based on a theoretical consideration of the chaotic conditions, there is no certainty that the model will be valid for locally analyzed conditions. A total of 22 different approaches in analyses and methods for determining the risk of accidents at road crossings have been identified in 12 countries around the world. The differences are reflected in their complexity and approach, which can be classified into four main groups based on the different complexity of computational algorithms [36,37]. The first group consists of the use of simple parameters that serve as tips for choosing the level of security in the following countries: India, Japan, Russia, Spain and Sweden. The second group consists of simple weighted factors that indicate the relative contribution of each parameter to the overall risk and are Australia (ALCAM model), Northern Ireland and New Zealand. The third group consists of complex weighted factors used in the following countries: Great Britain, Ireland and Spain (Failure Mode and Effects Analysis). The fourth group consists of statistical models based on statistical techniques of weight assessment (empirical terms) for parameters and are applied in Great Britain, Australia (Risk Assessment of Accident and Incident at Level crossings), Canada (GradeX), New Zealand and the USA (formulas for predicting the severity of an accident, GradeDEC.net). In some countries, risk modeling is based on the application of more advanced techniques, such as empirical Bayesian methods, FTA (Fault-Tree Analysis), ETA (Event-Tree Analysis), human factor analysis, etc. A large number of existing models are based on analyses of the occurrence of accidents that have occurred in the past, as well as monitoring the effects before and after the implementation of certain measures. The current version of the US DOT formula for accident prediction is presented in the Handbook for level crossing, revised second edition in 2007 by the Federal Highway Administration -FHWA) [38]. It was developed using data on accidents at national level crossings from 1981 to 1986. The formula has shortcomings [39] in weighting the contribution of various safety factors in estimating accident rates as well as inaccuracies in update formulas. Because it is based on data from all over the United States, it cannot take into account regional differences. The variables included in the models, or their coefficients, have not been modified since the publication of the original 1980 study, except for the third element of the model consisting of a normalizing constant factorized in the model just before the final collision prediction [40], and improvements should be made in identifying new variables.
A French group of authors developed a preliminary model for predicting accidents at level crossings, followed by an improved model based on the preliminary model [41]. It has been proven that the occurrence of accidents at level crossings is positively influenced by average daily railway traffic and speed limits on railways, average daily road traffic and the annual number of traffic accidents, road alignment, crossing width, crossing length and regional factors for observed level crossings. Although this model has only been applied to automatic railway crossings with two half-barriers and flashing lights, it can also be used at other crossings. In such a manner, it is possible to predict accidents with extremely good accuracy, which is important for reducing their number.
The same group of French authors, with exactly the same database, continued research and risk analysis at level crossings using Bayesian networks (BNs). In particular, causal structural constraints have been introduced in order to establish a BN risk model for the purpose of combining empirical knowledge and statistics, thus enabling the identification of effective causality and avoidance of inappropriate structural links. Furthermore, advanced and reverse conclusions based on risk determination using BN models were derived to predict the occurrence of accidents and incidents at level crossings and to quantify the degree of contribution of various factors and impacts, in order to determine risk factors. In addition, analysis of the model's impact strength was performed to examine the impact strength of various causal factors on the occurrence of road accidents and incidents [42].
In the last few years, several scientific papers have appeared in which researchers have determined models for assessing the risk of accidents at level crossings. A known technique of mathematical programming for measuring the efficiency of complex entities with diverse inputs/outputs is the data Envelopment Analysis (DEA) software, DEA-Solver LV8.0, which allows one to determine whether the Decision-Making Unit (DMU) is  [43]. Another study [44] was conducted in the Republic of Serbia with the aim of identifying the necessary parameters that quantify the risks associated with railway crossings, where the available statistical models that are commonly used (Poisson, NB, ZIP and ZINB) were analyzed. These models were obtained using a gradual AIC. The obtained models were then compared using the Vuong test. In the mentioned research [44], a new measure for risk was introduced-empirical risk. In Bosnia and Herzegovina, for eight level crossings on the Šamac-Doboj line, crossings were evaluated using the Novel Integrated Fuzzy MCDM-fuzzy PIPRECIA (pivot pairwise relative criteria importance assessment) model [45], i.e., the assessment was performed using the fuzzy MARCOS method (measurement of alternatives and ranking according to compromise solution). The level of safety of level crossings was determined on the basis of determining the final weight values of the criteria, in order to achieve sustainable railway traffic management.
Research conducted in North Carolina (USA) was based on a model for predicting the risk of collisions at level crossings in relation to the class of rail and track [46], while another comprehensive study conducted in Florida (USA) recommended a new model for predicting danger, called the Florida priority index formula, for ranking/setting priorities at level crossings (highway/railroad). The Florida Priority Index formula provides a more accurate ranking of level crossings compared to alternative methods. The Florida priority index formula estimates the potential danger of a given level crossing based on the average daily traffic of road vehicles and trains [47]. The competitive risk model [48] is a special type of survival analysis designed to correctly assess the marginal probability of an incidence outcome when multiple causes of failure are possible. This method is intensively used in medical research to study the death of patients that can be attributed to competitive events such as cardiovascular and non-cardiovascular causes. Modeling the competitive risks of accidents at level crossings shows the ability to simultaneously identify risk factors and the marginal probability of the severity and occurrence of collisions. The model is designed to identify and summarize those factors that contribute to the probability of accident risk at level crossings in North Dakota. However, the study does not suggest the effectiveness of countermeasures.

Model Basics: Maximum Risk, Entropy and Chaos
The term "risk" is first found in Homer's famous poems The Iliad and The Odyssey, 9th century AD. However, in these poems, the etymology of the word "risk" needs to be considered from the point of view of numerous synonyms of the word "radical" (Greek alphabet: ριζικó), which abounds in the poems of the Iliad and Odyssey, especially in terms of warrior uncompromisingness. Another more probable etymological source of risk is in the Greek word root (Greek alphabet: ριζκα), which was associated with the danger that threatened ships from underwater rocks. This associative source of the origin of "risk" is more probable if the terrestrial conditions of navigation of old are taken into accountsailing along the coast or along well-known cliffs, capes or islands, exclusively by day with good visibility. Terrestrial navigation was performed with the obligatory use of a depth gauge (a rope with knots weighed by a stone-the meaning of risk prevention). Under these navigational conditions, invisible underwater rocks (analogous to the invisible root below the earth's surface) with unknown tidal intensities could have caused fatal damage to the ship. The primitive depth gauge thus received the title of the first means of risk assessment. Night sailing was made possible only with the advent of astronomical navigation in the 6th century BC, for which the famous Thales of Miletus is credited. Today, risk is considered to be the effect of uncertainty on goals (ISO31000 "Risk management-Principles and guidelines" standard, 2009). Systemic chaos, in terms of complete disorder and confusion, can be caused under conditions of maximal entropy. Depending on the structure, some systems can achieve the goal even in conditions of maximal entropy, while other systems enter the progression of chaos and complete erosion of the system.
Traffic as a dynamic stochastic system has the desired value of zero risk-without accidents, i.e., without danger to human life and health and without degradation of the vehicles value, goods and roads. This ideal is inclined to the concept of safety in maximally regulated vehicle flows. Dominantly, traffic systems are homogeneous in an aggregate sense. A solid base is for road and rail traffic, liquid represents water traffic and gaseous represents air traffic system. Of these systems, the possible intersection of roads and flows at the same level can be realized on the land/ground-between the road and the rail traffic system. The level crossing serves traffic flows from two traffic systems and therefore must be considered as a heterogeneous system. Numerous concepts for accident prevention at level crossings are described in Section 2.
Contrary to the ideal of zero risk, the level crossing can be introduced into a state with maximal risk. This situation is achieved by declaring identical flow priorities in the absence of traffic signals as information carriers. It is clear that in real conditions, this mode of operation is prohibited. However, in virtual conditions, this mode can quantify the maximal risk.
In real conditions, after the realization of an accident at level crossings, the level crossing system was introduced into an unstable state. The work of the level crossing is obligatorily suspended, and the traffic flows of railway and road vehicles are brought to a halt. The consequences of the accident are fixed and procedures are carried out, which return the level crossing system to a stable, working condition. Otherwise, the level crossing system would reach a state of chaos. In theoretical conditions, virtual accidents do not stop traffic flows. Thus, theoretically, the level crossing system is introduced to chaos with the possibility of successive virtual accidents.
Objective risk can be obtained from the quotient of recorded real accidents n real and the intensity of traffic flow of railway and road vehicles. There are a number of important parameters that are synthesized in this quotient. These are average values of the speed and length of trains and road vehicles, the non-stationary stochastic structure of road vehicle flow and the usual deterministic structure of railway vehicle flow, geometric characteristics of the level crossing (angle between the railway and road, horizontal and vertical curves), the dynamics of meteorological conditions, etc. The conditions of railway and road traffic and their impact are very difficult to statistically extract from the obtained value of objective risk. Let us denote the objective, real risk by r real .
Theoretically, the maximal risk of a level crossing is measurable. It is also obtained from the quotient of recorded virtual-theoretical accidents n theor and the intensity of traffic flow of railway and road vehicles. This leads to the risk interval, from complete reliability with zero risk to the maximal theoretical risk for given traffic flow intensities. If we denote the probability of the theoretical maximal-critical risk with r theor , objective, real risk is always in the range of theoretical limits 0 ≤ r real ≤ r theor .
Another important question remains: How to get the theoretical maximal risk? The answer to this question comes down to the induction of maximal entropy in the service system. Fortunately, the answer to this question is simple: By applying an exponential distribution, because of all the continuous distributions, it has the largest entropy. Therefore, it is enough to measure the intensity of traffic flows, the average length of trains and road vehicles and calculate the average occupancy of the level crossing by rail and road vehicles based on their average speeds. The parameters of the average occupancy of the level crossing can easily be included in the exponential distribution of the known function and density, for the parameter λ, which represents average daily intensity flows of a road or railway vehicle λ > 0, λ ∈ R(1) and time t, for the known parametric characteristics M(T) = λ −1 , D(T) = λ −2 [49]: Continuous entropy, or "differential entropy", is a concept that expands the idea of "Shannon's entropy", as a measure of average predictability of the outcome of a random event with a continuous distribution of probabilities, i.e., measures of uncertainty established in the famous debate between Claude Shannon (2016-2001) and John von Neumann . In the example of the exponential distribution, the continuous entropy h e (t) is given by (2): The application of the exponential distribution in the level crossing system without priority provides the maximal theoretical risk, precisely due to the known fact that of all probabilistic distributions, the exponential has the highest continuous entropy. In this sense, all probabilistic systems based on the exponential distribution are indeterminate to the greatest extent, which is the foundation of discrete processes based on Denis Poison's distribution (1781-1840), and Cony Pelma's theorem  proves the elementary importance of exponential distribution in Poison's processes. This fact is contained in the "memoryless" property of exponential distribution, which has already found application in the field of tests for generating independent random numbers [50].

Ideal Level Crossing Queuing System
A level crossing can be considered as a queuing system that serves vehicles from two traffic systems: Railway and road. Therefore, the queuing system of a level crossing has a heterogeneous structure. In ideal safety conditions, without accidents, the level crossing queuing system is shown in Figure 1. This system has complementary occupancy states with unconditional priority for railway vehicles. and road vehicles based on their average speeds. The parameters of the average occupancy of the level crossing can easily be included in the exponential distribution of the known function and density, for the parameter λ, which represents average daily intensity flows of a road or railway vehicle λ > 0, λ ∈ R (1) and time t, for the known parametric characteristics M(T) = λ −1 , D(T) = λ −2 [49]: Continuous entropy, or "differential entropy", is a concept that expands the idea of "Shannon's entropy", as a measure of average predictability of the outcome of a random event with a continuous distribution of probabilities, i.e., measures of uncertainty established in the famous debate between Claude Shannon (2016-2001) and John von Neumann . In the example of the exponential distribution, the continuous entropy he(t) is given by (2): The application of the exponential distribution in the level crossing system without priority provides the maximal theoretical risk, precisely due to the known fact that of all probabilistic distributions, the exponential has the highest continuous entropy. In this sense, all probabilistic systems based on the exponential distribution are indeterminate to the greatest extent, which is the foundation of discrete processes based on Denis Poison's distribution (1781-1840), and Cony Pelma's theorem  proves the elementary importance of exponential distribution in Poison's processes. This fact is contained in the "memoryless" property of exponential distribution, which has already found application in the field of tests for generating independent random numbers [50].

Ideal Level Crossing Queuing System
A level crossing can be considered as a queuing system that serves vehicles from two traffic systems: Railway and road. Therefore, the queuing system of a level crossing has a heterogeneous structure. In ideal safety conditions, without accidents, the level crossing queuing system is shown in Figure 1. This system has complementary occupancy states with unconditional priority for railway vehicles. The probability of occupancy of the level crossing cumulants of time by railway vehicle is equal, "p", with the geometric interpretation given in Figure 2. Probability "p" is analogous to the quotient of time cumulants ti i ∈ [1, n] occupancy of the level crossing with priority railway traffic and the observed time T.  The probability of occupancy of the level crossing cumulants of time by railway vehicle is equal, "p", with the geometric interpretation given in Figure 2. Probability "p" is analogous to the quotient of time cumulants t i i ∈ [1, n] occupancy of the level crossing with priority railway traffic and the observed time T. and road vehicles based on their average speeds. The parameters of the average occupancy of the level crossing can easily be included in the exponential distribution of the known function and density, for the parameter λ, which represents average daily intensity flows of a road or railway vehicle λ > 0, λ ∈ R (1) and time t, for the known parametric characteristics M(T) = λ −1 , D(T) = λ −2 [49]: Continuous entropy, or "differential entropy", is a concept that expands the idea of "Shannon's entropy", as a measure of average predictability of the outcome of a random event with a continuous distribution of probabilities, i.e., measures of uncertainty established in the famous debate between Claude Shannon (2016-2001) and John von Neumann . In the example of the exponential distribution, the continuous entropy he(t) is given by (2): The application of the exponential distribution in the level crossing system without priority provides the maximal theoretical risk, precisely due to the known fact that of all probabilistic distributions, the exponential has the highest continuous entropy. In this sense, all probabilistic systems based on the exponential distribution are indeterminate to the greatest extent, which is the foundation of discrete processes based on Denis Poison's distribution (1781-1840), and Cony Pelma's theorem  proves the elementary importance of exponential distribution in Poison's processes. This fact is contained in the "memoryless" property of exponential distribution, which has already found application in the field of tests for generating independent random numbers [50].

Ideal Level Crossing Queuing System
A level crossing can be considered as a queuing system that serves vehicles from two traffic systems: Railway and road. Therefore, the queuing system of a level crossing has a heterogeneous structure. In ideal safety conditions, without accidents, the level crossing queuing system is shown in Figure 1. This system has complementary occupancy states with unconditional priority for railway vehicles. The probability of occupancy of the level crossing cumulants of time by railway vehicle is equal, "p", with the geometric interpretation given in Figure 2. Probability "p" is analogous to the quotient of time cumulants ti i ∈ [1, n] occupancy of the level crossing with priority railway traffic and the observed time T.  Complementarily, the access of road vehicles to the level crossing is realized with probability q = 1 − p, intensity λ c . The service of road vehicles is realized with intensity µ c .
The initial state of the Markov ergodic system is X 0,0 without access to railway and road vehicles. The system has a defined priority of railway vehicles, which approach the road crossing with intensity λ t , and are served with intensity µ t .
When the level crossing is occupied by a railway vehicle, the system is in state X 0,1 . All road vehicles that approach the crossing with intensity λ c , and due to the defined priority of railway traffic, fill the system states in the order X 0+1,1 , X 0+2,1 , . . . X 0+k,1 . Ideally, the number of places in a row is unlimited (∞).
After the passage of the railway vehicle over the zone of the level crossing, the service with the intensity µ t has been performed. Regardless of the number of accumulated road vehicles, due to the memoryless property of exponential distribution, the system switches from state X 0+k,1 to state X k,0 , and the service of road vehicles with intensity µ c begins.
In case the road vehicle approaches the road crossing with intensity λ c , and the state is not conditioned by the priority of railway vehicles, the system changes the condition from X 0,0 to X 1,0 , while serving with intensity µ c without the possibility of forming a queue.
The presented system is idealized from the side of safety. It prevents the simultaneous access of vehicles of the two systems to the road crossing, i.e., there is no condition X 1,1 , which is a collision of railway and road vehicles.

Queuing System for the Calculation of Maximal Risk
The issue of calculating the value of the maximal risk can be solved by applying a heterogeneous queuing system with the following parameters: • λ c average daily intensity flows of road vehicle. • λ t , average daily intensity flows of railway vehicle. • µ c average daily service intensity of road vehicles. • µ t , average daily service intensity of railway vehicles.
The key geometric parameters of the model for the service intensity calculation (Figure 3) are: • l c average length of road vehicles. • L c length of the critical distance for road vehicles, which is equal to the average frontal width of the train. • l t length of the critical distance, which is equal to the average train length. • L t length of the critical distance for railway vehicles, which is equal to the width of the level crossing.
The initial state of the Markov ergodic system is X0,0 without access to railway and road vehicles. The system has a defined priority of railway vehicles, which approach the road crossing with intensity λt, and are served with intensity μt.
When the level crossing is occupied by a railway vehicle, the system is in state X0,1. All road vehicles that approach the crossing with intensity λc, and due to the defined priority of railway traffic, fill the system states in the order X0+1,1, X0+2,1, … X0+k,1. Ideally, the number of places in a row is unlimited (∞).
After the passage of the railway vehicle over the zone of the level crossing, the service with the intensity μt has been performed. Regardless of the number of accumulated road vehicles, due to the memoryless property of exponential distribution, the system switches from state X0+k,1 to state Xk,0, and the service of road vehicles with intensity μc begins.
In case the road vehicle approaches the road crossing with intensity λc, and the state is not conditioned by the priority of railway vehicles, the system changes the condition from X0,0 to X1,0, while serving with intensity μc without the possibility of forming a queue.
The presented system is idealized from the side of safety. It prevents the simultaneous access of vehicles of the two systems to the road crossing, i.e., there is no condition X1,1, which is a collision of railway and road vehicles.

Queuing System for the Calculation of Maximal Risk
The issue of calculating the value of the maximal risk can be solved by applying a heterogeneous queuing system with the following parameters: • λc average daily intensity flows of road vehicle. • λt, average daily intensity flows of railway vehicle. • μc average daily service intensity of road vehicles. • μt, average daily service intensity of railway vehicles.
The key geometric parameters of the model for the service intensity calculation (Figure 3) are: • lc average length of road vehicles.

•
Lc length of the critical distance for road vehicles, which is equal to the average frontal width of the train. • lt length of the critical distance, which is equal to the average train length.

•
Lt length of the critical distance for railway vehicles, which is equal to the width of the level crossing.  The service intensity of road vehicles is calculated from quotient (3) where v c is the average speed of road vehicles over the critical distance l c + L c : The service intensity of trains is calculated from quotient (4) where v t is the average speed of railway vehicles over the critical distance l t + L t : In order to achieve maximum entropy, i.e., for the calculation of the maximal risk, an exponential distribution was adopted for the obtained parameters. The declared probabilities of the states are as follows (Figure 4): • X 0,0 road crossing is without vehicles.
In order to achieve maximum entropy, i.e., for the calculation of the maximal risk, an exponential distribution was adopted for the obtained parameters. The declared probabilities of the states are as follows (Figure 4): • X0,0 road crossing is without vehicles. • X1,0 level crossing is at a critical distance and serves only road vehicles. • X0,1 level crossing is at a critical distance and serves only railway vehicles. • X1,1 road crossing serves both road and rail vehicles at the same time. This condition has a dual accident status: A railway vehicle may run into a road vehicle, or a road vehicle may run into a railway vehicle. A graph of the heterogenous level crossing system's states of service for railway and road vehicles for the calculation of maximal risk is presented in Figure 5. All intensities are obligatorily exponential in order to achieve maximal entropy and to calculate the maximal risk. The flows of road and railway vehicles are Poisson's. Due to the well-known property of summing the intensity of Poisson flows, which was proved by Raikov's theorem [51], the distribution of two-way flows of road vehicles can In order to achieve maximum entropy, i.e., for the calculation of the maximal risk, an exponential distribution was adopted for the obtained parameters. The declared probabilities of the states are as follows (Figure 4): • X0,0 road crossing is without vehicles. • X1,0 level crossing is at a critical distance and serves only road vehicles. • X0,1 level crossing is at a critical distance and serves only railway vehicles. • X1,1 road crossing serves both road and rail vehicles at the same time. This condition has a dual accident status: A railway vehicle may run into a road vehicle, or a road vehicle may run into a railway vehicle. A graph of the heterogenous level crossing system's states of service for railway and road vehicles for the calculation of maximal risk is presented in Figure 5. All intensities are obligatorily exponential in order to achieve maximal entropy and to calculate the maximal risk. The flows of road and railway vehicles are Poisson's. Due to the well-known property of summing the intensity of Poisson flows, which was proved by Raikov's theorem [51], the distribution of two-way flows of road vehicles can All intensities are obligatorily exponential in order to achieve maximal entropy and to calculate the maximal risk. The flows of road and railway vehicles are Poisson's. Due to the well-known property of summing the intensity of Poisson flows, which was proved by Raikov's theorem [51], the distribution of two-way flows of road vehicles can be distributed without restriction on the width of the road L t , which also represents the length of critical distance for railway vehicles. The system is Markovian, and the probabilities are calculated directly in the stationary mode [52]. The probabilities of the states for the Markovian stationary system are calculated from the initial Equation (5): p 0,0 (t) = 0 = −λ c p 0,0 − λ t p 0,0 + µ c p 1,0 + µ t p 0,1 p 1,0 (t) = 0 = −µ c p 1,0 − λ t p 1,0 + λ c p 0,0 + µ t p 1,1 p 0,1 (t) = 0 = −µ t p 0,1 − λ c p 0,1 + µ c p 1,1 + λ t p 0,0 The norming condition of the system is (6): p 0,0 + p 1,0 + p 0,1 + p 1,1 = 1 (6) By grouping the values of intensities (5) with unknown probabilities of states, respectively, p 0,0 , p 1,0 , p 0,1 and p 1,1 give equation system (7): By elimination with the obligatory use of norming condition (6), the probabilities of the system's states are (8): The probability of the state of maximal risk is equal to the probability of simultaneous occupancy of the level crossing with both railway and road vehicles p 1,1 . Since all the parameters for calculating the state probability X 1,1 i.e., intensities in the numerator, are positive and greater than zero λ c > 0 ∧ λ t > 0, and the product in the denominator is always greater than zero (µ c + λ c )(µ t + λ t ) > 0, the maximal risk always converges! The number of realized accidents, for the purposes of comparison, can be reduced to units of road vehicles that are statistically recorded at the real level crossing n real in time interval T, which is the basis for calculating the accident intensity per vehicle, or the probability that any road vehicle will have an accident p real , which is equal to (9): where λ c is the previously explained unit intensity of road vehicles' access in a day, while T is the time period expressed in years for which the statistical records are analyzed. The real probability of an accident has a dual possibility of expression through the intensity of railway vehicles' access as well. However, due to the usually higher intensity of road vehicles at level crossings λ c >> λ t , in further research, we shall adopt the intensity of road traffic as a reference for the calculation. Equation (9) gives the probability that an arbitrary road vehicle will, in real conditions, participate in an accident. In theoretical conditions, the heterogeneous system in state X 00 with probability p 00 serves 0 road vehicles and in state X 01 (when the level crossing is occupied only by railway vehicle) with probability p 01 also serves 0 road vehicles. This means that the entire flow of road vehicles is serviced in states X 1,0 and X 1,1 with probabilities p 1,0 and p 1,1 , respectively. Therefore, it is necessary to divide the flow of road vehicles into the number of vehicles that were serviced at the level crossing, but did not participate in an accident, and the number of vehicles found in critical condition X 1,1 , which is the number of vehicles that participated in theoretical accidents. Based on the ergodicity of the system, the distribution is proportional (10). The obtained value has the dimension of accidents in one day (due to the fact that the flow intensity is declared per day).
The conditions when a level crossing system is introduced into chaos with the possibility of successive virtual accidents and where n theor in the time interval T (number of Entropy 2021, 23, 1230 10 of 18 years) are the foundation for calculating the intensity of theoretical, virtual accidents per vehicle, or the probability that arbitrary road vehicle will be involved in a virtual accident. According to the analogous pattern for p real (9), the theoretical maximal probability of an accident per vehicle p theor is obtained (11): The maximal theoretical risk is an important reference value from which the reliability of the operation of the level crossing is obtained, which takes into account all the previously mentioned parameters, and above all, the flow intensities of road and railway vehicles. In statistically recorded accidents, i.e., indirectly through p real , all other characteristics of the work of the level crossing are implicitly contained. The synthetic reliability of the road crossing is given by (12): The complementary value of reliability is the risk of the level crossing (13)

Model Testing on Selected Level Crossings
For the specific application of the model, two level crossings on the lines of "Serbian Railways Infrastructure" were selected. The frequencies of road and railway traffic, technical and geometric data, were obtained by measurements and counting on the spot. Part of the statistical data on the number of accidents at level crossings was used from the OC for SP Ruma, where one author was involved in the organization and supervision of traffic on the observed part of the railway. Part of the data was simultaneously used and analyzed from a project conducted through the study "Research of traffic safety in the areas of level crossings" by the Road Traffic Safety Agency of the Republic of Serbia during 2018, in cooperation with professors of the Department of Traffic from the Faculty of Technical Sciences in Novi Sad and a large number of experts in this field [53].
The first level crossing is "Budanovci", which is located on the local road L-1 (Ruma-Budjanovci-Nikinci-Platičevo), 3 + 285 km along the regional railway Ruma-Šabac-Rasputnica Donja Borina-state border-(Zvornik Novi). The level crossing is passive and is provided with traffic signs both on the road and the railway along with the zone of required visibility (visibility triangle). The satellite view with geographical coordinates of the road crossing is given in Figure 6. All stationary and dynamic parameters of the level crossing are shown in Table 1. The average length of road vehicles was obtained based on the structure of the flow (cars, trucks, buses, agricultural vehicles with machinery). The number of recorded accidents in the period between 2007 and 2017 at this road crossing is 6. All stationary and dynamic parameters of the level crossing are shown in Table 1. The average length of road vehicles was obtained based on the structure of the flow (cars, trucks, buses, agricultural vehicles with machinery). The number of recorded accidents in the period between 2007 and 2017 at this road crossing is 6. Table 1. Stationary and dynamic parameters of the "Budanovci" level crossing. Train service intensity µ t = (l t + L t )/v t 4,732.394

Stationary and Dynamic Parameters Value
Road service intensity µ c = (l c + L c )/v c 80,000.000 The probability of a real accident p real 0.000001851792 The probability of a theoretical accident p theor 0.004836612535 Synthetic level crossing reliability (R) 0.99961713041 The second level crossing is "Platičevo", which is located on the state road Novi Sad-Irig-Ruma-Šabac and 21 + 465 km along the regional railway Ruma-Šabac-Rasputnica Donja Borina-state border-(Zvornik Novi). The level crossing is active and is equipped with half-barriers as well as light and sound signals. This level crossing is managed from the station, exclusively by the train dispatcher when securing the route. The satellite view with geographical coordinates of the level crossing is given in Figure 7. All stationary and dynamic parameters of the level crossing are shown in Table 2. The average length of road vehicles was obtained based on the structure of the flow (cars, trucks, buses, agricultural vehicles with machinery). The number of recorded accidents in the period between 2007 and 2017 at this road crossing is 2.  All stationary and dynamic parameters of the level crossing are shown in Table 2. The average length of road vehicles was obtained based on the structure of the flow (cars, trucks, buses, agricultural vehicles with machinery). The number of recorded accidents in the period between 2007 and 2017 at this road crossing is 2. Table 2. Stationary and dynamic parameters of the "Platičevo" level crossing. For an easier review, data on ratio synthetics reliability (R) and quotients p real and p theor , as well as risks (r), for both observed level crossings are given in Table 3 and Figure 8, as well as Table 4 and Figure 9, respectively.        Based on the obtained synthetic parameters that take into account all the static and dynamic attributes of the observed level crossings, we come to an important objective answer that has been in the subjective zone so far: How much riskier is the "Buđanovci" level crossing than "Platičevo" level crossing? The ratio of their risks is (14):

Discussion
An ideal safety state, as we have shown in Figures 1 and 2 and in part of the work in point 3.2, the risk of an accident is r = 0 because there is no danger that there will be a collision of road and railway vehicles. The system represented as the ideal system has complementary occupancy states with unconditional priority for railway vehicles. Based on the obtained synthetic parameters that take into account all the static and dynamic attributes of the observed level crossings, we come to an important objective answer that has been in the subjective zone so far: How much riskier is the "Budanovci" level crossing than "Platičevo" level crossing? The ratio of their risks is (14):

Discussion
An ideal safety state, as we have shown in Figures 1 and 2 and in part of the work in point 3.2, the risk of an accident is r = 0 because there is no danger that there will be a collision of road and railway vehicles. The system represented as the ideal system has complementary occupancy states with unconditional priority for railway vehicles.
In reality, this ideal situation is disturbed by the risk of potentially dangerous accidental occurrences. In this paper, a theoretical model is set up, where, with the mathematical apparatus presented above, we come to the calculation number of virtual, theoretical accidents, the calculation of the risk of accidents and complementary reliability for the observed level crossings.
As the first comparative result, the obtained value of 28,6351 times higher safety at the "Platičevo level crossing" than the safety at the "Budanovci" level crossing is somewhat expected. Here we should keep in mind the different levels of security and different stationary and dynamic parameters and the much higher flow of road vehicles at the "Platičevo" level crossing.
Based on expression (10) at the level crossing in Budjanovci, the daily number of road vehicles that do not participate in an accident is 8,030,969, and the number of vehicles that participate in an accident is 3,903,146, while in Platičevo, based on expression (10), the flow of road vehicles that do not participate in an accident is 7,590,744, and the number of vehicles that participate in an accident is 3,725,564.
The "Platičevo" level crossing is an active level crossing and it has a higher level of security in relation to the level crossing "Budanovci" and a smaller number of real accidents realized in the observed period. Regardless of the far higher flow of road vehicles at the "Platičevo" level crossing, according to the probability of a real accident p real , every 15,313,210th (1/p real ) vehicle will participate in an accident, while at the "Budanovci" crossing, every 540,017.5th (1/p real ) vehicle will participate in an accident, which contributes to the obtained test results of the model.
The "Platičevo" level crossing is an active level crossing, where the users of the crossing are protected or are warned of an approaching train by activation of the device, in the case where it is not safe for the user to cross the crossing. In this case, control is manual, and the level crossing device is activated by an authorized person of the railway infrastructure, when they receive information through the means of communication that ensures safety, as part of the safe traffic organization. At the "Platičevo" level crossing, there is a lowering barrier when the train approaches the level crossing in order to prevent the crossing of road vehicles or pedestrians, which significantly affects the level of safety and security of this crossing. The model is presented in a valid way through the calculation of synthetic reliability and comparison of the maximal risk for both crossings, which explicitly stated which crossing is safer and how many times.
As a result of this work, a proposal can be made to raise the level of security, in terms of raising the level of security at the "Budanovci" level crossing. Until the moment of the essential technical-technological solution, it is possible, in order to preserve and raise the level of traffic safety at the "Budanovci" level crossing, to take some less demanding and cheaper measures such as:

•
The installation of vibrating lanes in order to "calm down" road traffic when approaching the area of the road-rail crossing. • Improving the visibility at the level crossing (all visibility triangles must be absolutely provided).

•
Paving the surface of the road-rail crossing (level crossing) with different strong colors, lighting the crossing with reflectors and installing additional light signals and lanterns that will warn road users that they are about to encounter the level crossing, etc.
The above measures are proposed as a temporary solution until such time as the Public Management for Road Infrastructure and Public Management for Railway Infrastructure reach a decision on the provision of financial resources for automated level crossings (which is risky) on the basis of the above analysis, statistical data on the number of accidents, lightly and seriously injured persons at the specified level crossing for the period from 1996 to 2020 (Table 5) as well as the on-site inspection of the situation at the level crossing ( Figures 10 and 11).  Table 5. Review of the number of accidents, injuries and deaths on the "Budjanovci" level crossing from 1996 to 2020.

Conclusions
The proposed model and the preliminary results do not carry the pretense imperative of the final form of the model. The application of maximal probabilistic entropy has been premiered and successfully performed in order to quantify the maximal risk that has been proven convergent. With the ideal value of the minimal risk, which is always the ideal of absolute safety, the necessary engineering interval is declared: From zero risk to maximum risk. It is omnipotent and can be applied to homogeneous road traffic systems at intersections, or in other traffic systems, and to conflicted flows in general. The comparison of risks at level crossings is based on a statistic parameter: The number of accidents. The installation of new, or the reconstruction of existing, level crossings significantly reduce this value. For known geometric characteristics and flow intensities, the proposed model provides the possibility of a preliminary calculation of the maximal risk as the starting reference value of subsequent safety elaborations. In ad- Figure 11. Road geometry for the passive "Budjanovci" level crossing, with horizontal and vertical curves and poor visibility. Table 5. Review of the number of accidents, injuries and deaths on the "Budjanovci" level crossing from 1996 to 2020.

Number of Accidents, Injuries and Deaths Value
Number of accidents in the period from 23 years (1996-2020) 12 Number of persons who were deaths at the level crossing (1996-2020) 2 Number of persons who were seriously injured at the level crossing (1996-2020) 4 Number of persons who were lightly injured at the level crossing (1996-2020) 1

Conclusions
The proposed model and the preliminary results do not carry the pretense imperative of the final form of the model. The application of maximal probabilistic entropy has been premiered and successfully performed in order to quantify the maximal risk that has been proven convergent. With the ideal value of the minimal risk, which is always the ideal of absolute safety, the necessary engineering interval is declared: From zero risk to maximum risk. It is omnipotent and can be applied to homogeneous road traffic systems at intersections, or in other traffic systems, and to conflicted flows in general. The comparison of risks at level crossings is based on a statistic parameter: The number of accidents. The installation of new, or the reconstruction of existing, level crossings significantly reduce this value. For known geometric characteristics and flow intensities, the proposed model provides the possibility of a preliminary calculation of the maximal risk as the starting reference value of subsequent safety elaborations. In addition, the model can easily compare level crossings of different safety levels or level crossings of the same level of safety installed by different manufacturers.
The advantage of this model for infrastructure managers and road managers lies in the fact that by using the methodology of performing reliability analyses and risk comparisons at all observed level crossings, it is possible to solve the problem of determining priorities when choosing level crossings where it is necessary to raise safety. This represents a great contribution, keeping in mind the limited financial resources and the unlimited desire to raise the level of traffic safety.
The proposed model explicitly included only the basic parameters. Implicitly, there are a large number of probabilistic parameters at road crossings: Average sensory and motor abilities of drivers, driving culture and habits, reliability of signaling and safety devices, road quality at level crossings, visibility (meteorological), time of day, air temperature and humidity, devices acoustic audibility, the severity of accidents (number of injured or killed), etc. All these parameters are implicitly covered through only one statistic parameter: The number of accidents. In future work and research, these parameters can be introduced into the model by special analytical functions, with one obligatory principle: Regardless of their deterministic or probabilistic structure, the maximal probabilistic entropy must be preserved by applying an exponential distribution.