A hump simulation method and practical training system based on parameterized configuration

By using a parameterized camel hump simulation method, the physical model and the control model are decoupled. Combined with multi-clock domain discrete event scheduling and mutual exclusion token mechanism, the problems of large state space and strong coupling between physical and control systems in camel hump simulation systems are solved, achieving high-fidelity and safe and reliable simulation results.

CN122902316BActive Publication Date: 2026-11-27CHENGDU YUNDA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611402152.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-11-27
Estimated Expiration
2046-09-10

AI Technical Summary

Technical Problem

In existing railway hump simulation systems, the large state space and strong coupling between physical control and physical control lead to behavioral distortion. It is difficult to balance randomness and safety determinism, and the simulation results cannot be consistent with the real system. Furthermore, it cannot be adapted to different hump stations.

Method used

The parametric configuration of the camel hump simulation method is adopted. By constructing a parametrically driven simulator and a virtual sensing layer, the physical model and the control model are decoupled. Multi-clock domain discrete event scheduling and mutual exclusion token mechanism are introduced to generate control commands that conform to the response characteristics of the real system, thus ensuring the credibility and security of the simulation results.

Benefits of technology

It achieves high-fidelity and high-efficiency simulation, ensuring that the simulation results are consistent with the real system, adapting to different hump stations, and maintaining safe and reliable reproducible simulation results under random factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122902316B_ABST
    Figure CN122902316B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on parameterization configuration's hump simulation method and practical training system, the method includes: constructing parameterization driven simulation machine;Reflecting the directed dependence graph of state dependence relationship between devices;Update along the dependence path in graph propagation and act on affected node, irrelevant node state remains unchanged;S2, by constructing virtual sensing layer and behavior agent model, the decoupling of physical model and control model is carried out;Behavior agent model is deployed in the simulation machine, and according to current station state and the pseudo observation sequence, control command meeting the response characteristics of real system is generated, drives the device state in simulation machine;Therefore, by constructing the directed dependence graph of device based on configuration file, and using the incremental state updating mechanism of event-driven, the state calculation range is strictly limited to the local node affected, avoids state space explosion problem, and improves the running efficiency of large-scale station simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of train training simulation technology, and in particular to a hump simulation method and training system based on parameterized configuration. Background Technology

[0002] Currently, railway training systems use simulation software for teaching. This typically involves using software to create a 1:1 replica of the TW-2 or TBZKII operating interface and station layout, which students then operate on. For example, the teacher's control panel can inject all types of hump yard faults with a single click, simulating real-world emergencies and establishing standardized handling procedures. Another example is allowing multiple people to simultaneously operate the system locally, simulating real-world coordination in marshalling yards.

[0003] However, the various external systems in railway dispatching, such as the TW-2 or TBZKII type hump yard automation control systems, are all process control systems in railway marshalling yards. Their controlled objects are various equipment throughout the hump yard, including speed reducers, switches, signals, and parking devices, directly affecting on-site traffic safety and operational efficiency. Once such systems are put into actual operation, their control logic, interface protocols, and operating parameters are all fixed and locked. Therefore, when constructing a hump yard simulation training system, these external systems cannot be directly called, modified, or embedded as simulation objects, resulting in a disconnect between the simulation process and the real-world situation, and a significant gap between the training content and the actual operation process.

[0004] Therefore, in existing technologies, railway dispatching simulation training typically employs a system architecture consisting of a simulator as the simulation environment layer, a server as the core logic layer, and a training terminal as the interactive presentation layer. The simulator simulates the external behavior of the external system, the server performs logical calculations based on the simulator's feedback, and the training terminal provides human-computer interaction and operational feedback. The simulator sends simulated signals to the server, which performs logical calculations based on the simulator's feedback data and returns the results to the training terminal for the trainee. For example, patent CN108153165 B uses this method to simulate a marshalling yard integrated automation system; this can shorten on-site personnel training time and optimize the effectiveness of practical training.

[0005] However, the aforementioned existing technologies still have some problems:

[0006] First, regarding the automated control system for hump yards, behavior can only be reproduced through externally observable I / O signals, such as route commands, signal status, track occupancy, and speed and length measurement data. However, a medium-sized hump yard may contain hundreds of track sections, dozens of turnouts, dozens of signals, and multiple speed reducers. The states of these devices are interlocked and constrained, resulting in an extremely large overall state space. Signal changes range from millisecond-level rapid responses, such as the delay in track section occupancy detection, to second-level operational processes, such as turnout switching and route arrangement, to minute-level shunting intervals—behaviors at different time scales are nested together. Furthermore, the execution of operational plans and the timing of vehicle shunting are influenced by various random factors, while interlocking constraints and safety conditions require signal changes to meet strict deterministic rules.

[0007] Secondly, in real-world scenarios, the TW-2 or TBZKII type hump yard automated control system issues decelerator braking commands according to its internal control strategy based on the real-time vehicle status reported by speed and length measuring devices. After executing the command, the decelerator changes the vehicle speed, and this speed change, in turn, causes changes in subsequent speed measurement data, forming a complete information loop. However, in a simulation environment, the server sends the simulator with the student's operation instructions or preset conditions of the simulation scenario. The simulator must autonomously generate feedback signals such as speed and length measuring data and track occupancy status corresponding to these operations, ensuring that the behavior logic of the entire closed loop is consistent with the real system. This results in a strong coupling between the physical model (vehicle motion) and the control model (speed adjustment decision), while the internal logic of the control model is unknown. If the physical model is inaccurate, the speed measurement data generated by the simulation will deviate from the real distribution, causing the control decisions based on this data to branch differently in the simulation than in the real system. If the control model's response to physical feedback is inconsistent with the real TW-2 or TBZKII type hump yard automated control system, even if the physical model is accurate, the generated command sequence will deviate from reality.

[0008] Third, it is also necessary to consider how to achieve a station description that is parameterizable and supports efficient runtime querying and verification, so that the simulator can adapt to different hump stations by adjusting the parameter file, and at the same time, it can complete interlocking condition checks and status updates with deterministic low latency during simulation.

[0009] Fourth, after introducing the above-mentioned random factors, it is also necessary to ensure that the simulation results are reproducible: if the order of concurrent interlocking requests is uncertain due to random delays, multiple simulations under the same initial conditions will give different results, which cannot be used for practical training assessment and fault review.

[0010] In summary, there is still much room for improvement in existing railway training systems. Summary of the Invention

[0011] The purpose of this invention is to overcome the shortcomings of the prior art and provide a camel hump simulation method and training system based on parameterized configuration. This provides a high-fidelity, high-efficiency and safe and reliable simulation solution to address the core problems of existing camel hump simulations, such as the large state space, strong coupling between physical and control leading to behavioral distortion, and the difficulty in balancing randomness and safety determinism.

[0012] The objective of this invention is achieved through the following technical solution:

[0013] In a first aspect, this application discloses a camel hump simulation method based on parameterized configuration, comprising the following steps: S1, constructing a parameterized driven simulator; loading the station configuration file, parsing out equipment attributes and interlocking constraints, and constructing a directed dependency graph reflecting the state dependencies between equipment; when an event triggers a state transition of a source node in the directed dependency graph, performing incremental state updates based on the directed dependency graph; in response to the state flip frequency exceeding a preset jitter threshold, marking the source node as a state to be confirmed, and pausing the dependency path along the directed dependency graph originating from the source node. Incremental state update; wherein, random delay is introduced according to the probability distribution parameters preset in the configuration file, and a lock mechanism based on mutual exclusion tokens is used for shunting hook planning for operations with mutual exclusion relationships; S2, the physical model and control model are decoupled by constructing a virtual sensing layer and a behavior agent model; a behavior agent model is deployed in the simulator, which is a data-driven model trained based on historical operating data of the real system, so as to generate control commands that conform to the response characteristics of the real system according to the current station status and the pseudo-observation sequence, and drive the equipment state machine in the simulator.

