Re: [netlogo-devel] agentsets with repeats?

2015-02-06 Thread Marshall
On Friday, February 6, 2015 at 12:39:59 PM UTC-6, Jason Bertsche wrote: Does it complicate the NetLogo language, though, if agentset primitives knew how to deal with agentbags. Maybe there's something I'm not seeing. Bags and sets are two things that you can use very similarly, but they

Re: [netlogo-devel] how to run with logging from sbt

2015-02-06 Thread Corey Brady
cool: thanks! and -- my brief testing confirmed the logging modifications and custom-logging extension are working well. -c On Feb 6, 2015, at 11:53 AM, Jason Bertsche jason.berts...@northwestern.edu wrote: If there's a will, there's a way. From the root directory of your local copy of

Re: [netlogo-devel] agentsets with repeats?

2015-02-06 Thread Jason Bertsche
I agree. On 02/06/2015 01:55 PM, Bryan Head wrote: I think that's a great idea for an extension. On Fri Feb 06 2015 at 1:53:52 PM Marshall marsh...@logical.net mailto:marsh...@logical.net wrote: On Friday, February 6, 2015 at 12:39:59 PM UTC-6, Jason Bertsche wrote: Does

[netlogo-devel] agentsets with repeats?

2015-02-06 Thread Marshall
A model I'm working on includes a series of functions that implement a random choice of turtles that will send messages to another turtle. Recently, I decided it might be better to allow the selection of senders to be random with repeats. Nicolas Payette's rnd extension

Re: [netlogo-devel] agentsets with repeats?

2015-02-06 Thread Marshall
Thanks Bryan--That's a good solution. Hadn't thought of it. (Seems obvious, now!) I'll probably do that. And I appreciate knowing that uniqueness is deeply embedded in the nature of agentsets. Roman, you're right--I should have called that what I was proposing an agentmultiset. On Friday,

Re: [netlogo-devel] agentsets with repeats?

2015-02-06 Thread Bryan Head
Glad you think that will work for you. I should note that if you want to reproduce the random ordering behavior of `ask` and `with`, just put `shuffle` before `agent-list`. For instance `foreach shuffle agent-list [ ... ]` and `map [...] shuffle agent-list`. You'll take a performance hit, but then

Re: [netlogo-devel] agentsets with repeats?

2015-02-06 Thread Jason Bertsche
We've definitely discussed the idea of bag/multiset support in NetLogo before, but, as was already noted in this thread, it would be a substantial thing to introduce. In this particular situation, it seems like the use case for multisets is not terribly difficult to work around, but I'd be

Re: [netlogo-devel] agentsets with repeats?

2015-02-06 Thread Roman Seidl
What you are asking for is not an agentset. A set is usually defined to be unique in terms of its members. Also a set has no order. What you are asking for is an agentlist that would support for an ask method similar to an agentset. What you are getting by weighted-n-of-with-repeats is a list of

Re: [netlogo-devel] agentsets with repeats?

2015-02-06 Thread Bryan Head
Hi Marshall, Writing you're own ask-procedure that operates on lists could be a pretty easy workaround. For instance: to ask-list [ agent-list commands ] foreach agent-list [ ask ? [ run commands ] ] end which you then call like: ask-list agents-with-repeats task [ do-stuff ] Where