Scalable Decision-Making for Energy Systems: A Graph-Structured Optimization Approach