Invariant
Invariant Corporation
  
Products

OmeChron

OMECHRON MODELER INTRODUCTION

©2003 Invariant Corporation

What is OmeChron Modeler? If you have done any programming with the OmeChron API, then you know how tedious it can be to write code to export a model's attributes and references. It is analogous to writing GUI code to layout a dialog by hand. Few people write GUI code by hand anymore; they use visual layout tools and code generators. We use Qt Designer to layout many of the OmeChron GUI components. The purpose of OmeChron Modeler is to relieve the model developer of repetetive coding tasks by providing an intuitive, visual means of creating OmeChron model classes, their attributes, and their references. This will allow modeler developers to focus on simulation problems and not on the OmeChron API. since every model is part of a C++ plugin library, OmeChron Modeler integrates seamlessly into your current plugin build system. The Modeler architecture is also compatible with your software configuration management system.

OmeChron Modeler provides:

An intuitive GUI environment to create OmeChron plugin classes along with their attributes and references.
Seamless integration into the plugin build system.
Compatibility with software configuration management systems.
OmeChron Modeler consists of three components: the Modeler GUI, the Model Interface Compiler (MIC), and qmake wrapper command iqmake. The most important component and the one that you will be using the most is the Modeler GUI. You use the Modeler GUI to create your classes along with the attributes and references you require for them. From the Modeler you save the information about your class to an OMI file in your plugin sub-directory. To get your OmeChron plugin build system to generate code from your OMI file, all that is required is that you list your OMI files in the MODELS command in your qmake .pro file. The MODELS command works just like the other qmake commands you are used to (e.g. SOURCES, HEADERS, FORMS).

MODELS = myclass.omi

Instead of running qmake, you run iqmake to generate your makefile. You don't have to run qmake, iqmake will do that for you. This will generate a makefile that will build your plugin. During the build process, your OMI file is "compiled" into C++ code that implements the class you have described in the modeler. This C++ code is regenerated each time you make a change to the OMI file. At this point you may be asking "How can I add modeling code to files that are regenerated without losing my changes?" The short answer is that you don't. The generated classes are intended as base classes for your C++ classes that implement that actual modeling code. The attributes you create in modeler are generated as protected member variables, so they are always in the scope of your derived implementation class. To use a generated class, create a class derived from it and implement the model code there in the usual way. One of the advantages of this approach is that we do not have to use "markers" in the generated code to preserve your changes. Using markers makes it difficult to integrate the plugin build system with your configuration control tools. You would have to check out the source files to set the required write privileges even if you were only changing the OMI file. By using this scheme, you only have to maintain your OMI files and your derived-class C++ files under source code control. The relationships between the modeler tools and files is shown below.

Modeler

 

A trial version of modeler is available on the downloads page.

[ top ]

 

OmeChron links ...

 
*

 
home | company | experience/services | products | customers | employees

Invariant Corporation, Inc.
Offices: 4035 Chris Drive, Suite F | Huntsville, Alabama 35802
Mailing Address: 4800 Whitesburg Drive #30-353 | Huntsville, AL 35802
Phone: (256) 885-9794 | Fax: (256) 881-1812
© Copyright 2007 Invariant Corporation
All Rights Reserved.

 

contact us sitemap home