Simulation test method, device and equipment of urban rail system and storage medium

By establishing a JSON configuration file and using Unity3D, an OPC-UA server, and a multi-objective global optimization algorithm, efficient simulation of multi-train operating environments was achieved, solving the multi-train simulation problem in existing technologies and improving the testing efficiency and scientific rigor of urban rail transit signaling systems.

CN120722877BActive Publication Date: 2025-11-18CHINA MASCH HUANYU CERTIFICATION & INSPECTION CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511135516.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-11-18
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

Existing simulation software is difficult to effectively simulate the operation environment of multiple trains, and manual intervention is prone to errors or omissions, resulting in low efficiency in the simulation and testing of urban rail transit signaling systems.

Method used

By acquiring the track topology and train dynamics parameters of rail transit, a JSON configuration file is created, a scaled digital model is constructed using the Unity3D engine, and the data format is converted through an OPC-UA server. Combining multi-objective global optimization algorithms and machine learning algorithms, the 3D dynamic model is updated in real time, and the Pareto optimal solution is automatically output, reducing manual intervention.

Benefits of technology

It achieves efficient simulation of multi-train operating environments, improves testing efficiency and decision-making scientificity, reduces interface adaptation workload, breaks through the visual limitations of traditional simulation, and avoids the randomness defects of human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120722877B_ABST
    Figure CN120722877B_ABST
Patent Text Reader

Abstract

The application discloses a simulation test method, device and equipment of a city rail system and a storage medium, relates to the field of electric digital data processing, and integrates track topology and dynamic parameters by using a JSON configuration file, converts operation data through an OPC-UA server, realizes heterogeneous system data intercommunication through a preset JSON format, and improves compatibility; a Unity3D engine is used to build a digital model with the same proportion, real-time mapping of train position and operation data is realized, the visual limitation of traditional two-dimensional simulation is broken, and system response to complex scenes such as high-density traffic and sudden faults can be observed; a multi-objective function is defined based on an operation strategy, a comprehensive optimal scheme is automatically output through a Pareto optimal solution set, the randomness defect of traditional methods depending on artificial repeated testing is avoided, and the test efficiency and decision scientificity are improved. Multi-train simulation is realized, and potential problems such as interface fragmentation, insufficient scene visualization and inefficient random testing are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electric digital data processing, and in particular to a simulation test method, device and equipment for a city rail system and a storage medium. BACKGROUND

[0002] The city rail transit signal system is a key system for ensuring train operation safety, realizing train operation command and modernization, and improving transportation efficiency. It mainly consists of two parts: the automatic train control system (ATC) and the depot signal control system, which realize train operation command, train operation monitoring and management, etc.

[0003] The new construction and maintenance of the city rail transit and the signal system need to rely on a simulation platform to verify the rationality and safety of the rail system and the signal system.

[0004] At present, the simulation of the city rail transit and the signal system is generally carried out by discrete event simulation, system dynamics modeling and agent-based modeling, and high-density crowd scenes and entity flow paths are simulated based on built-in industry libraries (such as process modeling library and pedestrian library). It can be seen that it is a complex environment simulation for a single train, and manual intervention is needed for parameter setting or decision-making during the simulation process. However, for a multi-train operation environment, the existing simulation software is difficult to meet the requirements, and manual intervention will also increase with the increase of trains, which may lead to errors or omissions in manual intervention. SUMMARY

[0005] The main purpose of the present application is to provide a simulation test method, device and equipment for a city rail system and a storage medium, so as to solve the problem that the existing simulation software only simulates a single train in a complex environment, and the existing simulation software is difficult to meet the requirements for a multi-train operation environment, and manual intervention will also increase with the increase of trains, which may lead to errors or omissions in manual intervention.

[0006] To achieve the above purpose, the present application provides the following technical solutions:

[0007] A simulation test method for a city rail system, which is applied to a rail transit in a preset operation city, the simulation test method comprising:

[0008] Step S1: obtaining the track topology of the rail transit and the dynamics parameters of all trains located in the track topology, and establishing a JSON configuration file based on the track topology and the dynamics parameters;

[0009] Step S2: reading the JSON configuration file through a Unity3D engine to construct a scaled digital model, and converting the dynamics parameters of each train into JSON format running data recognizable by a preset simulation software through an OPC-UA server.

[0010] Step S3, inputting real-time position three-dimensional coordinates of all trains and JSON format running data of all trains in the equal proportion digital model at a preset sampling frequency to form a three-dimensional dynamic model;

[0011] Step S4, defining at least two objective functions based on the operation strategy of the rail transit, and reading and iterating the JSON format running data of all trains in the three-dimensional dynamic model through a multi-objective global optimization algorithm to obtain a Pareto optimal solution set based on all objective functions;

[0012] Step S5, synchronizing the JSON format running data optimal solution of all trains in the Pareto optimal solution set to each train respectively to obtain an optimized three-dimensional dynamic model;

[0013] Step S6, repeating steps S1 to S5 based on the preset sampling frequency to update the optimized three-dimensional dynamic model in real time, and sending the optimized three-dimensional dynamic model to an external monitoring end once based on one update.

[0014] As a further improvement of the present application, step S6, repeating steps S1 to S5 based on the preset sampling frequency to update the optimized three-dimensional dynamic model in real time, and sending the optimized three-dimensional dynamic model to an external monitoring end once based on one update, and then comprising:

[0015] Step S10, data cleaning and standard normalization of the JSON format running data optimal solution of each train respectively to obtain processed running data;

[0016] Step S20, adjusting all train processed running data to mutually equal length sequence samples along the time sequence of the preset sampling frequency through a sliding window algorithm;

[0017] Step S30, defining the learning goal of the machine learning algorithm as the minimum value of the mean absolute error of the predicted value and the true value of the same time node sequence sample, and the prediction step length being consistent with the step length of the preset sampling frequency;

[0018] Step S40, training and learning all sequence samples through the machine learning algorithm, and obtaining the predicted value based on several prediction steps after reaching the learning goal;

[0019] Step S50, obtaining the residual value of the predicted value and the true value of the same time node;

[0020] Step S60, drawing a residual distribution scatter plot with the predicted value as the horizontal axis and the residual value as the vertical axis;

[0021] Step S70: Obtain outliers in the residual distribution scatter plot and mark them as outliers;

[0022] Step S80: Define each outlier as an unexpected event and obtain the train number and event timestamp corresponding to each unexpected event.

[0023] Step S90: Send the train number and event timestamp of all unexpected events to the external monitoring terminal.

[0024] As a further improvement to this application, step S90 involves sending the train numbers and event timestamps of all unexpected events to an external monitoring terminal, followed by:

[0025] Step S100: Output the residual distribution scatter plot at the same time point and the optimized 3D dynamic model side by side to the external visualization terminal.

[0026] Step S200: Mark the train numbers corresponding to the unexpected events at the current time node in standard red.

[0027] Step S300: Based on the track topology, determine whether the two standard red markers that are closest to each other at the same time point are located on the same route. If so, proceed to step S400.

[0028] Step S400: Determine that the routes marked with two standard red markers are high-risk routes;

[0029] Step S500: Stop all trains on the high-risk route and generate a warning signal;

[0030] Step S600: Highlight the warning signal on the visualization terminal and send the warning signal to the external monitoring terminal.

[0031] As a further improvement to this application, step S600 involves highlighting the warning signal on the visualization terminal and sending the warning signal to an external monitoring terminal, followed by:

[0032] Step S1000: In response to the processing completion signal of the unexpected event, the standard red mark corresponding to the processing completion signal is faded at a uniform rate until it becomes completely transparent within a preset time.

[0033] Step S2000: Delete the completely transparent standard red marker and generate an event record based on the processing completion timestamp of the processing completion signal;

[0034] Step S3000: Upload all event records to an external cloud.

[0035] As a further improvement to this application, step S1 involves obtaining the track topology of the rail transit system and the dynamic parameters of all trains located within the track topology, and establishing a JSON configuration file based on the track topology and the dynamic parameters, including:

[0036] Step S11: Obtain a digital model of the rail transit system based on the design drawings of the rail transit system;

[0037] Step S12: Extract the three-dimensional coordinates, slope, curve radius, and track nodes based on the digital model and make logical connections to obtain the track topology;

[0038] Step S13: Obtain the maximum traction force, maximum braking force, and real-time traction force and mass velocity curves of each train based on the preset sampling frequency, and convert them into dynamic parameters in the unified unit of measurement for the current train through the UIC standard.

[0039] Step S14: Define a three-layer JSON template containing top-level metadata, a middle-level topology network, and a bottom-level train parameter library;

[0040] Step S15: Use a script to capture the digital model and store it in the top-level metadata, capture the track topology and store it in the middle-level topology network, and capture all dynamic parameters and store them in the bottom-level train parameter library;

