Optimal Design of a Mini-Grid