An Optimization Algorithm for the Operation Planning of the University of Genoa Smart Polygeneration Microgrid