Making the Most out of Distributed Generation without Endangering Normal Operation: A Model-Based Technical-Policy Approach