OPTIMIZING DISTRIBUTED GENERATION AND ENERGY STORAGE IN DISTRIBUTION