当前位置: 首页>>代码示例>>Python>>正文


Python engine.Engine方法代码示例

本文整理汇总了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() 
开发者ID:multi-commander,项目名称:Multi-Commander,代码行数:13,代码来源:simulator.py

示例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 
开发者ID:brunorijsman,项目名称:rift-python,代码行数:29,代码来源:test_node_flood_repeater_election.py

示例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() 
开发者ID:brunorijsman,项目名称:rift-python,代码行数:16,代码来源:__main__.py

示例4: _storybook

# 需要导入模块: import engine [as 别名]
# 或者: from engine import Engine [as 别名]
def _storybook(**settings):
    return StoryCollection(
        pathquery(DIR.key / "story").ext("story"), Engine(DIR, **settings)
    ) 
开发者ID:crdoconnor,项目名称:strictyaml,代码行数:6,代码来源:key.py


注:本文中的engine.Engine方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。