I started with a little simpler evolutionary system of agents randomly placed on a field of Cells (1*1 static squares that describe location for agents) and Zones (larger squares that can count how many Agents are within it after each iteration and their centroid attract Agents). So, I basically came up with a small .dll where I wrote classes for Agent, ZOne, Cell and SystemSetting. I reference this .dll into my VB component but then the majority of the functions and subs that describe this system interaction are written directly in this VB component.
The system works fine, but I cannot achieve the effect of having the system to redraw after each iteration. For example :
'''////////////////////////////////////'''
Call InitializeEverything()
For i=0 to 19 'say, Iwant to run my system for 20 times
Call UpdateZones() 'updates attractor values of Zones
Call RelocateAgents() 'say, code that does all the evolutionary job
Dim agentSrf As New List (Of OnNurbsSurface) 'want to collect the surface_
representation of all agents and visualize it
For j= 0 to agents.count-1
agentSrf.Add(agents(i).MySurface() 'collect the Agent representations
Next
A=agentSrf
Next
'''////////////////////////////////////'''
So, in this case I will only see the surfaces of the agents after this last iteration. I was trying to use timer and target my VB component but I have my initialization function there as well so it just reruns everything from the very beginning. Or I tried to:
A=agentSrf
System.Threading.Thread.Sleep(5000)
but this didn't give me much either.
I'm sure that there is a relatively simple solution to that but I cannot find it.
Would you please give me your thoughts on that?
Thanks A lot,
Dima