[0014] Secondly, this application discloses a training system, comprising: a simulator, serving as a simulation environment layer, on which are deployed: a parameter resolver, used to load station configuration files, parse out equipment attributes and interlocking constraints, and construct a directed dependency graph in memory reflecting the state dependencies between equipment; an equipment behavior engine, composed of multiple finite state machine instances, where each field device is abstracted as an independent finite state machine, and its state set and transition rules are determined by the configuration data provided by the parameter resolver; and a behavior agent model, deployed within the simulator, which is a data-driven model trained based on historical operating data of a real system, used to generate control commands that conform to the response characteristics of a real system based on the current station state and the received pseudo-observation sequence, so as to drive the equipment state in the equipment behavior engine. The system includes: a state machine; a mutex token manager, connected to the device behavior engine and the behavior agent model, used to execute a lock mechanism based on mutex tokens for operations with mutual exclusion relationships to ensure interlocking security constraints; and a server on which a physical model and a virtual sensing layer are deployed; the physical model is used to calculate the vehicle's motion state in real time; the virtual sensing layer is connected to the physical model and is used to map the continuous vehicle motion state output by the physical model into a discrete pseudo-observation sequence with simulated real sensor transmission characteristics, and push it to the behavior agent model in the simulator; and a training terminal, as an interactive presentation layer, used to present a graphical interface of the hump yard, receive operation instructions from trainees and send the operation instructions to the server, and receive and display the logical calculation results from the server.

[0015] The beneficial effects of this invention are:

[0016] First, by constructing a device-directed dependency graph based on configuration files and adopting an event-driven incremental state update mechanism, the scope of state calculation is strictly limited to the affected local nodes. This reduces the computational load of a single state update from the scale of all station equipment to the scale of affected nodes, improving the operational efficiency of large-scale station simulations. Simultaneously, a multi-clock domain discrete event scheduling strategy is introduced, enabling behaviors at different time scales to be mixed and scheduled in a unified queue according to precise timing, ensuring the temporal causal correctness of the simulation. Second, by constructing a virtual sensing layer and a data-driven behavioral agent model, the physical model and control model are decoupled. The former generates pseudo-observation data with real sensor transmission characteristics, while the latter is trained using historical operation logs to recreate the control response characteristics of the real system. This effectively avoids long-term behavioral drift caused by closed-loop coupling, significantly improving the reliability of the simulation. Finally, for the control commands sampled from the behavior agent model, a lock mechanism based on mutex tokens is introduced to carry out the release hook plan before injecting them into the event queue. When concurrent requests occur, the order of token acquisition is determined according to priority and fine-tuning timestamp, thereby ensuring that the safety principle always takes precedence and the simulation results are reproducible, regardless of random disturbances. Attached Figure Description

[0017] Figure 1 This is a simplified flowchart illustrating a camel hump simulation method based on parameterized configuration according to an embodiment of this application.

[0018] Figure 2 This is a simplified schematic diagram illustrating the jitter detection and subsequent judgment process according to an embodiment of this application;

[0019] Figure 3 This is a simplified schematic diagram of a training system for implementing the camel hump simulation method with the parameterized configuration according to an embodiment of this application. Detailed Implementation

[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] refer to Figure 1 The method for camel hump simulation based on parameterized configuration according to embodiments of this application includes:

[0022] S1. Construct a parameterized, driven simulator; load the station configuration file, parse out equipment attributes and interlocking constraints, and construct a directed dependency graph reflecting the state dependencies between equipment; in response to the state transition frequency exceeding a preset jitter threshold, mark the source node as an unconfirmed state and pause incremental state updates along the dependency path originating from the source node in the directed dependency graph. That is, when an event triggers a state transition of a source node in the directed dependency graph, incremental state updates are performed based on the directed dependency graph. This update propagates along the dependency path in the graph and affects the affected nodes, while the states of unrelated nodes remain unchanged.

[0023] It is worth noting that during actual hump shunting operations, when vehicles pass through switch areas, the states of critical equipment such as switch devices, reducers, and signals often experience frequent state jumps due to sensor noise, signal interference, or control logic conflicts. Existing simulation systems cannot effectively identify and handle this jitter phenomenon, leading to continuous oscillations in the equipment states during the simulation process, which in turn triggers a chain reaction, causing the state updates of the entire shunting scenario to become chaotic. Therefore, in this embodiment, the acquisition of the state flip frequency of the source node in the microscopic clock domain can be achieved by setting a sliding observation window with a duration equal to the microscopic simulation cycle within the microscopic clock domain; counting the number of state jumps of the source node within the sliding observation window; if the number of state jumps is greater than or equal to a preset jump frequency threshold, it is determined that the state flip frequency exceeds a preset jitter threshold; if the number of state jumps is less than the preset jump frequency threshold, it is determined that the state flip frequency does not exceed the preset jitter threshold.

[0024] Building upon the foregoing, this embodiment also introduces a multi-clock-domain discrete event simulation scheduling strategy to address the problem of nested behaviors across multiple time scales. In this embodiment, at least two simulation clock domains with different precisions are defined, ensuring that each event to be processed carries a timestamp and a tag indicating its clock domain. A global event queue is maintained, and all events to be processed, regardless of their clock domain, are uniformly sorted according to the chronological order of their timestamps. During scheduling, the event with the earliest timestamp is retrieved from the global event queue, the simulation time is advanced to that timestamp, and a state update process for the corresponding clock precision is triggered based on the clock domain tag to which the event belongs.

[0025] Specifically, three types of simulated clock accuracy are defined, including micro-clocks. Preferably with an accuracy of 1 ms; used for processing rapid signals such as track section occupancy / clearance detection delay and speed measurement data updates; ordinary clock. Preferably with an accuracy of 100ms; used for turnout switching processes, signal display changes, etc.; macroscopic clock. The preferred accuracy is 1 second; it is used for slow-varying processes such as route arrangement and shunting plan stepping. Let the current simulation time be t, then event e carries a timestamp. In this embodiment, each event e to be processed carries a timestamp. In addition, it also includes the clock domain label to which it belongs. , For the three different clock tags mentioned above, the simulation engine maintains a [system / mechanism]... The simulation engine maintains an event queue (Queue) sorted by timestamp in ascending order. A single scheduling loop follows the following process:

[0026] ;

[0027] Find the earliest event in the entire pending event queue, denoted as e*, and retrieve the event that satisfies the conditions. The first event e* advances the global simulation clock to [time]. ;in accordance with Execute state updates in a layered manner. For example, if... Update the status of micro-sensors such as track occupancy and train speed measurement; for example, if Each event drives the device state machine and top-level scheduling process to complete state transitions and generates subsequent events as needed for queuing. This allows behaviors with different time granularities to be mixed and scheduled in the same event queue according to precise timing, ensuring the correct temporal causal relationship between millisecond-level responses and minute-level jobs, and avoiding computational waste or time error accumulation caused by a globally unified clock.

