Optimal Energy Flow Management in Multicarrier Networks in the presence of Distributed Energy Hubs