Collisions stop working when more elements added

I am modelling threads wrapped around a grid of nails. I am shortening the length of the threads so that they snug up against the nails and detecting collisions between threads and between threads and nails.

I have a simple example with two threads that seems to work:

Before solving:

After solving:

When I try the same thing with four threads, the collisions between threads and nails seem to be ignored.

Before solving:

After solving:

I used the following grasshopper script: (24.9 KB)

Many thanks for any help.

I think the main problem is that the collision radius is too small, and the objects are passing through each other. Increasing it to 2 seems to make it work. (26.3 KB)

Thank you, that helps! Is there a description of (or information about) how the radius is used in the optimization? I have a much larger set of threads that I am trying to model and I would like to understand how to find a good radius value (other than trial and error) and how much distance is required between objects in the initial configuration in order to prevent them from passing through one another.

An update for anyone interested in similar interlaced models. I found that the strength of the collision goal objects versus the strength of the line length objects is more important than the radius of the collision objects (although radius is also significant). I made the collision strength 1000 and the line length strength 10 and was able to achieve the correct alternating over and under crossings of threads. If the collision strength and line length strength are equal or similar, the threads can pass through each other or even twist around each other additional times (more twists than in the initial state of the curves).

I was able to scale the simple model to more elaborate examples: