Hi everyone,

At my work, we've begun a debate on Netlogo and what is better to use. I 
was wondering if you could settle this debate for us. What is the 
computational order of magnitude of "ask" versus "foreach" with a list of 
one item? Foreach should just loop, so I assume that it is O(n). Is "ask" a 
one step process or does it do some computation to grab the object and 
return itself?

Another question that has arisen is how to get an unordered list from an 
agentset. Sort on an agentset does give us this, but it orders it; we want 
to keep our computation as lightweight as possible, so how do we go about 
converting an agentset to a list of agents? Value-of seems to not exist 
anymore, so should we use (list <agentset>) or  [self] of agentset, which 
also seems to work (I'm still intrigues by this, since it should not give 
us back a list, but it does work with a foreach loop)? Which one is less 
computationally intensive?

What do you guys suggest?

Thanks!
EV

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to