Anylogic错误:root.arrival:尝试在过去安排事件。负超时:NaN

huangapple go评论93阅读模式
英文:

Anylogic Error : root.arrival: Trying to schedule an event in the past. Negative timeout: NaN

问题

我有一个连接到MQTT网络的AnyLogic模型。当它接收到一些消息(有时根本没有消息)时,它会抛出这个错误并停止模型。

root.arrival: 尝试在过去安排事件。负超时:NaN
java.lang.RuntimeException: root.arrival: 尝试在过去安排事件。负超时:NaN
        at com.anylogic.engine.Engine.error(Unknown Source)
        at com.anylogic.engine.EventOriginator.d(Unknown Source)
        at com.anylogic.engine.EventTimeout.restartTo(Unknown Source)
        at com.anylogic.engine.jk$d.a(Unknown Source)
        at com.anylogic.engine.jk$d.execute(Unknown Source)
        at com.anylogic.engine.Engine.j(Unknown Source)
        at com.anylogic.engine.Engine.le(Unknown Source)
        at com.anylogic.engine.Engine.d(Unknown Source)
        at com.anylogic.engine.Engine$l.run(Unknown Source)

我已经检查了所有变量,确保它们不为null或负值,它们似乎都没有问题。这个错误似乎是随机的,因为它可以在运行时的开始、结束或中间出现。我不指望在这里得到明确的解决方案。但如果我知道在哪里查找负值,那将非常有帮助。

提前感谢您。

英文:

I have an anylogic model that connects to an MQTT network. When it receives some messages (sometimes no messages at all) it throws this error and stops the model.

root.arrival: Trying to schedule an event in the past. Negative timeout: NaN
java.lang.RuntimeException: root.arrival: Trying to schedule an event in the past. Negative timeout: NaN
        at com.anylogic.engine.Engine.error(Unknown Source)
        at com.anylogic.engine.EventOriginator.d(Unknown Source)
        at com.anylogic.engine.EventTimeout.restartTo(Unknown Source)
        at com.anylogic.engine.jk$d.a(Unknown Source)
        at com.anylogic.engine.jk$d.execute(Unknown Source)
        at com.anylogic.engine.Engine.j(Unknown Source)
        at com.anylogic.engine.Engine.le(Unknown Source)
        at com.anylogic.engine.Engine.d(Unknown Source)
        at com.anylogic.engine.Engine$l.run(Unknown Source)

I've already checked all the variables for null or negative values and they seem to be in the clear. This error seems random since it can appear at the beginning, the end or the middle of the runtime. I'm not expecting a clear solution for the issue here. But if I can know where to look for negative values that'll be great.

Thank you in advance.

答案1

得分: 1

Your Source block arrival is set up in a way that it tries to create agents "in the past", likely due to how you set the model start time or what data it is fed from. If the model starts in 2023 but your data wants to create agents in 2021, this is what you get.

Change the data or the setup Anylogic错误:root.arrival:尝试在过去安排事件。负超时:NaN

英文:

Your Source block arrival is set up in a way that it tries to create agents "in the past", likely due to how you set the model start time or what data it is fed from. If the model starts in 2023 but your data wants to create agents in 2021, this is what you get.

Change the data or the setup Anylogic错误:root.arrival:尝试在过去安排事件。负超时:NaN

huangapple
  • 本文由 发表于 2023年5月26日 00:24:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76334427.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定