The assignment focuses on optimizing the use of Distributed Generation (DG) units for efficient power distribution. It aims to minimize power losses and overall transmission and distribution costs. The project involves designing a trackback algorithm to achieve these objectives. Initial testing demonstrates a 96% reduction in power losses and a 50% cost reduction, highlighting the potential of this approach. Further research is needed to scale this solution for commercial applications.