Loading ...
Sorry, an error occurred while loading the content.

Re: [netlogo-users] agentset

Expand Messages
  • Gregor Troll
    ... I was in a bit of a daze by the time I finished this...if the number of typo s is any indication. Anyway... random-n-of reports an agentset, not a single
    Message 1 of 9 , Oct 1, 2004
    • 0 Attachment
      I wrote:

      > Also, note that random-n-of N something can
      > never report nobody, because if the count of
      > something is less than N, an error is produced

      I was in a bit of a daze by the time I finished this...if the number
      of typo's is any indication. Anyway...

      "random-n-of" reports an agentset, not a single agent, like
      "random-one-of" does, so it could never report nobody, no matter what.
      See below:

      crt 100
      print random-n-of 5 turtles
      O> agentset (5 turtles)
      print random-n-of 1 turtles
      O> agentset (1 turtle)
      print random-n-of 0 turtles
      O> agentset (0 turtles)

      As you can see, random-n-of always reports an agentset, even if it is
      an agentset of 1, or in the case of random-n-of 0, an empty agentset.

      ~~James.
    • Bin Jiang
      HI, James, Thanks a lot for comments on agentset, useful and insightful!!!Before more exchange, I shall say a nice weekend for you first. Cheers. Bin .
      Message 2 of 9 , Oct 1, 2004
      • 0 Attachment
        HI, James,

        Thanks a lot for comments on agentset, useful and insightful!!!Before
        more exchange, I shall say a nice weekend for you first.

        Cheers.

        Bin
        .
      Your message has been successfully submitted and would be delivered to recipients shortly.