[0041] Step S16: Define the three-layer JSON template after storage as the JSON configuration file.

[0042] As a further improvement to this application, step S2 involves reading the JSON configuration file using the Unity3D engine to construct a scaled digital model, and converting the dynamic parameters of each train into JSON format runtime data recognizable by the preset simulation software via an OPC-UA server, including:

[0043] Step S21: Create an empty scene in Unity3D and receive the JSON configuration file;

[0044] Step S22: Retrieve the digital model from the top-level metadata to establish an initial 3D model;

[0045] Step S23: Correct the coordinate system of the initial three-dimensional model based on the world coordinate system, and obtain the three-dimensional orbit model by the same scale as the world coordinate system;

[0046] Step S24: Retrieve the orbital topology of the intermediate topology network and match and verify it with the three-dimensional orbital model;

[0047] Step S25: After verifying that there are no errors, retrieve all train dynamic parameters from the underlying train parameter library and generate an interactive train model in the three-dimensional track model;

[0048] Step S26: Create a data subscription channel for each train interactive model based on the OPC-UA server;

[0049] Step S27: Based on the preset sampling frequency, retrieve all train dynamic parameters from the underlying train parameter library and update the real-time operating status of each train interactive model through each subscription channel.

[0050] As a further improvement to this application, step S4 involves defining at least two objective functions based on the rail transit operation strategy, and using a multi-objective global optimization algorithm to read and iterate the JSON-formatted operating data of all trains in the three-dimensional dynamic model to obtain a Pareto optimal solution set based on all objective functions, including:

[0051] Step S41: Define at least two mutually exclusive objective functions based on the operation strategy. The input variables for all objective functions are the JSON format operation data of all trains.

[0052] Step S42: Based on the multi-objective global optimization algorithm, define the JSON format running data of each train as an initial population. The data dimension of the current train's initial population is the same as the data dimension of the current train's JSON format running data.

[0053] Step S43: Define that each initial population has several random solutions. The position vector of the current train's random solution corresponds to the real-time three-dimensional coordinates of the current train's position, and the velocity vector of the current train's random solution corresponds to the JSON format running data of the current train.

[0054] Step S44: Define the track topology as the feasible region of all random solutions and the maximum speed of all trains as the exploration boundary. Assign a random speed to each random solution within the ATP protection curve range of the current train.

[0055] Step S45: Iteratively update the previous position and current velocity of all random solutions several times based on the preset sampling frequency, and calculate the function value of each random solution based on each objective function in each iteration update;

[0056] Step S46: Filter the Pareto front solutions updated in all rounds of iterations using non-dominated sorting and store them in an external archive.

[0057] Step S47: When the number of iterations reaches the preset maximum number, or when the rate of change of the hypervolume index of the Pareto solution set in the external archive is lower than the rate of change threshold, the final archive of the external archive is output and defined as the Pareto optimal solution set.

[0058] To achieve the above objectives, this application also provides the following technical solutions:

[0059] A simulation testing device for an urban rail transit system, the simulation testing device being applied to the simulation testing method for the urban rail transit system as described above, the simulation testing device comprising:

[0060] The track system configuration file construction module is used to obtain the track topology of the rail transit and the dynamic parameters of all trains located within the track topology, and to establish a JSON configuration file based on the track topology and the dynamic parameters;

[0061] The digital model and runtime data preparation module is used to read the JSON configuration file through the Unity3D engine to build a scaled digital model, and to convert the dynamic parameters of each train into JSON format runtime data that can be recognized by the preset simulation software through the OPC-UA server.

[0062] The three-dimensional dynamic model generation module is used to input the real-time three-dimensional coordinates of all trains and the JSON format running data of all trains into the proportional digital model at a preset sampling frequency to form a three-dimensional dynamic model.

[0063] The three-dimensional dynamic model iteration module is used to define at least two objective functions based on the operation strategy of the rail transit, and to read and iterate the JSON format operation data of all trains in the three-dimensional dynamic model through a multi-objective global optimization algorithm to obtain a Pareto optimal solution set based on all objective functions.

[0064] The train optimal running status update module synchronizes the optimal running data of all trains in the Pareto optimal solution set in JSON format to each train to obtain the optimized three-dimensional dynamic model;

[0065] The three-dimensional dynamic model real-time update module repeatedly executes the orbital system configuration file construction module to the three-dimensional dynamic model update module based on the preset sampling frequency, so as to update the optimized three-dimensional dynamic model in real time, and sends the optimized three-dimensional dynamic model to the external monitoring terminal once for each update.

[0066] To achieve the above objectives, this application also provides the following technical solutions:

[0067] An electronic device includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the simulation test method described above.

[0068] To achieve the above objectives, this application also provides the following technical solutions:

[0069] A storage medium storing program instructions, which, when executed by a processor, implement the simulation testing method described above.

[0070] Beneficial effects:

[0071] This application obtains the track topology of the rail transit system and the dynamic parameters of all trains within the track topology, and establishes a JSON configuration file based on the track topology and dynamic parameters. It then uses the Unity3D engine to read the JSON configuration file to construct a scaled digital model, and uses an OPC-UA server to convert the dynamic parameters of each train into JSON format operational data recognizable by a preset simulation software. In the scaled digital model, the real-time three-dimensional coordinates of all trains and the JSON format operational data of all trains are input at a preset sampling frequency to form a three-dimensional dynamic model. Based on the rail transit operation strategy, at least two objective functions are defined, and a multi-objective global optimization algorithm is used to read and iterate the JSON format operational data of all trains in the three-dimensional dynamic model to obtain a Pareto optimal solution set based on all objective functions. The optimal solutions of the JSON format operational data of all trains in the Pareto optimal solution set are synchronized to each train to obtain an optimized three-dimensional dynamic model. Based on a preset sampling frequency, the optimized three-dimensional dynamic model is updated in real time through the above five steps, and an optimized three-dimensional dynamic model is sent to an external monitoring terminal with each update. This application integrates track topology and dynamic parameters using a JSON configuration file and converts operational data via an OPC-UA server. This significantly reduces the workload of interface adaptation for signaling equipment from different manufacturers (such as onboard systems and interlocking equipment). The pre-defined JSON format enables data interoperability between heterogeneous systems, improving compatibility and avoiding the need for customized interface platforms for each manufacturer, as required by traditional simulations. Furthermore, this application utilizes the Unity3D engine to construct a scaled digital model, mapping train position and operational data in real time. This overcomes the visual limitations of traditional two-dimensional simulations, facilitating the observation of system responses in complex scenarios such as high-density traffic flow and sudden malfunctions. Based on operational strategies, this application defines multiple objective functions (such as minimizing energy consumption and maximizing traffic efficiency), automatically outputting the comprehensive optimal solution through the Pareto optimal solution set. This avoids the randomness inherent in traditional methods that rely on repeated manual testing, significantly improving testing efficiency and the scientific nature of decision-making. Compared to existing technologies, this application achieves simulation of multiple trains without requiring manual intervention for model iteration and real-time updates, resolving potential problems such as interface fragmentation, insufficient scene visualization, and inefficient random testing. Attached Figure Description

[0072] Figure 1 This is a flowchart illustrating the steps of one embodiment of the simulation testing method for the urban rail system of this application.

[0073] Figure 2 This is a schematic diagram of the structure of one embodiment of the simulation and testing device for the urban rail system of this application;

[0074] Figure 3 This is a schematic diagram of the structure of an embodiment of the electronic device of this application;

[0075] Figure 4 This is a schematic diagram of the structure of one embodiment of the storage medium of this application. Detailed Implementation

[0076] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0077] The terms "first," "second," and "third" in this application are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0078] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same instance, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0079] like Figure 1 As shown, this embodiment provides an example of a simulation testing method for an urban rail transit system. In this embodiment, the urban rail transit system is applied to a pre-designed operating urban area. The simulation testing method includes the following steps:

[0080] Step S1: Obtain the track topology of the rail transit and the dynamic parameters of all trains located within the track topology, and establish a JSON configuration file based on the track topology and dynamic parameters.

[0081] Preferably, JSON (JavaScript Object Notation) is designed based on a subset of ECMAScript. It is an open standard file format and data exchange format that is easy for humans to read and write, as well as easy for machines to parse and generate.

[0082] Preferably, the specific implementation of step S1 is as follows:

[0083] ① Track topology acquisition:

