Ets_Layout_Subnet()

Note: Requires OPNET Development Kit

Abstract

Performs automated layout of nodes in a specified subnet to attempt to create a pleasing topological layout.

Syntax

Ets_Layout_Subnet (mdl_hndl, subnet_hndl, layout_options)
Argument Type Description
mdl_hndl EtsT_Model_Handle Specifies the model whose subnet contents are being laid out.
subnet_hndl EtsT_Obj_Handle Identifies a specific subnet within the specified model whose contents will be rearranged.
layout_options EtsT_Subnet_Layout_Options * Specifies a variety of layout-specific information that is used to control the layout process.

Return Type

void

No return value.

ets_api_layout.h

Details

This function performs an automated layout of the nodes in a specified subnet in an attempt to create a pleasing topological layout. It also attempts to minimize edge crossings. The layout_options structure that is passed in as an argument controls certain details of the layout process, including clustering, pinning of nodes, whether or not icon sizes are taken into account, and what the bounds of the layout area are. (This structure is defined in <install_dir>/sys/include/ets_api_layout.h.)

One of two different layout algorithms is used by this function, depending on the number of nodes in the subnet. These algorithms correspond to the “Lay Out Nodes (Balanced)“ and “Lay Out Nodes (Simple)“ operations available from the View menu.

  • For small networks (number of nodes less than a specified threshold), a balanced algorithm is used.
  • For large networks, a simple algorithm is used. This algorithm produces a less elegant layout, but is faster.

The threshold is set by the “network_layout.use_simple_threshold“ preference.

At the high level, there are two separate modes of layout:

  1. Lay out all nodes in the current subnet
  2. Lay out clusters of nodes. Clustering is a way to group related nodes and place the entire group at a specific region within the subnet. The nodes within a cluster are laid out relative to each other, and then the clusters themselves are laid out relative to other clusters.

To perform layout type 1, the caller sets the cluster_lptr field of the layout options to NULL. To perform layout type 2, the caller creates a list of EtsT_Subnet_Layout_Cluster data structures and sets the cluster_lptr field of the layout options to that list.

To specify the area in which all subnet contents should be laid out, set the layout_in_specified_region flag and define the unpinned nodes layout area (layout_area_ul_x, etc.).

The ETSC_API_SUBNET_LAYOUT_OPTIONS_DEFAULT macro creates a default layout options structure that allows for very simple layout of all nodes within the current subnet of a model.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com