swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] discrete2d


From: Paul Johnson
Subject: Re: [Swarm-Support] discrete2d
Date: Mon, 07 Mar 2005 16:03:46 -0600
User-agent: Mozilla Thunderbird 0.9 (X11/20041127)

Answers below!
Good luck

K Konopka wrote:
Hi,
I'm new to swarm (and objective c) and constructed a simple model based on the tutorial. I created a space by importing <space/Discrete2d> but I'm not able to assign float values to this grid. Is there another type of grid I should use for this?
The Heatbugs example should help. Or look in the ref manual for Discrete2d. The Discrete2d has methods to put in objects or long ints, but no doubles. If you need to store floats, you must create a class that holds the float, and then drop those onto the grid.

Also, I am using uniformDblRand to get random values, but it seems to pick the same ones every run. Do I need to seed the generator somehow?

Yes.

http://www.ku.edu/~pauljohn/SwarmFaq/SwarmOnlineFaq.html#7.18

-s or --varyseed

-S234234

will force the seed to 234234

pj

Thanks for your help,
Ken

------------------------------------------------------------------------
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web <http://birthday.yahoo.com/netrospective/>


------------------------------------------------------------------------

_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support


--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700


reply via email to

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