OPNET learning experience (1): OPNET Structure

Source: Internet
Author: User
Tags opnet
OPNET learning experience (1): OPNET Structure OPNET Architecture)
(Note: See OPNET documentation: Main Menu-> modeling concepts-> modeling overview-> OPNET Architecture)
OPNET provides a comprehensive development environment for the performance evaluation of communication networks and distributed systems. Composed of many tools, these tools are classified into three categories: specification, data collection and simulation, and analysis ). 1. model specification 1.1 custom Editor (specification editors)
A) Project Editor: defines the network model (Network Models). Network Models consists of subnets and node models (node models ). Project editor has basic simulation and analysis capabilities (including statistics ).
B) node Editor: defines the node model. node models is part of network models. Node models consists of a series of modules, which contain process models ). The module may also contain the parameter model (?! Parameter models ).
C) process Editor: defines the process model. The Process Model controls the module behavior, which may also involve parameter models (?!).
D) link model Editor: create, edit, and view the link model ).
E) packet format Editor: defines the packet formats model ). Packet format indicates the structure and sequence of information stored by packet.
F) ICI Editor: creates, edits, and views the interface control information ICI format. ICI is used to exchange control information between processes.
G) antenna pattern Editor: create, edit, and view the antenna type of the transmitter and receiver. (For radio)
H) modulation cure Editor: create, edit, and view the model curve of the transmitter. (For radio)
I) PDF Editor: create, edit, and view probability density functions. PDFs is used to control some tasks, such as the sending frequency of the source module. 1.2 model domain
OPNET is divided into three model domains: network domain, node domain, and process domain, which are also the main layers of the entire model.
1.2.1 network domain)
Network domain defines the topology of a communication network. The communication entity is nodes.
OPNET provides one-way and full-duplex point-to-point links, and bus links to allow dedicated broadcast communication to any node group.
1.2.2 node domain)
Node domain is used to model communication devices, such as routers, bridges, workstations, and terminals. Node Model is generated by node editor and expressed by smaller modules. Some modules have certain functions, which have been defined. You only need to configure a set of internal parameters (built-in parameters. They include a variety of transmitters and receivers used to connect a communication link in a network domain. There are also some modules: processors and queues, which are also highly programmable and their actions are described through the process model.
Each module in the node model is connected through three links: Packet streams, statistic wires, and logical associations. Packet streams is called packet to send formatted messages. Statistic wire transmits simple digital signal and control information, which is generally used by one module to monitor the performance and status of other modules. Both statistic wire and packet stream have parameters to configure their behavior. Logical associations are used to confirm the binding between modules. Currently, they are only used between the transmitter and receiver to indicate that they should be used as a pair of modules when connected to a link on the network domain.
1.2.3 process domain)
A process can be considered to be similar to an execution. Program . The process in OPNET is based on the process model, which is defined in the process editor.
A process group is composed of many processes that are executed in the same processor or queue. At the beginning of simulation, each module can have only one process, which is called root process. After this process, you can create a new process, and then create other processes. The process created in the simulation is called a dynamic process ).
Only one process can be executed at any time. When a process starts to be executed, we say that this process has been called (invoked.
When one process calls another process, the called process is temporarily suspended until the called process is blocked ). If a process completes the processing of its current call, it will be blocked. When the invoked process is blocked, the invoking process proceeds from where it is suspended.
The process in OPNET can respond to interrupt or invocation. Interrupt may generate sources outside the process group, other members in the process group, or the process itself. Interrupt generally corresponds to some events, including message arrival, Timer arrival, resource release, or status change of other modules.
The OPNET process editor uses the proto-C language to describe the process model. Proto-C is a common component based on the state transition diagrams STD, a advanced command Library (kernel procedures), and C or C ++. STD defines the State of each process of the model and the condition for transferring processes between States. This condition is called transition. Kernel procedures consists of a series of function packages. For more information about these packages, see references.
STD is generated in process editor. Apart from the capabilities of some traditional STD, STD also has a series of extensions:
A) state variable ). Process can have some private state variables. These state variables can be any data type, including OPNET proprietary, General C/C ++, and user-defined types. This capability enables process to flexibly control counter, routing tables, performance-related statistics, and message to be forwarded. Any combination of statevariable can be used in all actions and decisions of a process.
B) State executives ). The C/C ++ language describes the operations performed when a process enters and leaves the status. Typical operations include modifying the status information, creating or receiving a message, and updating the content of the sent message, update statistics, set the timer, and respond to the timer.
C) transfer condition ). Use the C/C ++ language to describe the Boolean variable, which involves the attributes of interrupt and the combination of state variables.
D. Transition executives ). Some common operations may be defined during the transfer. 1.3 model, object, attribute (models, object, attributes)
1.3.1 object)
An object is part of a model. It can play the following functions in the model:
A) define behavior
B) Create information
C) storage and management information
D) process, modify, and forward information
E) Respond to the event
F) include other objects
1.3.2 attribute)
The attribute of an object and some programs that allow access to the attribute or enable the attribute to take effect constitute the object interface. These programs can be automatically generated by OPNET or compiled by users. Objects that contain sub-objects are called compound objects ).
1.3.3 Model)
1.3.4 model attribute and attribute promotion)
In addition to describing objects, attribute can also be used on the model to represent parameters of the model. The attributes mechanism of the model can improve the reusability of the model. Specifically, the attribute of the model is defined as a part of the model, but they also appear in the object. They are obtained by the object after the object model is specified. This is the object's instinct.
Similar to this model attribute mechanism, object attribute can be passed up to the model. This mechanism is called attribute promotion. Promotion causes the object attribute to appear in the upper-layer attribute instead of having a value. For the attribute from one promote to all models, we can regard it as the attribute of simulation. In this way, the study system is regarded as the attributes functions.
1.3.5 Derivative Model (derived models)
Sometimes we want to change only some attributes of a model to get a new model. This mechanism is called model derivation ). The derived model is called the derived model, the derived model is called the parent model, and the model without the parent model is called the base model. 2. Modeling communications with packets)
A basic communication structure in OPNET is packet. Packet consists of three storage domains. The first field is packet field, which is a set of user-defined values. The second pre-defined field consists of a set of predefined values for tracking and statistics. The third domain is the transmission data field, which is used to support customizable communication link models.
Packet is divided into formatted and unformatted ). The fields of formatted packet are defined according to the so-called packet format template. Packet format is created in packet format Editor, where a set of domain names, data types, sizes (by bit), and default values are customized. Unformatted packet does not have any fields when it was just created. These fields are all appended at a time and can only be indicated by numerical numbers, rather than by names.
Packet can be transmitted through several communication mechanisms in the OPNET model. At node level, it is through packet stream; at network level, it is through links; There is also a third transmission mechanism, called packet delivery, which supports packet sending between modules, no matter where these modules are in the network or whether they have physical connections. 3. Data collection and Simulation)
The main purpose of modeling is to measure the system performance or observe some behaviors of the system. OPNET supports this function by creating an executable model in this system. There are several mechanisms used to collect the required data in one or more systems. 3.1 simulation output data types (simulation output data types)
OPNET provides many output types, including output vectors, output scalars, and animation. Of course, you can also define the desired output type, but usually you can directly use the data type provided by OPNET.
3.1.1 output Vectors)
Output vector is the most common output result of output data. It is actually a set of pairs of real value (entry ). A vector can contain any number of entries from a single simulation. The first value of the entry can be considered as an independent variable, and the second value is a dependent variable ). In OPNET, this is also called the abscissa and ordinate coordinates ). In most cases, independent variable is a simulation time, which increases monotonically with the simulation. In other words, in most cases, vector represents the changes in the value we care about over time. Of course there are also changes with other things :)
3.1.2 output scalar)
Scalar is a value compared to vecotr. Generally, scalar is a function of the collected measurement data, such as average value, probability, or peak value. Scalar is more useful when multiple simulations result in a curve that varies with system parameters. The OPNET simulation records scalar statistics in the output scalar file. Unlike output vector, output scalar contains not only a simulation result, but also multiple simulation results. The cause has been mentioned before.
3.1.3 application-specific statistics)
Scalar and vector can be used to automatically calculate and record predefined statistics. These predefined statistics are generally related to the measurements of some specific objects in the model, such as queue sizes, link throughputs, error rates, and queuing delays. In addition, it is common to record computing statistics for specific applications in simulation. These statistics are also stored in scalar and vector output files.
Custom statistics can be declared in the process model. In this case, OPNET adds them to the built-in statistics of the module using this process. Custom statistics are divided into local and global by scope ).
Local statistic is only maintained by the processors and queue that declare it. It is suitable for recording local-only events, such as CPU utilization.
Global statistic is shared by entities in many models. It is suitable for recording information related to the performance and behavior of the entire system. For example, ignore the source and target end-to-end latency. 3.2 selecting data for collection)
The default setting of the OPNET data collection mechanism is disabled. Therefore, you must explicitly activate specific statistics so that the results can be output to the appropriate output file. This is achieved by setting a series of probe during simulation. These probe can point to scalar, vector, and so on. These probe results (?! My MS is the simulation-> choose statistics operation definition under project editor. More advanced probe should be defined in probe editor.
To make statistics easier, you can also select some options for pointers, such as selecting time windows to reduce data volume. 4. Analysis)
The third stage of simulation includes checking the collected data. Generally, most of the data is stored in the output scalar and output vector files. OPNET provides basic access to the data in the project editor, and provides more advanced image and numerical processing capabilities in the analysis tool. 4.1 numerical data analysis
Both project editor and analysis tool can select an output vector file, import one or more vectors, and display their tracks (traces. Multiple traces can be displayed on one graph, which is called an analysis panel ). You can configure the display mode of analysis Panel through analysis configuration.
Analysis panels provides a number of numeric processing operations to operate traces or vectors to generate new data graphs. For more information about these operations, see references.
Analysis tools is linked to the Filter Editor, which can use mathematical filter to process vector and trace. This is not detailed here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.