I'm trying to set pcolor orange for different patches. I want them to be created randomly, but always at a distance of R from each other. In this current code, it creates the patches randomly just fine, but simply removes the orange patch if they are within the radius, resulting in fewer than N orange patches. How can I solve this so that all N patches are created at a distance R instead of just the ones which randomly fall out of radius R of each other?
ask n-of N patches
[
if not any? other patches with [pcolor = orange] in-radius R [
set pcolor orange
]]