Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

Although it may appear a huge challenge to turn a model engine code (the computational heart of a model) into an OpenMI-compliant linkable component, it may not be as difficult as it seems. The OpenMI Software Development Kit (SDK) provides a large number of software utilities that make migration easier. These utilities can be used by anyone migrating a model but are not required in order to comply with the OpenMI standard. The SDK can be used as a whole or you can select only part of it; alternatively, you can use the SDK as the basis for your own implementations. This article assumes that you will use the OpenMI SDK to the full extent. Step-by-step instructions are given for the whole migration process, from defining the requirements for an OpenMI component, through design and implementation to testing.
.

This chapter describes the requirements for OpenMI-compliance and introduces the Simple River model, which is used to illustrate the migration process.

...

There are two variants of OpenMI compliance. Component 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

However, when you use the software development kit provided by the OpenMI Association Technical Committee (Oatc.OpenMI.Sdk) most of the requirements for compliance will automatically be taken care of.

...

A Simple River model engine was developed as an example of model migration. The model engine is programmed in Fortran and is a very simple conceptual river model. The Simple River consists of nodes and branches, as shown in Figure 1. For each timestep, the inflow to each node is obtained from a boundary-input file. These flow rates are multiplied by the timestep length and added to the storage in each node. Then, starting from the upstream end, the water is moved to downstream nodes and the flow rate in each branch is calculated.

(lightbulb) Source code for the Simple River model (FORTRAN engine and C# wrapper) is included in the OpenMI 1.4.0.0 SDK release, which can be downloaded from:  http://sourceforge.net/projects/openmi/ 

Fig 1. Simple River network

...