Algorithmic tools for the transformation of Petri nets to DEVS