Solving logistic tasks by parallelizing algorithms of the theory of direct decompositions of torsion-free abelian groups

. The paper considers the principles of parallelization at marshalling yards and determines their importance. There are presented the methods for direct decompositions of torsion-free Abelian groups of finite rank. There are applied the concepts of “conditionally linear graphs” depicting railway trains and their characteristics, including “quasi-length”, which characterizes the length of the corresponding “quasi-graph”. There has been formalized a graphical approach to the redistribution of railcars of incoming trains at a marshalling yard for the formation of outgoing trains. The corresponding algorithms have


Introduction
The importance of transport logistics and its impact on simple things has recently been felt by everyone. An unprecedented increase in inflation around the world, rising prices and shortage of a number of goods affect us. The coronavirus pandemic, which has led to lockdowns and bans on travelling freely around the world, has distanced not only people and countries but also entire sectors of the economy. The chain between suppliers of raw materials, producers and consumers has become damaged or broken. The problem has been exacerbated by the US-China trade war. The whole world seemed to be watching the ordinary accident that happened to the container ship "Ever Given" in the Suez Canal.
The railway of the largest country in the world, connecting Asia and Europe, has not stayed away from the problem of transport logistics. In January-September 2021, container transportations carried out on the "China -Europe -China" connection through the infrastructure of JSC "Russian Railways" increased by 47% compared to the same period last year, i.e. to 568.7 thousand TEU (rzd.ru). The increased demand for container freight transportation has increased the load on railway stations. Marshalling yards are the most important node in the logistics chain.  A marshalling yard is a technical railway station designed for disbanding and forming various categories of rolling stock in accordance with the plan for assembling trains from individual railcars; for passing transit trains without their processing, maintenance and commercial inspection, and for eliminating identified malfunctions of railcars as well as changing locomotives and locomotive crews.  The main function of a marshalling yard is to process railcar flows and assemble trains, while the presence of a railcar at the station should be minimal in time. This is due to the limited capacity of the station itself and the need for minimizing the delay of the railcar at the station.
The following operations are performed at a marshalling yard: reception of trains, preparation of trains for disbandment, disbandment of trains, accumulation of railcars for new trains, formation of trains, preparation for departure, departure of trains. To reduce downtime, all non-sequential operations are performed in parallel; for this purpose additional tracks are allocated at marshalling yards: tracks for bypassing passenger and transit trains, tracks for locomotive depots, tracks for railcar maintenance, and tracks for other operations. A marshalling yard is often divided into even and odd systems to separate oncoming train flows. All operations performed at the yard and the norms for their duration are listed in the technological process standards.
Information about the approach of trains to the station is transmitted in advance from the transportation control center. On the basis of data on the yard location, received telegrams-full-scale sheets and data on the estimated time of arrival, the yard dispatcher plans train formation and the order of reception and disbandment of trains. The marked-up full-scale sheet is transmitted to the yard attendant, as well as to the operator of the technical inspection point (TIP) of the reception park. According to the results of checking the train at the decommissioning post, as well as according to the results of technical and commercial inspection of the train in the reception park, information about the composition of the train can be adjusted.
Disbandment and formation of trains on the railway hump is as follows. After the train arriving at the disbandment has been processed in the reception park, the hump locomotive drives into the tail of the train, pushes the train up to the crest of the hump and disbands it.
In order to eliminate the "gaps" formed in the process of disbandment between groups of railcars on the sorting tracks, the hump locomotive, after the disbandment of every 3-4 trains, drives into the sorting park and makes a landing. Instead of settling the railcars with hump locomotives, it is possible to eliminate the "gaps" by pulling the wagons from the side of the exhaust track with shunting locomotives.
The technological basis for the work of a sorting hump is the combination of disbandment with the formation of trains.
Thus, the elements of the hump cycle with the parallel arrangement of the reception and sorting parks are: arrival, pulling, pushing, disbandment and settling.
When considering the transport system of a marshalling yard in the form of a dynamic oriented graph, the vertices of which are transport nodes connected by paths represented by arcs of the graph, it allows one to formulate logistical problems in the language of graphs and algorithms.
At the same time, the principle of parallelization is fundamental, as it makes it possible to eliminate the risks of collisions, as well as to increase the throughput of the entire transport system.
The theoretical foundations of this approach should be sought in methods of mathematical parallelization of dynamic processes, including new methods of parallelization of algebraic structures.
One of the approaches to solving logistical problems related to the organization of a marshalling yard is the development of dynamic algorithms of a special type.
In fact, these are parallelization algorithms, since the distribution of rolling stock along different paths has a parallel structure. These algorithms are borrowed from the theory of direct decompositions of torsion-free Abelian groups, since it also contains parallel structures that arise when implementing these algebraic objects in the form of graphs of a tiered-parallel form [1].
Examples of non-isomorphic direct decompositions of torsion-free Abelian groups appeared in the middle of the last century, and the disclosure of their nature long remained one of the main problems of the theory of abelian groups. Its various aspects were formulated as problems 67 and 68 in the famous Fuchs' book [2], were completely solved with a specially invented combinatorial method described in the article [3] and reflected in Mader's book [4] (chapter 13). As a result, there was revealed the graphical structure of the so-called "almost completely decomposable" groups X containing a completely decomposable torsion-free Abelian group A, called a regulator, as a subgroup of a finite index.
Various decompositions of X =X1+X2 + ... + X3 of these groups, belonging to the class of torsion-free Abelian groups of finite rank under consideration, are interpreted as transformations of some graph whose number of vertices is equal to the rank of the group n (that is, the minimum possible dimension of the vector space containing it over the field of real numbers), and the connectivity components symbolize indecomposable direct terms. Permissible transformations of the graph consist in the movement of edges according to certain rules, which leads to different distributions of the set of vertices between the connectivity components and, therefore, to different decompositions of the rank of the group n=r1+r2+...+rs into the sum of ranks of indecomposable terms. This visualization, in particular, leads to results describing, up to almost isomorphism, all decompositions of almost completely decomposable groups of some special kind, with a cyclic regulatory factor X/A, forming a class of CRQ groups.
The proposed graphical (combinatorial) method for studying the properties of direct decompositions made it possible to describe direct decompositions of almost completely decomposable groups with a cyclic regulatory factor in the language of graphs obtained with some permissible transformations of the original, "main" graph correlated with the socalled "main" decomposition of the group. These allowed transformations of the graph, associated with the transition to a new system of generating elements of regulator A, lead to other sets of connectivity components.
This algorithmic approach is based on the correspondence between the indecomposable direct terms of the group and the connectivity components of the graph that corresponds to this direct decomposition, and the number of vertices of each component coincides with the rank of the indecomposable term, and the number of vertices of the graph as a whole corresponds to the rank of the group itself. What is fundamentally important for solving applied problems is that the graphs that appeared in the theory of direct decompositions can be reduced to graphs of a tiered-parallel form: the vertices that make up a single tier symbolize one of the homogeneous components of regulator A of group X, and the arcs connect the vertices from different tiers and reflect the structure of the factor group according to regulator X/A. Permissible transformations of graphs are all possible transfers of arcs without changing the tiers of their vertices.
This method actually allows one to reformulate the theorems of the theory of direct decompositions of torsion-free Abelian groups in the language of graphs, which, with the orientation that naturally arises in them, can be considered as graphs of parallel algorithms.
The application of this algorithmic approach to logistics tasks introduces a natural orientation into the graphs, reflecting the direction of movement. At the same time, in contrast to the original algebraic problem of determining the number of vertices of connectivity components as ranks of indecomposable groups, we are going to focus on counting the number of arcs interpreting railroad cars.
Thus, considering graph G as a collection of arcs and vertices, we will limit the scope of study with the graphs whose connectivity components are "conditionally linear graphs" depicting railway trains in such a way that the arcs correspond to wagons, and the vertices correspond to junctions between wagons. At the same time, the presence of multiple arcs is allowed, which symbolize the same (indistinguishable, interchangeable) wagons both in terms of parameters and by type of freight. Then the length of composition Y will be equal to the number of arcs in the corresponding graph Y'.
When the vertices are denoted by numbers (0, ..., n), the arcs will be denoted by ordered pairs of numbers (i, i+1) for i = 0, ..., n-1. In particular, a pair of numbers (0, 1) denotes the last identical railcars, and (n-1, n) ---the first cars indistinguishable from each other. There will be n cars of various types in total. The locomotive is then denoted by a pair (n, n+1), in case of its presence.
We will need another characteristic of the train -its "quasi-length", which is the number of different cars n. The quasi-length of the train is defined as the number of arcs of its "quasi-graph" Y'', which differs from graph Y' in that instead of each set of multiple arcs (i, i+1), only one of them is taken into consideration. The quasi-graph of the railway stock is no longer conditionally linear, but a linear graph in the generally accepted sense, since it does not contain any multiple arcs.
Thus, the quasi-length and length of the train are the same if all its cars are different. In another case, if a train has only one type of cars, its quasi-length always equals 1. The quasi-length of the train never exceeds its length.

