Statistics for Modeling and optimal operation of sustainable thermoelectric microgrids with phase-change material thermal system