You are not logged in. Click here to log in.

Application Lifecycle Management

Search In Project

Search inClear

Tags:  not added yet

Model Development by Component Integration


model is a specific assembly of components that gets created using a visual model editor. This section introduces the supporting (visual) tools that allow the model creation model component assembly.

Before you can build a model, a new and empty model file can be created using the Model creation wizard.

Model Creation Wizard

The model wizard allows the creation of a new model that can be used for visual model editing. To invoke the wizard, right click on the Models node in your project view and select New | Model. You are asked to provide a name for the new model and then finish the wizard.

You can also right-click on the Project's Model folder and select New | Model to start the wizard.

A new model file gets created and it opens for editing. OMS models do have the extension *.jma. You can always open a model by double clicking on a model jma file.

Note: make sure that all the components that a model is using are compiled. Components should be present within the Component Library explorer.

Model Editor

The model editor is the user interface element you see when you open a model. An overview of its user interface elements is shown in the picture below.

Modelbuilder-Overview.png
Figure: Model Editor Overview

The model editor relates to and consists of several user interface windows and parts.

  • The Projects window lists all the projects that are currently open. The Models folder contains all the models that exists in a project scope.
  • The left part shows the Model Editor that allows the visual assembly of a model. Usually it shows the tree of components that are part of the model assembly. It also contains a tool bar that allows for management of attributes.
  • The right part shows Declared Attributes , Hookups, and Properties. These three windows are sensitive to the element that is selected in the Model Editor.

The following sections describe the different parts that support the management of components within a model such as adding/removing components or managing the way how a component links to other parts of the model.

Model Assembly Process

Adding a component to a Model

You can add components into a model by dragging them from the Component Library explorer into the Model Editor window. This requires the components to be compiled into a component archive. When you drop a component into a model, the dialog below shows up.

Modelbuilder-ImportComponentDialog.png
Figure: Attribute Declaration Dialog

The dialog shows a tree of nodes that can be chosen for attribute declaration. Since each component provides a list of attributes it wants to connect to this dialog ask for the location where these attributes should be declared. Declaring an attribute means allocating space for it in the model (or creating the attribute object).

Attributes can be declared at different scopes within the model. The model scope is the root scope and always present. In the example above the TimeLoop scope is also shown. This scope was introduced from a TimeLoop component. You select the appropriate scoping level for attribute declaration.

Declared Attributes need to be connected to the component. If you select the Checkbox Hookup all declared attributes? the component connects to all attributes that were declared before.

If the Hookup only check box is selected no attributes will be declared. It connects to existing model attributes only.

Modelbuilder-DeclaredAttributes.png
Figure: Declared Attributes Window and Properties

The Figure above shows the declared attributes for a selected node in a model. When selecting a declared attribute here, the Properties window shows its properties that are either real only or can be edited. All this information was introduces into the model when adding a component.

Removing a component from a Model

A model can be removed from a model by selecting its node in the model editor and pressing Delete or selecting Delete from the right mouse context menu. If you delete a component from a model, all attributes declared by this model will stay there since other components might still use them. You check for and can clean up unused attributes

Changing Component Attributes Connections

Components are connected to declared Attributed in the model. The Hookups window lists all Attribute Connections for a selected component in the model editor. The Component Connectivity node contains all component attributes as sub nodes as seen in Figure below.

Modelbuilder-Hookups.png
Figure: Component Connectivity

Each entry in this list consists of two parts, the 'Component Attribute' that is connected to the 'Declared Attribute' in the model. The connection is indicated by the arrow symbol (->). In the given example above, the component attribute temp points to the model attribute /TimeLoop@temp.

     temp -> /TimeLoop@temp  

The Notation /TimeLoop@temp references the attribute named temp that resides in the TimeLoop scope. Such a Notation is called MPath (it is somehow related to XPath syntax) In MPath:

  • Scopes describing a path that starts from the root ('/') of the model following the path. Path elements are the scope names, separated by a forward slash.
  • The attribute that is references in a scope is found at the end of a MPath statement, separated by a '@'
There are two main ways to change the attribute connectivity for a component.
  1. In the Hookups window, select the attribute whose connectivity should be changed. In the Property window use the property 'Hookup' and select another attribute from the offered list. This list shows all declared attributes that the component can use for this connection. OMS checks for type compatibility of declared model attributes and component attribute slots.
  2. The Hookup Component button in the model editor tool bar allows the change of connections for the whole component at once. The Figure below shows the connectivity for the Daylen component. Connections can be changes for each attribute. The Hookup Candidates panel in this dialog allows the connection change that takes effect right away.

Modelbuilder-HookupComponent.png
Figure: Hookup Component Dialog

Viewing the Declared Attributes.

The model editor can switch its view from a structural view showing the component execution sequence to a view that lists all declared attributes. Click on the Attributes Button in the model editor's tool bar. The view changes as its shown in the Figure below.

Modelbuilder-AttributeView.png
Figure: Declared Attributes

The right part of this panel allows for the navigation within all attributes of a model. You can filter the attribute list by

  • Name
  • Type
  • Unit
  • Dimension
  • Role
  • and Component that this attribute is referenced from.

Model Execution

A model can be executed from the Model Editor window. Select the model node in the model editor or the model file in the model project. You can press Shift + F6 to run the model or select in the main menu Run | Run File | Run "model.jma to execute the active model. The model is then being executed using the selected Executor from the model executor settings.

Model Executor Settings

OMS supports various ways to execute a model. This is configured by selecting the so called Excecutor in the properties window of a model. There following executors are available:

Batch This executor executes the model in batch mode with no user interface. The output the model is producing is usually visible in the OMS output window, if there is any.
Internal The model is being executed within OMS. This means it is being loaded in-process into the running OMS application. Such an execution is save when a model is a purely Java model and does not contain any native code that will be loaded from a .dll or .so. If you are using native code in your model, choose external execution since its isolates the model from OMS. Internal execution provides a user interface that allows for data editing.
External The model is being executed as an external process. A new Java Virtual Machine will be started for execution. This execution mode is recommended if the model contains native code.

You can assign the proper executor to your model by clicking on the model file (jma) and choose in the Properties window the right executor using the provided combo box. This selection will be stored in your model.