You are on page 1of 7

17—Filter Editor

17 Filter Editor
The Results Browser allows you to extract data from simulation output files and
to display the data in various forms, as described in Chapter 11 Data Analysis
on page MC-11-1. The Results Browser also supports several mechanisms for
numerically processing the data and generating new data sets that can also be
plotted. These include computing probability density functions and cumulative
distribution functions, as well as generating histograms.

The sections includes the following topics:

• Filter Construction on page ER-17-2

• Filter Editor Menus on page ER-17-3

• Toolbar Buttons on page ER-17-5

• Objects Menu Operations (Filter Editor) on page ER-17-6

• Compile Menu Operations (Filter Editor) on page ER-17-7

OPNET Modeler/Release 16.1 ER-17-1


17—Filter Editor

Filter Construction
Filter models are represented as block diagrams consisting of interconnected
filter elements. Filter elements may be either built-in numeric processing
elements, or references to other filter models. Thus, filter models are
hierarchical, in that they may be composed of other filter models. However, all
filter models must be composed at the lowest level of the predefined filters
described in Chapter 11 Data Analysis on page MC-11-1.

Filters operate on vectors. Vectors are discrete and ordered sets of numeric
data, organized as entries. Each entry consists of an abscissa and an ordinate
value. These are double-precision floating point numbers. A filter model may
operate on one or more vectors and combine them to form its output, which
must consist of just one vector. The vectors that are fed into the filter are called
input vectors; the result of the filter’s processing is called the filter’s output
vector.

A filter model block diagram must abide by several requirements concerning its
structure. First, the graph which it consists of must be acyclic, so that none of a
filter element’s input vectors depend on the calculation of its output vector.
Second, each filter model must have exactly one unused output vector among
all of its filter elements. A filter element’s output is used if it serves as the input
of at least one other filter element. The unused filter element output is the output
of the overall filter model.

Filter models are executed using a data-flow approach. A filter element can
compute its output vector only if all of its input vectors are available. Initially, only
the input vectors supplied by the user in the Results Browser are considered to
be available. These will allow certain filter elements to be executed. Once these
elements produce their output vectors, other elements will in turn be executed,
until finally the last filter element is executed and the result of the overall filter
model is produced.

There are two types of filter model inputs that the user may supply when
executing a filter model from the Results Browser. These inputs are vectors (as
described previously), and parameters. The input vectors of the filter model are
needed to satisfy the filter element inputs that are not attached to the outputs of
other filter elements. These are called unused inputs.

Certain filter elements have parameters which configure them to perform a


precise operation. For example, the “windowed average” filter element has a
parameter controlling its window size. The user may choose to specify
parameters of filter elements when constructing the filter, or to leave these
unresolved and to specify them at the time when the filter model is executed.
This approach allows the construction of a library of filter models that are easily
reusable.

ER-17-2 OPNET Modeler/Release 16.1


17—Filter Editor

Filter Editor Menus


The Filter Editor provides operations for creating and working with network
models. You access these operations from the Filter Editor menu bar, which
contains the following menus:

Table 17-1 Filter Editor Menus


Menu Description Reference

File Contains operations that relate to high-level File Menu on page ER-2-2
functions such as opening and closing
projects, saving scenarios, importing
models, and printing graphics and reports

Edit Contains operations that allow you to edit the Edit Menu on page ER-2-5
preferences that control program operation
and to manipulate text and objects

Objects Contains operations for creating filter Objects Menu on


elements and connections page ER-17-4

Compile Contains operations for compiling a filter Compile Menu on


model page ER-17-4

Windows Lists all open editor windows and allows you Windows Menu on
to make one active page ER-2-7

Help Provides access to context-sensitive help, Help Menu on page ER-2-8


the product documentation and tutorials, and
information about the program

Note—The editor menus on your machine may vary from those described here,
particularly if there has been any UI customization or use of ETS.

There is one operation available within the Filter Editor that does not appear on
a menu:

• Edit/View Filter Element—this operation allows you to set the parameters of


a filter element by opening its Attributes dialog box when you right-click on
an object.

OPNET Modeler/Release 16.1 ER-17-3


17—Filter Editor

