Hey guys!
I thought that your experience might help me to overcome a problem that I am facing with the Agent Based Simulation
model I am developping at the moment.
1. I need to progress time in my Agent Based Simulation, but also keep track of the time variable. How can I do that?
2. During each simulation period I need to add a new variable in each collection variable I have created. Can this new
variable be included in the form variable(time) in each collection variable added in each time period?
Many thanks in advance for your invaluable help!
Kindest Regards,
Stavrianna
Victor Gleim — 13.12.07
to Stavrianna:
1. To get the current simulation time, you could use the getTime method of the Engine class: getEngine().getTime().
2. To add a value into a Collection, you should use the add method. Thus, for a Collection with elements of type Double
it would be: collection.add(value).