Defining an Array Variable

Demo model: Bass Diffusion Arrays

 To define an array variable
  1. Select the variable in a graphical editor or in the Projects view.
  2. To make the selected variable a variable of type array, check the Array check box in the Properties view.

  1. You can see that the variable's name in the graphical editor is now followed with square brackets. In this way AnyLogic visualizes array variables.  

Array variables in the graphical editor

  1. Click in the {...} to the right of the check box. The Array section of the Properties view will be shown.

  1. Define the dimensions of your array variable. Add the dimensions you need from the Available dimensions list to the Selected dimensions list. To add some dimension, select it in the Available dimensions list and click the  button. To add all available dimensions, click the  button. 
  2. If needed, you can remove some selected dimensions any time you like. To remove a dimension, select it in the Selected dimensions list and click the  button. To remove all selected dimensions, click the  button.
  3. The order of dimensions is also important. You can reorder the dimensions by clicking  and  buttons.