Gotcha! Thanks Devang and Abraham!
I found a better way to express our objective for optimization. Please find the revised file.
Your solution is really neat! Thanks for that - it is a very cool wee script now
This is a great script!
Can this be replicated in Dynamo?