Communication simulation interruption control method and system
By implementing dynamic parameter modification and functional entity operation in the simulation kernel, the problem that existing communication emulator software cannot modify parameters and functional entities in real time is solved, and the flexibility and operability of the simulation process are improved.
Patent Information
- Application Number
- CN202111222442.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-20
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-10-20
AI Technical Summary
Existing communication emulator software such as OPNET and NS2 do not support the simulation interrupt dynamic modification mechanism, and cannot modify parameters and functional entities in real time during the simulation process, which limits the user's operation and analysis capabilities.
By configuring and storing initial parameters in the simulation kernel, dynamic parameter modification of the simulation model is realized, and asynchronous and synchronous mechanisms are supported, allowing parameters to be modified in real time during the simulation process and adding and deleting functional entities.
Real-time dynamic modification of simulation parameters and dynamic creation and deletion of functional entities are realized, which improves user's operation flexibility during the simulation process and observability of simulation results, and makes up for the shortcomings of the existing technology.
Smart Images

Figure CN113904946B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of simulation technology, in particular to a communication simulation interruption control method and system, and more particularly to a communication simulation interruption control implementation method. Background Art
[0002] At present, the commonly used network simulators in the Chinese market are OPNET, NS2 and MATLAB. They are all based on the simulation principle of discrete events, use the packet / message communication mechanism, support hierarchical modeling structure, and can complete system-level dynamic simulation very well. The three software also have their own characteristics, which will be introduced below:
[0003] OPNET is one of the four series of network simulation software products from OPNET Technology. It is mainly aimed at network design professionals and can meet the simulation needs of large and complex networks.
[0004] OPNET has the following features: it provides a three-layer modeling mechanism, the bottom layer is the Process model, which describes the protocol with a state machine; the second is the Node model, which is composed of corresponding protocol models and reflects the characteristics of the equipment; the top layer is the network model. The three-layer model completely corresponds to the actual network, equipment, and protocol layers, and fully reflects the relevant characteristics of the network; it provides a relatively complete basic model library. At the same time, OPNET Technology will provide additional dedicated model libraries for different corporate users, using discrete event-driven simulation mechanisms, and greatly improve computing efficiency; using a hybrid modeling mechanism, combining packet-based analysis methods with statistical-based mathematical modeling methods, it can not only obtain very detailed simulation results, but also greatly improve simulation efficiency; OPNET has rich statistical quantity collection and analysis functions. It can directly collect commonly used performance statistical parameters of each network layer, and can easily compile and output simulation reports; it provides interfaces with network management systems and traffic monitoring systems, and can easily use existing topology and traffic data to establish simulation models, and can also verify simulation results.
[0005] NS2 is an object-oriented network simulator, essentially a discrete event simulator. NS2 was developed by UCBerkeley. It has a virtual clock and all simulations are driven by discrete events. Currently, NS2 can be used to simulate various IP networks. Some of the simulations that have been implemented include: network transmission protocol; service source traffic generator; routing queue management mechanism; routing algorithm. NS2 also implements multicast and some MAC sublayer protocols for LAN simulation.
[0006] NS2 uses C++ and Otcl as development languages. It includes simulation event scheduler, network component object library, and network construction model library. The event scheduler calculates the simulation time, activates the current event in the event queue, and executes some related events. Network components communicate with each other by passing packets, but this does not consume simulation time. All network components that need to spend simulation time to process packets must use the event scheduler. It first sends an event for the packet, and then waits for the event to be scheduled back before doing the next processing work.
[0007] When the simulation is complete, NS will generate one or more text-based trace files. These files will contain detailed trace information by adding some simple statements to the Tcl script. This data can be used for further analysis or the entire simulation process can be displayed using NAM.
[0008] MATLAB software is a scientific computing system environment for numerical calculation and graphics processing launched by the American company Mathworks. MATLAB is the abbreviation of MATrix LABoratory. In the MATLAB environment, users can perform various operations such as program design, numerical calculation, graphics drawing, input and output, and file management in an integrated manner. MATLAB provides a human-computer interactive mathematical system environment. The basic data structure of the system is the matrix. When generating a matrix object, no clear dimension description is required. Compared with programming using C language or FoRTRAN language for numerical calculation, using MATLAB can save a lot of programming time.
[0009] Although the above-mentioned software have their own advantages in simulation performance, none of them support the dynamic modification mechanism of simulation interruption. The simulation kernel cannot know the reading and modification operations of parameters and functional entities by users through GUI or external programs during the simulation interruption.
[0010] Patent document CN106508103B (application number: 201010050653.2) discloses a dynamic control method for communication network simulation, which includes an initial configuration generation step, a simulation initialization step, a dynamic parameter management step, and a parameter export step. Dynamic parameter management includes: (1) running the simulation network; (2) modifying the actual parameter value through GUI modification and external program modification; (3) the simulation model provides a parameter modification processing interface; (4) the simulation model obtains the modified actual parameter value and updates the simulation state through synchronous and asynchronous methods. The present invention realizes dynamic parameter modification in the communication simulation process, and can modify the simulation parameters without interrupting the simulation, thereby realizing the secondary planning of the simulation network.
[0011] Simulator software such as OPNET and NS2 do not support dynamic parameter modification mechanisms. They cannot accept parameter reading and modification operations from the GUI or external programs after the simulation is interrupted, nor can they use external interfaces to add or delete models, links, and simulation scenarios. Users can only reconfigure simulation parameters after the simulation is completed and run the simulation again for observation. Summary of the invention
[0012] In view of the defects in the prior art, an object of the present invention is to provide a communication simulation interruption control method and system.
[0013] A communication simulation interruption control method provided by the present invention includes:
[0014] Step S1: Initial parameter configuration of the simulation model and storage in the simulation kernel;
[0015] Step S2: The simulation kernel constructs an initial simulation parameter system according to the simulation parameter settings and the structure of the simulation model;
[0016] Step S3: the simulation model initializes the simulation program;
[0017] Step S4: During the simulation process, the parameter values stored in the simulation kernel are modified. After the parameters are modified, they are transmitted to the simulation program, and corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0018] Preferably, the step S1 adopts: initial parameter configuration of the simulation model is performed by GUI configuration, background batch configuration and / or measured parameter import.
[0019] Preferably, the step S3 adopts: the simulation program initialization process of the simulation model is a multi-round bidirectional process; the bidirectional process includes: the simulation model obtains parameter values from the parameter configuration system to modify the simulation kernel data and modifies the values in the simulation kernel through the simulation program to change the simulation model parameters.
[0020] Preferably, the step S3 adopts:
[0021] Step S3.1: The simulation program sets the initialization rounds required for the simulation model;
[0022] Step S3.2: The simulation program performs its own initial simulation operation to determine the parameters that need to be read or modified;
[0023] Step S3.3: The simulation program calls the parameter acquisition interface provided by the simulation kernel to read the specified parameter value; or calls the parameter modification interface provided by the simulation kernel to modify the specific parameter.
[0024] Preferably, step S4 adopts: during the simulation process, the parameter values stored in the simulation kernel are modified, and the modified parameters are transmitted to the simulation program through an asynchronous mechanism and / or a synchronous mechanism, and corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0025] Preferably, the asynchronous mechanism adopts: modifying the parameter values stored in the simulation kernel, and updating the parameters when the simulation program is running after the parameters are modified.
[0026] Preferably, the synchronization mechanism adopts: modifying the parameter value stored in the simulation kernel, the simulation kernel sends a signal to the simulation program associated with the currently modified parameter to notify the parameter modification, and after receiving the signal, the simulation program immediately updates the parameter value cached by itself.
[0027] Preferably, during the simulation process, a command for dynamically adding or deleting functional entities is transmitted to the simulation kernel, and the adding or deleting operations of the functional entities are performed based on a dynamic parameter modification mechanism;
[0028] The add / delete function entity commands include: link addition, link deletion, node or network addition, and node or network deletion;
[0029] When a node or network is created, a connection relationship is added; when a node or network is deleted, the connection relationship between the current node or network and the surrounding nodes is deleted.
[0030] A communication simulation interruption control system provided by the present invention comprises:
[0031] Module M1: Initial parameter configuration of the simulation model and storage in the simulation kernel;
[0032] Module M2: The simulation kernel builds the initial simulation parameter system according to the simulation parameter settings and the structure of the simulation model;
[0033] Module M3: The simulation model initializes the simulation program;
[0034] Module M4: During the simulation process, the parameter values stored in the simulation kernel are modified. After the parameters are modified, they are passed to the simulation program, and the corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0035] Preferably, the module M1 adopts: initial parameter configuration of the simulation model by including GUI configuration, background batch configuration and / or measured parameter import;
[0036] The module M3 adopts: the simulation program initialization process of the simulation model is a multi-round two-way process; the two-way process includes: the simulation model obtains parameter values from the parameter configuration system to modify the simulation kernel data and modifies the values in the simulation kernel through the simulation program to change the simulation model parameters;
[0037] The module M4 adopts: during the simulation process, the parameter values stored in the simulation kernel are modified, the modified parameters are transmitted to the simulation program through an asynchronous mechanism and / or a synchronous mechanism, and the corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] 1. VRNET's communication simulation interrupt control makes up for the shortcomings of the current commonly used software in this field. By supporting two communication simulation interrupt dynamic parameter modification mechanisms: asynchronous mechanism and synchronous mechanism, it is convenient for simulation users to observe the real-time changes of simulation parameters during operation and modify simulation parameters in real time;
[0040] 2. When the user observes an abnormal situation during the simulation operation, he can pause the simulation, modify the simulation parameters in real time, and then continue the simulation observation;
[0041] 3. The present invention further realizes the dynamic creation and deletion of functional entities based on the dynamic parameter modification mechanism, thus meeting the user's modification requirements for simulation entities. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0043] Figure 1 Parameter management process.
[0044] Figure 2 Import the process for the parameters.
[0045] Figure 3 It is an asynchronous parameter modification mechanism.
[0046] Figure 4 Import the process for initial parameters.
[0047] Figure 5 Modify the process for parameters.
[0048] Figure 6 It is a synchronization parameter modification mechanism.
[0049] Figure 7 Initializes the process for parameters.
[0050] Figure 8 Modify the process for parameters.
[0051] Fig. 9 To dynamically add and delete functional entities. DETAILED DESCRIPTION
[0052] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0053] Example 1
[0054] A communication simulation interruption control method provided by the present invention includes:
[0055] Step S1: Initial parameter configuration of the simulation model and storage in the simulation kernel;
[0056] Step S2: The simulation kernel constructs an initial simulation parameter system according to the simulation parameter settings and the structure of the simulation model;
[0057] Step S3: the simulation model initializes the simulation program;
[0058] Step S4: During the simulation process, the parameter values stored in the simulation kernel are modified. After the parameters are modified, they are transmitted to the simulation program, and corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0059] Specifically, the step S1 adopts: initial parameter configuration of the simulation model is performed by GUI configuration, background batch configuration and / or measured parameter import.
[0060] Specifically, the step S3 adopts: the simulation program initialization process of the simulation model is a multi-round two-way process; the two-way process includes: the simulation model obtains parameter values from the parameter configuration system to modify the simulation kernel data and modifies the values in the simulation kernel through the simulation program to change the simulation model parameters.
[0061] Specifically, the step S3 adopts:
[0062] Step S3.1: The simulation program sets the initialization rounds required for the simulation model;
[0063] Step S3.2: The simulation program performs its own initial simulation operation to determine the parameters that need to be read or modified;
[0064] Step S3.3: The simulation program calls the parameter acquisition interface provided by the simulation kernel to read the specified parameter value; or calls the parameter modification interface provided by the simulation kernel to modify the specific parameter.
[0065] Specifically, step S4 adopts: during the simulation process, the parameter values stored in the simulation kernel are modified, and the modified parameters are transmitted to the simulation program through an asynchronous mechanism and / or a synchronous mechanism, and corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0066] Specifically, the asynchronous mechanism adopts: modifying the parameter values stored in the simulation kernel, and updating the parameters when the simulation program is running after the parameters are modified.
[0067] Specifically, the synchronization mechanism adopts: modifying the parameter value stored in the simulation kernel, the simulation kernel sends a signal to the simulation program associated with the currently modified parameter to notify the parameter modification, and after receiving the signal, the simulation program immediately updates the parameter value cached by itself.
[0068] Specifically, during the simulation process, the command of dynamically adding or deleting functional entities is conveyed to the simulation kernel, and the adding or deleting of functional entities is performed based on the dynamic parameter modification mechanism;
[0069] The add / delete function entity commands include: link addition, link deletion, node or network addition, and node or network deletion;
[0070] When a node or network is created, a connection relationship is added; when a node or network is deleted, the connection relationship between the current node or network and the surrounding nodes is deleted.
[0071] A communication simulation interruption control system provided by the present invention comprises:
[0072] Module M1: Initial parameter configuration of the simulation model and storage in the simulation kernel;
[0073] Module M2: The simulation kernel builds the initial simulation parameter system according to the simulation parameter settings and the structure of the simulation model;
[0074] Module M3: The simulation model initializes the simulation program;
[0075] Module M4: During the simulation process, the parameter values stored in the simulation kernel are modified. After the parameters are modified, they are passed to the simulation program, and the corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0076] Specifically, the module M1 adopts: initial parameter configuration of the simulation model by including GUI configuration, background batch configuration and / or measured parameter import;
[0077] The module M3 adopts: the simulation program initialization process of the simulation model is a multi-round two-way process; the two-way process includes: the simulation model obtains parameter values from the parameter configuration system to modify the simulation kernel data and modifies the values in the simulation kernel through the simulation program to change the simulation model parameters;
[0078] The module M4 adopts: during the simulation process, the parameter values stored in the simulation kernel are modified, the modified parameters are transmitted to the simulation program through an asynchronous mechanism and / or a synchronous mechanism, and the corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
[0079] Example 2
[0080] Embodiment 2 is a preferred embodiment of Embodiment 1
[0081] VRNET is a network simulation integrated development environment developed by Beijing Weier Technology. It uses its good openness and efficient modeling methods to realize the dynamic parameter modification mechanism of communication simulation interruption. At the same time, thanks to the excellent modeling framework of VRNET simulation kernel, VRNET modeling adopts object-oriented thinking. All models directly or indirectly inherit a common base class, which defines most of the behavioral interfaces. Each model implements the interface according to its own characteristics to complete its own specific functions.
[0082] The simulation kernel has factory functions for all models, and can create a specific instance of a model at any time with the reflection mechanism. Since each object is an independent entity, model entities can be created both during simulation initialization and during simulation operation, as long as the interaction between entities is handled properly. Therefore, with the help of VRNET's dynamic parameter mechanism, dynamic creation and deletion of functional entities can be achieved during the simulation process, including dynamic creation and deletion of nodes, links, networks, etc., as well as behavior specification and other functions. The following will give a detailed description of these two unique mechanisms of VRNET itself.
[0083] like Figure 1 As shown in the figure, the basic process of dynamic parameter management adopted by this solution is shown. The whole process can be divided into four major stages: initial configuration generation stage, simulation initialization stage, dynamic parameter management stage, and parameter export stage. The initial configuration generation stage, simulation initialization stage, dynamic parameter management stage, and parameter export stage are the basic steps for the simulation software to run. In these stages, data interaction between the model and the simulation kernel is realized through dynamic parameter management and parameter export, thereby realizing simulation interrupt control. Below, we will describe the detailed process of these four stages.
[0084] Initial configuration phase
[0085] In this stage, the simulation kernel will build an initial simulation parameter system based on the parameter settings of a simulation and the structure of the simulation network. The initial parameter configuration of the simulation network can be performed in three ways: GUI configuration, background batch configuration, and measured parameter import. In actual operation, parameter configuration can be performed in one way or in combination. The implementation mechanisms of the three methods are as follows:
[0086] GUI Configuration
[0087] In VRNET, when building simulation networks and simulation models, you can use the GUI to build the required models. Each functional model will correspond to an entity in the GUI. At this time, you can perform graphical operations on the interface to configure the parameters of each functional model.
[0088] Backend batch configuration
[0089] When the simulation scale is large, it is very tedious to configure the parameters of each functional model on the GUI, and it is easy to make mistakes. Therefore, VRNET provides a method for background batch configuration, which can set the parameters of a group of models at the same time. This is also an innovation of VRNET in the field of parameter configuration of discrete event simulation. In the simulation model system, VRNET adopts a hierarchical description method of segmentation, for example:
[0090] Simulation network A. Subnet 1. Node 2. Module 3
[0091] Used to describe a globally unique module path. At this point, with the help of the wildcard principle in the field of computer science, we can achieve batch configuration of parameters.
[0092]
[0093] The difference between * and ** is that the former can only be used for wildcarding of characters within a section and cannot cross the section separator '.'; while the latter can be used for wildcarding of all characters and can cross the section separator.
[0094] Measured parameter import
[0095] Since VRNET uses an open parameter management system and has dynamic parameter management capabilities, VRNET has the ability to import parameters from measured data, which enables VRNET to combine with the actual network operation status, analyze the existing problems in the actual network operation and maintenance process, and provide solutions. It should be noted that the parameters collected through the actual network are usually incomplete, and only have partial parameter settings for some network elements, so this method usually needs to be used in conjunction with the first two methods.
[0096] Through the above three methods, the simulation kernel forms a basic parameter framework. In the initial configuration stage, the simulation kernel also needs to match the parameter settings with the actual model to form a specific parameter system. The process is as follows: Figure 2 shown.
[0097] Construct a simulation model system through network model description, that is, construct a specific simulation model entity;
[0098] Read the parameter configuration information obtained by the above three means and correspond it with the actual simulation model entity;
[0099] The parameter type is judged. If it is a constant type parameter, the parameter value is directly generated; if it is a random parameter, a value is generated through certain random rules and filled into the parameter; if it is a variable parameter, the change rule is stored in the parameter, and the parameter is dynamically generated each time it is used. Among them, dynamic variable parameters are VRNET's original parameter system. When declaring a parameter, a parameter can be defined as a dynamic variable parameter through the volatile keyword. Together with the dynamic parameter modification mechanism to be explained below, it constitutes VRNET's dynamic parameter management mechanism.
[0100] Unit matching. In VRNET, when a parameter is introduced with a unit, the unit of the parameter can be set. For example, if the unit of a parameter is declared as seconds, and milliseconds are used when setting the parameter, the simulation kernel automatically reduces the parameter value by 1000 times to match the unit of the parameter.
[0101] Simulation initialization phase
[0102] After the processing of phase one, a parameter system matching the simulation model is formed. At this point, the entire simulation will initialize the simulation program. This initialization process is a multi-round two-way process. From the perspective of parameter management, the user program can obtain parameter values from the parameter configuration system, and can also modify specific parameters through the program. The process of this phase is as follows:
[0103] a. The user simulation program sets the initialization rounds required by itself;
[0104] b. The user simulation program performs its own initial simulation operation to determine the parameters that need to be read or modified;
[0105] c. The user simulation program calls the parameter acquisition interface provided by the simulation kernel to read the specified parameter value; or calls the parameter modification interface provided by the simulation kernel to modify specific parameters.
[0106] In practical applications, the execution flow of the simulation initialization phase generally depends on the execution flow of the simulation program developed by the user and needs to be customized by the user of the simulation software.
[0107] The two-way process means that during the initialization process, the model parameters can be obtained from the configuration file to modify the simulation kernel data, or the values in the simulation kernel can be directly modified through the program to change the model parameters.
[0108] Multiple rounds refer to the initialization of model parameters that are related during the initialization process (for example, the initialization parameters of model 1 need to call several basic parameters of model 2 to be fully initialized). Based on the association, the initialization is divided into multiple rounds. The first round initializes the basic parameters of all models, the second round initializes the related model parameters, and the third round initializes multiple related model parameters. The purpose is to uniformly initialize the model parameters for all possible scenarios. It can also be understood as forming a template for initializing model parameters that is suitable for all scenarios.
[0109] Dynamic parameter management stage
[0110] This stage is the core part of VRNET dynamic parameter management. Through the interaction between the simulation model and the simulation kernel, and between the simulation kernel and the external program, dynamic parameter modification and management capabilities are realized. The entire parameter dynamic management process can be divided into two aspects: modification of parameter storage values and interaction between parameter modification and simulation programs.
[0111] Modification of parameter storage value
[0112] After the construction of the parameter storage system as described above, a storage entity is established for each parameter of each model entity. During the simulation process, these parameter storage entities will save the type, value, etc. of each parameter. Therefore, the modification of the parameter is actually the parameter value stored in the simulation kernel.
[0113] Parameter modification and simulation program interaction
[0114] After the parameter storage value is modified, it is passed to the simulation program, and the corresponding program operation is executed in real time according to the modified value, thereby realizing the interaction between the parameter and the simulation program.
[0115] Parameter export phase
[0116] First, the dynamic parameter modification mechanism of VRNET is introduced. This mechanism includes two types: asynchronous mechanism and synchronous mechanism, which are introduced as follows:
[0117] Mechanism 1: Asynchronous update mechanism of simulation parameters, such as Figure 3 As shown;
[0118] Process analysis:
[0119] Configure parameters one by one through the GUI, or quickly configure batch parameters through the background configuration file to form the initial simulation parameter configuration.
[0120] Through the simulation initialization process, a simulation parameter configuration system is formed. After the parameter configuration is read and calculated according to the predefined (calculation rules are determined by the simulation model), the parameter system is stored in the parameter management system of the simulation kernel. The specific process is as follows: Figure 4 shown.
[0121] During the simulation, the GUI or external program can read and modify parameters. When reading or modifying parameters, the GUI or external program communicates with the parameter management entity of the simulation kernel. If a parameter modification occurs, the corresponding parameter value in the kernel parameter management entity will change. The specific process is as follows: Figure 5 shown.
[0122] When the simulation model is running, each time a parameter is used, the kernel parameter management entity is requested to provide the value of the parameter. The parameter management entity returns the latest value of the parameter to the simulation model, thereby achieving the effect of dynamically modifying the parameter.
[0123] When this mechanism is running, the simulation will form two runtime loops: the parameter modification loop and the simulation running loop. The two loops work independently and overlap at the kernel parameter management entity. Since the modified parameters may not be used immediately in the simulation program, the simulation program will update the parameters only when they are used. Therefore, the parameter update loop and the simulation loop are in an asynchronous working state.
[0124] Mechanism 2: Simulation parameter synchronization update mechanism, such as Figure 6 As shown;
[0125] Process analysis:
[0126] Configure parameters one by one through the GUI, or quickly configure batch parameters through the background configuration file to form the initial simulation parameter configuration.
[0127] Through the simulation initialization process, a simulation parameter configuration system is formed. After the parameter configuration is read and calculated according to the predefined (calculation rules determined by the simulation model), the parameter system is stored in the parameter management system of the simulation kernel. At the same time, the simulation program obtains a copy of the parameter value through the parameter initialization process and stores it in the local backup.
[0128] When the simulation is running, it relies on its own cached parameter copy for simulation calculation, instead of requesting parameter values from the kernel parameter management entity every time the parameter is used. Therefore, the simulation efficiency can be improved to a certain extent. The parameter initialization process is as follows Figure 7 shown.
[0129] During the simulation, the GUI or external program can read and modify parameters. When reading or modifying parameters, the GUI or external program communicates with the parameter management entity of the simulation kernel. If a parameter modification occurs, the corresponding parameter value in the kernel parameter management entity will change. At the same time, an internal signal mechanism is introduced. When the value of a parameter is modified, the kernel parameter management entity will send a signal to the simulation program associated with the parameter to notify the parameter modification. After receiving the signal, the simulation program immediately updates the parameter value cached in itself. The parameter modification process is as follows: Figure 8 shown.
[0130] Since the simulator does not need to request the parameter value from the kernel parameter management entity every time it uses the parameter, the simulation operation loop is reduced to the simulator itself. However, due to the existence of the signal mechanism, the parameter modification loop is expanded to include some functions of the simulator. Therefore, parameter modification is in a synchronous operation mechanism.
[0131] In actual simulation programs, the two parameter mechanisms can coexist, that is, some parameters are modified using a synchronous mechanism, some parameters are modified using an asynchronous mechanism, and some parameters may even refuse to be modified, which depends on the specific design and implementation of the simulation program.
[0132] Secondly, the dynamic increase and decrease of functional entities mechanism of VRNET is introduced, which can realize the dynamic creation and deletion of functional entities in the simulation process, including the dynamic creation and deletion of nodes, links, networks, etc., as well as behavior specification and other functions.
[0133] like Fig. 9 As shown in the figure, in order to realize the dynamic creation or deletion of functional entities, we need to add a management module in the simulation. This module can exist in the simulation scene or be hidden in the simulation background. It has the parameters and construction methods of the functional entities that we need to dynamically create or modify (which can be obtained through the simulation kernel). During the simulation process, we can convey the command of dynamically adding or deleting functional entities to the simulation kernel through the GUI or external program interface. Through the dynamic parameter modification mechanism provided by VRNET, this command is captured by the management module, and then the addition and deletion of functional entities are performed according to the detailed content of the command.
[0134] To dynamically add or delete functional entities, we need to pass commands to the simulation kernel. The instruction types can be divided into four categories, including link addition, link deletion, node or network addition, and node or network deletion. The parameters required for each type of instruction are shown in Table 1 below.
[0135] Table 1
[0136]
[0137]
[0138] After a node or network is created, its connection relationship is added; after a node or network is deleted, its connection relationship with surrounding nodes will be deleted as well.
[0139] The present invention realizes the acceptance of parameter reading and modification operations from a GUI or an external program during the simulation operation. When a parameter modification occurs, the kernel parameter management entity sends a parameter modification notification to the simulation program associated with the parameter by means of an internal signal mechanism, and the simulation program promptly updates the parameter value cached by itself after receiving the signal. When the simulation is initialized, the parameter system is stored in the parameter management system of the simulation kernel, and when the simulation is running, the parameter management entity returns the latest value of the parameter to the simulation model, so as to achieve the effect of dynamically modifying the parameter. According to the characteristics of the parameters themselves, two parameter modification mechanisms are supported, namely a synchronous mechanism and an asynchronous mechanism, and the two mechanisms can coexist. In the synchronous mechanism, when the simulation is running, the simulation calculation can be performed by relying on the parameter copy cached by itself, thereby improving the simulation efficiency to a certain extent. By using the dynamic parameter modification mechanism provided by VRNET, by adding a management module, the operation of dynamically adding and deleting functional entities is realized by conveying the operation to the simulation kernel through a GUI or an external program interface.
[0140] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.
[0141] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A communication simulation interruption control method, characterized in that: include: Step S1: Initial parameter configuration of the simulation model and storage in the simulation kernel; Step S2: The simulation kernel constructs an initial simulation parameter system according to the simulation parameter settings and the structure of the simulation model; Step S3: the simulation model initializes the simulation program; Step S4: During the simulation process, the parameter values stored in the simulation kernel are modified. After the parameters are modified, they are transmitted to the simulation program, and corresponding program operations are performed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program; The step S1 adopts: initial parameter configuration of the simulation model by GUI configuration, background batch configuration and / or measured parameter import; The step S3 adopts: the simulation program initialization process of the simulation model is a multi-round two-way process; The bidirectional process includes: the simulation model obtains parameter values from the parameter configuration system to modify the simulation kernel data and modifies the values in the simulation kernel through the simulation program to change the simulation model parameters; During the simulation process, the command of dynamically adding or deleting functional entities is conveyed to the simulation kernel, and the adding or deleting of functional entities is performed based on the dynamic parameter modification mechanism; The add / delete function entity commands include: link addition, link deletion, node or network addition, and node or network deletion; When a node or network is created, a connection relationship is added; when a node or network is deleted, the connection relationship between the current node or network and the surrounding nodes is deleted; The step S3 adopts: Step S3.1: The simulation program sets the initialization rounds required for the simulation model; Step S3.2: The simulation program performs its own initial simulation operation to determine the parameters that need to be read or modified; Step S3.3: The simulation program calls the parameter acquisition interface provided by the simulation kernel to read the specified parameter value; or calls the parameter modification interface provided by the simulation kernel to modify a specific parameter; The basic process of dynamic parameter management is divided into the initial configuration generation phase, simulation initialization phase, dynamic parameter management phase, and parameter export phase; The initial configuration generation phase: the simulation kernel will build an initial simulation parameter system according to the parameter settings of a simulation and the structure of the simulation network; The simulation initialization stage: a parameter system matching the simulation model is formed, and the entire simulation will initialize the simulation program. The initialization process is a multi-round two-way process. From the perspective of parameter management, the user program obtains parameter values from the parameter configuration system and modifies specific parameters through the program; The bidirectional process refers to obtaining model parameters from the configuration file to modify the simulation kernel data during the initialization process, and directly modifying the values in the simulation kernel through the program to change the model parameters; Multiple rounds refer to the correlation between the model parameter initializations during the initialization process. Based on the correlation, the initialization is divided into multiple rounds. In the first round, the basic parameters of all models are initialized. In the second round, the associated model parameters are initialized. In the third round, multiple associated model parameters are initialized. The purpose is to uniformly initialize the model parameters for all possible scenarios and form a template that is suitable for the initialization of model parameters in all scenarios. The dynamic parameter management stage: through the interaction between the simulation model and the simulation kernel, and between the simulation kernel and the external program, the dynamic parameter modification and management capabilities are realized. The whole dynamic parameter management process is divided into two aspects: modification of parameter storage values, and interaction between parameter modification and simulation program; The modification of the parameter storage value, through the construction of the simulation parameter system, establishes a storage entity for each parameter of each model entity. During the simulation process, the storage entities of these parameters will save the type and value content of each parameter; The parameter modification interacts with the simulation program. After the parameter storage value is modified, it is transferred to the simulation program, and the corresponding program operation is executed in real time according to the modified value, thereby realizing the interaction between the parameter and the simulation program.
2. The communication simulation interruption control method according to claim 1, characterized in that: The step S4 adopts: during the simulation process, the parameter values stored in the simulation kernel are modified, and the modified parameters are transmitted to the simulation program through an asynchronous mechanism and / or a synchronous mechanism, and corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
3. The communication simulation interruption control method according to claim 2, characterized in that: The asynchronous mechanism adopts: modifying the parameter value stored in the simulation kernel, and updating the parameter after the parameter is modified when the simulation program is running.
4. The communication simulation interruption control method according to claim 3, characterized in that: The synchronization mechanism adopts: modifying the parameter value stored in the simulation kernel, the simulation kernel sends a signal to the simulation program associated with the currently modified parameter to notify the parameter modification, and after receiving the signal, the simulation program immediately updates the parameter value cached by itself.
5. A communication simulation interruption control system, characterized in that: include: Module M1: Initial parameter configuration of the simulation model and storage in the simulation kernel; Module M2: The simulation kernel builds the initial simulation parameter system according to the simulation parameter settings and the structure of the simulation model; Module M3: The simulation model initializes the simulation program; Module M4: During the simulation process, the parameter values stored in the simulation kernel are modified. After the parameters are modified, they are transmitted to the simulation program, and the corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program; The module M1 adopts: initial parameter configuration of the simulation model by GUI configuration, background batch configuration and / or measured parameter import; The module M3 adopts: the simulation program initialization process of the simulation model is a multi-round two-way process; The bidirectional process includes: the simulation model obtains parameter values from the parameter configuration system to modify the simulation kernel data and modifies the values in the simulation kernel through the simulation program to change the simulation model parameters; During the simulation process, the command of dynamically adding or deleting functional entities is conveyed to the simulation kernel, and the adding or deleting of functional entities is performed based on the dynamic parameter modification mechanism; The add / delete function entity commands include: link addition, link deletion, node or network addition, and node or network deletion; When a node or network is created, a connection relationship is added; when a node or network is deleted, the connection relationship between the current node or network and the surrounding nodes is deleted; The module M3 adopts: Module M3.1: The simulation program sets the initialization rounds required for the simulation model; Module M3.2: The simulation program performs its own initial simulation operations and determines the parameters that need to be read or modified; Module M3.3: The simulation program calls the parameter acquisition interface provided by the simulation kernel to read the specified parameter value; or calls the parameter modification interface provided by the simulation kernel to modify specific parameters; The basic process of dynamic parameter management is divided into the initial configuration generation phase, simulation initialization phase, dynamic parameter management phase, and parameter export phase; The initial configuration generation phase: the simulation kernel will build an initial simulation parameter system according to the parameter settings of a simulation and the structure of the simulation network; The simulation initialization stage: a parameter system matching the simulation model is formed, and the entire simulation will initialize the simulation program. The initialization process is a multi-round two-way process. From the perspective of parameter management, the user program obtains parameter values from the parameter configuration system and modifies specific parameters through the program; The bidirectional process refers to obtaining model parameters from the configuration file to modify the simulation kernel data during the initialization process, and directly modifying the values in the simulation kernel through the program to change the model parameters; Multiple rounds refer to the correlation between the model parameter initializations during the initialization process. Based on the correlation, the initialization is divided into multiple rounds. In the first round, the basic parameters of all models are initialized. In the second round, the associated model parameters are initialized. In the third round, multiple associated model parameters are initialized. The purpose is to uniformly initialize the model parameters for all possible scenarios and form a template that is suitable for the initialization of model parameters in all scenarios. The dynamic parameter management stage: through the interaction between the simulation model and the simulation kernel, and between the simulation kernel and the external program, the dynamic parameter modification and management capabilities are realized. The whole dynamic parameter management process is divided into two aspects: modification of parameter storage values, and interaction between parameter modification and simulation program; The modification of the parameter storage value, through the construction of the simulation parameter system, establishes a storage entity for each parameter of each model entity. During the simulation process, the storage entities of these parameters will save the type and value content of each parameter; The parameter modification interacts with the simulation program. After the parameter storage value is modified, it is transferred to the simulation program, and the corresponding program operation is executed in real time according to the modified value, thereby realizing the interaction between the parameter and the simulation program.
6. The communication simulation interruption control system according to claim 5, characterized in that: The module M4 adopts: during the simulation process, the parameter values stored in the simulation kernel are modified, the modified parameters are transmitted to the simulation program through an asynchronous mechanism and / or a synchronous mechanism, and the corresponding program operations are executed in real time according to the modified values, thereby realizing the interaction between the parameters and the simulation program.
