NetLogo Efficient way to create fixed number of links
Great question. This is actually quite challenging to optimize. The problematic line is: let candidates other people with [ count my-links < friends ] This is slow because it has every agent checking with every other agent. With 5000 agents, that’s 25,000,000 checks! Unfortunately, there isn’t really a good way to optimize this particular line … Read more