[0084] Data Sources: Geometric parameters (curve radius, gradient, turnout location, etc.) of the track are extracted from existing signaling systems (such as interlocking equipment) or BIM (Building Information Modeling, a digital management tool applied throughout the entire lifecycle of engineering design, construction, and operation), CAD design documents, and other drawing files. The SpaceL method (a commonly used method in complex network modeling, primarily used to generate network models for subsequent analysis. This method constructs an adjacency list by statistically analyzing the connection relationships of nodes (such as subway stations, transportation hubs, etc.), and then converts it into an adjacency matrix to complete the modeling) is used to abstract the physical track into a topological network of nodes (stations / turnouts) and edges (track sections). The SpaceL method is a mainstream modeling method for constructing rail transit network topologies; its detailed principles will not be elaborated in this embodiment.

[0085] Automated processing: By drawing on multimodal traffic network modeling methods, intervals with adjacent station distances less than 180m are merged and optimized, and connectivity relationships are stored through an adjacency matrix.

[0086] ②Train dynamics parameter acquisition:

[0087] Parameter types include train mass, traction / braking characteristic curves, maximum acceleration, wheel-rail friction coefficient, etc., which can be obtained in real time through the on-board TCMS system (TCMS stands for Train Control and Monitoring System, which is mainly used in the rail transit field to realize train-level control and condition monitoring functions) or imported from the vehicle design manual.

[0088] ③ JSON configuration file generation:

[0089] Structural Design: The configuration file should store track topology (node ​​and edge attributes) and train dynamics parameters in a hierarchical manner (each train uses a unique ID to associate dynamics parameter data). The pseudocode for one preferred structure of this configuration file is shown below:

[0090] json

[0091] {

[0092] "topology": {

[0093] "nodes": [{"id": "N1", "type": "station", "coords": [x,y,z]}],

[0094] "edges": [{"from": "N1", "to": "N2", "length": 1000}]

[0095] },

[0096] "trains": [

[0097] {"id": "T0001", "mass": 30000, "max_accel": 1.2} ]

[0099] }

[0100] Dynamic updates: Real-time data uploads are performed using 5G or 5GA vehicle terminals to achieve periodic automatic refresh of JSON files.

[0101] Step S2: The Unity3D engine reads the JSON configuration file to build a scaled digital model, and the OPC-UA server converts the dynamic parameters of each train into JSON format running data that can be recognized by the preset simulation software.

[0102] Preferably, the model construction in step S2 requires first parsing the JSON configuration file generated in step S1 using JsonUtility.FromJson or a third-party library (such as Newtonsoft.Json), converting the track topology nodes into a Unity GameObject hierarchy, and storing the train's dynamic parameters in a ScriptableObject resource file. Specifically, the 3D track model generates a MeshCollider component based on the topology edge length and curvature parameters to ensure that physical collisions are consistent with real tracks; the train model needs to bind dynamic parameters to a vehicle prefab, using properties such as Rigidbody.mass to achieve physical simulation.

[0103] Preferably, dynamic scene generation uses an automated layout editor script (EditorWindow) to automatically arrange node positions and adjust scaling ratios. At the same time, LOD (Level of Detail) technology is used to load complex models in stages, reducing GPU load, achieving real-time rendering optimization, and obtaining a proportional digital model.

[0104] Preferably, the OPC-UA server (an industrial communication server based on the OPC UA (OPC Unified Architecture) protocol) is used to achieve real-time data interaction and integration across platforms and systems. It subscribes to the Node-Id of the train ATP system through the UA-.NET Standard library, reads data streams such as acceleration and velocity in real time, filters outliers (such as acceleration exceeding physical limits), and then uses a sliding window algorithm to smooth noisy data.

[0105] Preferably, during the conversion stage, the following JSON structure (pseudocode) is constructed according to the input specifications of the preset simulation software (such as VISSIM, RailSys, MATLAB / Simulink, etc.):

[0106] json

[0107] {

[0108] "train_id": "T0001",

[0109] "timestamp": "xxxx-yy-zzTaa:bb:ccZ",

[0110] "kinematics": {

[0111] "speed": 80,

[0112] "accel": 0.8,

[0113] "position": [x,y,z]

[0114] }

[0115] }

[0116] An asynchronous write mechanism is employed, using System.Threading.Tasks to process multi-train data conversion in parallel. Data is written to a temporary file via FileStream, triggering a callback in the simulation software.

[0117] Step S3: Input the real-time three-dimensional coordinates of all trains and the JSON format running data of all trains into the proportional digital model at a preset sampling frequency to form a three-dimensional dynamic model.

[0118] Preferably, the preset sampling frequency can be set to 10Hz. Real-time train location data is obtained through dynamic networking technology of 5G or 5GA vehicle terminal, converted using TDRPIP protocol and uploaded at a sampling frequency of 10Hz. At the same time, threshold filtering (such as speed change detection) and Kalman filtering smoothing are performed on the three-dimensional coordinates (x,y,z).

[0119] Preferably, the Unity3D dynamic model construction utilizes `Rigidbody.AddForce` to achieve physical motion based on dynamic parameters, binding a script to parse acceleration / velocity parameters from the JSON runtime data to implement train motion control; raycasting is used to project the train coordinates onto the track's MeshCollider surface, ensuring strict alignment between the model and the topology; object pooling is then used to reuse the train's GameObject, avoiding stuttering caused by frequent instantiation; finally, Unity's Job System separates data parsing and rendering logic to ensure real-time performance.

[0120] Step S4: Define at least two objective functions based on the rail transit operation strategy, and use a multi-objective global optimization algorithm to read and iterate the JSON format operation data of all trains in the three-dimensional dynamic model to obtain a Pareto optimal solution set based on all objective functions.

[0121] Preferably, the objective function is constructed based on the operational strategy of minimizing energy consumption and maximizing on-time performance, for example:

[0122] ① Minimize energy consumption: Calculate the total traction energy consumption of all trains using the following formula:

[0123] ,in, The objective function is to minimize energy consumption. For the set of all train numbers, , The start time of train operation. This is the end time of the train journey. For the first Real-time power function of each train For the first The instantaneous speed of each train, For the first The instantaneous acceleration of the train. The time differential unit represents the cumulative energy consumption within a tiny time interval.

[0124] ② Maximizing punctuality: Calculating the total delay time based on the timetable:

[0125] ,in, The objective function is to maximize the on-time rate. A set of all site numbers or event point numbers. , For the first The cumulative delay time at each station or event point This refers to the actual arrival time of the train. The value represents the planned time of the train schedule. If the actual arrival time is earlier than the planned time, the result is 0 (no delay); otherwise, it is the difference (positive delay).

[0126] Preferably, the multi-objective global optimization algorithm can be implemented using the MOPSO algorithm, as follows:

[0127] ① Objective function definition stage:

[0128] Based on the rail transit operation strategy, select at least two conflicting objective functions (such as minimizing total train energy consumption and minimizing average passenger waiting time), and use JSON operation data such as train speed curves and departure intervals as input variables for the objective functions to establish quantifiable mathematical expressions.

[0129] ② MOPSO algorithm initialization:

[0130] Set the particle swarm size N, initialize the position (corresponding to the train operation plan) and velocity of each particle. The particle position needs to be mapped to the range of train speed, acceleration and other parameters allowed by the 3D dynamic model, and load the real-time JSON data generated in step S3 as the initial population.

[0131] ③ Fitness assessment and archive update:

[0132] For each particle, its position parameters are decoded, and the parameters are input into the three-dimensional dynamic model simulation via the OPC-UA server to calculate the values ​​of each objective function. The current Pareto front solution is selected by non-dominated sorting, stored in an external archive, and the archive diversity is maintained by crowding distance.

[0133] ④ Selection of the global optimal solution:

[0134] A global optimal guide (gbest) is selected for each particle from the archive using a roulette or tournament strategy, ensuring that Pareto solutions in different regions can guide the particle's flight direction.

[0135] ⑤ Particle state update:

[0136] The particle velocity and position are adjusted according to the MOPSO velocity update formula, and combined with the dynamic adjustment strategy of inertial weight, the particles explore new solutions in the train operation parameter space. At the same time, invalid solutions that violate the ATP safety rules are eliminated through the constraint processing mechanism.

[0137] ⑥ Termination condition judgment: The algorithm terminates when the number of iterations reaches the preset maximum value or the rate of change of the hypervolume index (HV) of the Pareto solution set in the archive is lower than the threshold, and outputs the final Pareto optimal solution set in the archive, where each solution corresponds to a set of optimized train JSON operation data.

[0138] ⑦ Result verification and output:

[0139] The Pareto solution set is imported into a 3D dynamic model for visualization verification to ensure that all solutions satisfy the signal system safety constraints. Finally, a set of optimized solutions is output that can be used in step S5.

[0140] Step S5: Synchronize the optimal solutions in JSON format for all trains in the Pareto optimal solution set to each train to obtain the optimized 3D dynamic model.

[0141] Preferably, the T-GRE tunneling protocol based on 5G can be used to achieve dynamic networking of on-board terminals, ensuring data transmission with low latency of less than 50ms. Real-time data exchange between trains can be achieved through 5G or 5GA on-board terminals, and automatic regrouping can be performed when the topology changes.