Formalization of the graphical approach.
Let V be a non-empty set, then V2 is the set of all its two-element subsets. A pair (V,E), where E is an arbitrary subset of the set V2, is called a graph. The elements of set V are called the vertices of the graph, and the elements of set E are its edges. A pair (V, A) is called a directed graph, where V is a set of vertices, A is a set of oriented edges, which are called arcs . If a=(v1, v2) is an arc, then vertices v1, v2 are called its beginning and end, respectively. Arcs are denoted by arrows indicating the direction from the beginning to the end.
We also introduce the notion of a strictly linear graph. Let it be an oriented connected graph with n vertices that are renumbered from 0 to n, and arcs in the number (n-1) connect vertices i and i+1, where i = 0,1, ... n-1.
We will call an almost linear graph a graph that is obtained from a strictly linear graph by removing a certain number of arcs.
We will need the following Definition. A spiral graph modulo r is called a graph that is obtained from a linear graph by removing a certain number of arcs (i, i+1) for i > r-1, and with factorization modulo r, all arcs (0, 1) are removed (it is assumed that r <n).
Obviously, a spiral graph modulo r is a special case of an almost linear graph.
The paper proposes an algorithm for converting an almost linear graph to the form of a spiral graph modulo r, where r is the maximum allowable length of a train of a single marshalling yard fleet, which, with some assumptions, we consider as a rectangle of length r and width m, where m is the maximum number of simultaneously standing trains.
Here is an example of a spiral graph modulo 6: The idea of considering graphs of a special kind defined above came from the theory of direct decompositions of torsion-free Abelian groups of finite rank, namely, the so-called almost completely decomposable groups with a cyclic regulatory factor. Therefore, the next section is devoted to the theorem on direct decompositions of groups from this class, in the algorithmic proof of which a graphical representation has been used.

