You are not logged in. Login or Register

Latest News

Newsletter

Fill in your email address to sign up and receive all our latest news


Unsubscribe

Last newsletter on 15th June 2008

Newsletters archive

Send us your OpenMI news to post them in our next Newsletter

Login Area

Username
Password

Register



What is new in OpenMI 1.4.0.0 for developers

Java supported

Release 1.4 of the OpenMI Standard includes a full definition of the standard in both C# and Java. This means that OpenMI-compliant components can be programmed both in C# (or any other .Net language) and in Java. Please note that OpenMI Java-compliant models/components and OpenMI .Net-compliant components cannot be linked. Also note that the software development kit and the configuration editor provided by the OATC only work with the OpenMI .Net standard.



OpenMI SDK

In previous releases, software libraries and source code that supported the migration of models were released as the Utilities package. The Utilities package has been reorganized and is now released as the OpenMI SDK. The OpenMI SDK is released as source code only (no binaries).



Distribution

Release 1.4 consists of three separate items: the OpenMI Standard, the configuration editor and the software development kit (SDK). In previous releases everything was included in a single installation file. The official OpenMI Standard is released by the OpenMI Association and made available for download from http://www.openmi.org; the OpenMI configuration editor and the OpenMI SDK are released by the OpenMI Association Technical Committee (OATC), both made available for download from http://sourceforge.net/projects/openmi/.

Some of the main reasons for splitting the release into three parts are:


  • The OpenMI Association develops, maintains and releases the OpenMI Standard, whereas development of supporting tools and libraries will be done by others. In this respect the OATC is regarded as any other software provider.
  • It is not possible to make backward-compliant releases of the OpenMI Standard - whenever you change a standard you have a new standard. Consequently, new Standard releases should be done only with long time intervals (e.g. every second year). However, the configuration editor and the SDK can easily be released more frequently. Splitting the release makes such asynchronous releases possible.


OpenMI source license

The OpenMI Standard remains under the LGPL licence, whereas the configuration editor and the SDK are released under the 'new BSD licence'. The new BSD licence is less restrictive than the LGPL licence.



More strict definition of the standard

The OpenMI Standard 1.4 is now defined as follows: "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."



Namespaces

The namespace for the OpenMI .Net standard is changed from org.OpenMI.Standard to OpenMI.Standard. For the OpenMI Java standard the name space is org.OpenMI.Standard.



What should OpenMI 1.4.0.0 developers install

You can create OpenMI-compliant components using only the official OpenMI Standard, which can be found on the Download section.

However, it is recommended that you take advantage of the OpenMI software development kit (SDK) provided by OATC. You can download the SDK from http://sourceforge.net/projects/openmi/. The SDK is programmed in C#, so if you are using the Java standard you cannot use the source directly, but you may still find it useful as a source of inspiration. The SDK also includes the OpenMI Standard, which means that you do not need to download the OpenMI Standard from http://www.openmi.org.

You may also find it useful to download the OpenMI configuration editor from http://sourceforge.net/projects/openmi/. Loading your OpenMI-compliant component into the configuration editor is an easy way to make the first test.



Upgrading from previous version

If you already have a model that is compliant to OpenMI 1.2 and this model is using the org.OpenMI.Utilities.wrapper, you can upgrade your model by following the steps below:


  • Uninstall OpenMI 1.2 or any other previous OpenMI releases on your computer.
  • Download the OATC SDK from http://sourceforge.net/projects/openmi/
  • Unzip the files
  • If you do not already have NUnit installed, it is recommended that you install it from http://nunit.org/
  • Open the Oatc.OpenMI.Sdk.sln solution and rebuild all
  • Add your existing wrapper project to the Oatc.OpenMI.Sdk.sln (also add the unit test project, if you have that).
  • In your wrapper project (and unit test project if you have that) remove the reference to org.OpenMI.Standard and subsequently add a reference to the OpenMI.Standard.dll using the Browse tab in the Add Reference dialog in Visual Studio. The OpenMI.Standard.dll is located in <yourUnzipfolder>\OpenMI.Standard\src\csharp\bin.
  • In your wrapper project (and unit test project if you have that) references to org.OpenMI.Backbone, org.OpenMI.DevelopmentSupport, org.OpenMI.Utilities.Wrapper, org.OpenMI.Utilities.Spatial and org.OpenMI.Utilities.Buffer should be replaced by references to the projects Oatc.OpenMI.Sdk.Backbone, Oatc.OpenMI.Sdk.DevelopmentSupport, Oatc.OpenMI.Sdk.Wrapper, Oatc.OpenMI.Sdk.Spatial and Oatc.OpenMI.Sdk.Buffer, respectively. All 'using' statements in your source code should be changed accordingly.
  • If you are using fully-qualified class names for classes from the SDK or the OpenMI.Standard, these should also be changed (use search and replace). For example, if you have a class declared as org.OpenMI.Utilities.Wrapper.LinkableEngine this should be changed to Oatc.OpenMI.Sdk.Wrapper.LinkableEngine. Note that when changing fully-qualified references to interfaces in the OpenMI.Standard you may have to use the 'global' keyword; for example, org.OpenMI.Standard.IDimension is changed to global::OpenMI.Standard.IDimension.
  • Rebuild all
  • If you are using unit test, run these now
  • Create an OpenMICompliancyInfo xml file for your component. This file must be verifiable with the schema http://www.openmi.org/schemas/OpenMICompliancyInfo.xsd. You can find an example of such file for the simple river example, which is included in the SDK release (see <yourUnzipFolder>\Oatc\src\csharp\Examples\ModelComponents\SimpleRiver.simpleRiver.xml)
  • Mail the OpenMICompliancyInfo xml file to technical@openmi.org, with a request to have your component officially accepted as OpenMI-compliant

Note that the steps above are just one possible way to update your code. You may want to organize things differently and you may have tools that will help you update your code.
With the OpenMI 1.4 release you will, as a model provider, have to provide all required assembly files (also the OpenMI.Standard.dll and Oatc.OpenMI.Sdk DLLs). For this reason it is recommended (but not required) that you change the Oatc.OpenMI.Sdk namespaces to, for example, <MyCompany>.OpenMI.Sdk.*. You may or may not choose to install your assemblies into the GAC. If you choose the latter you must sign all the assemblies with your own signature file.