Tags:
not added yet
Component DevelopmentComponents are the basic building blocks of simulation models in OMS. This chapter introduces ComponentBuilder tools for the creation and maintenance of components within the OMS framework. OMS contains several support tools to speed up the process of developing components:
The next section introduces a conceptual basic of simulation components, then an example of a component which computes potential evapotranspration is developed using several tools. OMS ComponentsA component representing a certain conceptual function in a simulation is the foundation for each model. A hydrological model for example usually needs components for handling input/output, has components representing processes of a hydrological system such as precipitation, interception and runoff, and has to realize general data processing functions such as reading climate data or parameter sets. The key for a proper model design based on components is a clean "separation of concerns" in a model. Components for a model hosted in OMS have to provide a certain aspect What qualifies a part of a model to become a component?
By analyzing simulation models a classification of potential components can be made.
An OMS component can be written in the Java Programming Language or in the FORTRAN programming language. Java is the preferred implementation language for components since you will experience all the benefits and advantages of this platform. The use of FORTRAN components enables the integration of legacy FORTRAN code as components into the system. Figure: Component Creation Wizard The creation of a component is performed by the New Wizard. It gets invoked by selecting the menu item File | New. There are different code templates for creating both Java and Native Components. The Figure “Component Creation Wizard” shows available OMS templates. For component development only Java Component and Native Component are relevant. Creating a Java ComponentOpen the New Wizard as described above. In several steps you will be asked details about creating a Java component.
The new component will opened and appears in the source editor for editing. Managing Component AttributesAttributes can be added to both Java and Native Components. However, the Native components wizard already creates attributes for all data being used in as arguments to a native call. Nevertheless attributes can be added to native components to perform additional operation besides the wrapped FORTRAN functionality. The OMS user interface contains a window for managing component attributes. It can be activated by selecting the menu item Window | Component Attributes. The window appears initially at the right part of the user interface. This window is sensitive to the selection of a component in the projects window and the source editor. It changes its content to show always the attributes of the selected component. Figure Attribute Editor shows the Attributes Editor for a component named Snow with 5 different attributes. Figure: Attribute Editor The main attribute editors purpose is the source management for attributes within components. Therefore any editing operation in the attribute editor will directly affect the associated component source. Both, attribute editor and an open component source are always kept in sync. Attributes can only be added, edited and deleted using the attribute editor. Thus, all the sections in the component source related to attributes are guarded (not editable!), which is indicated by the light blue background of the source. Protecting the component source regarding to attribute sections ensures their correct structure. By using the attribute editor the attribute sections in the component source are always in a syntactically correct status. The Properties Window is being used to edit the attributes meta data. The meta data content of a selected attribute in the Attribute Editor is shown in the properties window. Any change in here will affect the attribute settings in the source. An overview about the relationships between the component source file, Attribute Editor and the Properties Window while attribute editing is shown in the Figure below. Figure: Attribute Editing Workflow The following operations can be performed using the Attribute Editor:
Managing Component Meta DataOMS components have associated meta data which provide additional information about a component such as author, version, literature references, etc. Using the Attribute Editor component meta data can be edited. Like Attributes, component meta data is stored in the component source file. It is guarded to against incorrect modifications. Figure: Managing Component Meta Data The component meta data can be edited by selecting the node Component Meta Data in the Attribute Editor for an active component. The Properties window then allows editing of the component meta data by operating individual properties such as Author or Description as shown in Figure Managing Component Meta Data. |
Navigation Bar for Object Modeling System
Resources:
Downloads You must login to see this link. Register now, if you have no user account yet. OMS API Javadoc Publications & Presentations Annotation Reference DSL Reference Handbook 3.0 (Draft) Frequently Asked Questions (FAQ) OMS License (LGPL 2.1) New Users: 1. Get an ALM account 2. Join the OMS project Contact Us: Jack Carlson Coordinator, OMS Laboratory OMS Laboratory Jack.Carlson@colostate.edu (970) 492-7323 Olaf David Director, OMS Laboratory odavid (at) colostate.edu (970) 491-8026 |