专栏
标签
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;

image.png

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

全部回答

暂无数据
暂无数据
用户
和原帖交流更多问题细节吧,去
我要发帖 我要发帖
资料中心 资料中心
查看更多>
热门帖子 热门帖子
主要贡献者 主要贡献者
过去7天