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

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

Although it may appear a huge challenge to turn a model engine into an OpenMI-compliant linkable component, it may not be as difficult as it seems. The OpenMI Software Development Kit provides a large number of software utilities that make migration easier. These tools and utilities can be used by anyone migrating a model but are not required in order to comply with the OpenMI standard. The utilities can be used as a whole or you can select only a few of them; alternatively, you can use the utilities as the basis for your own implementations. This book assumes that you will use the OpenMI utilities to the full extent. Step-by-step instructions are given for the whole migration process, from defining the requirements for an OpenMI omponent, 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.

OpenMI compliance

The official requirements for OpenMI compliance are:

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 (OpenMI.OATC.Sdk) most of the requirements for compliance will automatically be taken care of.

The simple river example

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 4-4. 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.

Fig 1. Simple River network

  • No labels