Objects Menu
The Objects menu includes operations for creating a filter model.

Table 17-2 Objects Menu Summary


Menu item Description Reference

Create Filter Element Defines a filter in the workspace. Create Filter Element
on page ER-17-6

Create Connection Connects the output of one filter element Create Connection on
to a specified input of another filter page ER-17-6
element.

Compile Menu
The Compile menu includes an operation for compiling a filter model.

Table 17-3 Compile Menu Summary


Menu item Description Reference

Compile Filter Model Transforms a filter model into an Compile Filter Model on
executable form so that it can be invoked page ER-17-7
in the Results Browser.

ER-17-4 OPNET Modeler/Release 16.1


17—Filter Editor

Toolbar Buttons
The Filter Editor has toolbar buttons for frequently-used operations.

Figure 17-1 Toolbar Buttons (Filter Editor)

1 2 3

The followong table lists the name of each toolbar button—the name appears
as a tooltip when you rest the cursor on the button—and its equivalent menu
command.

Table 17-4 Toolbar Buttons in the Filter Editor


Button Name in the Toolbar Equivalent Menu Command

1 Create Filter Element Objects > Create Filter Element

2 Create Connection Objects > Create Connection

3 Compile Filter Model Objects > Compile Filter Model

To configure the toolbar buttons, see Configuring the Toolbar on page ER-1-7.

OPNET Modeler/Release 16.1 ER-17-5


17—Filter Editor

Objects Menu Operations (Filter Editor)


This section describes operations available from the Objects menu in the Filter
Editor. The items that appear on this menu are

• Create Connection on page ER-17-6

• Create Filter Element on page ER-17-6

Create Connection
This operation connects two filter elements. The connection represents the
transfer of the output vector of the source filter element to the input vector of the
destination filter element.

Multiple connections can be attached to a filter element’s output. However, each


filter accepts only one connection per input vector. If a connection is attempted
where there are no available input vectors, the operation ends, and an error
message appears in the message display. Similarly, if a model in a macro filter
model is assigned a new filter model, the new model must support at least the
same number of input vectors as the old model. Any connection exceeding the
limit is deleted.

The “destination input” of a connection can be changed via the connection’s


attribute menu, provided it follows the connection rules described above.
Connections have several other attributes that allow the user to modify color,
alignment, and path definition.

Create Filter Element


This operation creates a new filter in the workspace. Filter elements are the
basic building blocks of filter models. Filter elements can be connected to other
filter elements with filter connections. The connections between filter elements
define the computational structure of the filter model. The location of filter
elements in the tool window does not affect the model’s execution.

Each filter element has a “filter model” attribute. After a filter element is placed
in the workspace, it can be assigned a filter model by modifying the “filter model”
item on its attribute menu. It is assigned the “gain” filter model by default.

The attribute menu may contain a parameter that is automatically defined by


OPNET. This parameter can be edited or promoted. When the parameter is
promoted, its name is prompted for at compilation time. Parameter promotion
allows you to construct filters that are more general and reusable. When the
filter model is used in the Results Browser, the user is prompted to enter the
actual parameter values.

For a complete list of filter elements and the functions they represent, see
Chapter 11 Data Analysis on page MC-11-1.

ER-17-6 OPNET Modeler/Release 16.1


17—Filter Editor

Compile Menu Operations (Filter Editor)


This section describes the operation available from the Compile menu in the
Filter Editor. The item that appears on this menu is

• Compile Filter Model

Compile Filter Model


This operation transforms a filter model into an executable form so that it can be
invoked to numerically process vectors. Filter models that are merely saved
(and not compiled) cannot be used in the Results Browser.

One of the first steps in compiling a filter model is verifying that the model
contains no feedback paths. Also, the filter must present only one unused
output, as described in Filter Construction on page ER-17-2. Filters not meeting
the criteria will not compile successfully.

If the filter is properly formed and compilation completes, the user is prompted
to assign names to unused inputs and promoted parameters. These names are
important properties of the filter model, because they are referenced in the
Results Browser when the filter model is executed.

When a model is compiled, it is automatically saved to disk.

OPNET Modeler/Release 16.1 ER-17-7

You might also like