Optimal scheduling of a P2G plant in dynamic Power Heat and Gas markets