[0142] Step S6: Repeat steps S1 to S5 based on the preset sampling frequency to update the optimized 3D dynamic model in real time, and send the optimized 3D dynamic model to the external monitoring terminal once for each update.

[0143] Further, in step S6, steps S1 to S5 are repeated based on a preset sampling frequency to update the optimized 3D dynamic model in real time, and the optimized 3D dynamic model is sent to the external monitoring terminal once for each update. Afterwards, the following steps are also included:

[0144] Step S10: Perform data cleaning and standard normalization on the optimal solution of the JSON format operation data for each train to obtain the processed operation data.

[0145] Preferably, since the JSON format running data is time-series data based on the predicted sampling frequency, missing values ​​can be filled by linear interpolation, and outliers can be removed by quantile pruning.

[0146] Preferably, performing standardization or normalization operations, such as Min-Max scaling or Z-Score standardization, can eliminate dimensional differences to avoid affecting model convergence.

[0147] Step S20: Using a sliding window algorithm, adjust the processed running data of all trains into sequence samples of equal length along the time series of the preset sampling frequency.

[0148] Preferably, step S20 is implemented as follows:

[0149] ① Data preprocessing:

[0150] Time alignment: Based on the real-time position coordinates of trains obtained from 5G or 5GA dynamic networking, the timestamps of all trains are aligned with the system clock.

[0151] Outlier handling: A sliding time window detection technique is used to remove abnormal data collected by the sensor, such as vibration and acquisition delay, in order to avoid interfering with subsequent analysis.

[0152] ② Window parameter settings.

[0153] Window length: The window length is set to 10-30 seconds based on the track topology complexity, and it needs to cover at least one complete acceleration-cruise-braking cycle of the train.

[0154] Sliding step size: can be set to an integer multiple of the sampling frequency, for example, a 1-second step size corresponds to a 10Hz sampling rate.

[0155] Overlap rate: Adjacent windows overlap by 50% to ensure data continuity.

[0156] ③ Dynamic window partitioning:

[0157] Multi-train synchronization: The window sliding event is triggered by the master clock to ensure that the start time of all train data windows can be strictly synchronized.

[0158] Boundary handling: Pad data segments that are less than the window length at the beginning and end with zero padding or mirror expansion.

[0159] ④ Feature standardization:

[0160] Dimensional unification: Normalize dynamic parameters such as acceleration and velocity to the [0,1] interval.

[0161] Isometric conversion: Adjusts the number of data points within a window to a fixed number using linear interpolation, for example, 100 data points per window.

[0162] ⑤ Continuity assurance:

[0163] State inheritance: When the window slides, the final state data of the previous window is retained as the initial condition of the next window.

[0164] Conflict detection: The Lamport timestamp mechanism is used to handle data timing conflicts caused by network latency.

[0165] Step S30: Define the learning objective of the machine learning algorithm as minimizing the average absolute error between the predicted and true values ​​of the sequence samples at the same time point, and ensuring that the prediction step size is consistent with the step size of the preset sampling frequency.

[0166] Step S40: Train and learn all sequence samples using a machine learning algorithm, and obtain the predicted value based on several prediction steps after the learning objective is achieved.

[0167] Preferably, for data with time-series characteristics, an LSTM network or an LSTM / GRU hybrid network can be used.

[0168] Preferably, the network layer structure can be defined as follows: the input layer receives a three-dimensional tensor (number of samples, time step, number of features), the number of hidden layer nodes is usually 8 to 12 times the number of features to capture complex patterns, and regularization components such as Dropout layers with a ratio of 0.2-0.5 are added to prevent overfitting, and the ReLU activation function is used to introduce non-linear features.

[0169] Preferably, the LSTM network is trained using normal operating condition data, the objective function is set to the mean absolute error (MAE) between the predicted and true values ​​or the classification cross-entropy, dynamic learning rate decay and early stopping mechanism are applied, the initial learning rate is set to 0.001, the change in validation set loss is monitored to avoid overfitting, imbalanced data is handled during training, such as oversampling or class weight adjustment, to ensure the generalization ability of the model.

[0170] Step S50: Obtain the residual value between the predicted value and the actual value at the same time point.

[0171] Preferably, the predicted residuals are calculated on the test set, and a dynamic threshold is set based on the 99th percentile of the historical error distribution to monitor fluctuation anomalies. Furthermore, the training process (e.g., loss curves) and prediction results can be visualized to analyze whether the model captures the expected fluctuation patterns (e.g., periodicity or abrupt changes).

[0172] Step S60: Plot a scatter plot of the residual distribution with the predicted values ​​on the horizontal axis and the residual values ​​on the vertical axis.

[0173] Preferably, the residual distribution scatter plot can intuitively reflect the fluctuation pattern. For example, the residuals of normal fluctuations are randomly distributed near the zero line y=0, without a specific trend. If the abnormal pattern presents a funnel shape, that is, the fluctuation amplitude increases with the predicted value, it indicates heteroscedasticity. If it is curved, it indicates that the nonlinear relationship has not been captured. Periodic fluctuations indicate that the seasonality of the peaks at fixed intervals has not been modeled. Continuous deviations in the same direction indicate that the continuous positive / negative residuals indicate systematic prediction bias.

[0174] Step S70: Obtain outliers in the residual distribution scatter plot and mark them as outliers.

[0175] Preferably, outliers can be identified using one of the following methods: absolute value thresholding, dynamic quantile method, or density clustering. This embodiment prefers the dynamic quantile method. The dataset is segmented based on predicted values ​​or timestamps, for example, dividing it into intervals of 100 units per predicted value. Within each interval, the 99th percentile of the residuals is calculated as the dynamic upper bound threshold for that interval, and the 1st percentile is used as the lower bound threshold to filter out outliers.

[0176] Step S80: Define each outlier as an unexpected event and obtain the train number and event timestamp corresponding to each unexpected event.

[0177] For example, sudden events include a surge in passenger volume, train mechanical failure, and signal system failure.

[0178] Step S90: Send the train number and event timestamp of all unexpected events to the external monitoring terminal.

[0179] Further, in step S90, the train numbers and event timestamps of all unexpected events are sent to the external monitoring terminal. This is followed by the following steps:

[0180] Step S100: Output the residual distribution scatter plot at the same time point and the optimized 3D dynamic model side by side to the external visualization terminal.

[0181] Step S200: The train numbers corresponding to the unexpected events at the current time node are marked in standard red.

[0182] Step S300: Based on the track topology, determine whether the two standard red markers that are closest to each other at the same time node are located on the same route. If so, proceed to step S400.

[0183] Step S400: Determine that the routes marked with two standard red markers are high-risk routes.

[0184] In step S500, all trains on high-risk routes are suspended and a warning signal is generated.

[0185] Step S600: Highlight the warning signal on the visualization terminal and send the warning signal to the external monitoring terminal.

[0186] Further, in step S600, the warning signal is highlighted on the visualization terminal and sent to the external monitoring terminal. Afterwards, the following steps are also included:

[0187] In step S1000, in response to the processing completion signal of an unexpected event, the standard red marker corresponding to the processing completion signal is faded at a uniform rate until it becomes completely transparent within a preset time.

[0188] Step S2000: Delete the completely transparent standard red marker and generate an event record based on the processing completion timestamp of the processing completion signal.

[0189] Step S3000: Upload all event records to an external cloud.

[0190] Further, step S1 involves obtaining the track topology of the rail transit system and the dynamic parameters of all trains located within the track topology, and establishing a JSON configuration file based on the track topology and dynamic parameters. This includes the following steps:

[0191] Step S11: Obtain a digital model with track topology based on the design drawings of rail transit.

[0192] Step S12: Extract the three-dimensional coordinates, slope, curve radius, and track nodes based on the digital model and make logical connections to obtain the track topology.

[0193] Step S13: Obtain the maximum traction force, maximum braking force, and real-time traction force and mass velocity curves for each train based on a preset sampling frequency, and convert them into dynamic parameters in a unified unit of measurement for the current train using the UIC standard.

[0194] Preferably, UIC standards (International Union of Railways standards) are a system of technical specifications developed by authoritative organizations in the global railway industry, covering three core areas: railway infrastructure, rolling stock technology, and operational safety.

[0195] Step S14: Define a three-layer JSON template containing top-level metadata, a middle-level topology network, and a bottom-level train parameter library.

[0196] Step S15: Use scripts to capture digital models and store them in top-level metadata, capture track topology and store it in the middle-level topology network, and capture all dynamic parameters and store them in the bottom-level train parameter library.

[0197] Step S16: Define the three-layer JSON template after storage as a JSON configuration file.

