CN117540565A - Software definition-based trackside simulation method, system, electronic equipment and medium - Google Patents

Software definition-based trackside simulation method, system, electronic equipment and medium Download PDF

Info

Publication number
CN117540565A
CN117540565A CN202311551631.8A CN202311551631A CN117540565A CN 117540565 A CN117540565 A CN 117540565A CN 202311551631 A CN202311551631 A CN 202311551631A CN 117540565 A CN117540565 A CN 117540565A
Authority
CN
China
Prior art keywords
simulation
simulator
state
data
simulation simulator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311551631.8A
Other languages
Chinese (zh)
Inventor
郝闯
宋晨亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New United Group Co Ltd
Original Assignee
New United Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New United Group Co Ltd filed Critical New United Group Co Ltd
Priority to CN202311551631.8A priority Critical patent/CN117540565A/en
Publication of CN117540565A publication Critical patent/CN117540565A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a software definition-based trackside simulation method, a software definition-based trackside simulation device, electronic equipment and a storage medium, and relates to the technical field of computers, wherein the method comprises the following steps: determining simulator information, simulation items and a simulation interface according to the starting command; the simulator information comprises simulator roles and control area information, wherein the simulator roles correspond to various equipment types in the communication-based train control system CBTC; loading a simulation simulator according to the simulator role, inputting simulation data and communication configuration corresponding to the simulator role and control area information in a simulation project into the simulation simulator, initializing the simulation simulator by using the simulation data, and controlling the simulation simulator to communicate with other simulation simulators according to the communication configuration; realizing real equipment operation simulation by using the initialized simulation simulator, and outputting operation data of the simulation simulator to a simulation interface; the simulation system can achieve the effect of adapting to the simulation requirements of various scenes and various project software based on a set of simulation system.

Description

