
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/c5d8c6ae-8bb8-47e8-8eb5-165c3b31ee10n%40googlegroups.com.
On Jul 26, 2022, at 2:20 PM, Michael Tamillow <mikaelta...@gmail.com> wrote:I could be mistaken but I don't think breed is a property owned by individual agents. From my understanding it is more like a "type" which means it is deeply set and not something that can be set willy-nilly. Otherwise we could change turtles to wolves!
--
--
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/CADiHOG6jFFvx7V2sFyQYOiJ7_%2BZoV0ZOCNqdZOYmrv3P8toD%3Dw%40mail.gmail.com.
Michael and Jim, thank you for all the help.
Stephen, thanks for the code; without it would have been much hard to find the solution to my problem. Just one question, why is "round" necessary? (I tried with and without it, and the outcome appears to be the same.)
James, thanks for the recommendation of the rnd extension.
Is there any way to find the code operating behind the extension?
I wanted to see the details of how the code rdn works behind the scenes, but I am unsure if this information is in https://github.com/NetLogo/Rnd-Extension . I looked at all files but could not quite find anything resembling NetLogo.
In case the authors of this extension decide to change the code, is there any way to keep using the version of the rnd extension I am using now (2022.07.29)?
Cheers ^^
Fan
Stephen, thanks for the code; without it would have been much hard to find the solution to my problem. Just one question, why is "round" necessary? (I tried with and without it, and the outcome appears to be the same.)
You might see artifacts based on the rounding, the ordering of the lists and there's a chance a patch won't get assigned. For a more robust approach take a look at the "Lottery Example" in the models library of how to do "weighted draws" and having a patch set a breed that way.
Is there any way to find the code operating behind the extension?
I wanted to see the details of how the code rdn works behind the scenes, but I am unsure if this information is in https://github.com/NetLogo/Rnd-Extension . I looked at all files but could not quite find anything resembling NetLogo.
You're looking in the right place. NetLogo extensions are all written in Java or Scala code, and not in NetLogo code. The code for RND is mostly in the files Picker.scala and Primitives.scala here: https://github.com/NetLogo/Rnd-Extension/tree/hexy/src/main/scala/org/nlogo/extensions/rnd with a little other Java code here.
In case the authors of this extension decide to change the code, is there any way to keep using the version of the rnd extension I am using now (2022.07.29)?
The version of RND that comes bundled with a particular NetLogo version won't change, so as long as you install that same NetLogo version will get you the same version of RND too. Old versions of NetLogo are always kept available, partly for this reason. There is no way from your model code to "lock in" a particular extension version, unfortunately.
That said, as far as I can see there hasn't been a functional update for RND in many years; it seems like a pretty stable extension.
-Jeremy
On Aug 3, 2022, at 2:39 PM, Jeremy Baker <jeremy...@northwestern.edu> wrote:
--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/DM6PR05MB4667D1B318558E64ACD5B1D4FE9C9%40DM6PR05MB4667.namprd05.prod.outlook.com.