Network sequence simulation code