Quote Originally Posted by dhouston View Post
If there is a mathematical relationship between supply_in and max_duty, it might be more efficient to just compute max_duty as supply_in varies.

Also, if the relationship could be refined to eliminate the max _duty granular discontinuities (i.e. if it can vary in steps of 1 or any constant step), a loop might be better.

I'd considered that, but alas the supply_in vs the max_duty required is all over the shop....hence the multiple ifs!