Analysis of the influence of Thermal Energy Storage on the Optimal Management of a Trigeneration Plant