In the Random Network Example, it is easy for the naive user to set 
`num-links` too high, producing an infinite loop in `setup-simple-random`.

Two possible solutions:

i. set the `Maximum` to `num-nodes * (num-nodes - 1) / 2` in the 
`num-links` slider.

ii. add the following (or equivalent) before the while loop in 
`setup-simple-random`:

    let max-links num-nodes * (num-nodes - 1) / 2
    if (num-links > max-links) [set num-links max-links]

fwiw

-- 
You received this message because you are subscribed to the Google Groups 
"netlogo-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netlogo-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to