[0198] Further, in step S2, the Unity3D engine reads the JSON configuration file to construct a scaled digital model, and the OPC-UA server converts the dynamic parameters of each train into JSON format running data recognizable by the preset simulation software. This specifically includes the following steps:

[0199] Step S21: Create an empty scene in Unity3D and receive the JSON configuration file.

[0200] Preferably, when creating a new scene in Unity3D, the default lighting and skybox can be disabled to reduce the computational burden. Physics engine parameters can be set, such as a gravitational acceleration of 9.81 m / s² and a fixed time step of 0.1 s (with a synchronous preset sampling frequency of 10 Hz).

[0201] Preferably, Unity's Resources.Load or AssetBundle can be used to load the JSON configuration file.

[0202] Step S22: Retrieve the digital model from the top-level metadata to build the initial 3D model.

[0203] Preferably, the coordinate system type in the top-level JSON metadata is parsed, such as WGS84, local coordinate system, etc., and the scene origin is created based on the reference point coordinates in the metadata. The railsegment prefab is instantiated to obtain the uncalibrated initial model.

[0204] Step S23: Correct the coordinate system of the initial 3D model based on the world coordinate system, and obtain the 3D orbit model by matching the scale of the world coordinate system.

[0205] Preferably, the transformation from the local coordinate system to the world coordinate system is achieved through Unity3D's Matrix4x4.TRS method, while applying a scale factor of 1 unit = 1 meter to unify the model size.

[0206] Preferably, the deviation between the track control points and the actual coordinates, as well as the elevation deviation, can be fitted using the least squares method to obtain the calibrated track model.

[0207] Step S24: Retrieve the orbital topology of the intermediate topology network and match and verify it with the three-dimensional orbital model.

[0208] Preferably, the node connection relationship (adjacency matrix) of the intermediate topology network can be parsed and the turnout linkage logic and signal-section mapping relationship can be verified. Ray detection is used to verify the spatial overlap between the three-dimensional model and the topology data and to mark abnormal sections with missing / overlapping tracks to ensure the geometric consistency of the model.

[0209] Step S25: After verifying that there are no errors, retrieve all train dynamic parameters from the underlying train parameter library and generate an interactive train model in the 3D track model.

[0210] Preferably, the train collision body is dynamically generated using the BoxCollider component of Unity3D, and a script component is added to each train to control the acceleration / braking curve, and the on-board ATP virtual interface is configured to simulate TACHO signal output.

[0211] Step S26: Create a data subscription channel for each train interactive model based on the OPC-UA server.

[0212] Preferably, the OPC-UA server address is set to opc.tcp: / / [IP]:********, an independent node (NodeID=train ID) is created for each train, forming a data subscription channel, and then the data update event (DataChangeTrigger) and the parameter update callback function bound to the train model are defined.

[0213] Step S27: Based on the preset sampling frequency, retrieve all train dynamic parameters from the underlying train parameter library and update the real-time operating status of each train interactive model through each subscription channel.

[0214] Preferably, data retrieval is triggered according to a preset sampling frequency of 10Hz, and a double buffering mechanism is preferably used to avoid data contention. During the update process, the dynamic parameters are converted into Unity's Rigidbody physical parameters, and the changes in train position are smoothly transitioned through Vector3.Lerp to obtain a three-dimensional dynamic model that can be synchronized in real time.

[0215] Further, in step S4, based on the rail transit operation strategy, at least two objective functions are defined, and a multi-objective global optimization algorithm is used to read and iterate the JSON-formatted operation data of all trains in the 3D dynamic model to obtain a Pareto optimal solution set based on all objective functions, including:

[0216] Step S41: Define at least two mutually exclusive objective functions based on the operation strategy. The input variables for all objective functions are the JSON format operation data of all trains.

[0217] Preferably, at least two mutually exclusive objective functions can be the two objective functions mentioned above:

[0218] ① Minimize energy consumption: Calculate the total traction energy consumption of all trains using the following formula:

[0219] ,in, The objective function is to minimize energy consumption. For the set of all train numbers, , The start time of train operation. This is the end time of the train journey. For the first Real-time power function of each train For the first The instantaneous speed of each train, For the first The instantaneous acceleration of the train. The time differential unit represents the cumulative energy consumption within a tiny time interval.

[0220] ② Maximizing punctuality: Calculating the total delay time based on the timetable:

[0221] ,in, The objective function is to maximize the on-time rate. A set of all site numbers or event point numbers. , For the first The cumulative delay time at each station or event point This refers to the actual arrival time of the train. The value represents the planned time of the train schedule. If the actual arrival time is earlier than the planned time, the result is 0 (no delay); otherwise, it is the difference (positive delay).

[0222] It can be seen that the two objective functions are inversely related. When minimizing energy consumption, the direct impact is that the train speed decreases, which in turn directly affects the train's punctuality rate, causing the punctuality rate maximization to tend towards the minimum value, i.e., making it difficult to be on time. Conversely, when maximizing the punctuality rate, the direct impact is that the train needs to operate at high power to ensure that the punctuality rate meets the requirements. If the ultimate punctuality rate is pursued, it will cause the other objective function to tend towards the maximum value, thereby increasing power consumption.

[0223] Step S42: Based on the multi-objective global optimization algorithm, define the JSON format running data of each train as an initial population. The data dimension of the current train's initial population is the same as the data dimension of the current train's JSON format running data.

[0224] Preferably, the definition of the initial population requires parsing the field structure of the train's JSON data (position, speed, acceleration, etc.) and creating an N×D dimensional matrix for each train (N = population size, D = JSON data dimension).

[0225] Preferably, a circular buffer can be used to store the data of each train population, and a timestamp can be added to each population.

[0226] Step S43: Define that each initial population has several random solutions. The position vector of the current train's random solution corresponds to the real-time three-dimensional coordinates of the current train's position, and the velocity vector of the current train's random solution corresponds to the current train's JSON format running data.

[0227] Preferably, the generation of random solutions requires solution space construction and randomization strategy. Solution space construction involves converting the train's GPS coordinates into the scene's local coordinate system (Unity space) to define the position vector and extracting v_t from JSON to define the velocity vector. The randomization strategy uses Latin hypercube sampling to ensure uniform distribution of the solution space and attaches a unique ID to each solution.

[0228] Step S44: Define the track topology as the feasible region of all random solutions and the maximum speed of all trains as the exploration boundary. Assign a random speed to each random solution within the ATP protection curve range of the current train.

[0229] Preferably, the random solution will not exceed the orbital topology, and the exploration boundary is the solution space boundary constructed by extracting v_max and a_max from JSON.

[0230] It is worth noting that the Automatic Train Protection (ATP) system is a core safety subsystem of the rail transit signaling system. Its main function is to ensure the safe operation of trains through real-time monitoring and automatic control. The ATP protection curve is an inherent attribute of the train. The ATP protection curve is the core algorithm curve used by the Automatic Train Protection (ATP) system to monitor the safe operation of trains. By calculating the relationship between train speed and distance in real time, it ensures that the train travels safely within the speed limit range. The ATP protection curve is essentially a speed-distance curve, which represents the maximum allowable operating speed of the train at different locations. If the actual speed exceeds this curve, the ATP will trigger braking. The ATP protection curve is a mature existing technology that has been put into use. This embodiment will not elaborate on the curve style and function.

[0231] Step S45: Iteratively update the previous position and current velocity of all random solutions several times based on the preset sampling frequency, and calculate the function value of each random solution based on each objective function in each iteration update.

[0232] Preferably, the new position of the random solution can be calculated using the Newton-Euler equations, or all random solutions can be defined using the MOPSO algorithm:

[0233] .

[0234] in, Let be the set of all random solutions. For each random solution, The label for the random solution. The number of all random solutions; The set of velocities for all random solutions. The speeds for each random solution are respectively.

[0235] Preferably, the current position and current velocity can be updated based on the same random solution according to the following formula:

[0236] .

[0237] in, For the first The random solution at the th solution in the th case... Step speed, For the first The random solution at the th solution in the th case... The velocity inertia of the step, The inertia coefficient, For the first Self-cognitive representation of a random solution For the first Social cognitive representation of a random solution; and All are learning factors. for random numbers, For the first The optimal solution for each individual has been obtained from a random solution. For the first The globally optimal solution has been obtained from a set of random solutions. In the first Step 1 A random solution. In the first Step 1 A random solution.

[0238] Preferably, The range of values ​​is Preferred ; The range of values ​​is Preferred .

[0239] Meanwhile, the inertia coefficient can be linearly decreased once for each update according to the following formula:

[0240] .

[0241] in, For the first The random solution at the th solution in the th case... The optimized inertia coefficient The initial inertia coefficient, For the current update step count, This represents the maximum number of update steps.

[0242] In summary, for each iteration, the function value of each random solution based on each objective function is calculated.

