Model Coupling

In this work, we use the term model to refer to a mathematical representation of a dynamic system with its implementation as a computer program. Model coupling enables computational models to affect each other's simulations as they are being carried out. Different kinds of models (continuous, discrete event, agent-based, cellular automata, and statistical models such as regression analyses) that simulate different dynamic systems (physical processes such as water, erosion, and crops, as well as economics and sociology) can be coupled.

An brief overview of different methods of creating coupled models is given next, followed by a discussion of the idea of coupling potential and a representation that we developed to describe it. A technique for describing coupled models in terms of this representation is then presented.

Model Coupling Methods
The Coupling Potential of a Model
Describing Coupled Models


Model Coupling Methods

Levels of Interaction

1) Independent simulation of a common study site: the models are parameterized for the same study site and the outputs are analyzed collectively.

2) Output of one model is used as input to another: the models are parameterized for the same study site and the output of one model is used as input to another model.

3) The output of each model is used an input to the other: the models are parameterized for the same study site (or related sites) and the output from each model is used as input to the other model.

Styles of Integration

Given two or more models, there are 3 general approaches to integrating them: the monolithic approach, the component-oriented approach, and the communication-oriented approach (Bulatewicz, Cuny and Warman 2004).

In the monolithic approach, the individual model codes are combined into a single composite code. While this is a familiar process for scientists, it is not an ideal approach from a software engineering point of view. In the component-oriented approach, the models are decomposed into individual components that adhere to some interface, or are wrapped by an interface. The resulting components can more easily be combined to create new models due to the standard interface. In the communication-oriented approach, the model codes remain independently-executing applications and exchange messages with each other. This requires only minimal changes to the model source codes. The InCouple approach to model coupling adopts the latter integration style focusing on reusing existing models with minimal effort.


The Coupling Potential of a Model

The centerpiece of the InCouple approach is the Potential Coupling Interface (PCI). A PCI describes the coupling potential of a model, that is, those aspects of the model that in some way affect how it can be coupled to another model. They look much like the flowcharts commonly found in model documentation. The graph depicts the overall control flow of the program with respect to potential coupling points , that is, places where the values of state variables - the variables that represent the state of the physical quantities being modeled - can be exchanged with other models. These places are indicated by dark arrows in the graph (which can be expanded to appear as blocks). It serves four roles:

  • a form of model metadata that conveys a model's coupling potential
  • a vehicle for visually describing the behavior of coupled models
  • the basis for automatic generation of model code instrumentation, and
  • a reusable interface allowing coupled models to be quickly prototyped.

Using our PCIAssist software, PCIs are generated automatically from user-annotated model codes and then edited to improve readability and to incorporate additional high-level information.


Describing Coupled Models

Scientists describe the interactions between models in the coupling environment (CE), provided by our PCIAssist application. A coupling specification begins with the PCIs for one or more models that are to be coupled. The figure below shows an example of a coupling description within PCIAssist, with two PCIs, each for a different model. The environment incorporates the Coupling Description Language which consists of a set of actions that operate on the accessible variables at coupling points. To describe a coupled model is to specify a set of actions, called an action list, for each of the relevant coupling points.

In the left and right of the figure, an action list is displayed for a different coupling point (there is only a single Inspector window in PCIAssist; several screenshots of the Inspector were collected in the figure and the dotted lines were added to indicate which blocks are associated with which Inspector windows). During execution of the coupled model, when a model reaches a coupling point, the actions in its action list are carried out. There are three kinds of actions: Send, Update, and Store. Collectively, they allow the values of a model's variables to be changed based on the values of other variables from that model, or from other, coupled models. After the coupling has been described in the coupling environment, it can be executed via PCIAssist.