[0028] Then, a random delay is introduced according to the preset probability distribution parameters in the configuration file. For operations with mutual exclusion relationships, a lock mechanism based on mutual exclusion tokens is used to carry out the release hook plan to ensure that the security logic is still deterministically satisfied after the introduction of the random disturbance.

[0029] To ensure that the simulator can reproduce the externally observable behavioral characteristics without relying on the internal logic of TW-2 or TBZKII, this embodiment adopts a parameterized driving approach, decoupling the station configuration from the equipment behavior rules. This ensures that the system can adapt to hump yards of different sizes and layouts by modifying the configuration file.

[0030] Specifically, step 1 includes:

[0031] S110 sets up a parameter parser, a finite state machine (FSM), and a signal generator. The parameter parser is responsible for loading the station configuration file in JSON or YAML format, and parsing out static information such as the topological connection relationship of the track section, turnout numbers and their positioning / reversing logic, signal display rules, reducer control modes, interlocking condition tables, and response delay parameters of various devices. All these configurations are stored in data form, achieving complete decoupling from business logic. Then, various field devices are modeled based on the finite state machine (FSM). For example, each set of turnouts is abstracted as an independent FSM instance, whose state set includes "positioned," "reversed," "converting," and "fault." State transitions are driven by external events such as route commands, track section occupancy status, and interlocking conditions; among them, the signal state update strictly follows the railway signal fault-oriented safety principle, dynamically adjusting its display status according to conditions such as the occupancy status of the preceding section and whether a hostile route has been established.

[0032] The signal generator is responsible for mapping the internal logic states of the device behavior engine to standard I / O signal outputs that conform to the communication protocols of real TW-2 or TBZKII systems. For example, it can be configured to support Modbus TCP or proprietary protocol encapsulation to ensure compatibility with existing training terminals.

[0033] Furthermore, in order to achieve deterministic and low-latency state updates despite the large state space of the simulated hump yard, and to reproduce the numerous random fluctuations present in the behavior of the real TW-2 or TBZKII systems in the model, step 1 also includes:

[0034] S120. To reduce the computational cost of a single state update when simulating a hump yard and to meet the real-time requirements of large-scale yard simulation, this step introduces a hierarchical incremental state update mechanism based on a directed dependency graph, building upon the finite state machine constructed in S110. Specifically, this includes:

[0035] S121, Reference Figure 2 Within the sliding observation window, the system monitors real-time state change events of source nodes, including track sections transitioning from idle to occupied, and switches transitioning from active to inactive. Whenever a state transition is detected, a state jump event is recorded in the sliding observation window. This record includes the precise timestamp of the jump, the source state, and the target state. By traversing all state jump records within the sliding observation window, the total number of state jumps for the source nodes within the current micro-simulation cycle is counted. This count reflects the frequency of state changes in the source nodes. To ensure statistical accuracy, the state jump statistics mechanism employs atomic operations to avoid counting errors during high-concurrency state updates.

[0036] ;

[0037] in, This represents the number of state transitions. For the microscopic simulation cycle, Let be the node state at time t. For indicator functions, This is the initial time.

[0038] If the number of state transitions is greater than or equal to a preset threshold, the state transition frequency is determined to exceed a preset jitter threshold. If the number of state transitions is less than the preset threshold, the state transition frequency is determined to be within the preset jitter threshold. Specifically, based on the equipment characteristics and system stability requirements of the hump operation, a state transition threshold is preset, for example, set to 3 times, meaning that if the source node's state transitions exceed 3 times within a micro-simulation cycle, abnormal jitter is considered to exist. The statistically obtained source node state transition count is compared with the preset threshold. When the number of state transitions is greater than or equal to 3 times, the source node's state transition frequency is determined to exceed the preset jitter threshold, indicating a risk of state jitter. When the number of state transitions is less than 3 times, the source node's state transition frequency is determined to be within the normal range, and the state change is stable. Based on the determination results, the system outputs corresponding state stability assessment information, providing a decision-making basis for subsequent state confirmation and dependency path control.

[0039] Therefore, by setting a sliding observation window with a duration equal to the micro-simulation cycle within the micro-clock domain, counting the number of state transitions of the source node within the sliding observation window, and comparing it with a preset threshold for the number of transitions to determine whether the frequency of state transitions exceeds the jitter threshold, this technique overcomes the technical problems of existing hump simulation systems, such as the lack of a fine-grained state jitter monitoring mechanism, the inability to accurately identify abnormally frequent changes in equipment state, and the inability of static threshold settings to adapt to the differences in the dynamic characteristics of different devices. This achieves precise micro-timescale state monitoring through the sliding observation window, accurately counts the frequency of state transitions, and scientifically determines the degree of jitter, providing reliable quantitative indicators for state stability control and effectively improving the state management accuracy and stability of the hump simulation system.

[0040] S122. Using track sections and turnouts as nodes of the directed dependency graph, and using interlocking constraints between equipment as directed edges of the directed dependency graph, wherein the direction of the directed edge represents the causal dependency of state transition.

[0041] The station equipment is divided into several control areas according to spatial layout and interlocking constraints, such as the peak arrival area, peak push area, peak shunting area, and marshalling track area. The equipment in each area constitutes a local state unit, and the areas are coupled through route interface signals (such as inspection conditions and inter-field communication signals).

[0042] For example, a directed dependency graph is established using track sections and turnouts as nodes and interlocking constraints as directed edges. Where V is a device state node, with a total of n nodes, and E represents the causal dependency of state transitions. For each node... Define its set of states The theoretical state space size of the entire station is then... However, the actual reachable state is constrained by the interlocking rules, and only a subset that satisfies the interlocking conditions needs to be maintained.

[0043] Furthermore, the state update is configured to use an event-driven incremental propagation algorithm: when a certain event e triggers a node... During state transitions, only along graph G from The starting path is defined, and the event 'e' refers to route commands, track occupancy changes, etc. Then, the set of affected nodes is calculated hop-by-hop. And update its state. Specifically, if event e causes the source node... A state transition occurs only along the path in graph G. The reachable path from the starting point is traversed hop by hop, and the set of affected nodes is calculated. And only perform state updates on nodes within that set, affecting the set of nodes. Defined as:

[0044] , Represents a node The interlocking condition depends on the state of the source node. .

[0045] The propagation rule is: for any original state Updated to new status :

[0046] ;

[0047] in, The state transition function, defined according to the interlocking table, only causes a transition if the combination of input states satisfies certain conditions. All are nodes.

[0048] In some embodiments, to address the need to reproduce the numerous random fluctuations in the behavior of real TW-2 or TBZKII camel hump automated systems in the model, while ensuring that the deterministic rules of interlocking safety conditions are not violated, the method further includes:

[0049] S123. In the station configuration file, define the probability distribution and its parameters for the state transition delay of each type of equipment. For example:

[0050] Switch switching time : Follows a truncated normal distribution, given a nominal value Standard deviation and lower limit Upper limit The probability density function p can be obtained; track segment occupancy detection delay. Its relationship with vehicle entry speed v and number of axles Related, base latency The data is derived from a physical model, such as a conventional vehicle kinematics model and track circuit occupancy detection method. For example, based on the vehicle's current speed, number of axles, and section length, the time from the first axle entering the section to the last axle exiting the section can be calculated using the uniformly decelerated motion equation. This can be obtained by modeling a hump speed measurement system and then superimposing a non-negative random disturbance on top of it. ,thus:

[0051] ;

