Folks, This is an abstract of a real life engineering problem that I'm working on, not homework. I've managed to implement a partially effective algorithm, but the code is clunky, and just wonder whether there's a standard, elegant solution out there. My solutions are presently based on (a) filling in the biggest gaps from the centre first and (b) minimising a hypothetical 'unbalance moment'.
A cylindrical central feed distributor, with 'n' processing units being fed through radial, evenly spaced feed lines. Each line has an on/off valve, ie. each unit may be off or on, no in-between. The number of online units is being adjusted by a separate controller, in response to production requirements.
The algo needs to choose units to switch to maximise the flow symmetry in the central distributor, eg. 1/3/5/7 is good, 1/2/3 is bad.
Any suggestions appreciated.