# Conceptual Overview

In many modeling efforts, you will find yourself using copy and paste to replicate a model structure multiple times. For example, a demographic model might treat the aging of a population, but be replicated for multiple ethnic groups in multiple areas. Conceptually, the model is very straightforward. Visually, the structure might take up a lot of diagram space and therefore be a bit difficult to handle. Similarly, you might model a supply chain in which a supplier ships out of a single inventory to multiple customers. Conceptually, this structure is very straightforward. Diagrammatically, it can be a bit difficult to swallow. In a marketing model, you might repeatedly use a simple structure to keep track of customer affinity for several different product lines. In an ecological model, you might repeatedly use a simple structure to represent the different seral stages associated with plant succession.

In each of these cases, copy and paste is the most straightforward way to represent the multiple parallel model structures involved. Unfortunately, the associated visual complexity of the resulting model diagram can become hard to manage, both for the builder of the model and the user of the model. Arrays provide a simple yet powerful mechanism for managing this visual complexity. By "encapsulating" parallel model structures, arrays can help you to present the essence of a situation in a simple diagram. Beneath the scenes, of course, arrays retain the richness of the disaggregated structure. Figure 11-1 provides a picture of what Arrays buy you.

Figure 11-1 Arrays Encapsulate Parallel Model Structures

Introducing arrays into a model is conceptually straightforward. The process consists of three simple steps.

1. Use the Array Editor to define one or more dimensions - A dimension is simply a category. Each dimension contains a set of set of elements. For example, you might create a dimension entitled "Cities." This category might contain the elements "London," "Sarajevo," and "Tokyo." A category of "Species" might include "lion," "tiger," and "bear." You will find the Array Editor the Interface menu, the Model menu, or the Equations menu. In addition, you can get at the Array Editor from within the define dialog of any arrayed variable.

2. Transform model variables into arrayed variables - After you have defined one or more Dimensions, you can transform non-arrayed variables into arrayed variables. To make the transformation, simply check the Array check box within the define dialog of any stock or converter. You needn't worry about transforming flows - whenever you transform a stock into an arrayed stock, any attached flows are automatically transformed into arrayed entities as well.

3. Define the equation logic for arrayed variables - Within each arrayed variable, you need to define the equation logic for each element within the array. It's possible to apply a single, generic equation to all elements within the array. Alternately, you can "page through" the individual elements in an arrayed variable and provide unique numerical values or equation definitions for each element.

In the next two sections, this process is illustrated for one- and two-dimensional arrays. The final sections of the chapter address many of the issues and special situations that can arise as you work with arrays in your models