Sysplorer如何频繁触发when?
技术分享
发布于 2025-10-16 23:56:46
查看 2过去229天
Q:
when sample(0, 2e-5) and burst and omega_out_timestep > 1e-4 then
//when burst and omega_out_timestep > 1e-4 then
index = pre(index) + 1;
end when;
当前注释的部分:当满足条件,使index加一,但是实际上when当第一次满足条件才会触发。
使用sample(0, 2e-5)可以保证每次都会触发when的条件判断,有没有什么其他的更好的办法吗?
A:
参考下图所建模型,就可以一直触发
when booleanPulse.y then
//when burst and omega_out_timestep > 1e-4 then
index = pre(index) + 1;
end when;

所属专栏:Modelica语言
产品信息:Sysplorer系统建模仿真环境