[0052] Wherein, the shape parameter k and the scale parameter Specify this in the configuration file. This allows the server-side physical model to calculate the theoretical timing of when a vehicle enters and leaves the section, thus obtaining the base delay. Then, the virtual sensing layer at the simulator end superimposes a non-negative random delay that conforms to the real error distribution on top of this. (That is, the values ​​follow a gamma distribution, which can also be expressed as) ), to obtain the track section occupancy detection delay .

[0053] Speed ​​measurement data deviation: Simulates real sensor error, assuming the vehicle's current real speed is given by the physical model and denoted as . Output speed value , For measurement noise that follows a zero-mean normal distribution, Configured in the settings. Shunting interval: The time interval between shunting adjacent hook cars. It follows a negative exponential distribution, i.e. Interval between adjacent hook cars It is related to the intensity of the work and can also be configured.

[0054] When the signal generator generates I / O signals, for each state transition event that requires timing, the pseudo-random number generator is invoked to sample the actual delay or value according to the above distribution, and the time when the transition event is inserted into the event queue is marked as the current simulation time plus the sampled value. To ensure simulation reproducibility, a random seed item is included in the configuration file, which is used to initialize all random number generators when the simulator starts.

[0055] To ensure that the railway signal failure-guided safety principle is not violated under random disturbances, a shunting and coupling planning mechanism based on mutual exclusion tokens is adopted. For routes or commands with hostile relationships, their enabling conditions and execution actions are strictly atomized. Let the two hostile routes be... Its locking variable is At any given moment in the simulation, the following must be satisfied:

[0056] ;

[0057] When two route requests have similar timestamps due to random delays, the priority associated with each request and the fine-tuning timestamp are compared. The priority, based on route type and triggering order, ensures that the route that acquires the mutex token first completes locking before the other route performs locking condition checks. Token management is implemented using atomic operations from the simulation engine, for example:

[0058] ;

[0059] ;

[0060] in, To acquire the mutex token for path A, `try_acquire` is an atomic operation. If the token is successfully acquired, path A is locked. Setting it to true indicates locking, and executes `lock_zone(RA)` to lock the physical zone corresponding to path A. If attempting to acquire... If the attempt fails, it means that path A is currently unavailable or the token is occupied. The system then enters the else if branch and attempts to acquire the mutex token for path B. If the token for route B is successfully obtained, then the locked state of route B will be maintained. Set to true and execute lock_zone(RB) to lock the physical zone corresponding to path B.

[0061] For any request that cannot obtain a token, its state machine remains in a waiting state until timeout or the condition is resolved. In this way, regardless of how randomly the delays of each device's actions fluctuate, the interlocking safety constraints remain hard constraints, achieving a balance between the reproducibility of random behavior and deterministic safety.

[0062] It is worth noting that traditional simulation systems often bind the physical model of vehicle motion and the control model generated by speed control commands into the same closed loop. If either model deviates, it can easily lead to long-term drift in the overall behavior, severely affecting the reliability of the simulation. To address this, this embodiment decouples the physical model from the control model: the physical model and the virtual sensing layer are deployed on the server side, while the behavior proxy model is deployed on the simulator side. The two are coupled only unidirectionally through a pseudo-observation sequence with random delay and measurement noise, without sharing continuous state truth values. This cuts off the mutual amplification path between physical deviations and control deviations, allowing the simulator to independently generate feedback signals that conform to the response characteristics of the real system without needing to reproduce the internal control strategies of the TW-2 or TBZKII systems.

[0063] Based on the above embodiments, in some preferred embodiments, after obtaining the state transition frequency of the source node in the microscopic clock domain, the method further includes:

[0064] If the difference between the number of state transitions and a preset threshold value falls within a preset critical difference range, the source node is determined to be in a critical jitter state. Specifically, this involves performing a more refined jitter analysis based on the number of state transitions, and setting a preset critical difference range to identify source nodes on the edge of jitter. For example, when the preset threshold value is 3 transitions, the preset critical difference range is set to ±1 transition, meaning that when the number of state transitions is 2 or 4, the source node is considered to be in a critical jitter state. By calculating the difference between the number of state transitions and the preset threshold value, and determining whether this difference falls within the preset critical difference range, source nodes that, while not completely exceeding the threshold, are close to the jitter boundary are identified. Identifying critical jitter states helps to provide early warning of potential state instability, offering a time window for implementing preventative control measures.

[0065] In response to a source node being in a critical jitter state, the system pre-activates mutex tokens corresponding to associated nodes that have a mutually exclusive relationship with the source node to lock the state transition of the associated nodes. Specifically, when the source node is determined to be in a critical jitter state, the system initiates a preventative protection mechanism to prevent the jitter state from spreading in the directed dependency graph. First, based on the interlocking constraints in the site configuration file, associated nodes that have a mutually exclusive relationship with the source node in a critical jitter state are identified. These associated nodes are typically other devices on the same path or adjacent devices with signal conflicts. Then, a pre-activation request is sent to the mutex token manager to pre-acquire the mutex token corresponding to the associated node. This token is used to lock the state transition permissions of the associated node. The pre-activation mechanism ensures that when the source node's state does indeed experience abnormal jitter, it can immediately prevent potentially affected associated nodes from changing their states, avoiding system instability caused by a chain reaction. The pre-activated mutex token has a time limit; if the source node's state recovers to stability within a specified time, the pre-activated token will be automatically released.

[0066] Therefore, the technical approach of determining whether the source node is in a critical jitter state by the difference between the number of state transitions and a preset threshold number of transitions, and pre-activating the mutex tokens corresponding to the associated nodes to lock the state transition of the associated nodes when they are in a critical jitter state, overcomes the technical problems of existing interlocking systems that only activate protection measures after the state is completely abnormal, cannot preventively control potentially unstable states, and lack of a collaborative protection mechanism for associated devices, which may lead to systemic instability due to local jitter. Thus, it achieves the technical effect of early warning of jitter risk through critical state identification, and preventive protection of associated devices through the pre-activation of the mutex token mechanism, effectively preventing the propagation and spread of state jitter in the interlocking network, and improving the overall stability and security of the hump simulation system.

[0067] Specifically, in S2, a virtual sensing layer and a behavioral agent model are constructed to decouple the physical model from the control model. The virtual sensing layer maps the continuous vehicle motion state output by the physical model to a discrete pseudo-observation sequence that simulates the transmission characteristics of real sensors. A behavioral agent model is deployed within the simulator. This behavioral agent model is a data-driven model trained using historical operating data from the real system. It is configured to generate control commands that conform to the response characteristics of the real system based on the current station status and the pseudo-observation sequence, thereby driving the equipment state machine within the simulator.

[0068] The virtual sensing layer runs on the server side and is responsible for receiving contextual information from the physical model, such as the vehicle's real-time location, speed, shunting plan, and climate parameters. This information is transformed into a set of pseudo-observation inputs and pushed to the simulator. The behavioral agent model is a set of lightweight machine learning models deployed inside the simulator. Its training data comes from historical operation logs to learn and fit the input-output mapping relationship of the feedback signal sequence that the real TW-2 or TBZKII system may produce under given operating conditions.

[0069] For example, when the server issues a command to start the release of a certain hook car, the simulator's behavior agent model will take into account factors such as the current station status, the trajectory of the preceding vehicles, and wind speed to predict the occupancy sequence of each subsequent track section, the probability distribution of speed measurement point readings, and the action sequence of the decelerator, and actively push these prediction results back to the server as feedback signals.

