Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用“基于时间的实体生成器”,我需要控制实体的生成。例如,如果 Simulation Clock < 100 停止生成,否则设置 interarrival time = 1。
我试过这个:
if SimClk < 100 IntARR = inf; else IntARR = 1; end
当到达间隔时间设置为 Inf 时,它不起作用,它停止生成并且无法返回。
有什么帮助吗?!
在您的示例中,您可以使用以下 Matlab 操作脚本:
persistent once; if isempty(once) dt=100; once=1; else dt=1; end
同时取消选中“在模拟开始时生成实体”选项。