[0243] Step S46: Filter the Pareto front solutions updated in all rounds of iterations using non-dominated sorting and store them in an external archive.

[0244] Preferably, an ε-dominated archiving mechanism can be used for external archives, and a KD-tree can be used to accelerate nearest neighbor search.

[0245] Step S47: When the number of iterations reaches the preset maximum number, or when the rate of change of the hypervolume index of the Pareto solution set in the external archive is lower than the rate of change threshold, output the final archive of the external archive and define it as the Pareto optimal solution set.

[0246] Preferably, the rate of change threshold can be set to 1%.

[0247] It is worth noting that all formulas and functions in this embodiment are for explanation of principles. The meanings of the symbols in different formulas and functions are not interchangeable. If there are the same symbols, it means that there are not enough symbols with known meanings. Please do not associate different formulas and functions with each other.

[0248] This embodiment acquires the track topology of the rail transit system and the dynamic parameters of all trains within the track topology, and establishes a JSON configuration file based on the track topology and dynamic parameters. The Unity3D engine reads the JSON configuration file to construct a scaled digital model, and an OPC-UA server converts the dynamic parameters of each train into JSON format operational data recognizable by a preset simulation software. The scaled digital model is then input with the real-time 3D coordinates of all trains and their JSON format operational data at a preset sampling frequency to form a 3D dynamic model. At least two objective functions are defined based on the rail transit operation strategy, and a multi-objective global optimization algorithm is used to read and iterate the JSON format operational data of all trains in the 3D dynamic model to obtain a Pareto optimal solution set based on all objective functions. The optimal solutions of the JSON format operational data of all trains in the Pareto optimal solution set are synchronized to each train to obtain an optimized 3D dynamic model. The optimized 3D dynamic model is updated in real-time through the above five steps at a preset sampling frequency, and an optimized 3D dynamic model is sent to an external monitoring terminal with each update. This embodiment integrates track topology and dynamic parameters using a JSON configuration file and converts operational data via an OPC-UA server. This significantly reduces the workload of interface adaptation for signaling equipment from different manufacturers (such as onboard systems and interlocking equipment). The use of a pre-defined JSON format enables data interoperability between heterogeneous systems, improving compatibility and avoiding the need for customized interface platforms for each manufacturer, as required by traditional simulations. Furthermore, this embodiment utilizes the Unity3D engine to construct a scaled digital model, mapping train positions and operational data in real time. This overcomes the visual limitations of traditional two-dimensional simulations, facilitating the observation of system responses in complex scenarios such as high-density traffic flow and sudden malfunctions. Based on operational strategies, this embodiment defines multiple objective functions (such as minimizing energy consumption and maximizing traffic efficiency), automatically outputting the comprehensive optimal solution through the Pareto optimal solution set. This avoids the randomness inherent in traditional methods that rely on repeated manual testing, significantly improving testing efficiency and the scientific nature of decision-making. Compared to existing technologies, this embodiment achieves simulation of multiple trains without requiring manual intervention for model iteration and real-time updates, resolving potential problems such as interface fragmentation, insufficient scene visualization, and inefficient random testing.

[0249] like Figure 2 As shown, this embodiment provides an example of a simulation testing device for an urban rail system. In this embodiment, the simulation testing device is applied to the simulation testing method for an urban rail system as described in the above embodiment.

[0250] Specifically, the simulation test device includes a track system configuration file construction module 1, a digital model and operation data preparation module 2, a three-dimensional dynamic model generation module 3, a three-dimensional dynamic model iteration module 4, a train optimal operation state update module 5, and a three-dimensional dynamic model real-time update module 6, which are connected electrically or by signal in sequence.

[0251] The system comprises several modules: The track system configuration file construction module 1 acquires the track topology of the rail transit system and the dynamic parameters of all trains within that topology, and establishes a JSON configuration file based on the track topology and dynamic parameters; the digital model and operation data preparation module 2 reads the JSON configuration file using the Unity3D engine to construct a scaled digital model, and converts the dynamic parameters of each train into JSON format operation data recognizable by the preset simulation software via an OPC-UA server; the 3D dynamic model generation module 3 inputs the real-time 3D coordinates of all trains and the JSON format operation data of all trains into the scaled digital model at a preset sampling frequency to form a 3D dynamic model; and the 3D dynamic model iterates. Module 4 is used to define at least two objective functions based on the operation strategy of rail transit, and reads and iterates the JSON format operation data of all trains in the 3D dynamic model through a multi-objective global optimization algorithm to obtain a Pareto optimal solution set based on all objective functions; Train optimal operation state update module 5 synchronizes the optimal solutions of the JSON format operation data of all trains in the Pareto optimal solution set to each train to obtain the optimized 3D dynamic model; 3D dynamic model real-time update module 6 repeatedly executes the track system configuration file construction module to the 3D dynamic model update module based on a preset sampling frequency to update the optimized 3D dynamic model in real time, and sends the optimized 3D dynamic model to the external monitoring terminal once for each update.

[0252] Furthermore, the simulation testing device also includes, in sequence, an operating data preprocessing module, an operating data alignment module, a sequence sample learning module, a sequence sample training module, a residual value acquisition module, a residual distribution scatter plot drawing module, an outlier marking module, an unexpected event definition module, and an unexpected event sending module, which are electrically or signal-connected in sequence; the operating data preprocessing module and the three-dimensional dynamic model real-time update module 6 are electrically or signal-connected.

[0253] The system comprises the following modules: **Preprocessing module:** Cleansing and normalizing the optimal solution of the JSON-formatted operational data for each train to obtain processed operational data. **Alignment module:** Adjusting the processed operational data of all trains into mutually equal-length sequence samples along a time series using a sliding window algorithm at a preset sampling frequency. **Sequence sample learning module:** Defining the learning objective of the machine learning algorithm as minimizing the average absolute error between the predicted and actual values ​​of the sequence samples at the same time point, and ensuring the prediction step size matches the preset sampling frequency. **Training module:** Training and learning all sequence samples using a machine learning algorithm. The system obtains predicted values ​​based on several prediction steps after achieving the learning objective; the residual value acquisition module obtains the residual values ​​between the predicted values ​​and the actual values ​​at the same time point; the residual distribution scatter plot drawing module draws a residual distribution scatter plot with the predicted values ​​on the horizontal axis and the residual values ​​on the vertical axis; the outlier marking module obtains outliers in the residual distribution scatter plot and marks them as outliers; the unexpected event definition module defines each outlier as an unexpected event and obtains the train number and event timestamp corresponding to each unexpected event; the unexpected event sending module sends the train numbers and event timestamps of all unexpected events to the external monitoring terminal.

[0254] Furthermore, the simulation test device also includes a scatter plot and dynamic model visualization output module, an unexpected event highlighting module, an unexpected event judgment module, a high-risk route judgment module, a train stoppage and warning module, and a warning signal display and sending module, which are electrically or signal-connected in sequence; the scatter plot and dynamic model visualization output module and the unexpected event sending module are electrically or signal-connected.

[0255] The system includes: a scatter plot and dynamic model visualization output module, which outputs the residual distribution scatter plot and the optimized 3D dynamic model at the same time point side by side to an external visualization terminal; an unexpected event red-marking module, which marks the train numbers corresponding to unexpected events at the current time point with standard red marks; an unexpected event judgment module, which determines whether the two closest standard red marks at the same time point are located on the same route based on the track topology; a high-risk route judgment module, which determines that the route containing the two standard red marks is a high-risk route if so; a train stoppage and warning module, which stops all trains located on high-risk routes and generates a warning signal; and a warning signal display and sending module, which highlights the warning signal on the visualization terminal and sends the warning signal to the external monitoring terminal.

[0256] Furthermore, the simulation testing device also includes a processing completion signal response module, an event record generation module, and an event record sending module that are electrically or signal-connected in sequence; the processing completion signal response module is electrically or signal-connected to the warning signal display and sending module.

[0257] The processing completion signal response module is used to respond to the processing completion signal of unexpected events, and to fade the standard red mark corresponding to the processing completion signal at a uniform rate until it becomes completely transparent within a preset time. The event record generation module is used to delete the completely transparent standard red mark and generate an event record based on the processing completion timestamp of the processing completion signal. The event record sending module is used to upload all event records to an external cloud.

[0258] Furthermore, the orbital system configuration file construction module 1 specifically includes a first orbital system configuration file construction unit, a second orbital system configuration file construction unit, a third orbital system configuration file construction unit, a fourth orbital system configuration file construction unit, a fifth orbital system configuration file construction unit, and a sixth orbital system configuration file construction unit that are electrically or signal-connected in sequence; the sixth orbital system configuration file construction unit is electrically or signal-connected to the digital model and operation data preparation module 2.

