ball.list

Syntax

l = ball.list

Get the global ball list. Use the loop foreach construct to iterate through the list.

Returns:l - ball list

Usage Example

The following example illustrates how loop foreach statement ball.list can be used to iterate through the list of balls in the system.

model solve calm 500 time 1.0

fish define ball_loop
  ; loop over balls
  global nballs = 0
  loop foreach local b ball.list
    nballs = nballs + 1
  endloop