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

Compare with Current View Page History

« Previous Version 3 Next »

OpenMI systems can be considered software systems that combine a set of OpenMI- compliant components, possibly in addition to non-OpenMI-compliant components. Such a system can deploy and run OpenMI components by accessing them through their standard interface.
In order to do this, the following functionality should be incorporated:
• The OpenMI system needs to know where (i.e. at what resource location) it can find linkable components.
• The OpenMI system needs to know which linkable components are joined together and how; i.e. it needs to know the links.
• The OpenMI system needs to be able to instantiate, deploy and run a combination of linkable components.
OpenMI systems can come in two types:
• Hard-coded systems
• Configurable systems
While the hard-coded system addresses only the functionality above, the configurable system also addresses the inspection of OpenMI linkable components for their exchange items. However, before going into depth on hard-coded and configurable systems, a complete overview is given on all dynamic aspects related to establishing links and running OpenMI components.

An OpenMI component can be identified through its OMI file. This is an XML file which contains sufficient information to identify a component, instantiate the binary unit on your machine (i.e. find the assembly and the class to instantiate) and populate it with input data. An XML schema definition has been created to enable default tools to parse the information.
In principle, OMI files can reside anywhere on your system. Users are therefore free to organize their own repository, as long as they can find the relevant OMI files themselves when configuring their model combination.
An example OMI file is given in Figure 1. The underlying schema definition (XSD) is provided in Figure 2 and 3.

<?xml version="1.0"?>
<LinkableComponent Type="Oatc.OpenMI.Examples.ModelComponents.SpatialModels.GroundWaterModel.GWModelLC" Assembly="..\GroundWaterModel\bin\Debug\Oatc.OpenMI.Examples.ModelComponents.SpatialModels.GroundWaterModel.dll">
  <Arguments>
    <Argument Key="modelID" ReadOnly="true" Value="GW local" />
    <Argument Key="simulationStart" ReadOnly="true" Value="1990,1,2,0,0,0" />
    <Argument Key="simulationEnd" ReadOnly="true" Value="1993,1,1,0,0,0" />
    <Argument Key="nx" ReadOnly="true" Value="20" />
    <Argument Key="ny" ReadOnly="true" Value="30" />
    <Argument Key="ox" ReadOnly="true" Value="3000" />
    <Argument Key="oy" ReadOnly="true" Value="3000" />
    <Argument Key="cellSize" ReadOnly="true" Value="125" />
    <Argument Key="groundWaterLevel" ReadOnly="true" Value="0.5" />
    <Argument Key="gridAngle" ReadOnly="true" Value="20.0" />
   </Arguments>
</LinkableComponent>

Figure 1 OMI file example

Figure 2 XML schema definition of the OMI file (graphical)

<?xml version="1.0"?>
<!-- OpenMI Linkable component entry point to instantiate the object-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.openmi.org" targetNamespace="http://www.openmi.org" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.0.0">
	<xsd:element name="LinkableComponent" type="LinkableComponentComplexType"/>
	<xsd:complexType name="LinkableComponentComplexType">
		<xsd:sequence>
			<xsd:element name="Arguments">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="Argument" minOccurs="0" maxOccurs="unbounded">
							<xsd:annotation>
								<xsd:documentation>arguments for instantiaion</xsd:documentation>
							</xsd:annotation>
							<xsd:complexType>
								<xsd:attribute name="Key" type="xsd:string" use="required" form="unqualified">
									<xsd:annotation>
										<xsd:documentation>attribute key for which a value is provided</xsd:documentation>
									</xsd:annotation>
								</xsd:attribute>
								<xsd:attribute name="ReadOnly" type="xsd:boolean" use="optional" form="unqualified"/>
								<xsd:attribute name="Value" type="xsd:string" use="required" form="unqualified">
									<xsd:annotation>
										<xsd:documentation>attribute value for associated key</xsd:documentation>
									</xsd:annotation>
								</xsd:attribute>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="Type" type="xsd:string" form="unqualified">
			<xsd:annotation>
				<xsd:documentation>class to be instantiated to create a LinkableComponent-object</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="Assembly" type="xsd:string" use="optional" form="unqualified">
			<xsd:annotation>
				<xsd:documentation>dotNet assembly that can instantiate the class</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="JavaArchive" type="xsd:string" use="optional" form="unqualified">
			<xsd:annotation>
				<xsd:documentation>JavaArchive that can instantiate the class</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>
</xsd:schema>

Figure 3 XML schema definition of the OMI file

  • No labels