AnyLogic
Expand
Font size

Dimensions

Dimensions are used for defining dimensions of array variables.

Types of dimensions

  • Enumerations — where enumeration is a list of named items allowing you to refer to the array elements. For example, if you are working with a population model, you can define age characteristics as Age enumeration with elements: Child, Teenager, Adult, Aged.
  • Ranges — where ranges are interval definitions that can be used to specify dimensions for array variables. When you define an array using enumerations, you can refer to the elements of the array using self-descriptive names of enumeration elements. When defining arrays using numerical ranges, you access array elements by index numbers.
  • Sub-dimensions — where sub-dimensions allow defining sub-ranges of dimensions. It is very useful when you have some particular sub-dimension referred in multiple places of your model, for example in sub-arrays definitions. Rather than dealing with sub-dimension definitions, you may simply create such sub-dimension once and then refer to it by its name whenever you need this sub-dimension definition. You can define sub-dimension both for enumerations and ranges as well.

Enumeration

To create a dimension

  1. Drag the  Dimension element from the  System Dynamics palette to the graphical diagram.
  2. The New Dimension dialog box opens. Specify the name of the new dimension in the Name box.
  3. Choose Enumeration option from the Define as group of buttons.
  4. Enter the names of the enumeration items in the Specify items table. To remove an item, select it in the table and click the button.
  5. Click Finish to complete the process.

Range

To create a range

  1. Drag the  Dimension element from the  System Dynamics palette to the graphical diagram.
  2. The New Dimension dialog box opens. Specify the name of the new dimension in the Name box.
  3. Choose Range option from the Define as group of buttons.
  4. Specify the elements of the range by entering the expression in the Range edit box, i.e 1-100.
  5. Click Finish to complete the process.

Sub-dimension

To define a sub-dimension, you should specify the elements of original dimension you want to include in the sub-dimension.

To create a sub-dimension

  1. Drag the  Dimension element from the  System Dynamics palette to the graphical diagram.
  2. The New Dimension dialog box opens. Specify the name of the new dimension in the Name box.
  3. Choose Sub-dimension of option from the Define as group of buttons.
  4. Choose the original dimension from the drop-down-list to the right.
  5. Specify the dimension elements you want to include in the sub-dimension.
  6. If the original dimension is an enumeration, set check boxes in the Select elements table to the left of the enumeration elements you want to include in your sub-dimension. To remove an element, clear the corresponding check box.
  7. If the original dimension is a range, type in the expression defining the resulting sub-range in the edit box, i.e 1-5, 17-29.
  8. Click Finish to complete the process.
How can we improve this article?