本文整理汇总了Python中engine.Engine方法的典型用法代码示例。如果您正苦于以下问题:Python engine.Engine方法的具体用法?Python engine.Engine怎么用?Python engine.Engine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类engine
的用法示例。
在下文中一共展示了engine.Engine方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import engine [as 别名]
# 或者: from engine import Engine [as 别名]
def __init__(self, path_to_log, path_to_work_directory, dic_traffic_env_conf):
self.path_to_log = path_to_log
self.path_to_work_directory = path_to_work_directory
self.dic_traffic_env_conf = dic_traffic_env_conf
self.eng = engine.Engine(self.dic_traffic_env_conf["INTERVAL"],
self.dic_traffic_env_conf["THREADNUM"],
self.dic_traffic_env_conf["SAVEREPLAY"],
self.dic_traffic_env_conf["RLTRAFFICLIGHT"])
self.load_roadnet()
self.load_flow()
示例2: make_test_node
# 需要导入模块: import engine [as 别名]
# 或者: from engine import Engine [as 别名]
def make_test_node(parents, additional_node_config=None):
test_engine = engine.Engine(
passive_nodes=[],
run_which_nodes=[],
interactive=False,
telnet_port_file=None,
ipv4_multicast_loopback=False,
ipv6_multicast_loopback=False,
log_level=logging.CRITICAL,
config={}
)
test_engine.floodred_system_random = 11111111111111111111 # Make unit test deterministic
node_config = {
"name": "node" + str(NODE_SYSID),
"systemid": NODE_SYSID,
"level": NODE_LEVEL,
"skip-self-orginated-ties": True # The test is in control of what TIEs are in the DB
}
if additional_node_config:
node_config.update(additional_node_config)
test_node = node.Node(node_config, test_engine)
# Create fake interfaces for parents (in state 3-way)
for parent_sysid in parents.keys():
make_parent_interface(test_node, parent_sysid)
# Fill TIE-DB for the first time
update_test_node(test_node, parents)
return test_node
示例3: main
# 需要导入模块: import engine [as 别名]
# 或者: from engine import Engine [as 别名]
def main():
args = parse_command_line_arguments()
parse_environment_variables(args)
parsed_config = config.parse_configuration(args.configfile)
packet_common.add_missing_methods_to_thrift()
eng = engine.Engine(run_which_nodes=run_which_nodes(args),
passive_nodes=args.passive_nodes,
interactive=args.interactive,
telnet_port_file=args.telnet_port_file,
ipv4_multicast_loopback=ipv4_multicast_loopback(args),
ipv6_multicast_loopback=ipv6_multicast_loopback(args),
log_level=args.log_level,
config=parsed_config)
eng.run()
示例4: _storybook
# 需要导入模块: import engine [as 别名]
# 或者: from engine import Engine [as 别名]
def _storybook(**settings):
return StoryCollection(
pathquery(DIR.key / "story").ext("story"), Engine(DIR, **settings)
)