Software definition-based trackside simulation method, system, electronic equipment and medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a software definition-based trackside simulation method, system, electronic device, and medium.
Background
The CBTC system (Communication Based Train Control, communication-based train control system) is a necessary control system for train operation. To verify the reliability of CBTC systems, it is often necessary to perform simulation tests on CBTC systems. However, in the related art, such simulation tests are usually only performed based on the real device, or each pair of devices or subsystems in the system is tested, so that a corresponding test platform is required to be developed, which is not only disadvantageous to performing the test work of the CBTC system, but also increases the test cost significantly.
Disclosure of Invention
The invention aims to provide a software definition-based trackside simulation method, a software definition-based trackside simulation system, electronic equipment and a software definition-based trackside simulation medium, which can achieve the effect of meeting various software simulation requirements based on one set of system, so that the simulation efficiency of a CBTC system can be effectively improved.
In order to solve the technical problems, the invention provides a software definition-based trackside simulation method, which comprises the following steps:
determining simulator information, simulation items and a simulation interface according to the starting command; the simulator information includes simulator roles and control zone information, the simulator roles corresponding to various device types in a communication-based train control system CBTC;
Loading a simulation simulator according to the simulator role, and inputting simulation data and communication configuration corresponding to the simulator role and the control area information in the simulation project into the simulation simulator so as to initialize the simulation simulator by using the simulation data and control the simulation simulator to communicate with other simulation simulators according to the communication configuration;
and realizing the operation simulation of the real equipment by using the initialized simulation simulator, and outputting the operation data of the simulation simulator to the simulation interface.
Optionally, the loading a simulation simulator according to the simulator role, and inputting simulation data and communication configuration corresponding to the simulator role and the control area information in the simulation project into the simulation simulator includes:
injecting a simulator interface corresponding to the simulator role into an IOC container so that the IOC container dynamically creates a simulation simulator instance corresponding to the simulation simulator;
inputting the simulation data and the communication configuration into the simulation simulator instance through the simulation simulator interface;
the method for realizing the operation simulation of the real equipment by using the initialized simulation simulator and outputting the operation data of the simulation simulator to the simulation interface comprises the following steps:
Calling the simulation simulator instance through the simulation simulator interface to realize the operation simulation of the real equipment;
and acquiring the operation data from the simulation simulator instance through the simulation simulator interface, and outputting the operation data of the simulation simulator to the simulation interface.
Optionally, the method further comprises:
receiving fault injection information input to the simulation simulator by a user through the simulation interface;
and inputting the fault injection information into the simulation simulator instance through the simulation simulator interface.
Optionally, the method further comprises:
determining real equipment information according to the starting command;
the method for realizing the operation simulation of the real equipment by using the initialized simulation simulator and outputting the operation data of the simulation simulator to the simulation interface comprises the following steps:
and realizing the operation simulation of the real equipment by using the real equipment corresponding to the real equipment information and the initialized simulation simulator, and outputting the operation data of the real equipment and the operation data of the simulation simulator to the simulation interface.
Optionally, the simulation data in the simulation project includes trackside equipment data, full-electronic environment data and full-electronic acquisition unit wiring data, the trackside equipment data includes trackside equipment information, the full-electronic environment data includes full-electronic system environment configuration, and the full-electronic acquisition unit wiring data includes wiring mapping between a full-electronic board card and the trackside equipment.
Optionally, the communication configuration in the simulation project includes local termination information, simulation control area information, message sending configuration and message receiving configuration, where the local termination information includes a network address and a port used by the simulation simulator for external communication, the simulation control area information includes control area information where the simulation simulator is located, the message sending configuration includes sending configuration of sending messages by the simulation simulator to other simulation simulators, and the message receiving configuration includes receiving configuration of receiving messages of the other simulation simulators by the simulation simulator.
Optionally, the simulator role is a trackside device;
the train control system simulation by using the initialized simulation simulator comprises the following steps:
setting a state machine state of the simulation simulator to an idle state, and detecting whether a start event for the simulation simulator occurs;
if the starting event aiming at the simulation simulator is detected to occur, setting the state of a state machine of the simulation simulator to be an operation state, and calling a health self-checking method of the simulation simulator to judge whether the simulation simulator has faults or not;
If the simulation simulator does not fail based on the health self-checking method, entering a step of calling the health self-checking method of the simulation simulator to judge whether the simulation simulator fails;
if the simulation simulator has faults based on the health self-checking method, setting the state machine state of the simulation simulator as a fault state, and calling the fault self-checking method of the simulation simulator to judge whether the simulation simulator has faults;
if the simulation simulator does not fail based on the failure self-checking method, entering a step of setting a state machine state of the simulation simulator to be an operation state, and calling a health self-checking method of the simulation simulator to judge whether the simulation simulator fails;
if the simulation simulator has failed based on the failure self-checking method, the method enters the steps of setting the state machine state of the simulation simulator to be an idle state and detecting whether a starting event for the simulation simulator occurs.
Optionally, the method is executed when the health self-checking method of the simulation simulator is called:
Invoking a normal operation judging method of the simulation simulator to judge whether the simulation simulator can normally operate;
if the simulation simulator is determined to have faults based on the normal operation judging method, a fault state updating method of the simulation simulator is called to adjust the state of a state machine of the simulation simulator into the fault state;
if the simulation simulator is determined to not have faults based on the normal operation judging method, judging whether the current equipment state of the simulation simulator is the same as the target equipment state of the next period;
and if the device states are different, calling a state updating method of the simulation simulator to adjust the device states of the simulation simulator to the target device states.
Optionally, the method is executed when a state update method of the simulation simulator is called:
initializing a count variable to 1;
waiting for preset time and judging whether the counting variable is smaller than or equal to a waiting time threshold value;
if yes, adding one to the counting variable, and judging whether a reverse command is received or not; if so, updating the counting variable based on the waiting time threshold value, and entering the step of waiting for preset time; if not, entering the step of waiting for the preset time;
And if not, driving the simulation simulator into the target equipment state.
The invention also provides a train control system simulation system, which comprises:
the starting module is used for determining simulator information, simulation items and simulation interfaces according to the starting command; the simulator information includes simulator roles and control zone information, the simulator roles corresponding to various device types in a communication-based train control system CBTC;
the loading module is used for loading a simulation simulator according to the simulator role, inputting simulation data and communication configuration corresponding to the simulator role and the control area information in the simulation project into the simulation simulator, initializing the simulation simulator by using the simulation data and controlling the simulation simulator to communicate with other simulation simulators according to the communication configuration;
and the simulation module is used for realizing the operation simulation of the real equipment by using the initialized simulation simulator and outputting the operation data of the simulation simulator to the simulation interface.
The present invention also provides an electronic device including:
a memory for storing a computer program;
and a processor for implementing a software-defined based trackside simulation method as described above when executing the computer program.
The present invention also provides a computer readable storage medium having stored therein computer executable instructions that, when loaded and executed by a processor, implement a software-defined-based trackside simulation method as described above.
The invention provides a software definition-based trackside simulation method, which comprises the following steps: determining simulator information, simulation items and a simulation interface according to the starting command; the simulator information includes simulator roles and control zone information, the simulator roles corresponding to various device types in a communication-based train control system CBTC; loading a simulation simulator according to the simulator role, and inputting simulation data and communication configuration corresponding to the simulator role and the control area information in the simulation project into the simulation simulator so as to initialize the simulation simulator by using the simulation data and control the simulation simulator to communicate with other simulation simulators according to the communication configuration; and realizing the operation simulation of the real equipment by using the initialized simulation simulator, and outputting the operation data of the simulation simulator to the simulation interface.
It can be seen that the present invention can provide corresponding simulation simulators for various equipment types in a communication-based train control system. In the starting process, the invention can determine simulator information, simulation items and simulation interfaces according to the starting command, wherein the simulator information comprises simulator roles and control area information, and the simulator roles correspond to various equipment types in a communication-based train control system; then loading the simulation simulator according to the simulator role, inputting simulation data and communication configuration corresponding to the simulator role and control area information in a simulation project into the simulation simulator, initializing the simulation simulator by using the simulation data, controlling the simulation simulator to communicate with other simulation simulators according to the communication configuration, and further obtaining the simulation simulator corresponding to each device in the train control system; furthermore, the invention can realize the operation simulation of the real equipment by using the initialized simulation simulator and output the operation data of the simulation simulator to the simulation interface, thereby not only achieving the effect of meeting the requirements of adapting to multi-project and multi-scene simulation based on a set of simulation systems, but also providing the visual equipment working state display function by simulating the working state of the real equipment through software, and further effectively improving the service efficiency of the simulation system of the train control system. The invention also provides a train control system simulation system, electronic equipment and a computer readable storage medium, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a software-defined-based simulation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a configuration model according to an embodiment of the present invention;
FIG. 3 is a flowchart of a loading process according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a state machine adjustment according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating an embodiment of a method for performing self-checking on health of a device;
FIG. 6 is a flowchart illustrating a method for updating status according to an embodiment of the present invention;
FIG. 7 is a block diagram of a software-defined-based trackside simulation system according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The CBTC system (Communication Based Train Control, communication-based train control system) is a necessary control system for train operation. CBTC systems typically include a number of subsystems, such as subsystems including ATS (Automatic Train Supervision, train automation monitoring system), ZC (Zone Controller), CBI (Computer Based Interlocking, computer interlock), ATO (Automatic Train Operation, train automation system), ATP (Automatic Train Protection, train automation protection subsystem), and the like. Furthermore, it is also possible to interact with the trackside equipment during use of the CBTC system. Common trackside equipment includes annunciators, switches, transponders, axle counting, buttons, and the like. In the related art, in order to verify the reliability of a CBTC system, it is generally required to perform a simulation test on the CBTC system. However, such simulation tests are usually only based on the device physical development, such as the test performed by using the trackside device physical, or the corresponding test platform is developed for each pair of devices or subsystems in the system, which is not only unfavorable for the development of the test work of the CBTC system, but also increases the test cost significantly. In view of this, the invention can provide a train control system simulation method, which can achieve the effect of meeting various software simulation demands based on one set of simulation system, thereby effectively improving the simulation efficiency of the train control system.
It should be noted that, the embodiment of the present invention is not limited to the hardware device for executing the method, and may be, for example, a personal computer, a server, etc., and may be set according to actual application requirements.
Referring to fig. 1, fig. 1 is a flowchart of a software-defined-based trackside simulation method according to an embodiment of the present invention, where the method may include:
s101, determining simulator information, simulation items and a simulation interface according to a starting command; the simulator information includes simulator roles corresponding to various device types in the communication-based train control system CBTC, and control zone information.
The embodiment of the invention provides a simulation simulator and a simulation interface. The simulation simulator is used for performing simulation on each device in the train control system, and is provided with a simulator role which corresponds to various device types in the train control system based on communication. In the actual simulation process, only the simulation simulators of the required type are loaded according to the requirements of the project, and the configuration data appointed by the project are input into each simulation simulator, so that each device in the train control system can be subjected to software simulation by using the simulation simulators. In addition, the simulation interface is used for visually outputting operation data generated by each simulation simulator and controlling each simulation simulator. For the convenience of users, the simulation interface further can comprise a simulated station diagram, and the position of equipment simulated by each simulation simulator in the station diagram can be marked. Therefore, a user can know the positions of all the devices in the simulated train control system in the station yard by looking up the simulation interface, and can directly operate all the devices in the simulated system on the station yard graph, so that the simulation efficiency of the train control system can be remarkably improved. It is also worth pointing out that, because the embodiment of the invention has performed software simulation on various devices in the train control system, and the simulation simulator and the simulation interface can be loaded and adjusted as required, the embodiment of the invention can realize the effect of providing a set of simulation system to realize various software simulation demands, thereby obviously reducing the cost required by train control system simulation.
It should be noted that, the embodiment of the present invention is not limited to the specific form and implementation manner of the simulation simulator and the simulation interface, and may be set according to the actual application requirements.
Furthermore, in order to realize loading of the simulation simulator, the simulation project and the simulation interface, the embodiment of the invention can provide a set of starting commands. The command may include various start-up parameters, such as at least simulator information and simulation project information. The simulator information is used for loading a simulation simulator and a simulation interface, and can comprise simulator roles and control area information, wherein the simulator roles indicate the type of the simulation simulator and the type of the simulation interface, and the control area information indicates the control area where the simulation simulator is located in a station yard; the simulation project information is used to load a simulation project, which may include a simulation project name. Of course, the start command may also include other start parameters, such as parameters for docking a forwarding tool, parameters for starting a message record, parameters for specifying an application to be monitored, and parameters for docking a real cabinet. Thus, the user can load the required simulation simulator, simulation project and simulation interface by filling specific parameter values in the command. In one possible scenario, the start-up command may contain start-up parameters as shown in the following table:
Table 1 startup parameters
Therefore, according to the embodiment of the invention, a EOCS (Electric Object Control System) full-electronic control system, a CIEU (Computer Interlocking Execution Unit) interlocking execution unit, a Trackside device, a Vehicle communication device, a cabin device and a log monitoring tool corresponding simulation simulator can be arranged. Based on the above start-up parameters, the following table shows possible start-up commands:
TABLE 2 Start Command
S102, loading the simulation simulator according to the simulator role, and inputting simulation data and communication configuration corresponding to the simulator role and control area information in a simulation project into the simulation simulator so as to initialize the simulation simulator by using the simulation data and control the simulation simulator to communicate with other simulation simulators according to the communication configuration.
It should be noted that the simulation simulator provided by the embodiment of the invention can be configured according to project requirements. The embodiment of the invention can provide two types of configuration data for a simulation simulator: simulation data and communication configuration. For ease of understanding, the two configuration data will be described separately in the following embodiments of the present invention.
The simulation data provided by the embodiment of the invention are used for indicating the equipment attribute corresponding to the simulation simulator and the working environment where the simulation simulator is located. In one possible scenario, the simulation data in the simulation project may include:
1. Trackside equipment data: the system can contain information of the trackside equipment, such as equipment type, name, number, coordinates of a station diagram and the like, and the data is used for initializing an equipment model by the trackside equipment simulation and drawing an electronic map;
2. full electronic environment data: all-electronic system environment configurations such as the number of cabinets included, the network configuration of each cabinet, the configuration of the boards within each cabinet, and the mapping of each board port to an interlock code bit can be included;
3. full electronic acquisition unit wiring data: wiring mapping between the full electronic board card and the trackside equipment may be included.
For convenient management, the three types of data are all provided with a corresponding data model and are stored as binary files, and the file names are in accordance with { data types } { item identifiers }. When data loading is carried out, the needed data file names can be spliced according to the project parameters (- -p), and then the data of the designated control area in the data file is loaded according to the control area parameters (- -r), so that the requirement of dynamically loading simulation data is met.
Further, the communication configuration (which may also be referred to as a transceiver configuration) provided by embodiments of the present invention indicates how the simulation simulator communicates with other simulation simulators, which may correspond to simulator roles, and which are stored in the configuration model. The file format of the configuration model may be JSON format. Furthermore, when each simulation simulator is started, the JSON file is read, and corresponding configuration is loaded according to the response role and the control region parameters. In one possible scenario, the communication configuration in the simulation project may include:
1. Local termination information (LocalEndPoint): the network address and the port used for external communication by the simulation simulator can be included;
2. analog control area information (region ids): control region information where the simulation simulator is located may be included. The configuration may also be used for the simulation system to filter the simulation data;
3. messaging configuration (SendMessages): the method can comprise the transmission configuration of the simulation simulator to send messages to other simulation simulators, such as a counterpart system (a plurality of which can be designated), a message protocol type, a protocol version, a communication period and the like;
4. message reception configuration (ReceiveMessages): the message receiving configuration may include the emulation simulator receiving other emulation simulators, such as a message source system (multiple may be specified), protocol version, etc.
Referring to fig. 2, fig. 2 is a schematic diagram of a configuration model according to an embodiment of the invention. The configuration model shown in fig. 2 configures a simulation simulator with a simulation role of trackSideSimu, and the simulation simulator is configured with 6 transceivers in total, wherein the third transceiver uses 192.168.22.254:6000 to send messages with message type 4 and version 2 to the EOCSSimu simulation for all trackside devices with analog control area codes of 2,6 and 9, and the period is 200ms.
It is worth pointing out that the simulation simulator supported by the simulation system realizes the processing of various message protocols, and only the configuration file needs to be modified if the protocol type needs to be modified in the later period.
Further, to achieve dynamic loading of the simulation simulator, embodiments of the present invention may introduce IOC containers (Inversion Of Control, control inversion), and may communicate lifecycle management of the simulation simulator to the IOC containers for processing. In order to implement the call to the emulation simulators, each emulation simulator in the embodiment of the present invention provides an application interface (hereinafter referred to as an emulation simulator interface) and one or more implementations (imagents) of the interface. Furthermore, the invention only needs to inject the simulation simulator interface of the simulation simulator into the IOC container, so as to dynamically create a simulation simulator instance corresponding to the simulation simulator by the IOC container, and call the simulation simulator interface after injection, thereby operating the simulation simulator. For example, when the simulation simulator is initialized, simulation data and communication configuration corresponding to the role of the simulation simulator can be input into the simulation simulator instance through the simulation simulator interface to complete the initialization of the simulation simulator.
Based on this, loading a simulation simulator according to the simulator role, and inputting simulation data and communication configuration corresponding to the simulator role and control zone information in the simulation project into the simulation simulator, may include:
step 11: injecting a simulation simulator interface corresponding to the simulator role into the IOC container so that the IOC container dynamically creates a simulation simulator instance corresponding to the simulation simulator;
step 12: simulation data and communication configuration are input into a simulation simulator instance through a simulation simulator interface.
Of course, since the simulator information input by the user may be incorrect, the simulator information may be verified before loading the simulation simulator according to the simulator information, and the simulation simulator loading and initializing may be performed according to the simulator information only when the simulator information is determined to be legal. Referring to fig. 3, fig. 3 is a flowchart of a loading process according to an embodiment of the invention. The loading process of the simulation simulator and the simulation interface can comprise the following steps:
step 1: attempting to acquire the application starting parameters and judging whether the role starting parameters are acquired or not; if yes, enter step 2; if not, entering a step 6;
step 2: analyzing simulation role parameters (- -s);
Step 3: judging whether the character parameters are legal or not; if yes, enter step 4; if not, entering a step 6;
step 4: injecting a simulation simulator of a corresponding interface into the container to realize and transmit relevant parameters;
step 5: loading and displaying the corresponding view;
step 6: prompting that the simulation role is not specified.
S103, realizing real equipment operation simulation by using the initialized simulation simulator, and outputting operation data of the simulation simulator to a simulation interface.
As described above, in the embodiment of the invention, the creation of the simulation simulator can be processed by the IOC container, so that in the actual simulation process, the train control system simulation is carried out by calling the simulation simulator instance based on the simulation simulator interface, and the operation data is acquired from the simulation simulator instance through the simulation simulator interface, and the operation data of the simulation simulator is output to the simulation interface.
Based on the above, the method for realizing the operation simulation of the real equipment by using the initialized simulation simulator and outputting the operation data of the simulation simulator to the simulation interface comprises the following steps:
step 21: calling a simulation simulator instance through a simulation simulator interface to realize the operation simulation of the real equipment;
step 22: and acquiring operation data from the simulation simulator instance through the simulation simulator interface, and outputting the operation data of the simulation simulator to the simulation interface.
Of course, the embodiment of the invention can also inject information into the fault input by the simulation simulator through the simulation simulator interface so as to achieve the effect of simulating the equipment fault. For the convenience of user, fault injection information can be input through the simulation interface.
Based on this, the method may further include:
step 31: receiving fault injection information input to a simulation simulator by a user through a simulation interface;
step 32: the fault injection information is input into the simulation simulator instance through the simulation simulator interface.
Based on the above embodiment, the present invention can set corresponding simulation simulators for various equipment types in a train control system. In the starting process, the invention can determine simulator information, simulation items and simulation interfaces according to the starting command, wherein the simulator information comprises simulator roles and control area information, and the simulator roles correspond to various equipment types in a train control system; then loading the simulation simulator according to the simulator role, inputting simulation data and communication configuration corresponding to the simulator role and control area information in a simulation project into the simulation simulator, initializing the simulation simulator by using the simulation data, controlling the simulation simulator to communicate with other simulation simulators according to the communication configuration, and further obtaining the simulation simulator corresponding to each device in the train control system; furthermore, the train control system simulation can be performed by using the initialized simulation simulator, and the operation data of the simulation simulator is output to the simulation interface, so that the effect of meeting the multi-project and multi-scene simulation requirements based on one set of simulation system can be achieved, the operation state of real equipment can be simulated through software, and an intuitive equipment operation state display function is provided, so that the simulation efficiency of the train control system can be effectively improved.
Based on the above embodiments, it should be noted that, in addition to the train control system simulation performed by using the simulation simulator, the embodiment of the present invention may further introduce real devices to perform the train control system simulation in a virtual-real combination manner. Specifically, the method may further include:
s201, determining real equipment information, simulator information, simulation items and simulation interfaces according to a starting command; the simulator information includes simulator characters corresponding to various device types in the train control system and control zone information.
In embodiments of the present invention, the start-up command may also be used to determine the actual devices involved in the simulation. In particular, the-trc parameter in the start-up command may be dedicated to identifying whether a real enclosure is docked. When provided with a trc parameter, embodiments of the present invention may further access the real device based on the value of the parameter to enable the simulation simulator to participate in the simulation with the real device. Therefore, the invention can further improve the flexibility of simulation of the train control system.
S202, loading the simulation simulator according to the simulator role, and inputting simulation data and communication configuration corresponding to the simulator role and control area information in a simulation project into the simulation simulator so as to initialize the simulation simulator by using the simulation data and control the simulation simulator to communicate with other simulation simulators according to the communication configuration.
S203, the real equipment corresponding to the real equipment information and the initialized simulation simulator are utilized to jointly realize the operation simulation of the real equipment, and the operation data of the real equipment and the operation data of the simulation simulator are output to a simulation interface.
The operation data of the real equipment can be output to the corresponding position in the simulation interface similarly to the simulation simulator, and the user can operate each real equipment in the simulation interface, so that the flexibility of simulation of the train control system can be further improved.
Based on the above embodiments, a simulation simulator will be described based on a specific role of the simulation simulator. Aiming at the track side equipment, the embodiment of the invention particularly abstracts the base class of the track side equipment, and agrees the basic attribute and the operation behavior of the equipment, thereby normalizing the simulation of the track side equipment, and only considering the behavior under specific conditions when the equipment is subsequently expanded or newly added. The specific class design of the trackside equipment simulation simulator is as follows:
TABLE 3 trackside Equipment base class
It is noted that the above-mentioned design considers how the device self-checks during normal operation and how it self-checks during failure, and the device subclass rewrites all the methods according to its own situation, implements its own detection method, and actually considers how to drive the device state during various failures, and whether the current device state can be driven to the target device state. For example, if a platform screen door is injected with a hold open fault, the system cannot drive the screen door closed; if the traffic light simulates a green light filament break, the system cannot drive the traffic light to be green.
Further, the embodiment of the invention can provide a device Running state machine to adjust the state of the rail side device simulation simulator so as to simulate the Running state and the Fault state of the rail side device, wherein the state machine is divided into three states of an idle state (Free), a Running state (Running) and a Fault state (Fault). The states of the three state machines can be automatically adjusted according to the actual running condition of the simulation simulator. The state of each state machine is adjusted as follows:
1. each device defaults to enter an idle state, an initialization method (init) is executed, and initialization of relevant parameters is completed; when a starting event occurs, entering an operating state;
2. executing a health self-checking method (RunningSelftest) by the equipment in an operation state, entering a fault state if a fault is detected by self, and entering an idle state if a shutdown event is detected;
3. in the fault state, the device executes a fault self-checking method (FaultSelfTest), enters an operating state if no fault is detected, and enters an idle state if a shutdown event is detected.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a state machine adjustment according to an embodiment of the invention. The simulator role is that of the trackside equipment, and the initialized simulator is utilized to realize the running simulation of the real equipment, which can comprise the following steps:
Step 41: setting the state machine state of the simulation simulator into an idle state, and detecting whether a starting event aiming at the simulation simulator occurs or not;
step 42: if the starting event aiming at the simulation simulator is detected, setting the state of a state machine of the simulation simulator as an operation state, and calling a health self-checking method of the simulation simulator to judge whether the simulation simulator has faults or not;
step 43: if the simulation simulator does not fail based on the health self-checking method, the method enters a step of calling the health self-checking method of the simulation simulator to judge whether the simulation simulator fails or not;
step 44: if the simulation simulator has faults based on the health self-checking method, setting the state of a state machine of the simulation simulator as a fault state, and calling the fault self-checking method of the simulation simulator to judge whether the simulation simulator has faults;
step 45: if the simulation simulator does not fail based on the failure self-checking method, the method enters a step of setting the state machine state of the simulation simulator as an operation state, and calling the health self-checking method of the simulation simulator to judge whether the simulation simulator fails or not;
step 46: if the simulation simulator has failed based on the failure self-checking method, the method enters a step of setting a state machine state of the simulation simulator to an idle state and detecting whether a starting event for the simulation simulator occurs.
Further, the embodiment of the invention can also provide a self-checking method (RunningSelftest) for equipment health in a simulation simulator. Referring to fig. 5, fig. 5 is a flowchart illustrating an execution of a device health self-checking method according to an embodiment of the present invention. The health self-checking method of the simulation simulator can be executed when being called:
step 51: calling a normal operation judging method of the simulation simulator to judge whether the simulation simulator can normally operate; if it is determined that the simulation simulator has failed based on the normal operation judgment method, step 52 is entered; if it is determined that the simulation simulator has not failed based on the normal operation judgment method, step 53 is entered;
step 52: calling a fault state updating method of the simulation simulator to adjust the state of a state machine of the simulation simulator into a fault state;
step 53: judging whether the current equipment state of the simulation simulator is the same as the target equipment state of the next period; if the two are the same, the process exits, and if the two are different, the process proceeds to step 54;
step 54: and calling a state updating method of the simulation simulator to adjust the device state of the simulation simulator to be the target device state.
It should be noted here that the device state characterizes the actual operating state of the device, such as the open state and the closed state of the screen door, and also, for example, the on state and the closed state of the signal lamp.
Further, the embodiment of the invention can also provide a self-checking method for equipment faults (FaultSelfTest) in the simulation simulator. It should be noted that the flow of device failure self-test will have different implementations in different devices, depending on the particular device type. The general fault self-checking method can be used for judging whether the current fault of the equipment is cleared, if so, judging that no fault exists, otherwise, judging that the fault exists. Of course, the fault self-checking method may have other exceptional situations, such as for the annunciator, when the green light filament is faulty, it may still be set to be red light, and further when the green light filament is faulty, the annunciator may not be judged to be faulty as a whole.
Further, the embodiment of the invention can also provide a state updating method (UpdateStatus) in the simulation simulator. The embodiment of the invention can design the state updating method into an asynchronous method, and the setting has the advantages that the state switching time can be simulated, for example, when a turnout rotates from a positioning state to a reverse state, the time consumption of rotation can be simulated, the time consumption of rotation can be customized, and when the state of the turnout is to be driven to change, the UpdateStatus method is required to asynchronously wait for a specified time period and then be driven to the state of target equipment. If a reverse drive command is received during rotation, the switch device should immediately wait for reverse rotation. For example, the switch takes 10 seconds from positioning to reversing, and when the switch rotates for 6 seconds, the switch receives a command to rotate to positioning, and at the moment, the switch rotates to positioning after receiving 6 seconds of a driving command. Referring to fig. 6, fig. 6 is a flowchart illustrating an execution of a status updating method according to an embodiment of the invention. The method is executed when a state update method of the simulation simulator is called:
Step 61: initializing a count variable to 1;
step 62: waiting for a preset time, and judging whether the count variable is less than or equal to a waiting time threshold (status switches seconds); if yes, go to step 63; if not, go to step 65;
step 63: adding one to the counting variable, and judging whether a reverse command is received or not; if so, go to step 64; if not, go to step 62;
step 64: updating the count variable based on the latency threshold (e.g., updating the count variable with the difference between the latency threshold and the count variable), and proceeding to step 62;
step 65: the simulation simulator is driven to the target device state.
It should be noted that, the embodiment of the present invention is not limited to the specific duration of the preset time and the preset time threshold, and may be set according to the actual application requirement.
The train control system simulation system, the electronic device and the computer readable storage medium provided by the embodiments of the present invention are described below, and the train control system simulation system, the electronic device and the computer readable storage medium described below and the train control system simulation method described above can be referred to correspondingly.
Referring to fig. 7, fig. 7 is a block diagram of a train control system simulation system according to an embodiment of the present invention, where the system may include:
The starting module 701 is used for determining simulator information, simulation items and a simulation interface according to a starting command; the simulator information comprises simulator roles and control area information, wherein the simulator roles correspond to various equipment types in the communication-based train control system CBTC;
the loading module 702 is configured to load the simulation simulator according to the simulator role, and input simulation data and communication configuration corresponding to the simulator role and control area information in the simulation project into the simulation simulator, so as to initialize the simulation simulator by using the simulation data and control the simulation simulator to communicate with other simulation simulators according to the communication configuration;
the simulation module 703 is configured to implement real device operation simulation by using the initialized simulation simulator, and output operation data of the simulation simulator to the simulation interface.
Optionally, the loading module 702 may include:
the injection submodule is used for injecting a simulation simulator interface corresponding to the simulator role into the IOC container so as to enable the IOC container to dynamically create a simulation simulator instance corresponding to the simulation simulator;
the data input sub-module is used for inputting simulation data and communication configuration into a simulation simulator instance through a simulation simulator interface;
The simulation module 703 may include:
the operation submodule is used for calling an instance of the simulation simulator through the simulation simulator interface to realize the operation simulation of the real equipment;
and the operation data acquisition sub-module is used for acquiring operation data from the simulation simulator instance through the simulation simulator interface and outputting the operation data of the simulation simulator to the simulation interface.
Optionally, the simulation module 703 may further include:
the fault injection information receiving sub-module is used for receiving fault injection information input to the simulation simulator by a user through the simulation interface;
the fault injection information input sub-module is used for inputting fault injection information into the simulation simulator instance through the simulation simulator interface.
Optionally, the starting module 701 may include:
the real equipment determining submodule is used for determining real equipment information according to the starting command;
a simulation module 703, which may be used to:
and carrying out train control system simulation by using the real equipment corresponding to the real equipment information and the initialized simulation simulator, and outputting operation data of the real equipment and operation data of the simulation simulator to a simulation interface.
Optionally, the simulation data in the simulation project includes trackside equipment data, full-electronic environment data, and full-electronic acquisition unit wiring data, the trackside equipment data includes trackside equipment information, the full-electronic environment data includes full-electronic system environment configuration, and the full-electronic acquisition unit wiring data includes wiring mapping between the full-electronic board card and the trackside equipment.
Optionally, the communication configuration in the simulation project includes local termination information, simulation control area information, message sending configuration and message receiving configuration, the local termination information includes a network address and a port used by the simulation simulator for external communication, the simulation control area information includes control area information where the simulation simulator is located, the message sending configuration includes sending configuration of sending messages to other simulation simulators by the simulation simulator, and the message receiving configuration includes receiving configuration of receiving messages of other simulation simulators by the simulation simulator.
Optionally, the simulator role is a trackside device;
the simulation module 703 may include:
the state machine adjusting sub-module is used for setting the state machine state of the simulation simulator into an idle state and detecting whether a starting event aiming at the simulation simulator occurs or not; if the starting event aiming at the simulation simulator is detected, setting the state of a state machine of the simulation simulator as an operation state, and calling a health self-checking method of the simulation simulator to judge whether the simulation simulator has faults or not; if the simulation simulator does not fail based on the health self-checking method, the method enters a step of calling the health self-checking method of the simulation simulator to judge whether the simulation simulator fails or not; if the simulation simulator has faults based on the health self-checking method, setting the state of a state machine of the simulation simulator as a fault state, and calling the fault self-checking method of the simulation simulator to judge whether the simulation simulator has faults; if the simulation simulator does not fail based on the failure self-checking method, the method enters a step of setting the state machine state of the simulation simulator as an operation state, and calling the health self-checking method of the simulation simulator to judge whether the simulation simulator fails or not; if the simulation simulator has failed based on the failure self-checking method, the method enters a step of setting a state machine state of the simulation simulator to an idle state and detecting whether a starting event for the simulation simulator occurs.
Optionally, the simulation module 703 may include:
the health self-checking method execution sub-module is used for calling a normal operation judging method of the simulation simulator to judge whether the simulation simulator can normally operate; if the simulation simulator is determined to have faults based on the normal operation judging method, a fault state updating method of the simulation simulator is called to adjust the state of a state machine of the simulation simulator to be a fault state; if the simulation simulator is determined to not have faults based on the normal operation judging method, judging whether the current equipment state of the simulation simulator is the same as the target equipment state of the next period; and if the device states are different, calling a state updating method of the simulation simulator to adjust the device states of the simulation simulator to target device states.
Optionally, the simulation module 703 may include:
a state update method execution sub-module for initializing a count variable to 1; waiting for preset time, and judging whether the counting variable is smaller than or equal to a waiting time threshold value; if yes, adding one to the counting variable, and judging whether a reverse command is received or not; if the count variable is received, updating the count variable based on a waiting time threshold value, and entering a step of waiting for preset time; if not, entering a step of waiting for preset time; if not, driving the simulation simulator into the target equipment state.
The embodiment of the invention also provides electronic equipment, which can comprise:
a memory for storing a computer program;
a processor for implementing the steps of the software-defined-based trackside simulation method described above when executing a computer program.
Since the embodiments of the electronic device portion correspond to the embodiments of the software-defined-based trackside simulation method portion, the embodiments of the electronic device portion are described with reference to the embodiments of the software-defined-based trackside simulation method portion, and are not repeated herein.
The embodiment of the invention also provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the software-defined-based trackside simulation method in any embodiment are realized.
Since the embodiments of the computer readable storage medium portion and the embodiments of the software-defined-based trackside simulation method portion correspond to each other, the embodiments of the storage medium portion are described with reference to the embodiments of the software-defined-based trackside simulation method portion, and are not described herein.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The software-definition-based trackside simulation method, the software-definition-based trackside simulation system, the electronic equipment and the storage medium provided by the invention are described in detail. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.

