import simpy # def generator(n): # while True: # for j in range(n): # yield j # # def function(n): # for j in range(n): # return j # def main(): # env = simpy.Environment() # env.process(traffic_light(env)) # env.run(until = 120) # print("Simulation complete") # # def traffic_light(env): # while True: # print("Light turned GRN at t =" + str(env.now)) # yield env.timeout(30) # print("Light turned YEL at t =" + str(env.now)) # yield env.timeout(5) # print("Light turned RED at t =" + str(env.now)) # yield env.timeout(20) # # if __import__(name == '_main_'): # main()