Text this: Minimization of total costs for distribution systems with battery energy storage systems and renewable energy sources