You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

(warning) Under contruction

I order to avoid any ambiguities the only official definition of the OpenMI standard is provided with the OpenMI standard release. (Download the OpenMI Standard).

The OpenMI standard release is a zipped directory structure, which contains the java and the C# code of the implemented interfaces, the compiled library files, and the standard definition document.

The entry point for the standard definition is the OpenMI.Standard.Definition.htm file, which is also shown below:

OpenMI.Standard.Definition.htm

OpenMI standard definition:

There are two variants of OpenMI compliance. Components can be either OpenMI 1.4 .Net compliant or OpenMI 1.4 Java compliant.

OpenMI .Net compliant components must follow the compliance definition given in the comments in the file ILinkableComponent.cs

OpenMI Java compliant components must follow the compliance definition given in the comments in the file ILinkableComponent.java

In the C# code the following statements serve as the key requirements for OpenMI compliance:

source code comments from the ILinkableComponent.cs file
  • § 1) An OpenMI compliant component must implement the ILinkableComponent interface according to specifications provided as comments in the OpenMI.Standard interface source code.

  • § 2) An OpenMI compliant component must, when compiled, reference the OpenMI.Standard.dll, which is released and compiled by the OpenMI Association

  • § 3) An OpenMI compliant component must be associated with a XML file, which complies to (can be validated with) the LinkableComponent.xsd schema.

  • § 4) An OpenMI compliant component must be associated with a XML file, which complies to (can be validated with) the OpenMICompliancyInfo.xsd schema. This file must be submitted to the OpenMI Association.

  • § 5) The OpenMI Association provides two additional interfaces which OpenMI compliant components may or may not implement; the IManageState interface and the IDiscreteTimes interface. However, if these interfaces are implemented, each method and property must implemented according to the comments given in the OpenMI.Standard interface source code.

  • § 6) The OpenMI Association's downloadable standard zip file provides the only recognized version of source files, xml schemas and assembly file.

Similar rules apply to the Java implementation.

The OpenMI Standard consists of 4 enumerations and 24 interfaces which all together defines 96 methods or properties). Each of these methods/properties is with the 1.4 release unambiguously defined in the source code.

As an example the documentation for one of these 96 methods is given below

ILinkableComponent.Initialize method definition

Initializes the LinkableComponent.

The Initialize method will and must be invoked before any other method or property in the ILinkableComponent interface is invoked.When the Initialize methods has been invoked the properties ModelID, ModelDescription, ComponentID, ComponentDescription, InputExchangeItemCount, OutExchangeItemCount, TimeHorizon, and the methods GetInputExchangeItem( ), GetOutputExchangeItem( ), AddLink( ), RemoveLink( ), Validate( ), and Prepare( ) must be prepared for invocation.

It is only required that the method Initialize can be invoked once. If the Initialize method is invoked more that once and the LinkableComponent cannot handle this; an exception must be thrown.

REMARKS:
The properties argument is typically generated based on the information given in the OMI file. The arguments typically contain information about name and location of input files.The Initialize method will typically populate the component by reading input files, allocate memory, and organize the input exchange items and output exchange items.

Clearly the standard definition is neither amusing of easy reading. The main purpose of the standard definition is to provide unambiguous definitions in case of doubts for how to implement specific methods. In order to understand the basic concept of OpenMI or to learn how to use OpenMI in different contexts reading the documents under the heading "OpenMI for developers" or OpenMI for modelers is recommended.

OpenMI Standard

  • No labels