[0259] The system comprises the following components: the first track system configuration file construction unit, which acquires a digital model with track topology based on the design drawings of the rail transit system; the second track system configuration file construction unit, which extracts the three-dimensional coordinates, gradient, curve radius, and track nodes from the digital model and performs logical connections to obtain the track topology; the third track system configuration file construction unit, which acquires the maximum traction force, maximum braking force, and real-time traction force and mass velocity curves based on a preset sampling frequency for each train, and converts them into dynamic parameters in a unified unit of measurement for the current train using the UIC standard; the fourth track system configuration file construction unit, which defines a three-layer JSON template containing top-level metadata, a middle-layer topology network, and a bottom-layer train parameter library; the fifth track system configuration file construction unit, which uses scripts to capture the digital model and store it in the top-level metadata, capture the track topology and store it in the middle-layer topology network, and capture all dynamic parameters and store them in the bottom-layer train parameter library; and the sixth track system configuration file construction unit, which defines the three-layer JSON template after storage as a JSON configuration file.

[0260] Furthermore, the operational data preparation module 2 specifically includes a first operational data preparation unit, a second operational data preparation unit, a third operational data preparation unit, a fourth operational data preparation unit, a fifth operational data preparation unit, a sixth operational data preparation unit, and a seventh operational data preparation unit that are electrically connected in sequence; the first operational data preparation unit is electrically or signal-connected to the sixth orbital system configuration file construction unit, and the seventh operational data preparation unit is electrically or signal-connected to the three-dimensional dynamic model generation module 3.

[0261] The system comprises the following components: the first runtime data preparation unit creates an empty scene in Unity3D and receives a JSON configuration file; the second runtime data preparation unit retrieves the digital model from the top-level metadata to establish an initial 3D model; the third runtime data preparation unit corrects the coordinate system of the initial 3D model based on the world coordinate system and obtains a 3D track model at the same scale as the world coordinate system; the fourth runtime data preparation unit retrieves the track topology of the intermediate topology network and verifies it against the 3D track model; the fifth runtime data preparation unit, after verifying that there are no errors, retrieves all train dynamic parameters from the bottom-level train parameter library and generates an interactive train model in the 3D track model; the sixth runtime data preparation unit creates a data subscription channel for each interactive train model based on the OPC-UA server; and the seventh runtime data preparation unit retrieves all train dynamic parameters from the bottom-level train parameter library based on a preset sampling frequency and updates the real-time running status of each interactive train model through each subscription channel.

[0262] Furthermore, the three-dimensional dynamic model iteration module 4 specifically includes a first three-dimensional dynamic model iteration unit, a second three-dimensional dynamic model iteration unit, a third three-dimensional dynamic model iteration unit, a fourth three-dimensional dynamic model iteration unit, a fifth three-dimensional dynamic model iteration unit, a sixth three-dimensional dynamic model iteration unit, and a seventh three-dimensional dynamic model iteration unit that are electrically or signal-connected in sequence; the first three-dimensional dynamic model iteration unit is electrically or signal-connected to the three-dimensional dynamic model generation module 3, and the seventh three-dimensional dynamic model iteration unit is electrically or signal-connected to the train optimal running state update module 5.

[0263] The system comprises four components: a first 3D dynamic model iteration unit, a second 3D dynamic model iteration unit, and a third 3D dynamic model iteration unit. The first 3D dynamic model iteration unit defines at least two mutually exclusive objective functions based on the operational strategy, with the input variables of all objective functions being the JSON-formatted operational data of all trains. The second 3D dynamic model iteration unit defines an initial population for each train's JSON-formatted operational data based on a multi-objective global optimization algorithm, with the data dimension of the current train's initial population being the same as the data dimension of the current train's JSON-formatted operational data. The third 3D dynamic model iteration unit defines that each initial population has several random solutions, where the position vector of the current train's random solution corresponds to the real-time 3D coordinates of the current train, and the velocity vector of the current train's random solution corresponds to the current train's JSON-formatted operational data. The fourth 3D dynamic model iteration unit defines the track topology as all random solutions. The feasible region of the machine solution and the maximum speed of all trains are the exploration boundaries. Within the ATP protection curve range of the current train, each random solution is assigned a random speed. The fifth three-dimensional dynamic model iteration unit is used to iteratively update the front position and current speed of all random solutions several times based on a preset sampling frequency, and calculates the function value of each random solution based on each objective function in each iteration update. The sixth three-dimensional dynamic model iteration unit is used to filter the Pareto front solutions updated in all rounds of iterations through non-dominated sorting and store them in an external archive. The seventh three-dimensional dynamic model iteration unit is used to output the final archive of the external archive and define it as the Pareto optimal solution set when the number of iteration updates reaches the preset maximum number or the rate of change of the hypervolume index of the Pareto solution set in the external archive is lower than the rate of change threshold.

[0264] It should be noted that this embodiment is a functional module embodiment based on the above method embodiment. For the preferred, extended, limited, exemplified and principle explanation parts of this embodiment, please refer to the above embodiment. This embodiment will not repeat them.

[0265] This embodiment acquires the track topology of the rail transit system and the dynamic parameters of all trains within the track topology, and establishes a JSON configuration file based on the track topology and dynamic parameters. The Unity3D engine reads the JSON configuration file to construct a scaled digital model, and an OPC-UA server converts the dynamic parameters of each train into JSON format operational data recognizable by a preset simulation software. The scaled digital model is then input with the real-time 3D coordinates of all trains and their JSON format operational data at a preset sampling frequency to form a 3D dynamic model. At least two objective functions are defined based on the rail transit operation strategy, and a multi-objective global optimization algorithm is used to read and iterate the JSON format operational data of all trains in the 3D dynamic model to obtain a Pareto optimal solution set based on all objective functions. The optimal solutions of the JSON format operational data of all trains in the Pareto optimal solution set are synchronized to each train to obtain an optimized 3D dynamic model. The optimized 3D dynamic model is updated in real-time through the above five steps at a preset sampling frequency, and an optimized 3D dynamic model is sent to an external monitoring terminal with each update. This embodiment integrates track topology and dynamic parameters using a JSON configuration file and converts operational data via an OPC-UA server. This significantly reduces the workload of interface adaptation for signaling equipment from different manufacturers (such as onboard systems and interlocking equipment). The use of a pre-defined JSON format enables data interoperability between heterogeneous systems, improving compatibility and avoiding the need for customized interface platforms for each manufacturer, as required by traditional simulations. Furthermore, this embodiment utilizes the Unity3D engine to construct a scaled digital model, mapping train positions and operational data in real time. This overcomes the visual limitations of traditional two-dimensional simulations, facilitating the observation of system responses in complex scenarios such as high-density traffic flow and sudden malfunctions. Based on operational strategies, this embodiment defines multiple objective functions (such as minimizing energy consumption and maximizing traffic efficiency), automatically outputting the comprehensive optimal solution through the Pareto optimal solution set. This avoids the randomness inherent in traditional methods that rely on repeated manual testing, significantly improving testing efficiency and the scientific nature of decision-making. Compared to existing technologies, this embodiment achieves simulation of multiple trains without requiring manual intervention for model iteration and real-time updates, resolving potential problems such as interface fragmentation, insufficient scene visualization, and inefficient random testing.

[0266] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Figure 3 As shown, the electronic device 7 includes a processor 71 and a memory 72 coupled to the processor 71.

[0267] The memory 72 stores program instructions for implementing the simulation test method of the urban rail system in any of the above embodiments.

[0268] The processor 71 is used to execute program instructions stored in the memory 72 to perform simulation tests of the urban rail system.

[0269] The processor 71 can also be referred to as a CPU (Central Processing Unit). The processor 71 may be an integrated circuit chip with signal processing capabilities. The processor 71 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0270] Furthermore, Figure 4 This is a schematic diagram of the structure of a storage medium according to an embodiment of this application. See also: Figure 4 In this embodiment of the application, the storage medium 8 stores program instructions 81 capable of implementing all the above methods. These program instructions 81 can be stored in the storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or terminal devices such as computers, servers, mobile phones, and tablets.

