在任何logic中:当不处于闲置状态时,请周期性地重新计算路线

发布于 2025-02-04 11:10:05 字数 457 浏览 4 评论 0原文

我的运输代理在任何logic中的动画都有问题。他们被卡住了,然后不再在模拟中移动。但是,车队认为他们很忙,这毁了我的结果。

我希望我的代理商在没有闲置时周期性地重新计算他​​们的路线。
transporterfleet-block下,我在运输商上> “ ”下的“动作”下:

if (agent.getState() != TransporterState.IDLE){
    agent.eventRecalculation.restart();
}
if (agent.getState() == TransporterState.IDLE){
    agent.eventRecalculation.reset();
}

EventRecalculation是一个周期性事件,每20秒发生一次每20秒。

​ 我该如何解决?

I have problems with the animation of my transporter agents in anylogic. They get stuck and then they no longer move in the simulation. However, the fleet thinks they are busy and this ruins my results.

I would like my agents to recalculate their route cyclically when they are not idle.
In the TransporterFleet-Block under "Actions" I put in on transporters state changed":

if (agent.getState() != TransporterState.IDLE){
    agent.eventRecalculation.restart();
}
if (agent.getState() == TransporterState.IDLE){
    agent.eventRecalculation.reset();
}

with eventRecalculation being a cyclic event that happens every 20 seconds. This is reset at the start-up of the model to stop it from happening from the beginning.

Anylogic now gives me the error code: agent cannot be resolved.
How do I solve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

污味仙女 2025-02-11 11:10:08

在运输机状态上的中,更改字段,您将转运蛋白参考为单位不是agent

In the on transporters state changed field you refer to the transporter as unit not agent

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文