Good intro to the problem. I did a fair bit of work on more complex versions of this problem in distribution systems at a past job. Because a distribution system is unbalanced, each phase has to be solved for but the phases interact with each other so the optimization problem becomes ~9x more complex.