Railway is a critical application; hence, all systems that compose the railway infrastructure must meet two conditions: availability and safety. The availability ensures continuous operation of the system; on the other hand, safety is achieved when the device works properly regardless of the environmental or operating conditions. In addition, Wireless Sensor Networks (WSN) are used to perform tasks previously performed manually. However, it is necessary to analyse what protocol is appropriate for the railway industry, since availability and safety are the required attributes. In this work, a recently proposed routing protocol, the Multi-Parent Hierarchical (MPH), has been compared with a well-known protocol, the Ad-hoc On-Demand Distance Vector (AODV), in order to find the most suitable one for the railway applications. For this purpose, a simulator has been developed, which faithfully reifies the workings of a given protocol, considering a fixed, reconfigurable ad-hoc network given by the number and location of participants, and general network conditions.