在任何logic中:当不处于闲置状态时,请周期性地重新计算路线
我的运输代理在任何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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在运输机状态上的
中,更改
字段,您将转运蛋白参考为单位
不是agent
In the
on transporters state changed
field you refer to the transporter asunit
notagent