swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with Value2dDisplay


From: James Marshall
Subject: Re: Problems with Value2dDisplay
Date: Wed, 12 Aug 1998 11:20:39 GMT

Hi,

> >> 
> JM> [populationDisplay putValue:
> JM> (long)(((double)localPopulation/maxAgents)*10+1) atX: x Y: y];
> JM> printf("%i\n",(int)[populationDisplay getValueAtX: x Y: y]);
> 
> Are you sure this code is right?  You should be attempting to set the
> value at each point through the underlying Discrete2d data structure -
> in your example it's whatever's returned by the [epdSwarm
> getWorldDisplay] method call - rather than the Value2Display instance
> variable (iVar).
>

yes, my code does set the values in the Discrete2d structure (see 
below)
. 
> In other words, Discrete2d grids `know' how to display themselves.
> You don't need to explicitly set them.
>

sorry, I don't quite understand what you're saying here.
 
> Are you using the same variable name for the Discrete2d iVar (or
> subclass thereof) in your ModelSwarm *and* the Value2dDisplay iVar in
> your ObserverSwarm, perhaps?
> 

You've hit the nail on the head. Is this potentially the source of 
the problem? I don't think it should be? I'll try changing it 
anyway...
        James

>  --- Alex
> -- 
>   Alex Lancaster         |   e-mail: address@hidden
>   Swarm Developer        |      web: http://www.santafe.edu/~alex
>   Santa Fe Institute     |      tel: +1-(505) 984-8800 (ext 242)
> ------------------------------------------------------------------
> 
>                   ==================================
>    Swarm-Support is for discussion of the technical details of the day
>    to day usage of Swarm.  For list administration needs (esp.
>    [un]subscribing), please send a message to <address@hidden>
>    with "help" in the body of the message.
>                   ==================================
> 
--
James Marshall - Postgraduate Research Student (MPhil/PhD)
Artificial Intelligence Group - Department of Computer and Information Sciences
De Montfort University - Milton Keynes Campus
Web:- http://www.mk.dmu.ac.uk/~jmarshall/

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]