Optimization and dynamic analysis of a novel polygeneration system producing heat, cool and fresh water