Distribution System Modeling with Distributed Energy Resources: Local Energy Markets, Aggregators, Grid Services, and Flexibility utilizes a wide range of modeling approaches to support DER integration into the energy grid. This book opens by introducing basic principles and challenges of modern energy systems and the role of DERs in resolving these, as well as regulatory considerations and frameworks across a variety of distributions. It goes on to demonstrate and evaluate mathematical modeling and optimizing methods including robust and adaptive robust methods, the two-stage stochastic method, and bi-level optimization approaches. This theory is then applied to a range of test-cases which use the DER aggregator as either price-maker or price-taker, apply Karush-Kahn-Tucker and dual theory approaches, and explore bilateral contacts, TSO-DSO cooperation, and decision-making tools. With a practical, holistic approach, ‘Distribution System Modeling with Distributed Energy Resources’ supports graduate students, researchers, and industry engineers in energy systems modeling to design sustainable power grids for the future.