1

关于流程中的教程 01:教程 01

我执行了代码

flow_params = dict(
    exp_tag='ring_example',
    env_name=AccelEnv,
    network=RingNetwork,
    simulator='traci',
    sim=sim_params,
    env=env_params,
    net=net_params,
    veh=vehicles,
    initial=initial_config,
    tls=traffic_lights,
)

# number of time steps
flow_params['env'].horizon = 3000
exp = Experiment(flow_params)

# run the sumo simulation
_ = exp.run(1, convert_to_csv=True)

之后我得到一个错误,这是错误

Error during start: [Errno 2] No such file or directory: '.../kernel/network/debug/cfg/ring_example_20201208-1332481607405568.58399.net.xml' Retrying in 1 seconds...

它应该如何生成或在哪里可以找到?

4

1 回答 1

0

这是我的文件命名转换的问题。显然,要调用的命令

        subprocess.call(
        [
            'netconvert -c "' + self.net_path + self.cfgfn +
            '" --output-file="' + self.cfg_path + self.netfn +
            '" --no-internal-links="false"'
        ],
        stdout=subprocess.DEVNULL,
        shell=True)

不需要间距。就我而言,我的文件夹名为“机器学习”。

于 2020-12-08T06:55:44.823 回答