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

Re: [netlogo-users] highlighting a group of turtles

Expand Messages
  • James Steiner
    Sure. Not knowing anything else, here s a simple example: ask turtles [ hide-turtle ] ask turtle-of-interest [ show-turtle ] You can also use the WATCH command
    Message 1 of 14 , Mar 1, 2011
      Sure.

      Not knowing anything else, here's a simple example:

      ask turtles [ hide-turtle ]
      ask turtle-of-interest [ show-turtle ]

      You can also use the WATCH command to highlight a particular turtle.

      You can also make turtles dim and mostly transparent, except for the turtle of interest.

      ~~James


      On Tue, Mar 1, 2011 at 12:50 AM, Jerry Rhee <jerryrhee@...> wrote:


      Ahoy,

      Is it possible to hide all turtles except the one of interest to monitor that group's behavior? 

      Thanks,
      J






    • Jerry Rhee
      Gracias, OB-1! J ... From: James Steiner Subject: Re: [netlogo-users] highlighting a group of turtles To: netlogo-users@yahoogroups.com
      Message 2 of 14 , Mar 1, 2011
        Gracias, OB-1!

        J



        --- On Tue, 3/1/11, James Steiner <gregortroll@...> wrote:

        From: James Steiner <gregortroll@...>
        Subject: Re: [netlogo-users] highlighting a group of turtles
        To: netlogo-users@yahoogroups.com
        Date: Tuesday, March 1, 2011, 9:29 AM

         

        Sure.


        Not knowing anything else, here's a simple example:

        ask turtles [ hide-turtle ]
        ask turtle-of-interest [ show-turtle ]

        You can also use the WATCH command to highlight a particular turtle.

        You can also make turtles dim and mostly transparent, except for the turtle of interest.

        ~~James


        On Tue, Mar 1, 2011 at 12:50 AM, Jerry Rhee <jerryrhee@...> wrote:


        Ahoy,

        Is it possible to hide all turtles except the one of interest to monitor that group's behavior? 

        Thanks,
        J







      • Jerry Rhee
        Hi again, I have a model running and there are a bunch of turtles on it.  How do I find out the who number so I can figure out what its measures are, please?
        Message 3 of 14 , Mar 3, 2011
          Hi again,

          I have a model running and there are a bunch of turtles on it.  How do I find out the who number so I can figure out what its measures are, please?

          Thanks!
          J



        • Peter Cappaert
          Just in case you haven t figured this one out already, I think I can help. I m assuming you want to obtain the value of a turtle variable for a specific turtle
          Message 4 of 14 , Apr 25, 2011
            Just in case you haven't figured this one out already, I think I can help.  I'm assuming you want to obtain the value of a turtle variable for a specific turtle based on some other variable.  In this case you can use something like this:

            show [who] of turtle with [xcor < 5]

            Is this what you were looking for?

            hth,

            Peter

            On Thu, Mar 3, 2011 at 2:01 AM, Jerry Rhee <jerryrhee@...> wrote:
             

            Hi again,

            I have a model running and there are a bunch of turtles on it.  How do I find out the who number so I can figure out what its measures are, please?

            Thanks!
            J




          • NikolaTrbojevic
            does this mean that we can apply multiple raster files?? ... -- View this message in context:
            Message 5 of 14 , Apr 26, 2011
              does this mean that we can apply multiple raster files??



              James Steiner-2 wrote:
              >
              > You can deal with multiple layers (which I presume means multiple maps)
              > using patches-own to create new variables to hold the layer values.
              >
              > patches-own
              > [ layer1
              > layer2
              > ]
              >
              >
              > ;; later... in setup
              > ;; read in the color map
              > import-pcolors "layer1.png"
              > ;; assign the colors to the layer variable
              > ask patches [ set layer1 pcolor ]
              > ;; repeat for layer 2
              > import-pcolors "layer2.png"
              > ask patches [ set layer2 pcolor ]
              >
              > --now, as to what you want to see in pcolor, that's up to you.
              >
              > Turtles can always refer directly to the patch they are standing on, so
              > you
              > can write things like:
              >
              > ask turtles
              > [ if layer 1 = something or layer2 = something [ do-something ]
              > ]
              >
              > Or any other code you like--treating layer1 and layer2 just like any other
              > patch variable.
              >
              > ~~James
              > www.turtlezero.com
              >
              >
              >
              >
              > On Thu, Feb 10, 2011 at 9:52 PM, Wang Lei
              > <wang.patrick.lei@...>wrote:
              >
              >>
              >>
              >> Thank you very much, turtlemaniac5000!!!
              >>
              >> I can run the model now. but I met an other problem: I have two layers.
              >> Turtles' actions will depend on the value of patches on each layer.
              >> Can NetLogo deal with multiple layers? or How to add new properties to
              >> the
              >> patches from a layer?
              >>
              >> 2011/2/6 turtlemaniac5000 <turtlemaniac5000@...>
              >>
              >>
              >>>
              >>>
              >>>
              >>> --- In netlogo-users@yahoogroups.com, "andyhong22"
              >>> <wang.patrick.lei@...>
              >>> wrote:
              >>> >
              >>> > Dear NetLogo users, I want to import a map with a few colors and
              >>> create
              >>> some turtles above one of the colors, what should I do?
              >>> > Thanks!!!
              >>> >
              >>>
              >>> Look up "Image Import Example" from models library.
              >>>
              >>> And after you have imported a map with a few colors:
              >>>
              >>> to make-some-turtles
              >>> let color-choice [pcolor] of patch random-pxcor random-pycor
              >>> let patches-of-interest patches with [pcolor = color-choice]
              >>> ask n-of (1 + random count patches-of-interest) patches-of-interest
              >>> [sprout 1]
              >>> end
              >>>
              >>>
              >>
              >>
              >> --
              >> Lei Wang, Ph.D. Candidate
              >> College of Urban & Environmental Sciences
              >> Peking University
              >> Beijing 100871 P.R.China
              >> Tel:86-10-62741151(H), 52764905(H), 62758845(O)
              >> E-mail: wang.patrick.lei@... / wlei@...
              >>
              >>
              >
              >

              --
              View this message in context: http://old.nabble.com/about-importing-a-map-with-colors-tp30794914p31476795.html
              Sent from the NetLogo-Users mailing list archive at Nabble.com.
            Your message has been successfully submitted and would be delivered to recipients shortly.