Corso di A.A. 2007-2008 Lezione 10 Introduzione a OPNET Ing. Marco GALEAZZI 1
What is OPNET? Con il nome OPNET viene indicata una suite di prodotti software sviluppati e commercializzati da OPNET Technologies, Inc. (http://www.opnet.com/). Tra tutti citiamo: OPNET Modeler (attualmente la versione rilasciata è la 11.5) OPNET IT Guru Academic Edition (versione gratuita scaricabile previa registrazione alla pagina web http://www.opnet.com/university_program/itguru_academic_edition/) 2
What can we do with OPNET? OPNET fornisce un ambiente di sviluppo completo per la creazione di modelli di reti di comunicazione e sistemi distribuiti. Eseguendo simulazioni discrete event, OPNET consente di analizzare sia il comportamento sia le prestazioni delle reti e dei sistemi modellati. L ambiente OPNET comprende gli strumenti per tutte le fasi dello studio: model design, simulation, data collection, data analysis. 3
What is Discrete event simulation In discrete event simulation, the operation of a system is represented as a chronological sequence of events. Each event occurs at an instant in time and marks a change of state in the system. For example, if an elevator is simulated, an event could be "level 6 button pressed", with the resulting system state of "lift moving" and eventually (unless one chooses to simulate the failure of the lift) "lift at level 6". A number of mechanisms have been proposed for carrying out discrete event simulation, which are used by a number of commercial simulation software packages, but from the user's point of view, the specifics of the underlying simulation method are generally hidden. 4
Components of a Discrete-Event Simulation In addition to the representation of system state variables and the logic of what happens when system events occur, discrete event simulations include the following: Clock - The simulation must keep track of the current simulation time, in whatever measurement units are suitable for the system being modeled. Events List - The simulation maintains at least one list of simulation events. Random Number Generators - The simulation needs to generate random variables of various kinds, depending on the system model. Statistics - The simulation typically keeps track of the system's statistics, which quantify the aspects of interest. Ending Condition - Theoretically a discrete-event simulation could run forever. So the simulation designer must decide when the simulation will end. Typical choices are at time t or after processing n number of events or, more generally, when statistical measure X reaches the value x. 5
Key System Features OPNET is a vast software package with an extensive set of features designed to support general network modeling and to provide specific support for particular types of network simulation projects: Object orientation Specialized in communication networks and information systems Hierarchical models Graphical specification Flexibility to develop detailed custom models Automatic generation of simulations Application-specific statistics Integrated post-simulation analysis tools Animation 6
Typical Applications of OPNET OPNET can be used as a platform to develop models of a wide range of systems: Standards-based LAN and WAN performance modeling Internetwork planning Research and development in communications architectures and protocols Resource sizing Mobile packet radio networks Satellite networks C3I and tactical networks 7
OPNET Architecture OPNET provides a comprehensive development environment for modeling and performance-evaluation of communication networks and distributed systems. The package consists of a number of tools, each one focusing on particular aspects of the modeling task. These tools fall into three major categories that correspond to the three phases of modeling and simulation projects: Specification, Data Collection and Simulation, Analysis. These phases are necessarily performed in sequence. They generally form a cycle, with a return to Specification following Analysis. 8
Model Specification (Editors) OPNET supports model specification with a number of tools, called editors. The model-specification editors are organized hierarchically, in a manner that is parallel to the structure of real network systems: Project Editor Node Editor Process Editor External System Editor Model specifications performed in the Project Editor rely on elements specified in the Node Editor; in turn, when working in the Node Editor, you make use of models defined in both Process and External System Editors. The remaining editors are used to define various data models, typically tables of values, that are later referenced by process-level or node-level models. Link Model Editor - Create, edit, and view link models. Packet Format Editor - Develop packet formats models. ICI Editor - Create, edit, and view interface control information (ICI) formats. PDF Editor - Create, edit, and view probability density functions (PDFs). 9
Model Specification (Domains) The Network, Node, Process, and External System modeling environments are sometimes referred to as the modeling domains of OPNET because they span all the hierarchical levels of a model. The issues addressed by each domain are summarized in the following table. 10
Network Domain The Network Domain s role is to define the topology of a communication network. A network model may contain any number of communicating entities called nodes. Nodes are instances of node models, developed using the Node Editor. Modelers can develop their own library of customized node models. Network models consist of nodes and links that can be deployed within a geographical context. OPNET comes with fixed nodes and point-to-point and bus links; the optional Wireless module adds mobile and satellite nodes and radio links. Fixed, mobile, and satellite subnetwork objects provide hierarchy in the network model and are used to break down complexity into multiple levels. Subnets can contain various combinations of nodes, links, and other subnets, and can be nested to any depth. 11
Node Domain The Node Domain provides for the modeling of communication devices that can be deployed and interconnected at the network level. In OPNET terms, these devices are called nodes. In the real world they may correspond to various types of computing and communicating equipment such as routers, bridges, workstations, terminals, mainframe computers, file servers, fast packet switches, satellites, and so on. Node models consist of modules and connections. Modules are information sources, sinks, and processors. Some modules have pre-defined behavior; processor and queue modules are programmable via their process model. Connections allow information to flow between modules. 12
Node Model Le due figure sotto mostrano un esempio di Node Model e la lista dei Node Model Objects. Statistic wires convey simple numeric signals or control information between modules, and are typically used when one module needs to monitor the performance or state of another. 13
Process Domain Process models define behavior for programmable modules. A process is an instance of a process model and operates within one module. Initially, each programmable module contains only one process; however, processes can create additional child processes dynamically. These can in turn create additional processes themselves. This paradigm is well-suited to modeling systems with dynamically instantiated contexts, like certain protocols, or multi-tasking operating systems. Processes respond to interrupts, which indicate that events of interest have occurred such as the arrival of a message or the expiration of a timer. When a process is interrupted, it takes actions in response and then blocks, awaiting a new interrupt. It may also invoke another process; its execution is suspended until the invoked process blocks. Process models are expressed in Proto-C, a language combining graphical state-transition-diagrams, embedded C/C++ language data items and statements, and a library of Kernel Procedures that provide commonly needed functionality for modeling communications and information processing systems. 14
Process Model Le due figure sotto mostrano un esempio di Process Model e la lista dei Process Model Objects. Forced states are graphically represented as green circles Unforced states are drawn as red circles. 15
Data Collection and Simulation (1) The objective of most modeling efforts is to obtain measures of a system s performance or to make observations concerning a system s behavior. OPNET supports these activities by creating an executable model of the system. Provided that the model is sufficiently representative of the actual system, OPNET allows realistic estimates of performance and behavior to be obtained by executing simulations. Several mechanisms are provided to collect the desired data from one or more simulations of a system. 16
Data Collection and Simulation (2) Simulation Output Data Types Modelers can take advantage of the programmability of OPNET models to create proprietary forms of simulation output (output files including text reports, proprietary binary files, etc), if desired. However, in most cases, users work with the output that can be provided automatically by OPNET simulations. These are: Output vectors - Output vectors represent time-series simulation data. They consist of a list of entries, each of which is a time-value pair. Output scalars - Scalar statistics are individual values that represent a metric of interest. They are often derived from vector statistics, as an average, peak value, final value, or other statistic. Typically, one value for each scalar statistic is recorded during a simulation; when many simulations are run, their scalar outputs are combined to form a graph. Animations - OPNET simulations can generate animations that you can view during the run or afterwards. Several forms of predefined or automatic animations are provided (packet flows, node movement, state transitions, and statistics). You can also program your own detailed, customized animations. OPNET supports predefined statistics, both local (related to an object) and global (related to overall system), that are typically of interest in simulation studies. However, many projects require customized statistics, computed in a manner specific to the application. OPNET supports both local and global applicationspecific statistics. 17
Data Collection and Simulation (3) Selecting Data for Collection Because OPNET-developed models typically contain a very large number of potential statistics and animations of interest, collection mechanisms are not active by default when a simulation is executed. OPNET provides a mechanism to explicitly activate particular statistics or animations so that they will be recorded in appropriate output files. This is accomplished by specifying a list of probes when running a simulation. Each probe indicates that a particular scalar statistic, vector statistic, or form of animation should be collected. Probe lists are defined using the Choose Results operation in the Project Editor. You can also define advanced forms of probes in the Probe Editor. 18
Analysis The third phase of the simulation project involves examining the results collected during simulation. OPNET provides basic access to this data in the Project Editor and more advanced capabilities in the Analysis Tool, which is essentially a graphing and numerical processing environment. The Analysis Tool supports display of data stored in output vector and output scalar files. Information is presented in the form of graphs, or traces. Each trace consists of a list of abscissa ( X ) and ordinate ( Y ) pairs. Traces are plotted in analysis panels. A set of analysis panels can be saved and recalled as an analysis configuration. The Analysis Tool supports a variety of methods for processing output data and computing new traces. Calculations such as histograms, PDF, CDF, and confidence intervals are supported directly by the tool. You can also build mathematical filters in the Filter Editor. Resulting data is displayed in new analysis panels. 19
Pausa 20