全球FlexSim系统仿真中文论坛

标题: 运行时而报错 [打印本页]

作者: LIUQIAN    时间: 2018-11-22 17:05
标题: 运行时而报错
模型运行时,有时会报如下错误,重置后又可以运行成功。请老师帮助解答,模型如下[attach]4610[/attach]

[attach]4611[/attach]

作者: 慧娴亚伦    时间: 2018-11-22 17:30
不要用sendmessage,改用senddelaymessage,延迟时间设置为0
作者: LIUQIAN    时间: 2018-11-22 17:45
慧娴亚伦 发表于 2018-11-22 17:30
不要用sendmessage,改用senddelaymessage,延迟时间设置为0

老师,改为senddelaymessage之后再运行,又会有如下错误。这个是什么原因呢file:///C:/Users/77476/Desktop/%E6%8A%A5%E9%94%992.png
作者: LIUQIAN    时间: 2018-11-22 17:45
LIUQIAN 发表于 2018-11-22 17:45
老师,改为senddelaymessage之后再运行,又会有如下错误。这个是什么原因呢

time: 6.000000 exception: Exception caught in Executive::tick(). Throwing.
time: 6.000000 exception: int runthemessageloop() #4
exception: core->theexecutive.tick();
time: 6.000000 exception: int runthemessageloop() #6
time: 6.000000 exception: Exception caught in TreeNode::receivemessage()
time: 6.000000 exception: Exception caught in Executive::processeventinlist(). Throwing.
time: 6.000000 exception: Exception caught in Executive::steptotime(). Throwing.
time: 6.000000 exception: Exception caught in Executive::tick(). Throwing.
time: 6.000000 exception: int runthemessageloop() #4
exception: core->theexecutive.tick();
time: 6.000000 exception: int runthemessageloop() #6
作者: 慧娴亚伦    时间: 2018-11-23 15:46
改完也要把模型附上呀。
作者: LIUQIAN    时间: 2018-11-23 16:28
慧娴亚伦 发表于 2018-11-23 15:46
改完也要把模型附上呀。

我就按照您得指导,把合成器进入触发得sendmessage改为了senddelayedmessage,模型如下。老师能不能讲一下这是什么原因,这个问题重置一下就没问题了,但是在实验器统计结果得时候会有影响。[attach]4614[/attach]

作者: 慧娴亚伦    时间: 2018-11-25 10:37
别用全局变量来引用那些rack。
rack会在运行过程中被装载,然后在重置触发里面再释放,所以在rack被装载之后重置模型的第一次运行会导致全局变量的引用错误。再重置之后,由于rack没有再被装载,因此又可以正常运行。
作者: LIUQIAN    时间: 2018-11-26 15:59
慧娴亚伦 发表于 2018-11-25 10:37
别用全局变量来引用那些rack。
rack会在运行过程中被装载,然后在重置触发里面再释放,所以在rack被装载之 ...

谢谢老师解答
作者: wangZ2521    时间: 2018-11-28 15:04
谢谢老师耐心解答




欢迎光临 全球FlexSim系统仿真中文论坛 (http://www.flexsimasia.com/) Powered by Discuz! X3.3