Question about additive synth based on agents

I am wondering if it is possible to implement an additive synth where the partials are ‘agents’ with state variables responding dynamically to each other’s state.

The idea is in general but here is an example for a chaotic ‘particle engine’ unison.

For example, a 3x unisoned saw wave implemented by 512 x3 partials, where the 3 agents responsible for each of the saw waves’ partials are a sine oscillator with some random motion in frequency, a desire to get to their assigned partial frequency, but also a dynamic repulsion to nearby agents.

So they would know their own frequency and the frequency of their neighbors and would chaotically swarm around their target frequency as they try to get close to the target but still stay far enough away from their neighbors, and their positions are always changing in real time.

Effectively, a detuned unison sawtooth.

You may think about the swarm dances of many flying species, or insects flying around a light bulb, or electron cloud around a nucleus.

I am wondering if there is a natural way to implement this in Supercollider.

Thank you.

One way might be to use the class Spring.ar to set each partial frequency with the in force parameter being a sum of LFNoise1.ar (or similar) for randomness, with values for the repellant forces from all the other partials in the group depending on how close they are.
Hope that helps,
Paul

You may also need to use LocalIn and LocalOut to store and feedback all the calculated partial frequencies so that they are available for the repellant force calculations.
I hope that makes sense.
Best,
Paul