Claims (12)

1. A software-defined-based trackside simulation method, comprising:
determining simulator information, simulation items and a simulation interface according to the starting command; the simulator information includes simulator roles and control zone information, the simulator roles corresponding to various device types in a communication-based train control system CBTC;
loading a simulation simulator according to the simulator role, and inputting simulation data and communication configuration corresponding to the simulator role and the control area information in the simulation project into the simulation simulator so as to initialize the simulation simulator by using the simulation data and control the simulation simulator to communicate with other simulation simulators according to the communication configuration;
and realizing the operation simulation of the real equipment by using the initialized simulation simulator, and outputting the operation data of the simulation simulator to the simulation interface.
2. The trackside simulation method according to claim 1, wherein loading a simulation simulator according to the simulator role and inputting simulation data and communication configuration corresponding to the simulator role and the control zone information in the simulation project into the simulation simulator includes:
Injecting a simulator interface corresponding to the simulator role into an IOC container so that the IOC container dynamically creates a simulation simulator instance corresponding to the simulation simulator;
inputting the simulation data and the communication configuration into the simulation simulator instance through the simulation simulator interface;
the method for realizing the operation simulation of the real equipment by using the initialized simulation simulator and outputting the operation data of the simulation simulator to the simulation interface comprises the following steps:
calling the simulation simulator instance through the simulation simulator interface to realize the operation simulation of the real equipment;
and acquiring the operation data from the simulation simulator instance through the simulation simulator interface, and outputting the operation data of the simulation simulator to the simulation interface.
3. The trackside simulation method of claim 2, further comprising:
receiving fault injection information input to the simulation simulator by a user through the simulation interface;
and inputting the fault injection information into the simulation simulator instance through the simulation simulator interface.
4. The trackside simulation method of claim 1, further comprising:
Determining real equipment information according to the starting command;
the method for realizing the operation simulation of the real equipment by using the initialized simulation simulator and outputting the operation data of the simulation simulator to the simulation interface comprises the following steps:
and utilizing the real equipment corresponding to the real equipment information and the initialized simulation simulator to jointly realize the operation simulation of the real equipment, and outputting the operation data of the real equipment and the operation data of the simulation simulator to the simulation interface.
5. The trackside simulation method according to claim 1, wherein the simulation data in the simulation project includes trackside equipment data, all-electronic environment data, and all-electronic acquisition unit wiring data, the trackside equipment data includes trackside equipment information, the all-electronic environment data includes all-electronic system environment configuration, and the all-electronic acquisition unit wiring data includes wiring mapping between an all-electronic board card and the trackside equipment.
6. The trackside simulation method according to claim 1, wherein the communication configuration in the simulation project includes local termination information, simulation control area information, message sending configuration and message receiving configuration, the local termination information includes a network address and a port used by the simulation simulator for external communication, the simulation control area information includes control area information where the simulation simulator is located, the message sending configuration includes sending configuration of sending messages by the simulation simulator to other simulation simulators, and the message receiving configuration includes receiving configuration of receiving messages by the simulation simulator.
7. The trackside simulation method according to any one of claims 1 to 6, wherein the simulator role is trackside equipment;
the method for realizing the operation simulation of the real equipment by using the initialized simulation simulator comprises the following steps:
setting a state machine state of the simulation simulator to an idle state, and detecting whether a start event for the simulation simulator occurs;
if the starting event aiming at the simulation simulator is detected to occur, setting the state of a state machine of the simulation simulator to be an operation state, and calling a health self-checking method of the simulation simulator to judge whether the simulation simulator has faults or not;
if the simulation simulator does not fail based on the health self-checking method, entering a step of calling the health self-checking method of the simulation simulator to judge whether the simulation simulator fails;
if the simulation simulator has faults based on the health self-checking method, setting the state machine state of the simulation simulator as a fault state, and calling the fault self-checking method of the simulation simulator to judge whether the simulation simulator has faults;
if the simulation simulator does not fail based on the failure self-checking method, entering a step of setting a state machine state of the simulation simulator to be an operation state, and calling a health self-checking method of the simulation simulator to judge whether the simulation simulator fails;
If the simulation simulator has failed based on the failure self-checking method, the method enters the steps of setting the state machine state of the simulation simulator to be an idle state and detecting whether a starting event for the simulation simulator occurs.
8. The trackside simulation method of claim 7, wherein the performing when the healthy self-test method of the simulation simulator is invoked:
invoking a normal operation judging method of the simulation simulator to judge whether the simulation simulator can normally operate;
if the simulation simulator is determined to have faults based on the normal operation judging method, a fault state updating method of the simulation simulator is called to adjust the state of a state machine of the simulation simulator into the fault state;
if the simulation simulator is determined to not have faults based on the normal operation judging method, judging whether the current equipment state of the simulation simulator is the same as the target equipment state of the next period;
and if the device states are different, calling a state updating method of the simulation simulator to adjust the device states of the simulation simulator to the target device states.
9. The trackside simulation method of claim 8, wherein the executing when the state update method of the simulation simulator is invoked:
Initializing a count variable to 1;
waiting for preset time and judging whether the counting variable is smaller than or equal to a waiting time threshold value;
if yes, adding one to the counting variable, and judging whether a reverse command is received or not; if so, updating the counting variable based on the waiting time threshold value, and entering the step of waiting for preset time; if not, entering the step of waiting for the preset time;
and if not, driving the simulation simulator into the target equipment state.
10. A software-defined-based trackside simulation system, comprising:
the starting module is used for determining simulator information, simulation items and simulation interfaces according to the starting command; the simulator information includes simulator roles and control zone information, the simulator roles corresponding to various device types in a communication-based train control system CBTC;
the loading module is used for loading a simulation simulator according to the simulator role, inputting simulation data and communication configuration corresponding to the simulator role and the control area information in the simulation project into the simulation simulator, initializing the simulation simulator by using the simulation data and controlling the simulation simulator to communicate with other simulation simulators according to the communication configuration;
And the simulation module is used for realizing the operation simulation of the real equipment by using the initialized simulation simulator and outputting the operation data of the simulation simulator to the simulation interface.
11. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing a software-defined based trackside simulation method according to any one of claims 1 to 9 when executing the computer program.
12. A computer readable storage medium having stored therein computer executable instructions which when loaded and executed by a processor implement a software defined based trackside simulation method according to any one of claims 1 to 9.
CN202311551631.8A 2023-11-20 2023-11-20 Software definition-based trackside simulation method, system, electronic equipment and medium Pending CN117540565A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311551631.8A CN117540565A (en) 2023-11-20 2023-11-20 Software definition-based trackside simulation method, system, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311551631.8A CN117540565A (en) 2023-11-20 2023-11-20 Software definition-based trackside simulation method, system, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN117540565A true CN117540565A (en) 2024-02-09

Family

ID=89793429

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311551631.8A Pending CN117540565A (en) 2023-11-20 2023-11-20 Software definition-based trackside simulation method, system, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN117540565A (en)

Similar Documents

Publication Publication Date Title
CN111200535B (en) Simulation system and method for equipment
US9916331B2 (en) Method and device for automatically processing static test data of rail transit vehicle
CN103676937A (en) Method and device for processing control parameters in controller
CN108802511B (en) Method and system for testing battery management unit
CN102289209A (en) CTCS-3 (China train control system) level train control testing simulation system
CN107831392A (en) A kind of all-electronin interlocks hardware intelligent test system
CN103699122A (en) Finished car controller test platform and control method
CN112737886B (en) Tool testing method and system, electronic equipment and storage medium
CN104101504A (en) Motor car automatic testing method and device
CN103576667A (en) Main control panel test method, device and system
CN117540565A (en) Software definition-based trackside simulation method, system, electronic equipment and medium
CN110198222A (en) A kind of distribution power automation terminal plug and play test method and test main website
Ebert et al. Testing software systems
CN109947078A (en) Direct fault location unit and its board, real time fail method for implanting, device and equipment
CN115733741A (en) Abnormal scene testing method and device for system to be tested
CN105320120A (en) Device and method for simulating start-up failure of air conditioning compressor
CN111552263B (en) Method, computer-readable storage medium and system for inspecting industrial facilities
CN110733037B (en) Signal processing method and device, storage medium and processor
CN114218001A (en) Fault repairing method and device, electronic equipment and readable storage medium
CN110978051B (en) Robot simulation device, system, method, readable medium, and electronic apparatus
CN114074697A (en) Fep simulator, industrial personal computer and rail transit comprehensive monitoring simulation system
CN113495545A (en) System and method for testing vehicle equipment controller using in-loop hardware
CN111679974A (en) Application program testing method and device
CN115589407B (en) File transmission verification method based on PLM-DNC integrated system
CN109361192B (en) Terminal equipment, and constant value modification method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination