Occurs once after the End button has been clicked on the VisualBots control or the Halt method has been executed.
Private Sub object_OnSimBegin(ByVal World As World, ByVal Bots As Bots, ByVal Cells As Cells)
object A reference to a World control object sited on a Worksheet.
World Required. Returns a reference to the World object.
Bots Required. Returns a reference to the Bots object.
Cells Required. Returns a reference to the Cells object.
Use the OnSimEnd event to perform tasks needed to finish a simulation, such as reporting on simulation results or destroying objects.
The following example prints information about the simulation to the Debug window.
Private Sub World1_OnSimEnd(ByVal World As World, ByVal Bots As Bots, ByVal Cells As Cells)
Debug.Print "Number of Bots: ", Bots.Count
Debug.Print "Elapse Time of Simulation: ", World.StopWatch.StopIt
Debug.Print "Number of Time Steps: ", World.Sim.Time
End Sub