[0070] Step 2 specifically includes S210 and S220.

[0071] S210. Construct a virtual sensing layer to map the continuous state of the physical model into discrete pseudo-observation inputs that conform to the characteristics of real sensors.

[0072] The vehicle motion physics model running on the server side employs a multi-mass train longitudinal dynamics and kinematics model to calculate the position, velocity, and acceleration of each vehicle in real time. The physics model can use content already configured in the TW-2 or TBZKII systems. For ease of understanding, this embodiment provides an example for reference:

[0073] Let the mass of the i-th vehicle be... Real-time speed is The location is Then its equation of motion can be written as:

[0074] ;

[0075] in, For the component force of the ramp, Add resistance to the curve. The braking force applied to the reducer can be determined by commands pushed by the simulator through the behavioral agent model. For wind power, This represents the basic operating resistance.

[0076] The task of the virtual sensing layer is to convert the aforementioned continuous physical states into a pseudo-observation data stream equivalent to the external I / O signals of the real TW-2 or TBZKII system, including track section occupancy / clearance events, velocity readings at speed measuring points, length measurement pulse counts, and decelerator status feedback. The conversion process must reproduce the delays, noise, quantization errors, and fault modes of the real sensors in terms of physical characteristics and signal transmission, and all parameters are obtained from the station configuration file described in step S110. Specifically, this includes:

[0077] Track segment occupancy status mapping.

[0078] Define track segment boundary coordinates ,in Starting from the boundary, This is the boundary endpoint. When the first wheelset of the vehicle enters the section, a section occupancy event should be generated; when the last wheelset leaves the section, a clearing event should be generated. To simulate the shunt sensitivity and transmission delay of the track circuit, assume that the vehicle's foremost axle enters... The time is Based on the aforementioned embodiments, the timestamp for inserting the occupancy event into the simulator event queue is:

[0079] ;

[0080] ;

[0081] in, The speed of the vehicle at the moment the first axle enters. The physical model is based on the wheel-rail contact conduction characteristics, calculated in a way that is proportional to the number of axles divided by the speed. If the vehicle reverses out during the delay period, the occupancy event is canceled to ensure that the state is consistent with physical reality.

[0082] Speed ​​measurement point data generation.

[0083] The configuration file defines the installation locations of each speed radar or pedal sensor. The physics model provides the actual instantaneous speed when the vehicle passes through this location. The virtual sensing layer generates a noisy speed measurement output using the following formula:

[0084] ;

[0085] in, The speed measurement error follows a mean of 0 and a variance of 0. The normal distribution The station configuration is set according to the sensor model to reflect the random fluctuations of real radar speed measurement. The sensors sample at fixed intervals: if a vehicle has not yet completely passed the speed measurement point but is within the effective beam range, the virtual sensing layer captures the latest speed of the physical model at each sampling moment and generates a corresponding speed measurement message. Each frame of the speed measurement message contains the speed value, timestamp, and sequence number. The timestamp is marked as follows:

[0086] ;

[0087] The simulation time is the instant of sampling. The transmission delay can be set to a constant or a random value following a normal distribution in the configuration. In this way, the speed feedback signal is marked as an event that can enter the micro-clock domain event queue described in step S120.

[0088] The above signals are uniformly encapsulated into data frames consistent with the proprietary protocols of the real TW-2 or TBZKII systems. Each frame contains the device address, signal type, value, timestamp, and sequence number, and is pushed to the simulator's signal receiving queue. To ensure timing consistency, the virtual sensing layer maintains a local event queue compatible with the multi-clock domain discrete event scheduling mechanism in step S120. Pseudo-observation events are sorted by timestamp and then sent through the simulation network interface, achieving loose coupling and deterministic data-driven operation between the physical model and the simulator.

[0089] S220. Construct a behavioral agent model, using offline training combined with online inference, to generate feedback signals such as decelerator braking commands and route arrangements equivalent to the real TW-2 or TBZKII control strategies. In this embodiment, the agent model adopts a temporal probabilistic generation network with an encoder-decoder architecture. The agent model receives an input sequence, which includes at least the current station equipment status, shunting plan, environmental parameters, and the pseudo-observation sequence generated by the virtual sensing layer within a recent time window; it generates and outputs an output sequence, which represents the probability distribution of control commands over a future period. The control commands include at least the decelerator braking level and duration, and the signal action sequence.

[0090] The behavioral agent model is deployed within the simulator. Its design goal is to output the probability distribution of control commands such as decelerator braking level and duration, and signal action sequences over a future period, given the current station equipment status, shunting plan, environmental parameters, and recently generated pseudo-observation sequences from the virtual sensing layer. This outputs the probability distribution of these commands, thereby driving the state transitions of the FSMs (Front-Side Controllers) within the simulator. The model employs a temporal probabilistic generation network with an encoder-decoder architecture. The specific construction steps are as follows:

[0091] Training data construction.

[0092] Fragments were extracted from historical operational logs of real TW-2 or TBZKII systems. Each sample contains an input sequence with lengths of [missing information]. and ; With output sequence Input vector Encoding at time t: Current shunting car sequence number Target lane, number of vehicle axles Total weight M; field equipment status snapshot (signal display, turnout position, current braking level of reducer); spurious observations from the most recent H steps, including speed at the speed measuring point. Track segment occupancy vector Binarization can be used to represent whether each section is occupied, and meteorological parameters such as wind speed, wind direction, and humidity. Recent pseudo-observation window: the sequence of velocity values ​​generated by the virtual sensing layer in the most recent H steps, as well as real-time meteorological parameters such as wind speed, wind direction, and humidity at each velocity measurement point.

[0093] Output vector This includes: reducer braking commands, set as discrete actions such as braking levels 1-4 or release. 0 represents mitigation, while 1-4 correspond to different braking levels, signal light position change commands, and the expected duration of the corresponding actions. All sequences are aligned, normalized, and interpolated to form equally spaced sequences with a fixed time step (e.g., 100ms).

[0094] Next, the model structure in this embodiment will be described.

[0095] We employ an attention-based sequence-to-sequence model, specifically a combination of a Transformer encoder and an autoregressive Transformer decoder.

[0096] The encoder maps the input sequence X to a context representation. The encoder is composed of stacked multi-head self-attention layers and feedforward networks. A high-dimensional feature vector, or context embedding vector, is generated for each position in the input sequence to capture the temporal dependency between the station state and pseudo-observations.

[0097] The decoder uses the previously generated output vector Taking the command sequence as input, the probability distribution of the next control command is generated step by step. To characterize the multimodal behavior caused by various random factors in real systems, the output layer uses a classification distribution for discrete actions (decelerator levels) and a Gaussian mixture model (GMM) for continuous quantities such as duration. In detail:

[0098] Let the hidden state of the decoder at step t be... ,but:

[0099] ;

[0100] in, This represents a Transformer decoder layer that accepts the embedding vector output from the previous step. The hidden state of the previous step Furthermore, by focusing on the encoder output C through a cross-attention mechanism, the hidden state of the current step is obtained. Initial hidden state Initialized by mean pooling or learnable vectors output by the encoder, and start symbol

[0101] Reducer braking level The conditional probability is:

[0102] ;

[0103] In the formula, This is the classification weight matrix. Given the bias vector, softmax outputs the probabilities of the five categories.

[0104] If the duration corresponding to the action is Then its distribution uses a Gaussian mixture model:

