Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Implementation of the IManageState interface is not required in order to claim OpenMI compliance. However, if you want to use your model in configurations where iterations are needed or you want to use calibration or optimization controllers, the implementation of the IManageState interface is required. Normally, you should put the bulk of the implementation into the engine core and save the data required in order to restore a state in memory.

7.1 The IManageState interface

Implementation of the IManageState interface is shown in Figure 20.

...

  1. In MyLinkableEngine, specify that it implements the IManageState interface.
  2. In MyEngineWrapper, specify that it implements the IManageState interface.
  3. Implement the IManageState methods in all wrapper classes. The implementation will typically be very simple code that redirects the call to the next wrapper class and finally to the engine core, where the bulk of the implementation is located.

Image Added
Fig. 20. IManageState implementation

8. The OMI file

The OMI file defines the entry point to a LinkableComponent. It contains information on the software unit to instantiate and the arguments to provide at initialization. This file makes it possible for a user interface to deploy your model.


This chapter describes the OMI file.

8.1 Structure of the OMI file

The structure of the OMI file is defined in OpenMI.Standared.LinkableComponent.XSD. (http://www.openmi.org/schemas/LinkableComponent.xsdImage Added) Figure 21 provides a visual representation of the schema definition; The XML listing below provides an example of an OMI file.

Image Added
Fig. 21. Visual representation of the LinkableComponent XML schema definition.

OMI file Example:

Code Block
XML
XML

<?XML version='1.0'?>
<LinkableComponent Type='org.OpenMI.Examples.MC.SimpleRain' Assembly='org.OpenMI.Examples.MC, Version=1.4.0.0, Culture=neutral, PublicKeyToken= 8384b9b46466c568' XMLns='http://www.openmi.org/LinkableComponent.xsd'>
<Arguments>
<Argument Key='Data' ReadOnly='true'
Value='c:\OpenMI\Examples\Data\SimpleRain.txt' />
</Arguments>
</LinkableComponent>