Polynomial Optimization In Energy Systems