Torsion-free Abelian groups, graphs and algorithms
Decomposition of additive structures into a direct sum of indecomposable objects is a traditional tool of algebraic research. The ambiguity of direct decompositions of torsionfree Abelian groups, defined as additive subgroups of elements of a linear space over a field of rational numbers Q, makes the objective of describing various direct decompositions of the same group relevant. The simplicity of defining these groups is due to their natural connection with applied research, and the complexity of the structure creates obstacles in related calculations. This circumstance accounts for the urgent objective of constructing a group with predefined parameters of two or more of its various direct decompositions. We consider a class of torsion-free groups of finite rank of a special kind, namely, a class of block-rigid almost completely decomposable groups with a cyclic regulatory factor. This means that group X contains a completely decomposable completely characteristic subgroup A with pairwise incomparable or coincident types of direct summands of rank 1 isomorphic to the sub-rings of ring Q, the so-called "regulator", by which the quotient group X/A is a finite cyclic group. Theorem 1. Let a given natural number n (n≥3) and its two representations as a sum of natural terms be represented as follows: with ri ≤ nt + 1 for any i=1, …, s and lj ≤ ns + 1 for any j = 1, … , t.
Then there is a group of rank n that can be decomposed both into a direct sum of indecomposable summands of ranks r1, ..., rs, and into a direct sum of indecomposable summands of ranks l1, ..., lt.