[0105] ;

[0106] Among them, the mixing coefficient mean ,variance All by It is obtained through a linear layer and softmax / exp activation. The training objective is to maximize the log-likelihood.

[0107] During simulation, whenever the server issues a new release command or the site status changes significantly, the behavior agent model is triggered to perform forward reasoning.

[0108] Specifically, during simulation, the behavioral agent model is triggered in two situations: the server issues a new release plan; or it receives a critical pseudo-observation update that causes the state to deviate significantly from expectations, such as the speed deviation of the speed measurement point exceeding the threshold.

[0109] Upon triggering, the input sequence X is constructed, and its specific components are as follows:

[0110] Current FSM equipment status snapshot: Read directly from the FSM instances of each device in the simulator, including turnout status (positioning / reversal / conversion in progress), signal display, current braking level of the reducer, track occupancy signs for each section, and the status of currently locked route tokens;

[0111] The virtual sensing layer's most recently cached pseudo-observation sequence window: extracting velocity measurements from the past H steps. Segment occupancy vector.

[0112] Meteorological data, etc., are arranged in chronological order. Information on subsequent hook cars in the plan includes the hook car number to be released, target track, number of axles, total weight, and preset pushing speed.

[0113] The model performs one forward propagation, and the autoregressive model generates the future. Predict the command sequence step by step, and obtain the probability distribution of each step action and duration.

[0114] For the decelerator braking command, the simulator determines the classification distribution based on the decoder output. Random sampling is performed to obtain the specific braking level. For duration, from a mixture of Gaussian distributions Mid-sampling to obtain specific values Immediately after sampling, a mutual exclusion token hard constraint mechanism is executed: for example, if the sampled braking command requires braking to a certain decelerator section, but that section is already locked by a hostile route token or interlocked. If the conditions are not met, the simulator rejects the command and sets the relevant FSM status to wait or fault indication, while generating an alarm signal. For route arrangement commands, before submitting to the event queue, an atomic operation is used to attempt to acquire a mutex token; if acquisition fails, the command is temporarily stored as a pending event, and retried after the token is released, thus ensuring: It is valid at any time.

[0115] Sampling braking action The event is encapsulated as a single event, with a timestamp set to the current simulation time plus the configured action delay, and inserted into a multi-clock domain event queue. During execution, an acceleration interval is set. If the physical model reports a new pseudo-observed velocity indicating that the vehicle speed is decreasing too slowly or too quickly, the simulator detects a velocity trajectory deviation, triggering a new round of inference: the input is reconstructed starting from the latest state, the proxy model is run again, and the subsequent part of the original command sequence is overwritten. To avoid degenerating into an unbounded feedback loop and reintroducing behavioral drift, the re-inference is performed within a fixed prediction horizon, and a preset upper limit is set for the number of re-inferences for a single shunting hook car. If the upper limit is exceeded, the default command from the safety side is executed.

[0116] To further improve online inference efficiency, the behavioral agent model undergoes INT8 quantization and structured pruning before deployment, and is accelerated using a high-performance inference engine (such as TensorRT). Model weights, random seeds, and various hyperparameters are all stored in the site configuration package. When changing sites, only the corresponding model files and configurations need to be loaded, enabling the simulator to accurately reproduce the automated control characteristics of the site without the need to redevelop the control logic.

[0117] In some embodiments, to support rapid deployment and efficient runtime checks across stations, this application further includes: constructing a hierarchical station description language, using a tree structure to express the complex topology and logical relationships between equipment. Its basic elements are divided into three categories: nodes such as track sections, switches, and signals; connection relationships such as adjacency, linkage, and protection; and constraint rules such as interlocking conditions and speed limits. After parsing, the configuration file will be constructed into a directed attribute graph in memory. This data structure optimizes the efficiency of key calculations such as path search, conflict detection, and state propagation. For example, when processing routes, the system can quickly determine whether there are opposing routes or mismatched switch positions using a graph traversal algorithm, and return specific violations, providing clear error messages to the operator.

[0118] During runtime, all device state changes are broadcast via a unified event bus. This mechanism triggers state updates and interlock verification processes for associated devices, ensuring global consistency of state changes. For critical operations, such as signal opening or reducer action, verification by a deterministic checker is mandatory.

[0119] In detail, this hierarchical station description language organizes the information of the entire hump yard in a tree structure. The root is the global station object, which is divided into branches according to control areas, such as the peak arrival area, peak push area, peak shunting area, and marshalling yard area. Each control area is further connected to equipment nodes, including track section nodes, turnout nodes, signal nodes, decelerator nodes, and speed and length measuring equipment nodes. Each node is described in the configuration file with structured fields to describe its static attributes and relationships. The static attributes include equipment number, name, installation mileage or coordinates, and technical parameters, such as the position and reverse direction of the turnout, the signal light combination, and the braking level mapping of the decelerator. The connection relationships are divided into three categories: physical connection, linkage relationship, and protection relationship. The physical connection describes the adjacency relationship between track sections and the connection method between the turnout and each section. The linkage relationship indicates how the turnout position determines the signal light position that can be displayed. The protection relationship specifies the range of track sections protected by each signal and other signals or sections that constitute opposing routes. The constraint rules are embedded in the configuration in the form of an interlocking condition table. Each rule is expressed as a conditional judgment based on the equipment status. For example, the prerequisite for a signal to open the green light is that its protected section is empty, the relevant turnout is in position and there are no hostile signals open. The corresponding operation can only be executed when the conditions are met; otherwise, the operation will be considered a violation.

[0120] After the configuration file is loaded by the parameter parser, the tree-like description described above is converted into a directed attribute graph in memory. Each device node in the graph is a vertex, and physical connections and logical constraints are modeled as directed edges and attributes on those edges, such as "the positioning direction of the adjacent turnout B after section A" and "the positioning protection signal C of turnout B." Simultaneously, to accelerate critical queries, the system establishes hash indexes for various devices, allowing node location within a constant time based on device number or section ID. When performing route processing, shunting route search, or hostile route detection, the simulation engine runs a graph traversal algorithm on this directed attribute graph. For example, when processing a push route, starting from the peak signal node, a depth-first traversal is performed along the physical connection edges, collecting all turnouts and track section nodes along the path. Then, the protection relationships and hostile route conditions associated with these nodes are determined in real time. Once any turnout position mismatch is found or a hostile route is locked, the search stops and the specific violation and its cause are returned. This graph-based judgment method keeps the computational complexity of route inspection within linear or low-order polynomial time, which is related to the route length and equipment correlation, thus greatly improving operational efficiency.

[0121] During simulation, all device state changes are broadcast via a unified event bus to ensure global state consistency. The event bus employs a topic-based publish-subscribe mechanism. After completing a state transition, a device's finite state machine instance immediately publishes a state change message to the bus. The message body includes the source device identifier, new state value, old state value, timestamp, and the source event number that triggered the transition. Based on the subscription relationship tree extracted from the directed attribute graph, the bus precisely routes the message to all modules that depend on this device's state, primarily including state machine instances of associated devices, interlocking check modules, and asynchronous operations waiting for the state change. For example, if a track section changes from idle to occupied, the event bus publishes this message. The signal state machine protecting that section will be notified and immediately execute a signal downgrade or closure operation based on the interlocking conditions. The turnout state machines associated with the section may also lock and transition accordingly. Simultaneously, if a behavior agent model is waiting for the section to be cleared to generate subsequent release commands, it will also be awakened and re-evaluated due to subscribing to this topic. The event bus's operating clock is tightly coupled with the multi-clock domain discrete event scheduling engine, and all types of messages are strictly sorted and processed according to timestamps, so that no inconsistencies in state due to out-of-order processing will occur even in high-load simulations.

