DARYN: A Distributed Decision-Making Algorithm for Railway Networks