Anylogic道路交通图书馆车道变更错误 [英] Anylogic Road Traffic Library Lane Change error

查看:736
本文介绍了Anylogic道路交通图书馆车道变更错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试对公路的公路系统进行建模,但出现此错误:

I am trying to model a highway system of roads but I am getting this error:

root.<人口> [3]:汽车无法更改车道(这对于 继续移动)或到指定目的地的路线不能是 找到

root.<population>[3]: Car failed to change lane (that was necessary to continue movement) or route to the specified destination cannot be found

完整的错误代码是:

java.lang.RuntimeException:根.< population> [3]:汽车无法 更改车道(这是继续行驶所必需的)或路线 在以下位置找不到指定的目的地 com.anylogic.engine.Engine.error(未知来源),网址为 com.anylogic.engine.Agent.error(未知来源),网址为 com.anylogic.engine.Utilities.error(未知来源),网址为 com.anylogic.libraries.road.C​​ar_xjal.error(来源未知) com.anylogic.libraries.road.C​​ar_xjal.a(来源未知) com.anylogic.libraries.road.C​​ar_xjal.a(来源未知) com.anylogic.libraries.road.C​​ar_xjal.executeActionOf(未知来源)
在com.anylogic.engine.TransitionMessage.execute(未知来源)上
在com.anylogic.engine.Engine.c(未知来源)处 com.anylogic.engine.Engine.gc(未知来源),网址为 com.anylogic.engine.Engine.a(来源未知) com.anylogic.engine.Engine $ i.run(未知来源)

java.lang.RuntimeException: root.<population>[3]: Car failed to change lane (that was necessary to continue movement) or route to the specified destination cannot be found at com.anylogic.engine.Engine.error(Unknown Source) at com.anylogic.engine.Agent.error(Unknown Source) at com.anylogic.engine.Utilities.error(Unknown Source) at com.anylogic.libraries.road.Car_xjal.error(Unknown Source) at com.anylogic.libraries.road.Car_xjal.a(Unknown Source) at com.anylogic.libraries.road.Car_xjal.a(Unknown Source) at com.anylogic.libraries.road.Car_xjal.executeActionOf(Unknown Source)
at com.anylogic.engine.TransitionMessage.execute(Unknown Source)
at com.anylogic.engine.Engine.c(Unknown Source) at com.anylogic.engine.Engine.gc(Unknown Source) at com.anylogic.engine.Engine.a(Unknown Source) at com.anylogic.engine.Engine$i.run(Unknown Source)

这是我的设置(带错误的空间标记屏幕截图):

Here is my setup (space markup screenshot with error):

设置方式为(逻辑屏幕截图):

The way it is setup is(screenshot of logic):

也就是说,有一个Select Output用于选择汽车将行驶的道路.我相信outWayNotFound会在汽车代理无法找到要移动的路径时使用,而我设置的方式是汽车想走任何路径而找不到它,只需继续沿当前路径行驶即可.

That is, there is an Select Output which selects which road the car will move to. I believe that the outWayNotFound is used when the car agent is not able to find the path it wants to move to and the way I have set it up is if the car wants to take any path and it doesn't find it, just continue on path that it currently is in.

我不确定错误在这里表示什么,因为我认为我已经涵盖了这里的基础.我想念什么?任何帮助将不胜感激.

I am not sure what the error signifies here as I think I have covered my bases here. What am I missing? Any help will be highly appreciated.

更新1

发生错误时,RTL流程图的屏幕截图:

Screenshot of the RTL flowchart when the error occurs:

推荐答案

这是一个有趣的问题,因为当您不熟悉它时,它是与道路交通图书馆相关的常见概念问题之一.

This is an interesting question because it's one of the common conceptual problems associated with the road traffic library when you are not familiar with it.

将模型分为多个"carMoveTo"以定义道路网络中汽车的轨迹几乎总是错误.

如果可能,应始终避免这样做.出现此问题的原因有两个:

If possible, you should always avoid doing this. There are 2 reasons why this is a problem:

  1. 因为您创建的交叉路口被认为是道路的一部分,因此该路口将首先走. carMoveTo3开始认为起点是小路的起点,但是由于它位于不允许运动的车道上,因此它甚至无法开始运动.
  2. 因为启动新的carMoveTo时,如果交通过多,这些汽车将无法正确计算其他汽车在十字路口时的位置.这导致汽车在有交通情况下发生碰撞和行为异常.

如果需要,可以将两个点都视为AnyLogic错误,但是创建此路库的目的是认为应该以完全不同的方式使用它. (至少我认为是)

Both points can be considered an AnyLogic bug if you want, but this road library was created thinking that it should be used in a completely different way. (At least I think it was)

那么正确的方法是什么?

好吧.您只需拥有1个carMoveTo,删除selectOutput并定义在carMoveTo之前或在carMoveTo本身中汽车必须走的路线.

Well.. you need to have only 1 carMoveTo, removing the selectOutput and defining what route the car must take before carMoveTo or in the carMoveTo itself.

在carMoveTo中,您可以定义一条策略,确定无法执行路线时的处理方式.

And in carMoveTo you can the define a strategy of what to do when the route is not possible.

这是我如何制作您的模型:

Here is how I would make your model:

在carMoveTo中,我将以50%的机会选择road1或road2(这是执行您正在使用的selectOutput的正确方法).我不知道您如何选择要走的路,但是您可以在那个地方定义.

In carMoveTo I would select road1 or road2 with 50% chances (which is the correct way of doing the selectOutput that you are using). I don't know how you choose the road to take, but you can define in that place.

这篇关于Anylogic道路交通图书馆车道变更错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