Converting a geothermal-driven steam flash cycle into a high-performance polygeneration system by waste heat recovery: 3E analysis and Genetic-Fgoalattain optimization