A graphical method for constructing direct decompositions of almost completely decomposable groups
As an appendix in [6], an algorithm is proposed for constructing group X from this class, which has numerous (and not just two) direct decompositions with given sets of ranks of indecomposable terms, which leads to the following statement.
Theorem 2. Let n > r ≥ 3 be natural numbers. There exists an almost completely decomposable group X of rank n with a cyclic regulatory factor, which can be decomposed into a direct sum of indecomposable groups of ranks r1,r2, ... , rs, satisfying any predefined different partitions n=r1+r2 + ... + rs, r1 ≥r2 ≥ ... ≥rs, provided that the largest terms r1 in the corresponding partitions of number n coincide and are equal to r.
Remark. Obviously, for any two such partitions, the above inequalities of Theorem 1 are fulfilled automatically, with number s of natural terms in different partitions of the number of vertices n that coincides with the rank of the group attaining any value. Note that this algorithm for the sequential construction of indecomposable direct terms of a group as a component of connectivity is implemented in the form of a graph that closely resembles an almost linear graph, but differs from it by the presence of multiple arcs. When factorizing the vertex numbers modulo r, the graphs of various decompositions must coincide; this is easily achieved by adding multiple edges to the connectivity component symbolizing the summand of the highest rank r.

The essence of the algorithm for parallelizing trains in marshalling yard fleet
In parallelization problems, an almost linear graph is taken as a basis. Further, the set of numbers of its vertices is factorized modulo r, where r is the maximum allowable length of the train at the station. If the resulting graph turns out to be spiral modulo r, the problem of parallelization of chains is solved automatically. Otherwise, we consider vertices whose numbers are comparable modulo r as lying on the same radii of some concentric circles, the further from the center the greater the ordinal number. With the help of suitable rotations of the circles relative to each other, we achieve the absence of arcs (breaks of circles) in the same place (between vertices 0 and 1).
The figure shows the graph of the algorithm, a spiral graph modulo 19, obtained with the number of paths 4 and compositions of the following length: 19, 15, 15, 15, 3, 2, 2, 2, 1, 1. We adapt this statement in order to determine the location of trains at a marshalling yard to reduce the length of unused tracks and increase the capacity of the yard. If, in the division of number n of Theorem 2, we go to number (n-r), we get an algorithm that is applicable to the organization of the arrangement of trains in a symbolic rectangle r by m even in the absence of a train of the greatest possible length. In the example considered, we get a plan for the most uniform distribution of trains in a rectangle 19 by 3, where the longest train consists of 15 cars.
This parallelization algorithm allows one to distribute the coming trains with the highest utilization factor of the yard's capabilities before redistributing the railcars. Only quantitative characteristics are taken into account here, that is, the length of each train in the usual sense. Qualitative characteristics should be taken into account at the next step when forming new trains with predefined types of freight in a certain amount. At this stage, a technique also borrowed from the theory of torsion-free Abelian groups is applied. We use their graphical interpretation to construct all possible direct decompositions, which are obtained by redistributing arcs symbolizing paddocks, with multiples arcs corresponding to railcars that are the same in qualitative terms. Therefore, there is evaluated both the length of the formed composition and its quasi-length.

Conclusion
Parallelization methods are particularly effective in organizing and structuring the work of transport hubs, including marshalling yards on railway transport. At the same time, it is necessary to form and arrange trains in accordance with their quasi-length, calculated with the corresponding quasi-graph.