Modelica学习

Annotation Choices for Suggested Redeclarations and Modifications

Replaceable model

sample(start,interval)

edge(b) Is expanded into “(b and not pre(b))” for Boolean variable b. 

 

A parameter variable is constant during simulation. This prefix gives the library designer the possibility to
express that the physical equations in a library are only valid if some of the used components are constant during
simulation. The same also holds for discrete-time and constant variables. Additionally, the parameter prefix
allows a convenient graphical user interface in an experiment environment, to support quick changes of the most
important constants of a compiled model. In combination with an if-clause, a parameter prefix allows to remove
parts of a model before the symbolic processing of a model takes place in order to avoid variable causalities in
the model (similar to #ifdef in C). Class parameters can be sometimes used as an alternative. Example:
model Inertia
parameter Boolean state = true;
...
equation
J*a = t1 – t2;
if state then // code which is removed during symbolic
der(v) = a; // processing, if state=false
der(r) = v;
end if;
end Inertia;

 

Condition of conditional components (if any).

 

转载于:https://www.cnblogs.com/jufu/p/5569328.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值