[0271] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0272] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A simulation testing method for an urban rail transit system, wherein the urban rail transit system is applied to rail transit in a pre-designated operating urban area, characterized in that, The simulation testing method includes: Step S1: Obtain the track topology of the rail transit and the dynamic parameters of all trains located within the track topology, and establish a JSON configuration file based on the track topology and the dynamic parameters; Step S2: The Unity3D engine reads the JSON configuration file to build a scaled digital model, and the OPC-UA server converts the dynamic parameters of each train into JSON format running data that can be recognized by the preset simulation software. Step S3: Input the real-time three-dimensional coordinates of all trains and the JSON format running data of all trains into the proportional digital model at a preset sampling frequency to form a three-dimensional dynamic model. Step S4: Define at least two objective functions based on the rail transit operation strategy, and use a multi-objective global optimization algorithm to read and iterate the JSON format operation data of all trains in the three-dimensional dynamic model to obtain a Pareto optimal solution set based on all objective functions; Step S5: Synchronize the optimal solutions of the JSON format running data of all trains in the Pareto optimal solution set to each train to obtain the optimized three-dimensional dynamic model. Step S6: Repeat steps S1 to S5 based on the preset sampling frequency to update the optimized 3D dynamic model in real time, and send the optimized 3D dynamic model to the external monitoring terminal once for each update. Step S6: Repeat steps S1 to S5 based on the preset sampling frequency to update the optimized 3D dynamic model in real time, and send the optimized 3D dynamic model to the external monitoring terminal once for each update. Afterwards, the process includes: Step S10: Perform data cleaning and standard normalization on the optimal solution of the JSON format operation data for each train to obtain the processed operation data; Step S20: Adjust the processed running data of all trains into sequence samples of equal length along the time series of the preset sampling frequency using a sliding window algorithm; Step S30: Define the learning objective of the machine learning algorithm as minimizing the average absolute error between the predicted and true values ​​of the sequence samples at the same time point, and ensuring that the prediction step size is consistent with the step size of the preset sampling frequency. Step S40: Train and learn all sequence samples using the machine learning algorithm, and obtain the predicted value based on several prediction steps after achieving the learning objective; Step S50: Obtain the residual value between the predicted value and the actual value at the same time point; Step S60: Plot a scatter plot of the residual distribution with the predicted value on the horizontal axis and the residual value on the vertical axis; Step S70: Obtain outliers in the residual distribution scatter plot and mark them as outliers; Step S80: Define each outlier as an unexpected event and obtain the train number and event timestamp corresponding to each unexpected event. Step S90: Send the train number and event timestamp of all unexpected events to the external monitoring terminal.

2. The simulation testing method according to claim 1, characterized in that, Step S90: Send the train numbers and event timestamps of all unexpected events to the external monitoring terminal. Afterwards, the following steps are included: Step S100: Output the residual distribution scatter plot at the same time point and the optimized 3D dynamic model side by side to the external visualization terminal. Step S200: Mark the train numbers corresponding to the unexpected events at the current time node in standard red. Step S300: Based on the track topology, determine whether the two standard red markers that are closest to each other at the same time point are located on the same route. If so, proceed to step S400. Step S400: Determine that the routes marked with two standard red markers are high-risk routes; Step S500: Stop all trains on the high-risk route and generate a warning signal; Step S600: Highlight the warning signal on the visualization terminal and send the warning signal to the external monitoring terminal.

3. The simulation testing method according to claim 2, characterized in that, Step S600: Highlight the warning signal on the visualization terminal and send the warning signal to the external monitoring terminal. Then, the process includes: Step S1000: In response to the processing completion signal of the unexpected event, the standard red mark corresponding to the processing completion signal is faded at a uniform rate until it becomes completely transparent within a preset time. Step S2000: Delete the completely transparent standard red marker and generate an event record based on the processing completion timestamp of the processing completion signal; Step S3000: Upload all event records to an external cloud.

4. The simulation testing method according to claim 1, characterized in that, Step S1: Obtain the track topology of the rail transit system and the dynamic parameters of all trains located within the track topology, and establish a JSON configuration file based on the track topology and the dynamic parameters, including: Step S11: Obtain a digital model of the rail transit system based on the design drawings of the rail transit system; Step S12: Extract the three-dimensional coordinates, slope, curve radius, and track nodes based on the digital model and make logical connections to obtain the track topology; Step S13: Obtain the maximum traction force, maximum braking force, and real-time traction force and mass velocity curves of each train based on the preset sampling frequency, and convert them into dynamic parameters in the unified unit of measurement for the current train through the UIC standard. Step S14: Define a three-layer JSON template containing top-level metadata, a middle-level topology network, and a bottom-level train parameter library; Step S15: Use a script to capture the digital model and store it in the top-level metadata, capture the track topology and store it in the middle-level topology network, and capture all dynamic parameters and store them in the bottom-level train parameter library; Step S16: Define the three-layer JSON template after storage as the JSON configuration file.

5. The simulation testing method according to claim 4, characterized in that, Step S2 involves using the Unity3D engine to read the JSON configuration file to construct a scaled digital model, and then using the OPC-UA server to convert the dynamic parameters of each train into JSON format runtime data recognizable by the preset simulation software, including: Step S21: Create an empty scene in Unity3D and receive the JSON configuration file; Step S22: Retrieve the digital model from the top-level metadata to establish an initial 3D model; Step S23: Correct the coordinate system of the initial three-dimensional model based on the world coordinate system, and obtain the three-dimensional orbit model by the same scale as the world coordinate system; Step S24: Retrieve the orbital topology of the intermediate topology network and match and verify it with the three-dimensional orbital model; Step S25: After verifying that there are no errors, retrieve all train dynamic parameters from the underlying train parameter library and generate an interactive train model in the three-dimensional track model; Step S26: Create a data subscription channel for each train interactive model based on the OPC-UA server; Step S27: Based on the preset sampling frequency, retrieve all train dynamic parameters from the underlying train parameter library and update the real-time operating status of each train interactive model through each subscription channel.

6. The simulation testing method according to claim 1, characterized in that, Step S4: Based on the rail transit operation strategy, define at least two objective functions, and use a multi-objective global optimization algorithm to read and iterate the JSON-formatted operation data of all trains in the three-dimensional dynamic model to obtain a Pareto optimal solution set based on all objective functions, including: Step S41: Define at least two mutually exclusive objective functions based on the operation strategy. The input variables for all objective functions are the JSON format operation data of all trains. Step S42: Based on the multi-objective global optimization algorithm, define the JSON format running data of each train as an initial population. The data dimension of the current train's initial population is the same as the data dimension of the current train's JSON format running data. Step S43: Define that each initial population has several random solutions. The position vector of the current train's random solution corresponds to the real-time three-dimensional coordinates of the current train's position, and the velocity vector of the current train's random solution corresponds to the JSON format running data of the current train. Step S44: Define the track topology as the feasible region of all random solutions and the maximum speed of all trains as the exploration boundary. Assign a random speed to each random solution within the ATP protection curve range of the current train. Step S45: Iteratively update the previous position and current velocity of all random solutions several times based on the preset sampling frequency, and calculate the function value of each random solution based on each objective function in each iteration update; Step S46: Filter the Pareto front solutions updated in all rounds of iterations using non-dominated sorting and store them in an external archive. Step S47: When the number of iterations reaches the preset maximum number, or when the rate of change of the hypervolume index of the Pareto solution set in the external archive is lower than the rate of change threshold, the final archive of the external archive is output and defined as the Pareto optimal solution set.

7. A simulation testing device for an urban rail transit system, wherein the simulation testing device is applied to the simulation testing method for the urban rail transit system as described in any one of claims 1 to 6, characterized in that, The simulation testing device includes: The track system configuration file construction module is used to obtain the track topology of the rail transit and the dynamic parameters of all trains located within the track topology, and to establish a JSON configuration file based on the track topology and the dynamic parameters; The digital model and runtime data preparation module is used to read the JSON configuration file through the Unity3D engine to build a scaled digital model, and to convert the dynamic parameters of each train into JSON format runtime data that can be recognized by the preset simulation software through the OPC-UA server. The three-dimensional dynamic model generation module is used to input the real-time three-dimensional coordinates of all trains and the JSON format running data of all trains into the proportional digital model at a preset sampling frequency to form a three-dimensional dynamic model. The three-dimensional dynamic model iteration module is used to define at least two objective functions based on the operation strategy of the rail transit, and to read and iterate the JSON format operation data of all trains in the three-dimensional dynamic model through a multi-objective global optimization algorithm to obtain a Pareto optimal solution set based on all objective functions. The train optimal running status update module synchronizes the optimal running data of all trains in the Pareto optimal solution set in JSON format to each train to obtain the optimized three-dimensional dynamic model; The three-dimensional dynamic model real-time update module repeatedly executes the orbital system configuration file construction module to the three-dimensional dynamic model update module based on the preset sampling frequency, so as to update the optimized three-dimensional dynamic model in real time, and sends the optimized three-dimensional dynamic model to the external monitoring terminal once for each update.

8. An electronic device, characterized in that, The method includes a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor; when the processor executes the program instructions stored in the memory, it implements the simulation test method as described in any one of claims 1 to 6.

9. A storage medium, characterized in that, The storage medium stores program instructions, which, when executed by a processor, implement the simulation test method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Digital twinning evolution mechanism and method for intelligent mine scene

    CN111210359A

  • Subway train performance evaluation system construction method based on digital twinning

    CN112258094A