Hi!
With Swarm, I want to carry out the following problem:
there are three kinds of individual---red, yellow and
green, each 50, scattering uniformly in the space at
the beginning. In the simulation process, the number
of red individual decreases, yellow one increases, and
each kind individual will aggregate together.
First, I let three individuals live in a world, and
use the same worldRaster, but I find that the
increased yellow one can not be seen in worldRaster,
whereas in the yellowList, the number of yellow one
increased. However, red one is normal.
Then I let them live in three worlds, and also use the
same worldRaster, the above problem can be solved, but
I get a new trouble, looking at the following source
code:
individualredDisplay = [Object2dDisplay createBegin:
self];
[individualredDisplay setDisplayWidget:
worldRaster];
…
individualredDisplay = [inindividual1Display
createEnd];
[worldRaster setButton: ButtonRight
Client: individualredDisplay
Message: M(makeProbeAtX:Y:)];
individualyellowDisplay = [Object2dDisplay
createBegin: self];
[individualyellowDisplay setDisplayWidget:
worldRaster];
…
individualyellowDisplay = [inindividualyellowDisplay
createEnd];
[worldRaster setButton: ButtonRight
Client: individualyellowDisplay
Message: M(makeProbeAtX:Y:)];
…
I find that with mouse right button in the
worldRaster, only the information of individualyellow
can be gotten, but individual1 can not. If delete the
setButton command of individualyellow, individualred
can.
Some persons tell me a few days ago, let them use the
different wolrdRaster. I try it, it is okey! Whereas I
can see three worldRasters in the screen, which
possess their own individual. However, I hope them
stay in the same worldRster.
This problem bothers me a lot. Maybe someone can give
me a whole solution or some advices.
Thank you very much!
Patrick.L