Package Overview

Note: You must have a license for the OPNET Development Kit to use the Model Assistant package.

The Model Assistant package enables you to enhance the built-in functions for importing data from text files into a network model. The general workflow is:

  1. Create a new tabbed notebook page that requests input from the user.

  2. Write specific callback functions for this notebook page. These callback functions are:

    a) Initialization handler—initializes page when dialog box opens b) Save handler—saves data from the tabbed page to a text file c) Load handler—loads data from text file to the tabbed page d) Destroy handler—called when dialog box is closed e) Apply handler—called when the user applies a model assistant file. This function applies the data specified in the tabbed page to the network.

  3. Create a new entry in the model-assistant configuration file. This file contains entries for each tabbed page that appears in the Model Assistant dialog box, and defines the handler functions the import engine uses for each page. This file is located in the following directory:

    <reldir>/sys/configs

    You can have multiple configuration files in this directory; the model_assistant_configuration_file preference determines which file to use during the current session. See the following figure for information about the format of this file.

Figure 3: Model-Assistant Configuration File: Example

# Each line defines a block name, a set of handler functions, a visual resource
# file, and a tabbed page.

# The order of the blocks specify the order in which they appear in the Model
# Assistant dialog box, and the order in which they are executed when the user
# applies the assistant file.

# To remove a block from the dialog box, comment out the line that describes
# that block.

# RULE: Each block and the specified handlers for that block must be on a single
#          line.

# If a block line does not include a specific argument, the import engine uses
# the default argument (handler, resource, or page) defined for that block.

# RULE: Use colons to separate arguments. To use the default argument for that
#          block name, include an "empty argument" (that is, a space followed by a
#          colon).

# RULE: Each line should specify the arguments in the following order:
#          1) block_name:
#          2) apply_library.apply_handler:
#          3) resource_name:
#          4) page_name:
#          5) init_library.init_handler:
#          6) save_library.save_handler:
#          7) load_library.load_handler:
#          8) destroy_library.destroy_handler

# EXAMPLE: This block uses custom arguments:
link_specifications:dci_common.Dci_Ma_Link_Apply:dci_ma/dci_ma_dbox:dci_ma_dbox_link_page:dci_common.dci_ma_dbox_link_init_handler:dci_common.dci_ma_dbox_link_save_handler:dci_common.dci_ma_dbox_link_load_handler:dci_common.dci_ma_dbox_link_destroy_handler

# Remaining blocks use default arguments:
object_destruction
subnet_creation
node_creation
...