Use Python to simulate the traffic by different rules.