An air-conditioning unit on a train car for cooling a tunnel where trains run comprising: - an inlet for sucking hot air from the exterior of the train car; - a refrigerant circuit having: a first heat exchanger (12, 12s) operating as an evaporator when the train car runs in a tunnel, a second heat exchanger (16, 16s) operating as a condenser when the train car runs in a tunnel, an expansion device (29, 29s) which permits the expansion of the condensed fluid by the second heat exchanger (16, 16s), and a compressor (25, 25s); - an outlet for cooled air supplied to the exterior of the train car in the tunnel; - a fan coupled with the first heat exchanger (12, 12s) and blowing the sucked air passed through the first heat exchanger (12, 12s) from the inlet towards the outlet; and - a heat collector that receives air passing through the second heat exchanger (16, 16s) and stores the received thermal energy, characterized in that the refrigerant circuit is designed to switch between two alternative operation modes and has: - a four-way valve that is alternatively placed in a first working position on a first operation mode wherein the first heat exchanger operates as an evaporator and the second heat exchanger operates as a condenser, or a second working position on a second operation mode wherein the first heat exchanger operates as a condenser, the second heat exchanger operates as an evaporator, and the heat collector is regenerated by cooled air through the second heat exchanger; and - a second expansion device which permits the expansion of the condensed fluid by the first heat exchanger in the second operation mode. - an inlet for sucking hot air from the exterior of the train car; - a refrigerant circuit having: a first heat exchanger (12, 12s) operating as an evaporator when the train car runs in a tunnel, a second heat exchanger (16, 16s) operating as a condenser when the train car runs in a tunnel, an expansion device (29, 29s) which permits the expansion of the condensed fluid by the second heat exchanger (16, 16s), and a compressor (25, 25s); a first heat exchanger (12, 12s) operating as an evaporator when the train car runs in a tunnel, a second heat exchanger (16, 16s) operating as a condenser when the train car runs in a tunnel, an expansion device (29, 29s) which permits the expansion of the condensed fluid by the second heat exchanger (16, 16s), and a compressor (25, 25s); - an outlet for cooled air supplied to the exterior of the train car in the tunnel; - a fan coupled with the first heat exchanger (12, 12s) and blowing the sucked air passed through the first heat exchanger (12, 12s) from the inlet towards the outlet; and - a heat collector that receives air passing through the second heat exchanger (16, 16s) and stores the received thermal energy, - a four-way valve that is alternatively placed in a first working position on a first operation mode wherein the first heat exchanger operates as an evaporator and the second heat exchanger operates as a condenser, or a second working position on a second operation mode wherein the first heat exchanger operates as a condenser, the second heat exchanger operates as an evaporator, and the heat collector is regenerated by cooled air through the second heat exchanger; and - a second expansion device which permits the expansion of the condensed fluid by the first heat exchanger in the second operation mode.