Height Constraints for Adjacent Panels Using 'Proximity' in Grasshopper

Trying to optimize the distribution of panels within a 3D arrangement, I’m considering using the ‘Proximity’ component in Grasshopper to establish connections between the panels. However, I’m having difficulties developing a logic that restricts the heights of neighboring panels, avoiding intersection. My idea is to establish a set of rules that allow panels to choose different heights when they are close to each other.

Does anyone have any suggestions on how to implement this height constraint logic based on connections generated by ‘Proximity’ or have an alternative solution to tackle this challenge? I appreciate any guidance or ideas to progress on this project.

The last photo is of a distribution attempt using attractor points, but it did not produce the expected result.
panels proximity.gh (14.3 KB)

panels proximity Edtied V0.gh (18.5 KB)
No need to install the plugin.