The main purpose of ensuring traffic safety on railways