[0122] For critical operations such as signal opening and decelerator braking command execution, in addition to interlocking condition checks, atomic verification by a deterministic checker is also required. The deterministic checker operates as an independent, highest-priority decision interception module within the simulation engine. Before any module attempts to generate a critical operation event and inject it into the event queue, it must submit an operation request to the deterministic checker. This request includes the current simulation time, the set of devices involved, the desired action, and the version number of the current system state snapshot. The deterministic checker internally maintains a knowledge base compiled from station configuration constraint rules, as well as a global locking state table linked to the mutual exclusion token mechanism described in step S120. First, it verifies whether the state snapshot version is still up-to-date to prevent invalid operations based on outdated states. Then, it performs satisfiability verification on all preconditions based on the rule knowledge base, including checking the positions of involved turnouts, track occupancy, and the status of hostile signals and hostile route tokens. If all conditions are met, the deterministic checker performs an atomic comparison and swap operation, writing the relevant locking token, updating the target state of the associated device, and returning authorization approval. Only then is the operation event officially timestamped and inserted into the event queue, subsequently scheduled for execution by the simulation engine. If any condition is not met, the operation request is immediately rejected, and a receipt containing detailed reasons for the violation is generated for the training terminal to display a clear operation error message.

[0123] Therefore, this mechanism ensures that even under various random delays and disturbances, the interlocking safety conditions always exist as inviolable hard constraints, thus ensuring the safety-oriented premise while reproducing the random behavior of real systems across multiple time scales.

[0124] refer to Figure 3 To understand a training system according to an embodiment of this application, including:

[0125] The simulator, serving as the simulation environment layer, has the following deployed on top of it:

[0126] The parameter parser loads the station configuration file, parses out equipment attributes and interlocking constraints, and constructs a directed dependency graph in memory reflecting the state dependencies between equipment. The equipment behavior engine consists of multiple finite state machine instances; each field device is abstracted as an independent finite state machine, and its state set and transition rules are determined by the configuration data provided by the parameter parser. The behavior proxy model, deployed within the simulator, is a data-driven model trained based on historical operating data of the real system. It generates control commands that conform to the response characteristics of the real system based on the current station state and received pseudo-observation sequences to drive the equipment state machines in the equipment behavior engine. The mutex token manager, connected to the equipment behavior engine and the behavior proxy model, executes a mutex token-based locking mechanism on mutually exclusive operations to ensure interlocking safety constraints.

[0127] The system includes a server on which a physical model and a virtual sensing layer are deployed. The physical model is used to calculate the vehicle's motion state in real time. The virtual sensing layer is connected to the physical model and is used to map the continuous vehicle motion state output by the physical model into a discrete pseudo-observation sequence with simulated real sensor transmission characteristics, and push it to the behavior agent model in the simulator. The training terminal, as an interactive presentation layer, is used to present a graphical interface of the hump yard, receive operation commands from trainees and send the operation commands to the server, and receive and display the logical calculation results from the server.

[0128] In addition, the virtual sensing layer on the server side internally maintains a local event queue compatible with the multi-clock domain discrete event scheduler in the simulator, and encapsulates pseudo-observation data by timestamp and pushes it to the simulator.

[0129] Therefore, combined Figure 3As shown, the data flow is as follows: the training terminal is bidirectionally connected to the server via the simulation network; the server is bidirectionally connected to the simulator via the simulation network. Inside the simulator, the parameter parser provides configuration data to the device behavior engine; the device behavior engine is connected to the signal generator, event bus, mutex token manager, and deterministic checker; the behavior agent model is connected to the event bus, mutex token manager, and multi-clock domain discrete event scheduler; the signal generator outputs I / O signals to the server.

