In the Social Ant Decision Support Model, I want to use a Collection variable , say "Neighbor", to store the
other ants that are within the vision range of an individual ant. As the individual ant moves, its "Neighbor"
need to be updated. In the begining, the "neighbor" should cotain no "neibhbor", so, it should be
initialized as "null". But I can not find the corresponding place such as "inital value" in the
plain variable to do so in the property of the collection variable. Please advise.
Thank you,
run
Victor Gleim — 08.02.08
Run, a Collection variable has a type of one of the special Java classes represent lists, stacks, etc. When you create a
Collection variable, AnyLogic automatically set an initial value to this variable that is not null but a link to a new
object of the corresponding type. That is why there is no initial value option in the properties of the Collection
variable.
I suggest you to read the Collection Variables topic in the Help.