Building energy simulation software (e.g. EnergyPlus) is a powerful tool used widely by designers and researchers. However, current software is limited in modeling distributed generation (DG), including DG with heat recovery applied to building end-use, i.e. combined heat and power (CHP). Concurrently, DG investment and dispatch optimization software has been developed, yet has not been linked to a building energy simulation program for accurate assessment of DG designs, particularly under uncertainty in future end-use loads and equipment availability. CHP is a proven approach to cost effective reductions in primary fuel consumption and CO2 emissions. Integrating DG system design and controls into building energy simulation is an important step towards popular DG acceptance. We propose to extend the existing building energy simulation program, EnergyPlus (E+), to enable the simulation of various DG modules and associated control strategies in order to achieve more accurate and holistic analysis of DG technologies. Extension of EnergyPlus is conveniently facilitated by SPARK, a program capable of modeling building equipment and controls as individual modules. These modules can be automatically integrated with EnergyPlus building models. Candidate DG systems can be selected from the DG investment optimization program, Distributed Energy Resources Customer Adoption Model (DER-CAM). The dispatch of the modeled DG system can be determined by a novel dispatch optimization algorithm, the Energy Manager, that accounts for uncertainty in future load and DG availability, as well as curtailment options. DG equipment and controls can modeled in SPARK and integrated into EnergyPlus building models. The way to this holistic approach will be described in this paper.