[0130] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A camel hump simulation method based on parameterized configuration, characterized in that, Includes the following steps: S1. Construct a parameterized driven simulator; The station configuration file is loaded, equipment attributes and interlocking constraints are parsed, and a directed dependency graph is constructed based on the equipment attributes and interlocking constraints. The directed dependency graph reflects the state dependencies between equipment. When an event triggers the state transition of a source node in the directed dependency graph, incremental state updates are performed based on the directed dependency graph. In response to the state flip frequency exceeding a preset jitter threshold, the corresponding source node is marked as an unconfirmed state, and incremental state updates along the dependency path starting from that source node in the directed dependency graph are paused. Random delays are introduced according to the preset probability distribution parameters in the configuration file. For operations with mutual exclusion relationships, a lock mechanism based on mutual exclusion tokens is used for shunting hook planning. S1 includes: S110, setting a parameter parser, a finite state machine, and a signal generator; S120, based on the finite state machine, introducing an incremental state update mechanism based on the directed dependency graph, S120 including: S121. Within the time frame of the sliding observation window, monitor the state change events of the source node in real time, including state transitions such as track sections changing from idle to occupied and switches changing from oriented to inverted positions. Whenever a state transition is detected in the source node, record a state jump event in the sliding observation window. By traversing all state jump records within the sliding observation window, count the total number of state jumps of the source node within the current micro-simulation cycle. The state jump statistics mechanism is implemented using atomic operations, where: ; In the formula, This represents the number of state transitions. For the microscopic simulation cycle, Let be the node state at time t. For indicator functions, This is the initial time; Furthermore, a sliding observation window with a duration equal to the micro-simulation period is set within the micro-clock domain; The number of state transitions of the source node within the sliding observation window is counted; if the number of state transitions is greater than or equal to a preset threshold, the state flip frequency is determined to exceed a preset jitter threshold; if the number of state transitions is less than the preset threshold, the state flip frequency is determined to not exceed the preset jitter threshold. S122. Using track sections and turnouts as nodes of the directed dependency graph, and interlocking constraints between equipment as directed edges of the directed dependency graph, wherein the direction of the directed edges represents the causal dependency of state transitions: A directed dependency graph is constructed, with track sections and turnouts as nodes and interlocking constraints as directed edges. Where V is a device state node, and the total number of nodes is n, and E represents the causal dependency of state transitions for each node. Define its set of states The theoretical state space size of the entire station is The subscript i represents the i-th node; When an event e triggers the node During state transitions, only along graph G from The starting path is then used to calculate the set of affected nodes hop by hop. And update its status; If event e causes the source node A state transition occurs only along the path in graph G. The reachable path from the starting point is traversed hop by hop, and the set of affected nodes is calculated. And only perform state updates on nodes within that set, affecting the set of nodes. Defined as: Represents a node Interlocking conditions, All are nodes, and the index j represents the j-th node; The propagation rule is: for any original state Updated to new status : in, This is the state transition function defined according to the interlocking table; S123. Define multiple simulation clock domains. Each event to be processed carries a timestamp and a tag indicating its clock domain. Maintain a global event queue and sort all events to be processed according to the order of their timestamps. During scheduling, retrieve the event with the earliest timestamp from the global event queue, advance the simulation time to the timestamp of that event, and trigger the corresponding clock precision state update process according to the clock domain tag to which the event belongs. S2. By constructing a virtual sensing layer and a behavioral agent model; The virtual sensing layer maps the continuous vehicle motion state output by the physical model to a pseudo-observation sequence superimposed with the random delay and measurement noise; a behavior agent model is deployed in the simulator. The behavior agent model is a data-driven model trained based on the historical operation data of the real system. The behavior agent model generates control commands that conform to the response characteristics of the real system according to the current station status and the pseudo-observation sequence, and drives the equipment state machine in the simulator. The virtual sensing layer runs on the server side and is responsible for receiving context information from the physical model; S2 includes: S210. Construct a virtual sensing layer to map the continuous state of the physical model into discrete pseudo-observation inputs that conform to the characteristics of real sensors, generating a pseudo-observation sequence. The vehicle motion physical model running on the server side adopts a multi-mass train longitudinal dynamics and kinematics model to calculate the position, velocity, and acceleration of each vehicle in real time. The virtual sensing layer converts the continuous physical state into a pseudo-observation data stream equivalent to the external I / O signals of the real system. The task execution process of the virtual sensing layer includes: Track section occupancy status mapping; Define track segment boundary coordinates ;in Starting from the boundary, The endpoint of the boundary; When the first wheelset of a vehicle enters the section, a section occupancy event is generated; when the last wheelset leaves the section, a clearing event is generated; assuming the foremost axle of the vehicle enters... The time is The timestamp for inserting an event into the simulator's event queue is: ; ; in, The speed of the vehicle at the moment the first axle enters. This refers to the number of axles in the vehicle. Based on delay, For non-negative random perturbations Delay for track section occupancy detection; Speed ​​measurement point data generation: The virtual sensing layer generates a noisy speed measurement output using the following formula: ; in, This represents the vehicle's current actual speed. The velocity measurement error follows a zero-mean normal distribution; Timestamp Marked as: The simulation time is the instant of sampling. For transmission delay; S220. Construct a behavioral agent model. The agent model adopts a temporal probabilistic generative network with an encoder-decoder architecture. The proxy model receives an input sequence, which includes the current station equipment status, shunting plan, environmental parameters, and a pseudo-observation sequence generated by the virtual sensing layer within a recent time window; it generates and outputs an output sequence, which represents the probability distribution of control commands over a future period. The proxy model includes a combination of a Transformer encoder and an autoregressive Transformer decoder: The encoder maps the input sequence X to a context representation. , For the context embedding vector, the Encoder includes a multi-head self-attention layer and a feedforward network, with several of the multi-head self-attention layers and feedforward networks stacked together; The decoder uses the previously generated output vector The probability distribution of the next control command is generated step by step using the command sequence as input. The output layer uses a classification distribution for discrete actions and a Gaussian mixture model for continuous quantities such as duration. Let the hidden state of the decoder at step t be... ,but: ; in, This represents a Transformer decoder layer that accepts the embedding vector output from the previous step. The hidden state of the previous step Furthermore, by employing a cross-attention mechanism to focus on the encoder output context representation C, the hidden state of the current step is obtained through synthesis. ; Reducer braking level The probability is: ; In the formula, This is the classification weight matrix. Given a bias vector, softmax outputs the probabilities of the five classes; During simulation, the behavioral agent model is triggered in two situations: the server issues a new release hook plan; or a critical spurious observation update is received, causing the state to deviate significantly from the expected state. Upon triggering, an input sequence X is constructed, wherein the input sequence X includes: The current FSM device status snapshot is read directly from the FSM instances of each device in the simulator; Extract the velocity measurements from the most recently cached pseudo-observation sequence window in the virtual sensing layer over the past H steps. Segment occupancy vector; Meteorological data; Information on subsequent hook-up vehicles in the plan; Based on the input sequence X, the proxy model performs a forward propagation once, and autoregressive generation of the future... Predict the command sequence step by step, and obtain the probability distribution of each step's action and duration; For the decelerator braking command, the simulator determines the classification distribution based on the decoder output. Random sampling is performed to obtain the specific braking level. For duration, from a mixture of Gaussian distributions Mid-sampling to obtain specific values ; After sampling, before injecting the sampled control commands into the event queue, a mutex token hard constraint mechanism is executed; and when the request timestamps of concurrent requests are close, the token acquisition order is determined based on the priority determined by the route type and triggering order, combined with the timestamp. During execution, if the physical model feeds back a new pseudo-observed speed indicating that the vehicle speed decrease rate does not meet the preset conditions, the simulator detects a speed trajectory deviation, thereby triggering a new round of inference; the new round of inference includes reconstructing the input with the current latest state as the starting point, running the proxy model again and overwriting the original command sequence.

2. The camel hump simulation method based on parameterized configuration according to claim 1, characterized in that: The clock domain includes micro-clocks. Ordinary clock Macro clock ; Each pending event carries a timestamp. And a label indicating the clock domain to which it belongs. , These are clock labels; each corresponding to a micro-clock. Ordinary clock Macro clock ; The simulation engine maintains a button The simulation engine maintains an event queue (Queue) sorted by timestamp in ascending order. A single scheduling loop follows the following process: Find the earliest event in the entire pending event queue, denoted as e*, and retrieve the event that satisfies the conditions. The first event e* advances the global simulation clock to [time]. ;in accordance with Execute state updates in a layered manner.

3. The camel hump simulation method based on parameterized configuration according to claim 1, characterized in that, In response to the state transition event, obtaining and statistically analyzing the state transition frequency of the source node in the micro-clock domain further includes: When the source node is determined to be in a critical jitter state, the system activates a preventive protection mechanism. Based on the interlocking constraints in the station configuration file, it identifies associated nodes that have a mutual exclusion relationship with the source node in the critical jitter state. Then, it sends a pre-activation request to the mutual exclusion token manager to obtain the mutual exclusion token corresponding to the associated node in advance.

4. A training system for implementing the camel hump simulation method based on parameterized configuration as described in any one of claims 1-3, characterized in that, include: The simulator, serving as the simulation environment layer, has the following deployed on top of it: The parameter parser loads the station configuration file, parses out equipment attributes and interlocking constraints, and constructs a directed dependency graph in memory that reflects the state dependencies between equipment. The equipment behavior engine controls multiple finite state machine instances, with each field device abstracted as an independent finite state machine. The behavior agent model, deployed inside the simulator, is a data-driven model trained based on historical operating data of the real system. It generates control commands that conform to the response characteristics of the real system based on the current station status and the received pseudo-observation sequence to drive the equipment state machines in the equipment behavior engine. A mutex token manager, connected to the device behavior engine and the behavior agent model, is used to execute a lock mechanism based on mutex tokens for operations with mutual exclusion relationships to ensure interlocking security constraints. The server has a physical model and a virtual sensing layer deployed on it. The physical model is used to calculate the vehicle's motion state in real time; The virtual sensing layer is connected to the physical model and is used to map the continuous motion state of the vehicle output by the physical model into a discrete pseudo-observation sequence with simulated real sensor transmission characteristics, and push it to the behavior agent model in the simulator. The training terminal, as an interactive presentation layer, is used to present a graphical interface for the hump yard, receive operation instructions from trainees, send the operation instructions to the server, and receive and display the logical calculation results from the server. The virtual sensing layer on the server side maintains a local event queue compatible with the multi-clock domain discrete event scheduler in the simulator, which encapsulates pseudo-observation data by timestamp and pushes it to the simulator.

Citation Information

Patent Citations

  • A simulation testing method and device for an integrated automation system of railway marshalling yards

    CN108153165B

  • Synthetic automation simulation training system for marshalling yard

    CN108182841A