Text this: An Energy Management System for PV Sources in Standalone and Connected DC Networks Considering Economic, Technical, and Environmental Indices