def cross_sim(): """ cross module test: Cross 模块测试单元 """ env = Environment() INPUT_QUEUE_DIC.update({ 'x1_in1': PriorityStore(env=env), 'x1_in2': PriorityStore(env=env) }) generator_queue_res = Resource(env=env, capacity=NUM_PORT_ABLE) env.process( machine_package(env=env, generator_queue_res=generator_queue_res)) OUTPUT_QUEUE = PriorityStore(env) Cross(env=env, id_x=CROSS_ID, input_dic=INPUT_QUEUE_DIC, out_put=OUTPUT_QUEUE) env.run(until=50)