A lattice model for transition zones in ballasted railway tracks