netlogopatchmodelingagent-based-modeling

Netlogo: How do I assign patches with one color to an agentset?


I have patches of yellow and blue color. I wanted to assign all patches with color blue to an agentset workspaces.

This is what I tried.

set patches with [pcolor = blue] workspaces

However, I'm getting an error saying This isn't something you can use 'set' on. How do I solve this?

Also how do I declare the agent-set? I have initialized workspaces in globals now.


Solution

  • set workspaces patches with [pcolor = blue]