From 0d4608f334ac2dbd70d0c3962d568f36bae97c40 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 10 Aug 2022 10:16:35 +0200 Subject: [PATCH] Removed ModelicaReference --- ModelicaReference/Resources/Images/acos.png | Bin 1017 -> 0 bytes ModelicaReference/Resources/Images/acosh.png | Bin 987 -> 0 bytes ModelicaReference/Resources/Images/asin.png | Bin 1135 -> 0 bytes ModelicaReference/Resources/Images/asinh.png | Bin 1255 -> 0 bytes ModelicaReference/Resources/Images/atan.png | Bin 859 -> 0 bytes ModelicaReference/Resources/Images/atan2.png | Bin 1054 -> 0 bytes ModelicaReference/Resources/Images/change.png | Bin 636 -> 0 bytes ModelicaReference/Resources/Images/cos.png | Bin 1267 -> 0 bytes ModelicaReference/Resources/Images/cosh.png | Bin 1239 -> 0 bytes ModelicaReference/Resources/Images/delay.png | Bin 1393 -> 0 bytes ModelicaReference/Resources/Images/edge.png | Bin 693 -> 0 bytes ModelicaReference/Resources/Images/exp.png | Bin 1065 -> 0 bytes .../Resources/Images/function.png | Bin 1328 -> 0 bytes ModelicaReference/Resources/Images/log.png | Bin 1153 -> 0 bytes ModelicaReference/Resources/Images/log10.png | Bin 1153 -> 0 bytes ModelicaReference/Resources/Images/pre.png | Bin 1366 -> 0 bytes ModelicaReference/Resources/Images/sample.png | Bin 587 -> 0 bytes ModelicaReference/Resources/Images/sin.png | Bin 903 -> 0 bytes ModelicaReference/Resources/Images/sinh.png | Bin 1116 -> 0 bytes ModelicaReference/Resources/Images/tan.png | Bin 963 -> 0 bytes ModelicaReference/Resources/Images/tanh.png | Bin 789 -> 0 bytes ModelicaReference/package.mo | 7395 ----------------- ModelicaReference/package.order | 22 - 23 files changed, 7417 deletions(-) delete mode 100644 ModelicaReference/Resources/Images/acos.png delete mode 100644 ModelicaReference/Resources/Images/acosh.png delete mode 100644 ModelicaReference/Resources/Images/asin.png delete mode 100644 ModelicaReference/Resources/Images/asinh.png delete mode 100644 ModelicaReference/Resources/Images/atan.png delete mode 100644 ModelicaReference/Resources/Images/atan2.png delete mode 100644 ModelicaReference/Resources/Images/change.png delete mode 100644 ModelicaReference/Resources/Images/cos.png delete mode 100644 ModelicaReference/Resources/Images/cosh.png delete mode 100644 ModelicaReference/Resources/Images/delay.png delete mode 100644 ModelicaReference/Resources/Images/edge.png delete mode 100644 ModelicaReference/Resources/Images/exp.png delete mode 100644 ModelicaReference/Resources/Images/function.png delete mode 100644 ModelicaReference/Resources/Images/log.png delete mode 100644 ModelicaReference/Resources/Images/log10.png delete mode 100644 ModelicaReference/Resources/Images/pre.png delete mode 100644 ModelicaReference/Resources/Images/sample.png delete mode 100644 ModelicaReference/Resources/Images/sin.png delete mode 100644 ModelicaReference/Resources/Images/sinh.png delete mode 100644 ModelicaReference/Resources/Images/tan.png delete mode 100644 ModelicaReference/Resources/Images/tanh.png delete mode 100644 ModelicaReference/package.mo delete mode 100644 ModelicaReference/package.order diff --git a/ModelicaReference/Resources/Images/acos.png b/ModelicaReference/Resources/Images/acos.png deleted file mode 100644 index 569032140055f917bc4196dceac538794ec79814..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1017 zcmeAS@N?(olHy`uVBq!ia0vp^zZe)88911MthGL~j{qs}0G|-o|Ns9pF#L~?k6*B0 z!HE+m9zJ~7-`{`r>eX-GzP)+#X8rp0&!0cPaN+-~S^u|h-+ue{?X_#y9yoB|=HV!!wQ zmnfPo`OtRY*P*z8m3b`1-xVjY*zQc-d~=`pw1=+)itaC0nH^XA#rM8?<*Q!Dd+*Lc|Z9tSMpb7Y5p#GlTW9c*Uex0 zC04)i68~*G%_ld0ZgKOBuexdZWXeNr<+*BmqZ8MMgie~$ALq$sRV4MRWOekV{_V@- z*?vCz;<^4;NY(z*Kd;tp;V%2T`Q@AsW>(*KP4Q#eHP`N?WP{$q=~Lw-YcHwqUGqia z{(f=e?-w`L0@dF* z`sEXtQ(N-J&Z~ z_xHtmfW*Zw9R%7{Tk^rq>Ko81?w1dM#yDA3z?ADP0V$_cc&T}Xye;cJxBA1{FCXMm z)q;MIr$C;Shj^A`HZU-^UrJt*EPnYkEM&nU@+PdR2NW+qLBRvzK%xK|V?d6st^Bh8 zs}f&)HT>n>>u|iz_V2p3g~{#r&VJhW-u_jdO4YjM*UuLpTXcQvmtrHSz3Y~wn^gVt zp8usPHvkyjJD0qlJZHh>7hjfMf3ih(ZXf%vb^o_Wy{wF=+U@4C+;hL{K*9!z!g)9Co@Dn3owm MUHx3vIVCg!0O|fAwg3PC diff --git a/ModelicaReference/Resources/Images/acosh.png b/ModelicaReference/Resources/Images/acosh.png deleted file mode 100644 index fd6c830dc688ac0112805dcc9a8e7d236b9e8157..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 987 zcmeAS@N?(olHy`uVBq!ia0vp^e}VWX2Q!eoU3K^dkTMJK332`Z|33r6|M>X$_3PI! zSg_#4i4*<({SO~Lyn6NOw{PE`KYzY``}Q|)-mG1__V(@DA3uIPaNxlC^XGSb-87$p zfjPm`#WAEJ?(MbPUAG+s*dG47ecV?4{r^plvs;rQKOEC&^tj5ptw)b#e!9)OT^GMx zaMx?wwc^!E`PHv3sW1I^$v^b#Vtt{S`e*XL7rwgl^h*5i^u1rZ+5XS`f8qI4=?Sl1 zUzxtVZriK*zn9)_{$KU(EC2d`m;SywSa19N*V)zk-xZzl{iOcud9nSwi+u7nHFn}If_b;z~v2gd7@*A9AuYJAH z`pf!F&X4Bhd)L)Ya_(}mwtp{sYWedO#;@#OY;~L8vb^wSSM6N8ufM;3?3A9pVf|I{ z8@(?!YJa_P{q@F8KR^GM|NP%$|BcOpzpHFRF5EmZEq=YbRM~&CH?O}&uHy3d-=zC{ zU%KrZJKM6wb~jS1-niM8%#_>h-+y=c@po5}%U^D^{>u3NQu22Y<3?=N8^78EyT9D1 z1u|^QrpxUPmj9q)rT;c4jl4M2yOY-rU&rfTiqXwZbn)y=hp{& ze_4PH1ap7}r`2|TEqv|0ray@P-WvUlc6mU4;H!hPzp7q4z81*$vaQ&>@5rwmFh06G zh!55u9iLRY=GR5{b^6QezD#_5dUbzHyx-p!%Gaj{+y6T8_37n)u<&wuu$aF+SZQb7 zm&Nk76^$V3?~8-^{`b$iE)ak14wMBd=MVk5!->DH`d9M&RdVOIfAQQD{CDegKl3l| z*SraiUw_2f&~js zoH+6D;luv^{%_yDtzWeZ{ypFe-|=FRr)+xPDM|M21e+qZ9j{P=P0+O@vE|CcZS zf8oOa0|ySAKYxDKtp7DN|1&cFA3y$IbbaMQ1_tJvo-U3d6>)FxoXq=dA;9qP-M4AA zKetET`|nua-|VSqFzIy9ji#>B1rGP^E@U`~A3cz^Irv>g&Muy=iW9p#ES}suYWKw1 z<p3=PSbb#miz9|@qPBs=DPG+pMUFo{NB@dVGEA!UHYnaZSmSSv)TT*<|QpY z);p_+`AyfV?ukba?3?kL+bruA!|&YI-l)TRb*fFfeal+A|9-XEEqPbMZ1%Ow>lRLy z`Fic}1=UK$LvN@TT&tHz()4G0ftw-gNpDAB0r3?s-$R zF>v;c6;t0BY&w0^EjMX#*rvlL^u(pNcJ|&n;-;H2y$3|EO=<7!jXI$x2^9ybGus%b zeKRp>vDhZ>V<3G%{_7j9w+_0kO>QpRKpI;dmxu9hBD)7zm zSLx0F?%$Ycv#xu2R{CPOV|Bl-ony1@`5RGhwmFbL<@)y*sm*dH>$<|sUTu7nk=iV_ zF;M@oo$HaiuWl?5PkdigA0}_V;dPL@^jD`hxBo2vyX(e+=}E^w>-GPBH_^v9UU4D1zIkqxut3|zcEl*qB`1?Yw?ETiO2j97G-=JJ| zRrXC?3A^>Kt7>K$g1|uJjXL6X_vky*>^NV|A$q zMW@-}v`LHaS{y^w-jz*s{UqjbD3IoXWHhQZ_HJ*MS0@fI$D4w2!p4q KpUXO@geCwjm0TeJ diff --git a/ModelicaReference/Resources/Images/asinh.png b/ModelicaReference/Resources/Images/asinh.png deleted file mode 100644 index f7d6b977be30a55af49b32e4e5a9df64706fa4d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1255 zcmZvceN0nl6vofnTUw}8fr$aCe28Dc1VJWa1EC_QWuTo_QU9Pfi!!E&;1UI_^ny4v z>i}_^42@is30&mUO{$D>fgzv?A0sSahieCeQ7Ycb*G9p+%a&~+Gx_B`Po8s5p7Ymx zNxplhSmYuC0I_UW*j@m{Nw8RB+*_0V@Exw;@<>HE%d!BhQmHI1W*LShNwU74jf-P7 z8a675ZEI^Y7z{Z%IhB=_y}iBD)6=7)tV+f9_p>7-BVAo=ZEdZ|WGX0N%gf7Ynr>}n z&1SPsr!yGX&d$!78g^2(mkZ~I%EGoOl4G9twO0)8SkCXh`0l4CUC-X1XVo80Qu>h< zT}1kmn!E=dwMp_dR=z#1$3wh5Ha^nV$E52X%B-~IXY|Jhh9{$a1(wvzy45T6H(w2% zJ!fNN-I;@DLhMf=ZK-Z%cDXH6`kf+tinVMxsJx95%F;5Y)GG0hGjT-L(<`>jXhqE6 zY#E;Wlbvl<<^1;d)sEsP0&Q^$<#tlcv!m6|j4iLIbwt{Qq>Tp9|N4qLE|AOkxu2}Z z<1>}3h$C3rQFzqe@IrZ}p{x*k$KN0+ck*#6P^UVJ%DzyoMmy5h&}}(x*_6C!tl?Y0m85i-S9D1vIZ;3#O%am7^X#B$;5KScmUzBRO(Nd z;Rxom^lvK&`nl;1h6QUG%?HZp0v*7#7C+0P}*nmhFKshH0J$`D0ptI;*nb^g^H~?a8E??E~tt8$nyJE~~0a zNpgLib(NM*Fh4(xT#X|M-aJzW<^46UPe|vS8yHBmCk9SUCzH-Z_4h2M5t3HqvAv)J zYM4)o@zC>4!GyDoXcWuuBIEh_m&qb~JQR!OIq|<4zk6dqY26k8SNG7ydl%D$aob)- zOGO!Kp>`?sL>>VAM*lKeaU~Xp3+iDass?F3e|&uWf&~lC zpFjWb;ls6S*IvDPwZFgr+qZAepFclv;K26n+uyu-^YP=y_3PK)zJ2?|i4%MU=c*YP zm>zh#IEGZjy}fn1>#hS2+r#}OdBy&p{^?5}D!6bc^68OzFP&JAz2@J#)nIOYp4P@S z)$4-yhp%6CY426}?Y7n-xdj0F_xxJg_yjp3;vSIC;plN4!+*K?sJEiy3q9^*+*1W)zQq{dd-$L>u z)$HUGxL`i5CpV@8|ETS?tyJ$}6=hW}BmBiiwv>_H^HCIuqB#nn}JDI(cj9 zWYg2i+0z5q1ZJ*@b&_=G*;KYOg~9L?gVI!0FUcdC%@L^+Pi;7*;3s)Rt2?AElx^cF zrKyQi9oKB~NUeZKg+(qg+5_ayNS&6Id*g(_=|@u(r=_lSYl{$D&a+V`+tldDrZrcA z;z}Nh(vnG$*RoPNQX^MSRGj8I!O09L`R4WsHxSJcbONNwQCT=;+Q#*3UU8@1-27{D zc-Ye^wSs-kDaRix{61~9eof)l@__c`b8i|h{CiG;{glvBozB2%iyuow_VH(xM+!CO zdwbV%7$_A`aSMI(E<`!&6VJPJmU zyGx81I(*%B`)o>EnQ}JhLpmpE7MTI$b-Vx2GbdJnXQ}CWrhQhW?z(C&V&RUYi(2D}Ofk b-Os2#PvDAV@{e|4Zej3r^>bP0l+XkKKFgd< diff --git a/ModelicaReference/Resources/Images/atan2.png b/ModelicaReference/Resources/Images/atan2.png deleted file mode 100644 index b2f8f29e0e9a8481fc33a3c8b12fb57247b74a7d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1054 zcmV+(1mXLMP)+uP~g zh3EhP1EWbqK~#8N?cLi>D@hPU(TKFUUuNe2e|CXukj~{p(T+co~ z`2h%j@QaObkLS&ANch?Q58)oqo8OV}JD)^^KRo&s!up>7%KmZ5GL zaMpP6ihIZ`b~1~d%wi|A*vSAk0$v0ATX4N@+@{0Pe;Stx$FLmIh zs*5)8mC=EhR0Dj;-|r-UiYxBpYm?Hg@H)758+|*x7S?XR$Kzg8d;O|c{_>gE4{Ap^ zp@uh{R>No3@PF2?kJ~SRH@x8uZ+OFNyOrUUDDY8u{LCUJv&hK|^6l_}%z(!%4m@fU zyut>-qej7_2En5y!NaD(qsG9)#=$FY3_NTcJZua+Y!p0hARNJ#40X#;w+wa5P`3`o+(hT@~d(DA|?m1O?W|~%6`*bX}Y9d@y-LeF{>ZK`g)Lcl|u(^<^=U3Vp zu47a?!*wXPELtTPymwNdaP0v1@$P%=0UvxhDqeXf#X2BdKL-y?-ULsC7Y!cwH27pU z5?=G+p2IFpgim$vC&*H|t#}n+TC&1@82A&$;a9Rzg)o^AFzrBWcUDtL0 Y1BsU?VQ5#;o&W#<07*qoM6N<$f~zk%pqZUOfow#weMP^#uUv9}25E+jDFM9sqw=XWe#%*q4@kB$e}`|q!7VP;t(-slo-CR-AB z*Kd9EuS3sIWZtST)?zw&MrcCyQzW}V%!xabwx$2?>$`Ra+4vPqCzU2}xO20loGiKU z>gK${?Sa=nmRzWC_ggHxbIrYpr!(C3xXV)FI6PLfGopabGt1lS*R^kr6~A9lvPG>8 zDGXe`Nlm!-sJ;;>@WX)eDhc3+Fuh+#4#1EmtjExDn*}eT|W9? zSADIlwZ6G93rotKf2SL3<}NwYJN>mZQ&o5R_3qzyXK($Obn*QZrV0P7Jhu2&E2?bf sSh6*a>5_xY+PiWcx%1f{S$NhnPWhO>X06y;J5b{BboFyt=akR{09s-HlmGw# diff --git a/ModelicaReference/Resources/Images/cos.png b/ModelicaReference/Resources/Images/cos.png deleted file mode 100644 index 4e1fb26b956ba4e6dd0a434a84af8a16facf7dc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1267 zcmV540000sP)t-s|Ns90 z0RLZKU!b6%$jHc#kB{Nu;r90S)z#JK=jXS#x9sfft*x!w+uQN+@xZ{qudlDq&(B=z zn0x>L1b9hAK~#8N?c2+0V@VJO;fR!c@5{{lzwFTT&~kHDwp=GGt1>rQ8b0DLj6i(o z`ud*Ya{Jimg7^0tFTi75cSd-OSKwzn?qv{vD_r6U9)hhAp5tGB#JAlH{#JO3hhGqT zBXEt!*Ld3;;Vr&JY-ezM8sq2o2#*opw=+0Cjqzi9gy*=hJHp#TyliO@@t)<%<_MR# zJnw1{!A@r*U?U(N40cnHMgZ_=@c-?J&CSZP*p!Whb0(P zz3)vZuW(n*af95}fM5XyRlWiNbyEX^@(L<^6$0v(1_ad=lrKd zP)(r`z*7+1Cj^3$DR>fs+k`++F$Eg|H!A3wi z7r{oDG6l~^aEA~Gilxv9UsmD3d}XfY}Hx9Rfj-6wF6(ldeG(KyHUa5YRb8 z5J2?6wI2cqCm=ZQlOTwIr~~GZnt~ri5HJNHKZKjcXapMpopcSdG{OfAPD5};1P^K> z5zqK>G@D`5bF z$!o}e6F?^pfrG&A2rv-Agf%4m$C#ahavuWhjsTp1V8R*_zE8+aVSw@wghm*wU-X|gA_E8yuA_z7DI(7|>Kp6xZ0Uf!9M&MqAC*WmogiBoE<>4Fz=UfBN z@$0T36QfneDX2xdq@SqGsJthxq* z{1i~OM{pek9Kcr(!AAIW3a*7<%@7E(Q*bo|(?iHdpb08rl2f}V6ibkkeGrCBUmg1g1i)58o^oy1ZfH~5kk@+TpqznArK^` z;06e$8{{LPbqokd7=*hZm~N1dfX-{+0pWCoe1kI)oYdgN5>RIxgPe(g>U0KhF2Yek zm7Nfd@vF*y2&kHyK|TWBE}1~}hCuwef0D022?^gku8lw=%y>tHMree-MredaXoN;+ dghuG=`wyb26%cxY?^*x=002ovPDHLkV1gSl6GZ?3 diff --git a/ModelicaReference/Resources/Images/cosh.png b/ModelicaReference/Resources/Images/cosh.png deleted file mode 100644 index 2e2e0188baa51c8aadfe5cde154b9a17ce7f6e2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1239 zcmXw(ZBP?e6owaZR8+nc4In|7pjAYe64BvOOVDIOsst7MsET1q3$#(NvZg?2p#lOD z7c7oC!a@jOepHI0V~R$^shuo>fn;?wjesf9?Am}b6A}|Xwo9>p?s?~)_qpf2KklvC zBjkH74O|LAkf$J#yN|9e2y$Dn#GO{J%D@0!()a96gec@%jFn`nM|gd znwn?Np4sj8q$G+YsiGpvVzF4Q*7xrzl}a@@NXcZBMnf44)WpPu(P-@H>1l6o&(5Zl zO3GxS1_lPMUZw8er#d^S&N%K<2wE5|;3lNz9~=9t_uRVJ<>jV4SlOTqtOy>aHrHFv zthn5NFY)*;2{FB9rBA(g=uS>Z?CBHI_^nM3-5agJJvy&Rf-hb0{t2?mEXf%$#+;1y zYZVzpAHEt9V*_K)C55jKwvMK2K9Oz^6yJE4$us9hfvE!*f7&v2m^*7%+=}9n2k-Ec zTz~YAFY6u3$&_#eu3`JZ7<2HQ)q(}D-i7NtN@n+zjUPHDHx|4|x3TKF>nn0ri$~h} zc#Z~j47eGDTEiDdop42V``qih@Y(5cA0SbLqYr-NK4>5m)xoudhrI}haULTL*6|oj zb0!gXKv^Ammu}Kaq#^Y2|2p)Pa`B6gzU`cG8+32pqo}~p#@u;6%_ix>S!4gPip3Zj zoISrk=jVL%m%iQ%*RGkLk+&CAZ3XA($>=VAa5NF{BHZxBfa*xeOESgK{$*n_KLov{3*h`v zuxa~94%6&}Yu(_x>Z-$xM&LyrHH2x^xGPDajmz! zSb_7shXc(sq)N@A`-=*SUCdm8++(Ckc-gy!>PtT9A|4(oRd1VNh@ce-5^;&+8ufbt z?8;aFiJ5F-$dLuluAP0uZWzwaVh@>6LK+7-ln!D#W%=+9v+zOZb1$JoOSt7P`#Fv& za!5eW^~tzaX0GokrL^59QO6wbe+n~-t_Uj}&6Y=fUQ<0&n+D@gN)MM9$rR^_Ek-gE zJI}~-gt)|5ok1X~0!1{$? diff --git a/ModelicaReference/Resources/Images/delay.png b/ModelicaReference/Resources/Images/delay.png deleted file mode 100644 index a28abec56f5515ecf7fb571e9274fa697fd0bc85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1393 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKN5-iL>k%pqZUOn$EEoaSoz(!ebk0+J2WWu7xs`_0NcH*1zud-6Y%EvpsNSOO;09)J3{ z+u;n?p=Gfw78`8&KdoHKbd#@yi*bcRA9Dm#Q@FEGw?l#IlL(egjJH4EP3QTU`m<-m_E8lXl*aDCn_2FG#?SRnx~$*d<{3ha0H zYyT$tv%sg}&i)rae>`EV?~W1VmYc35z%94kym$89rsHpYpV$c5tg|*zIQV#%Gcy+E zw-z>)ikR{YheMVs3mG||7jp7;SoV7Z`I&d-U1(tGf6d41@nOfi3k@yB9!|_c=N^Ar z$Y_XAcBV4Mi8<-qV<9PlV!7!T8fJXn(ZY6Q&hgaC4G|x98-v){PuRNR?o>zCLrVUw4y z{${Ow$HB+n)GiqaVEPB)3C$%yzdp3lL-7iR8;di5Zk}(WH=FIqA4kQTCcBz-92BdY zS&lG?T#^+M;12LG^KdxhsK^N>Z<;7PTQDJKLPJD@(>FHG4pxmN)^VJc%N#+f*SF+c zR$%0M2@ItMr(KV?PDmC~aZtPqv_HV3e2>JYL@p4wkg-LlDowZO)77iFGd??O9pn$H zp0uO9s_)1P1y)`U3k?<5Td8M(76Job0~imI@=H_{9yg1aC>UCKI5G?Iad~Ed9R!s( zWN%dgy9yZAG9r^MG}Hi%n9Y*1=R{^eLytD&zb2NH7|st9Kid`eKLB zgS-=Lo8)&UFdAjsH$67-U%|5Dqh*t@(L$jITpaf!eAlv6T>gAwhmZra(K?n3AgfIj z9(ytHq6jH~T;sq5RDtFaSg_|@S$k~(15nYHd@Sxo72WxO3znVroxt1ez<1~S^46XG>yrv+5bXx>-0c+<0jwsL=Fu^>bP0l+XkKezzyc diff --git a/ModelicaReference/Resources/Images/edge.png b/ModelicaReference/Resources/Images/edge.png deleted file mode 100644 index 4c420a547cedc98282aaf4630d64c62a1325df94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcmeAS@N?(olHy`uVBq!ia0y~yV4MKN5-iL>k%pqZUO={XaDiEswKIogNOF`*l?vo%QAjEna?o!ngOkboIlZ>0h6pZ~t#o?#@jM z6ife45DGjUvgn=6rAgdO*ubR6?r(UGbLsXsH8fn=>pW|l%aPZgi{j?KKP~m?P2U{3 z&HX-}3W5_EE=^*=rkyG1_L_I=6ql-5hOOY8l#qEfCb0^6DlCnNQc%cFD?Q(TzCT&L{ol&G{mRSZ+@I~XHu`R5 zRBpA2pW}py6fi8XfF-d4dx|}FD^zH3fWl=(q*aiS!>tP+A9X%B{CcnDnz{$Ml1DB{ zr90<1A3yB4C%dr$3wZKVaJS#ndXU_dj`h#IcP-y_e0OogU(xrR>rLh5A07KMO$UqX z1q3FTt=?ViAzdiT#T2yJK`D#PqiOMWq55;L`sRsl-ZeMv+UxV?^7r?}$Oo14XKvnQ z-M%HI`OD`$MGD)Ml?0`yua;(d6(V*ed-k8Sn>!*_%1>dLuuI73o!%#YMZxO!Ek&9N n!W~P$Zs0Afde?SCNy(nE()z4*}Q$iB}&A-#?=ZUIEGZj zy}fa>>$Zb{+r$6*mG{%)H|_hM+}7#Y6~V*BW1IK;%FY1sUB3l%JFm@Ly=~*4%?w+O~lz)D`RlVr`SLgoA>-zIVW9M1S-fgzab?NUXR`*_(&%d93(z^1M--q;* z#Ty(-}Gm#+Fi;XH1K=a-<8 zJHe9M7)tbjO7wT>GR*bHsl*1T#C)cn)ZQ0rms=MC%|xeM7mMFb*<}DU5=doySv1>6 zybb6EAk`aJGWq493*8`U5zqxju@WGM7{!`YUG!bn?WVu$WXVN@=@5e;CiKUZ1ioau z?7CFiM|^6YL2SsbgLnmW?ut#*)4H3mYeh-(%SD%XmvwuYPs`)>25JUMO##{&uuE6t zu0z$S%r8@tUp8IJb$rQoDcEoEav5*&DS6yp<`d=>N!dO%0V}xtLeu@y+#){Pryf;@ zEWb=38JsN!`|I=NI4dQ(!?(cAz2w+lLNShaA7OY+snKDqFSmx9--3`pK%Y zW^*qI-)q>{zdh{kMd5or>)xNfvF3{W-8_Z&|K;uO>QwED{8F;{h4S}a&MzhD_Ph&z z&v2S4S9`bQ|Jx^zx6S_jG3sTfU*e^wM<+*JQa+dE_hrUE71L$zC5>{Iug666XX4z>c|TsLSl=r7&gby_^&S7Yp6}ne zY}2g0RlEPgpR}@<+p?cO4BPC!AH?zezFXI3vdZs8FOxlY zE&sHqyh{1x+Xu1Rzbq5F{r%OndqJNJ_AL7gls)<7=7*dQ@3>whpEQXzK3{sV)*)&2 z^(fD0^E@v#i@(|$HmRE5_@!dGN4@D}o_}|Hcdeb9vVB9ldTf>E!SK+l`VN28ckg0f SbrYEP89ZJ6T-G@yGywon3p0QK diff --git a/ModelicaReference/Resources/Images/function.png b/ModelicaReference/Resources/Images/function.png deleted file mode 100644 index d55e43cb6ae5c619c6c7a5d2b947b9f8437f171b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1328 zcmV-01<(44P)CyV0000CP)t-s|NsBM zz`y_i00030+wwLv000EvNkl5uh2_xT`)cMF>)O86lyyU(94|r3WD9x-vjQVAuRRvnzZmZZu z>H{G4YMB?|oDm|3Ac6=Yh#-OpB1o}%7ne_Q-L9WA68if9(?zcjfT+rz31TXjA8D%Q zOb}O@{D`eoG$IJ0qT@mY(WuDgMieR>7a~Z53eC|XS4%AV+(=!buU{PEP{Hhn#IK1( z1(jeV8IeWYhWq~Ux{2Cwhmfk)MjM37kMa8M#^leQu;K zQJf7@9uZ<0QF|fvVUVc9=X-A4>~;9OS{`5|$U0qo_?#QzyexzmfzFA55jsgk5JB{a z*nEf@OQ%Kz5yXs$%ZD^0(&R$~5hUN?^FL$jeZIqIJB~yppRW9fAc7D^giaA5H;c4M zkhYye=z~jvII=T{hDm^sg_}VPbOJ;J4I_F3v5Yhz`+P(Jh7mO)03&cf0>l7n2C;y9 zKH>m9jgSS*o=7_)umH^?ES$FGkwd#v=yphycJO;$30{>4pqh+88X9w9q`Mfk(Wh0TD#BMn!XKn#4Ej#;3C^We-z!mTex z+#0c5WsMLv5b{WaLF@nqI}e*Vqy@+_VgS5~L-ZPPjA($|G~xvfM)Vp17z`p@7}Nn| z8Sypd5Io?45s-(5s0qX}V#lW)*O)`}XN-siOdP@+0Y>Pvjo(N(;3Fe?ji^lo7O033 z`~sN$b}I&S#|TXz;JgLgeu##?j6~j8vil+A9!A6l5e-iF&|*IXtz`rVBWgsn+ZO@0 zkY)>M7)f|o;DU%ri!?!`IYGo+0(J{gK;_aRDu~zY<6QqGlefWIy?&s|XkAL5%K77_YUny4f zSL*3{_2*MW>-5KiEuJ9cj`^2k1QA3KK?D&*5PrQnH&T}<&IT#Z2B~u+3x2&iapqsI z-e{G9Rvl>dJFW2R)wz+YWt|)092!9YK>$Gj!GV#Jh~#Ry=yw-y73hbUZmZ%pfYfDQ z@4yB6-F}GZR^Yb+fdr7R!$?fGc%+C!iX%hnq)1T)kOlf3@v mAhNhk`C%+pzuw|FBl!=my5+N`@)LOg00007ah|NHy(_t#_U+-r{}~zo zuU@_S{Q2|a$N%5F`G5QN?Qh<^xqbWgfddEDu3h`_?P3haFyEB=Hgog=YH>hdWfy3$#BZ`P2bvrzuy0_%bv^G_wnkbv!h-< z40dEZ|CQlEgmrRrvMuwENO$d~UmY7(Nk0fEFx#>I|A*amGX-m0cC0+Sx_K*OS!vBW z@%-lLze1n7U6|MP_43^Z5nm7YF0d7Sy?yt=+O-LJABtA6t242Bq_XEXhpv5hmP5ow z>1Cb+!xuA!6a^;M=}8Qm6a&c*o z)p6jO1JgP-r46RYQu)lB5@0EoZ6GOu#F{UW`iA%UEq$V z8(5|>U*9V|C+)@uL568E>by6mA2d1Kw7sIYTbS*|$%Lpxg?o=4Bwa9?P$ea?LSK4= zJ#%ZhWYBrDO;s;;sr|lH>9FYe{e#EfAA0+wyir!#A=iTGz=^X<7!y9kM(qFZzh|rA zk0<*Qk{VXZi8H@fd*A!!+=D-V58mN8rdzo^)0}CSd0GC3r_s?4(u|S}Y;4te*AHAi z@b`)vgBTn0eQ~9;ZV%pMJ#$yOnZu%Icz`Fm`1TzJJ<}WKeI9lBpUwT@)a-ulbizs7 ze{&g6hKCmAvHZWn@c6*$NXeWX`DRSwQXldtxbh}POiqKP z@0S}Y&~a7bfl5*LRUqtP1T(JF#wXVQ7CX@BbLdq$%M69t=(>KYipaCnYnilcXf5m&CTg_czk@E zrsky$8V1C&tC5pL%~@ugm-6Ft76WDoJPCI2s(DXo*gWduZ*VB zstFF|H66|ti;jC5yyk;eLZ3AbKSWC(h=!> zHXJFkg+Tz~38Jk0h3Q--dOa_}fFQKgzps8z}@?OU5T&s?7k zB(IyihOl?{^Tjl(g&?zvU0_#h9~0ii-eaYuUh4g5#Z-XMRh>OD)@T~Bng=BEP%C`` zEE8uSs@(^`3l6;W0N@77-ra&jOr2`sV(qILtK)dLw>i+K}$D@(-K;_@v= z^`I-zpaZSmAizl7$gv$>cT!(wC1Xv1APff9d_F z#;IXfBdv8Vj&%6rL3wp*2vy#b|GIi5f{3ylb2x8sBmL@!Av;6qKpYYXPYRg9up#xU zjDLYfuws6kXONEP0p@1PPCZ-GYdSs5JsUAlYnCu}DIN3Kf-DM35qcf`d?n4I8qS zDvUVjI0zV~Q+yN^$BM0DNK;Bhfr`*7@)kspf>A0yLK>!jJN zsO+5+J(2r7*EnhhJ|Fh0>X=|6_gEj5?$rNQWxkXgf4?U>>UrIh;|XC67D69i`=)-$ z`*tgP~<&K;8#Fn8aCV6Q)aIVRuc6BkLM}_u$y#|8f-JJ(#weiVO zbR`q!>#GwdlUR0V{l6X9@Yo&b8#TQjQ*qfNa<`Y)C&ta!EAJfp(hi7ijg3rkP(pG5 zjdOQ{0)Y`_t^AMl9&A@Cc`R}}XKU@oAp_IfCLi7!`MaX$^|}Dl551clp{AarHxtsH zqz3!%dy|{$x%@Abn(^x@P*e`-e5EzR9lp3AueeBy)w5%}wnVFq;-Q*-VE2+PGJW;2 zPSoHVO&X_zqSdmCMXOPxt6?)x_S|5}QjjWNus;Bd6ERF3j~d2Q>mr;`BMWxYj;;h{ zgkPJ-bE=E)jeA_WF`Q?7Eo#p3ym`%jbY@jXis#L7Wt(QohYG}I zn$6PpIiGGD!plr(2_Djsitq_~4Ct6LyE!lCi3nFn=ZNs7|B_+Ao8ZD({76?yi^?1r zr^vX4k1C#mEGGH35S#;D+RJIki%c+jm_ClRp8?nMfgDjDLUIeiGcdZ7uCRxv zIoKF+VxICg(21LGgfM>O>-?Gnr&+4Tz=9fYVRgRyqT_ ztEmUGIhIaSY09AdlDKzk%PjqJvUp}OFQe~S@<>I6cbO>w4h&-4$*=EUobNYGRE5(f z>@F#wJUQI@ow zfM3{R?OW*666w?`3H$Njo$X-Ihsp)c0or4e6Xov;-?v)4zhG<(gnRy^=ch520P*^S zHJM)l!y#mQ-vK2^a@IAVEUbx4Ux>Wof}@OqEaU}5<5d^H78q+%Tj`Km$t#q`vt6X& z@bBp*rHSN}19gg_v%%W^z+nw2m599Nmb8o#EPzvY6|;|Y^LXrsAq!M-o8pKd)0wlM z;UW{WQAH{|cY$y-nKU|{EKfW#;X54 zW%Tfx3+qJ2H=!#;#x|I=?cYmM{d*tMZf=8cf1YZ`Xz=r=&b2>X3BPT5q&(MD&!8*k z4fd-&-0MUxUS|&saqBAg#A1%Zr;+~rlWW^-gunQ%zk4vd-VU8r0j(|=I2gQuUT#C; m&v#vT7fYs%dllkE8@}9>j*M@5 zHAVjI#pNu$+rMpj1lAG&)zZ1;)Q5OQ1qB5zhf8@A^2|N@98Yc7_UDeS<9eGXMtatY z3+^hEae$oiq;~C9Sxf6Vr3{RWnp_T3m<6I+8Z;O@x2>38vvTXdoPOiqCl9@5Ik(=* zdb;w2h5QaVN4>y)jrv*n$?aSp`#whphb|_8r_D+VPpjun4XYEIuCV^L_@jwR@1i?l z!Q#;M?GyhcF-3(>?)zM0bnccl-Fg#urY8B-`2-EZ`*l{ z8P`_qHu-!tQ*M%v_JlmSq}2k}GLv)|UMfwHY1DXdds z{pPuN)=3$&$HfHB(3ZFvpkjBF0YryO063W)zhS!zZy=kTh+=ZG!f1A~OOs=1t9B9# zU~>{=HaY1NOiuPS8lBv67AKFB$;t94nViItO>X+*CXnv(!A+2w)Na`$INhjr%k0_dNblI|0Q10{n%iCJn&`9BO=?#bE~s7hIa<1? zb4~L6uN`|GmM*DW69j2p=;X4}6)a2Zawk_*uH8>iy41-=reC+>Jac?P}DvjEybBS2j4=*qEs5@)(WpHfE`osKuaS=?ufyIjR# z&7}=j_Z@Azn?zu8^|}{1T7+gYxSkB)z|v!2f`C>(hS5funT?mx~Iwdg~lJ^mIkxHg53;T=!k*=Sbt?ic1Q| z{T!=YY8@1gHr!x$5x{UeaNBQf`wsnFQMuB%ta723Bb|$lODe~`94lS>b*FOF%SD}Q zzm|2b{W^ELtaQcW+WnB$#U@{!<35hnE-f9Dj{3N$a&7QI>#%f1<=Q8++JzpD^e#5( z>KuDrf)wi=EgXCWOX5yZjbq)D_mhzll{olXuu z-^I!5lEulvlg+W5q{YeOY;;K$Y;Y1|FuF;+!AYNFagqmF9myZPlSXWE5=byP5ykA{ z>SacUj??NZ^P!`%cDXzrI?S>?%R0dcoE?s4%*o*PekE2&et))GKOFrq0`NHWbNEl) dhr54$)NjRL=_8)$JHG$`002ovPDHLkV1n6_zY+id diff --git a/ModelicaReference/Resources/Images/sinh.png b/ModelicaReference/Resources/Images/sinh.png deleted file mode 100644 index 02ec6f90a5c40f7e74b5876bb01d4c7c3f1e4eae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1116 zcmZ9MeN0nV7{=dw+e>OM#PU@VG^3IQMT9aXvtvx|wwlqYP&eF%m9_>1oO6%~votK; zy11d!l`w$`8XI+Eprs6wwMGh8m{^0ZWl4dqWwhePM8KlbGKAh;z(w63&w1YSoRgeC zo?p&UY35rY+-NQUgh(>P?*JeOGy6C!X7&8m^*duq>DKJcG))803WY+a(^)JQtyXKd z+dUr7wrzBIIqmh*ckj~U-Bo4(`hssDT*pA zq#GJ&tJUi9&~#(&?%iEda|X5x<_Tl1~iX_#}33gxDjBO0za!R;y{_$JOiX z)hm7~eC5`yl3yIUT|Euyp)DCHIgQ^Yjn!YcU%INkNgh5vCP_{BhkJS;W;R=K3FP5v zc83tlMJDdumJOxiuKwD!LbBW6H9MJDynWh^yS?U?O=bA$fy{o?STOBo*(Cd0Yul*i z&qm*aGn)#bN_9gDl1E3*f}!RBCjs2Iu?c8f-G1VtK-c*%IkokW6NX(ZSc@PNN` zdEs~==OL9>2zFl5|HVUMnP>l#3nM1c^-%&wR1VxpdUC|Xf1rXQ#D&3!IJEL1FA*#` zOIbim?C30yK!~ro<@qv{ zG>KXi=Usj((X>OnWv0s%( z=ATO_Wfdq(=6a_uP>*JIYaCM#(eoptSWizDzIEdLjq8$MQVg||aXu^O=D@=cOx<}A z%)?Th-;m`#)i;tZEM~1nEBoWUtT?|FcPY9AR68}C*8P~3u`hDwX4cg~^2VemN7Z&@Jq6!FQdVZF?=a73s9`vR) zAFcg)jm~)F#o4Ycx{bMOZGA#nxB%@%Oknd0U*l!yNXFqqmF diff --git a/ModelicaReference/Resources/Images/tan.png b/ModelicaReference/Resources/Images/tan.png deleted file mode 100644 index 85f7a3a6785dfdccd64941b0ea6bb429d7f899d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 963 zcmeAS@N?(olHy`uVBq!ia0vp^AAtB52Q!ddAz*b3NSOurgt-3y|DS>3e|&uWf&~lK zuU~)S#EJg?{)Z1AUcGwt+qZAepFiKeefyg?Z`Q6|d;9k7j~_oCIB?+n`Sbr@Pf%rG zVD|8IaSW-5dwchG*JB5P=ERjn=jN2%|DQVjK*J0}ZpO)ayO;h~dwZugWci0!gLNgV zo9)!rE@;@ki+RVDldLr>%^B)n8Li)5*TrATe2!K6!`6R~R@{AhX=X&#Rgnkr?!TI*F8IwZocF-p{@`iuS{d26DHAR&&Oc<66cF=Z zIU~D|yTL=|Yl{{gzZ7+i{aM-pMs}G3AmO9*U>y^m#e)XsxT`^bO7)P&sqp1Jh+5pF=!A?pr9E z%jXbC<(dO3YYuE-JpGz++I1ctZ39kigWLn3q#8BXGe*QQZ`dK0P-%PMQB=dzuMFMU zKsD?-?>;}!s(r)lb1Iub>^hUqTILy#q#BNXW$=E@uxv;60dt1$XPb}4a@t+t+%eyr zZ(5n@kEnjXXtv;6UlSgD4tOrSjq924EzWyOr{DN_ko!$m!Bw>b>yLBAY;`nPTFbcO zehl*lrtUlZ$4+lxTJ83ML5C%*Ho?o9;ZAm30(+C|I>(Q@r7nH6Z#cME_Lsk0ZA|Rr zxDPijE@Hg1;w_tbg7g91TXi2!$X?~olgL%y;dq-}uEUhU8|YFozJyHO1DAj)Xxj%Tj_g~6p5i4g; zn0w3e|&uW`Sa%& zELiaE+qZ`gAFf@y_UhHE{r&yVpFclv;K26n+uyu-^YP=y_3PK)zJ2?|i4(>>vI`j) zm}YspIEGZjy}f(d?}?WH+ruB1Yad$`-}|51Kclx*>Iz3^6OWNuT-1E6)nZ#WL{8Z8 zOLj}L?6>satGf0c-^KnTdUjvgD)xrx03S@JP{ zu0_PNk6YiaJmBe<^Y?5{slRr$`0A&;w`@k{uXbH8n)~S654NS+x#c@E zZpP}}dbjD~ubmB>4lUSXbc(C_SH~GIW_4XhFYgJLgtnNh*^-gT85Gqtt!=89A+NS> zl2lmKmMtv0Q05V!f)$xvrxc{4&X_FOG9%L?)9~_(YZsE1DK0(gvpCwhd#2m=HZkMg zJYL;2sV1E*3z0>69mQ^el%8+`X=jPd04i@&;Lgo3yewd1;#dY0j5FP`Ftk=)H{PfE zNT{t=W={Fn142<{ zv(~aO=4MPwT4uN<52RXp*3uc792w4=MT~nFmTIR-Ilm4&W72kQ?Tk#Gwb6!`C8D;& z)OvN#Ja%E1s4=f5(5pc}x3{THIGNejG*wJj*U|g1SN9BH7($uTrYS6S_4Wn^>l7$! z(zMw|UfPS-7_6ALAz?}EK|3FB<{2OKpZ^q}zqs{J%(ZtyyieW*T`Ut@n^|eSKvdWK zm(1#KH|~FC&bZ^T;d+~yiLbP0l+XkK D(GPkw diff --git a/ModelicaReference/package.mo b/ModelicaReference/package.mo deleted file mode 100644 index 3b5804f9a3..0000000000 --- a/ModelicaReference/package.mo +++ /dev/null @@ -1,7395 +0,0 @@ -within ; -package ModelicaReference "Modelica Reference" -extends ModelicaReference.Icons.Information; - -class ModelicaGrammar "Modelica Grammar" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info="Modelica 3.4 Grammar - - -

Modelica 3.4 Grammar

-

This is the grammar of Modelica 3.4 in EBNF form. Each -non-terminal appearing on the right hand side of a production is a link to the -production for that non-terminal. This grammar is identical to that in the -Modelica 3.4 specification except for removal of some unnecessary -parentheses, grouping of some common terms, and reformatting for easier -readability. The following typographic conventions are used:

-
    -
  • Keywords are set in boldface.
  • -
  • Literals other than keywords are \"quoted-monospaced\" text.
  • -
  • Non-terminals are set in italics, with blue italics used for links.
  • -
  • EBNF meta-characters are green.
  • -
-
Stored Definition
-

stored_definition: -
        [ within [ name ] \";\" ] { [ final ] class_definition \";\" } -

-
Class Definition
-

class_definition: -
        [ encapsulated ] class_prefixes class_specifier -

-

class_prefixes: -
        [ partial ] -
        ( class | model | [ operator ] record | block | [ expandable ] connector -
          | type | package | [ pure | impure ] [ operator ] function | operator ) -

-

class_specifier: -
        long_class_specifier | short_class_specifier | der_class_specifier -

-

long_class_specifier: -
        IDENT string_comment composition end IDENT -
        | extends IDENT [ class_modification ] string_comment composition end IDENT -

-

short_class_specifier: -
        IDENT \"=\" base_prefix type_specifier [ array_subscripts ] [ class_modification ] comment -
        | IDENT \"=\" enumeration \"(\" ( [ enum_list ] | \":\" ) \")\" comment -

-

der_class_specifier: -
        IDENT \"=\" der \"(\" type_specifier \",\" IDENT { \",\" IDENT } \")\" comment -

-

base_prefix: -
        [ input | output ] -

-

enum_list: -
        enumeration_literal { \",\" enumeration_literal } -

-

enumeration_literal: -
        IDENT comment -

-

composition: -
        element_list -
        { public element_list | protected element_list | equation_section | algorithm_section } -
        [ external [ language_specification ] -
          [ external_function_call ] [ annotation_comment ] \";\" ] -
        [ annotation_comment \";\" ] -

-

language_specification: -
        STRING -

-

external_function_call: -
        [ component_reference \"=\" ] IDENT \"(\" [ expression_list ] \")\" -

-

element_list: -
        { element \";\" } -

-

element: -
        import_clause -
        | extends_clause -
        | [ redeclare ] [ final ] [ inner ] [ outer ] -
          ( class_definition -
            | component_clause -
            | replaceable ( class_definition | component_clause ) -
              [ constraining_clause comment ] ) -

-

import_clause: -
        import ( IDENT \"=\" name | name [ \".\" \"*\" | \".*\" | \"{\" import_list \"}\" ] ) comment -

-

import_list: -
        IDENT { \",\" IDENT } -

-
Extends
-

extends_clause: -
        extends type_specifier [ class_modification ] [ annotation_comment ] -

-

constraining_clause: -
        constrainedby type_specifier [ class_modification ] -

-
Component Clause
-

component_clause: -
        type_prefix type_specifier [ array_subscripts ] component_list -

-

type_prefix: -
        [ flow | stream ] [ discrete | parameter | constant ] [ input | output ] -

-

component_list: -
        component_declaration { \",\" component_declaration } -

-

component_declaration: -
        declaration [ condition_attribute ] comment -

-

condition_attribute: -
        if expression -

-

declaration: -
        IDENT [ array_subscripts ] [ modification ] -

-
Modification
-

modification: -
        class_modification [ \"=\" expression ] -
        | \"=\" expression -
        | \":=\" expression -

-

class_modification: -
        \"(\" [ argument_list ] \")\" -

-

argument_list: -
        argument { \",\" argument } -

-

argument: -
        element_modification_or_replaceable | element_redeclaration -

-

element_modification_or_replaceable: -
        [ each ] [ final ] ( element_modification | element_replaceable ) -

-

element_modification: -
        name [ modification ] string_comment -

-

element_redeclaration: -
        redeclare [ each ] [ final ] -
        ( short_class_definition | component_clause1 | element_replaceable ) -

-

element_replaceable: -
        replaceable ( short_class_definition | component_clause1 ) -
        [ constraining_clause ] -

-

component_clause1: -
        type_prefix type_specifier component_declaration1 -

-

component_declaration1: -
        declaration comment -

-

short_class_definition: -
        class_prefixes short_class_specifier -

-
Equation
-

equation_section: -
        [ initial ] equation { equation \";\" } -

-

algorithm_section: -
        [ initial ] algorithm { statement \";\" } -

-

equation: -
        ( simple_expression \"=\" expression -
        | if_equation -
        | for_equation -
        | connect_clause -
        | when_equation -
        | component_reference function_call_args ) comment -

-

statement: -
        ( component_reference ( \":=\" expression | function_call_args ) -
        | \"(\" output_expression_list \")\" \":=\" component_reference function_call_args -
        | break -
        | return -
        | if_statement -
        | for_statement -
        | while_statement -
        | when_statement ) comment -

-

if_equation: -
        if expression then { equation \";\" } -
        { elseif expression then { equation \";\" } } -
        [ else { equation \";\" } ] -
        end if -

-

if_statement: -
        if expression then { statement \";\" } -
        { elseif expression then { statement \";\" } } -
        [ else { statement \";\" } ] -
        end if -

-

for_equation: -
        for for_indices loop { equation \";\" } end for -

-

for_statement: -
        for for_indices loop { statement \";\" } end for -

-

for_indices: -
        for_index { \",\" for_index } -

-

for_index: -
        IDENT [ in expression ] -

-

while_statement: -
        while expression loop { statement \";\" } end while -

-

when_equation: -
        when expression then { equation \";\" } -
        { elsewhen expression then { equation \";\" } } -
        end when -

-

when_statement: -
        when expression then { statement \";\" } -
        { elsewhen expression then { statement \";\" } } -
        end when -

-

connect_clause: -
        connect \"(\" component_reference \",\" component_reference \")\" -

-
Expression
-

expression: -
        simple_expression -
        | if expression then expression -
          { elseif expression then expression } -
          else expression -

-

simple_expression: -
        logical_expression [ \":\" logical_expression [ \":\" logical_expression ] ] -

-

logical_expression: -
        logical_term { or logical_term } -

-

logical_term: -
        logical_factor { and logical_factor } -

-

logical_factor: -
        [ not ] relation -

-

relation: -
        arithmetic_expression [ relational_operator arithmetic_expression ] -

-

relational_operator: -
        \"<\" | \"<=\" | \">\" | \">=\" | \"==\" | \"<>\" -

-

arithmetic_expression: -
        [ add_operator ] term { add_operator term } -

-

add_operator: -
        \"+\" | \"-\" | \".+\" | \".-\" -

-

term: -
        factor { mul_operator factor } -

-

mul_operator: -
        \"*\" | \"/\" | \".*\" | \"./\" -

-

factor: -
        primary [ ( \"^\" | \".^\" ) primary ] -

-

primary: -
        UNSIGNED_NUMBER -
        | STRING -
        | false -
        | true -
        | component_reference -
        | ( component_reference | der | initial | pure ) function_call_args -
        | \"(\" output_expression_list \")\" -
        | \"[\" expression_list { \";\" expression_list } \"]\" -
        | \"{\" array_arguments \"}\" -
        | end -

-

type_specifier: -
        [ \".\" ] name -

-

name: -
        IDENT { \".\" IDENT } -

-

component_reference: -
        [ \".\" ] IDENT [ array_subscripts ] { \".\" IDENT [ array_subscripts ] } -

-

function_call_args: -
        \"(\" [ function_arguments ] \")\" -

-

function_arguments: -
        expression [ \",\" function_arguments_non_first | for for_indices ] -
        | function name \"(\" [ named_arguments ] \")\" [ \",\" function_arguments_non_first ] -
        | named_arguments -

-

function_arguments_non_first: -
        function_argument [ \",\" function_arguments_non_first ] -
        | named_arguments -

-

array_arguments: -
        expression [ \",\" array_arguments_non_first | for for_indices ] -

-

array_arguments_non_first: -
        expression [ \",\" array_arguments_non_first ] -

-

named_arguments: -
        named_argument [ \",\" named_arguments ] -

-

named_argument: -
        IDENT \"=\" function_argument -

-

function_argument: -
        function name \"(\" [ named_arguments ] \")\" -
        | expression -

-

output_expression_list: -
        [ expression ] { \",\" [ expression ] } -

-

expression_list: -
        expression { \",\" expression } -

-

array_subscripts: -
        \"[\" subscript { \",\" subscript } \"]\" -

-

subscript: -
        \":\" | expression -

-

comment: -
        string_comment [ annotation_comment ] -

-

string_comment: -
        [ STRING { \"+\" STRING } ] -

-

annotation_comment: -
        annotation class_modification -

-")); -end ModelicaGrammar; - -package Annotations "Annotations" - extends ModelicaReference.Icons.Information; - class absoluteValue "absoluteValue" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-A simple type or component of a simple type may have the annotation absoluteValue. -Note that this is only relevant for components of a few specific types. -

-

-If false, then the variable defines a relative quantity, and if true an absolute quantity. -

- -

Syntax

- -
-   annotation\"(\" absoluteValue \"=\" ( false | true ) \")
-
- -

Description

- -

-When converting between units (in the user-interface for plotting and entering parameters), the offset must be ignored, for a variable defined with annotation absoluteValue = false. -

- -

Example usage

-

-This annotation is used in the Modelica Standard Library for example in Modelica.Units.SI for the type definition TemperatureDifference. -

-")); - end absoluteValue; - - class choices "choices" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define graphical layout of choices in a parameter menu -

- -

Description

-

-A declaration can have an annotation choices containing modifiers on choice, where each of them indicates a suitable redeclaration or modifications of the element. -This is a hint for users of the model, and can also be used by the user interface to suggest reasonable redeclaration, where the string comments on the choice declaration can be used as textual explanations of the choices. The annotation is not restricted to replaceable elements but can also be applied to non-replaceable elements, enumeration types, and simple variables. -

-

-For a Boolean variable, a choices annotation may contain the definition checkBox = true, meaning to display a checkbox to input the values false or true in the graphical user interface. -

- -

Examples

-
-replaceable model MyResistor=Resistor
-  annotation(choices(
-              choice(redeclare MyResistor=lib2.Resistor(a={2}) \"...\"),
-              choice(redeclare MyResistor=lib2.Resistor2 \"...\")));
-
-replaceable Resistor Load(R=2) constrainedby TwoPin
-  annotation(choices(
-              choice(redeclare lib2.Resistor Load(a={2}) \"...\"),
-              choice(redeclare Capacitor Load(L=3) \"...\")));
-
-replaceable FrictionFunction a(func=exp) constrainedby Friction
-  annotation(choices(
-             choice(redeclare ConstantFriction a(c=1) \"...\"),
-             choice(redeclare TableFriction a(table=\"...\") \"...\"),
-             choice(redeclare FunctionFriction a(func=exp) \"...\"))));
-
-type KindOfController=Integer(min=1,max=3)
-   annotation(choices(
-                choice=1 \"P\",
-                choice=2 \"PI\",
-                choice=3 \"PID\"));
-
-model A
-  KindOfController x;
-end A;
-A a(x=3 \"PID\");
-
-

-It can also be applied to Boolean variables to define a check box: -

-
-  parameter Boolean useHeatPort=false annotation(choices(checkBox=true));
-
-")); - end choices; - - class choicesAllMatching "choicesAllMatching" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Automatically display a list of matching choices in a graphical parameter menu. -

- -

Description

-

-Choices menus of replaceable elements can be automatically constructed showing the names of all classes that are either directly or indirectly derived by inheritance from the constraining class of the declaration. -

-

-This can be recommended by having annotation choicesAllMatching = true; and disabled by having annotation choicesAllMatching = false;. -

- -

Examples

-
-replaceable package Medium = Modelica.Media.Water.ConstantPropertyLiquidWater
-                             constrainedby Modelica.Media.Interfaces.PartialMedium
-                             annotation (choicesAllMatching=true);
-
-")); - end choicesAllMatching; - - class dateModified "dateModified" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

UTC date and time of the latest change to the package in the following format (with one space between date and time):
-  YYYY-MM-DD hh:mm:ssZ

-

Syntax

-
-annotation"(" dateModified "=" STRING ")"
-
-

Description

-

-“dateModified” is the UTC date and time (according to ISO 8601) of the last modification of the package. -The intention is that a Modelica tool updates this annotation whenever the package or part of it was modified and is saved on persistent storage (like file or database system). -

-

Examples

-
-package Modelica
-  annotation(version      = "3.0.1",
-             versionDate  = "2008-04-10",
-             dateModified = "2009-02-15 16:33:14Z",
-             revisionId   = "c04e23a0d 2018-08-01 12:00:00 +0200");
-  ...
-  end Modelica;
-
-
Related annotations
- -")); - end dateModified; - - class defaultComponentName "defaultComponentName" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Default name when dragging component -

- -

Syntax

- -
   annotation\"(\" defaultComponentName \"=\" STRING \")\"
-
- -

Description

- -

-When creating a component of the given class, the recommended component name is the -given string. -

- -")); - end defaultComponentName; - - class defaultComponentPrefixes "defaultComponentPrefixes" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Default prefixes when dragging component -

- -

Examples

- -
annotation(defaultComponentPrefixes=\"inner\",
-           defaultComponentName=\"world\")
-
- -

Syntax

- -
   annotation\"(\" defaultComponentPrefixes \"=\" STRING \")\"
-
- -

Description

- -

-The following prefixes may be included in the string prefixes: inner, outer, replaceable, constant, parameter, discrete. In combination with defaultComponentName it can be used to make it easy for users to create inner components matching the outer declarations. -

- -")); - end defaultComponentPrefixes; - - class defaultConnectionStructurallyInconsistent - "defaultConnectionStructurallyInconsistent" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-A model or block definition may contain the annotation defaultConnectionStructurallyInconsistent. -

- -

Syntax

- -
-   annotation\"(\" defaultConnectionStructurallyInconsistent \"=\" ( false | true ) \")
-
- -

Description

- -

-If true, it is stated that a default connection will result in a structurally inconsistent model or block. -A \"default connection\" is constructed by instantiating the respective model or block and for every input u providing an equation 0=f(u), and for every (potential,flow) pair of the form (v,i), providing an equation of the form 0=f(v,i). -

- -

Example usage

-

-It is useful to check all models/blocks of a Modelica package in a simple way. One check is to default connect every model/block and to check whether the resulting class is structurally consistent (= a stronger requirement as \"balanced\"). -

-

-It is rarely needed; but can be used for InverseBlockConstraints, in order to prevent a wrong error message. -Additionally, when a user defined model is structurally inconsistent, a tool should try to pinpoint in which class the error is present. -This annotation avoids then to show a wrong error message. -

-")); - end defaultConnectionStructurallyInconsistent; - - class derivative "derivative" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define derivative of function -

- -

Examples

- -
function foo0 annotation(derivative=foo1); end foo0;
-function foo1 annotation(derivative(order=2)=foo2); end foo1;
-function foo2 end foo2;
-
- -

Description

- -

-Derivatives of functions can be declared explicitly using the derivative annotation, whereas a function can be defined as a partial derivative of another function using the der-operator in a short function definition. -

- -

-A function declaration can have an annotation derivative specifying the derivative function. This can influence simulation time and accuracy and can be applied to both functions written in Modelica and to external functions. A derivative annotation can state that it is only valid under certain restrictions on the input arguments. These restrictions are defined using the following optional attributes: order (only a restriction if order > 1, the default for order is 1), noDerivative, and zeroDerivative. The given derivative-function can only be used to compute the derivative of a function call if these restrictions are satisfied. There may be multiple restrictions on the derivative, in which case they must all be satisfied. The restrictions also imply that some derivatives of some inputs are excluded from the call of the derivative (since they are not necessary). A function may supply multiple derivative functions subject to different restrictions. -

- -

-The inputs to the derivative function of order 1 are constructed as follows: -

- -
    -
  • First are all inputs to the original function, and after all them we will - in order append one derivative for each input containing reals.
     
  • -
  • The outputs are constructed by starting with an empty list and then in - order appending one derivative for each output containing reals.
     
  • -
  • If the Modelica function call is a nth derivative (n>=1), i.e., this - function call has been derived from an (n-1)th derivative, an - annotation(order=n+1)=?, specifies the (n+1)th derivative, and the - (n+1)th derivative call is constructed as follows:
     
  • -
  • The input arguments are appended with the (n+1)th derivative, - which are constructed in order from the nth order derivatives.
     
  • -
  • The output arguments are similar to the output argument for the - nth derivative, but each output is one higher in derivative order.
  • -
- -

-Example: Given the declarations -

- -
 function foo0
-   ...
-   input Real x;
-   input Boolean linear;
-   input ...;
-   output Real y;
-   ...
-   annotation(derivative=foo1);
- end foo0;
-
- function foo1
-   ...
-   input Real x;
-   input Boolean linear;
-   input ...;
-   input Real der_x;
-   ...
-   output Real der_y;
-   ...
-   annotation(derivative(order=2)=foo2);
- end foo1;
-
- function foo2
-   ...
-   input Real x;
-   input Boolean linear;
-   input ...;
-   input Real der_x;
-   ...;
-   input Real der_2_x;
-   ...
-   output Real der_2_y;
-   ...
-
- -

-the equation -

- -
(...,y(t),...)=foo0(...,x(t),b,...);
-
- -

-implies that: -

- -
(...,d y(t)/dt,...)=foo1(...,x(t),b,..., ...,d x(t)/dt,...);
-(...,d^2 y(t)/dt^2,...)=foo2(...,x(t),b,...,d x(t)/dt,..., ...,d^2 x(t)/dt^2,...);
-
- -

-An input or output to the function may be any simple type (Real, Boolean, Integer, String and enumeration types) or a record, provided the record does not contain both reals and non-reals predefined types. The function must have at least one input containing reals. The output list of the derivative function may not be empty. -

- -
    -
  • zeroDerivative=input_var1
    - The derivative function is only valid if input_var1 is independent - of the variables the function call is differentiated with respect to - (i.e., that the derivative of input_var1 is \"zero\"). - The derivative of input_var1 is excluded from the argument list of the derivative-function. - Assume that function f takes a matrix and a scalar. Since the matrix argument is - usually a parameter expression it is then useful to define the function - as follows (the additional derivative = f_general_der is optional and - can be used when the derivative of the matrix is non-zero). -
    function f \"Simple table lookup\"
    -  input Real x;
    -  input Real y[:, 2];
    -  output Real z;
    -  annotation(derivative(zeroDerivative=y) = f_der,
    -             derivative=f_general_der);
    -algorithm
    -  ...
    -end f;
    -
    -function f_der \"Derivative of simple table lookup\"
    -  input Real x;
    -  input Real y[:, 2];
    -  input Real x_der;
    -  output Real z_der;
    -algorithm
    -  ...
    -end f_der;
    -
    -function f_general_der \"Derivative of table lookup taking into account varying tables\"
    -  input Real x;
    -  input Real y[:, 2];
    -  input Real x_der;
    -  input Real y_der[:, 2];
    -  output Real z_der;
    -algorithm
    -  ...
    -end f_general_der;
    -
    -
  • - -
  • noDerivative(input_var2 = f(input_var1, ...) )
    - The derivative function is only valid if the input argument input_var2 - is computed as f(input_var1, ...). The derivative of input_var2 - is excluded from the argument list of the derivative-function. - Assume that function fg is defined as a composition f(x, g(x)). - When differentiating f it is useful to give the derivative under the - assumption that the second argument is defined in this way: -
    function fg
    -  input Real x;
    -  output Real z;
    -algorithm
    -   z := f(x, g(x));
    -end fg;
    -
    -function f
    -  input Real x;
    -  input Real y;
    -  output Real z;
    -  annotation(derivative(noDerivative(y = g(x))) = f_der);
    -algorithm
    -  ...
    -end f;
    -
    -function f_der
    -  input Real x;
    -  input Real x_der;
    -  input Real y;
    -  output Real z_der;
    -algorithm
    -  ...
    -end f_der;
    -
    -This is useful if g represents the major computational effort of fg).
  • -
-")); - end derivative; - - class Dialog "Dialog" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define graphical layout of the parameter menu. -

- -

Syntax

-
annotation(Dialog(enable = true,
-                     tab = \"General\",
-                   group = \"Parameters\",
-      showStartAttribute = false,
-           colorSelector = false,
-              groupImage = \"modelica://MyPackage/Resources/Images/image.png\",
-         connectorSizing = false));
-
- -

Description

-

-The annotations tab and group define the placement of the component or of variables in a dialog with optional tab and group specification. If enable = false, the input field may be disabled [and no input can be given]. If showStartAttribute = true the dialog should allow the user to set the start-value and the fixed attribute for the variable instead of the value-attribute [this is primarily intended for non-parameter values and avoids introducing a separate parameter for the start-value of the variable]. -

-

-If colorSelector=true, it indicates that an rgb-value selector can be presented for a vector of three elements and generate values 0..255 (the annotation should be usable both for vectors of Integers and Reals). -

-

-The annotation groupImage references an image using an Modelica URI, and the image is intended to be shown together with the parameter-group (only one image per group is supported). Disabling the input field will not disable the image. -

-

-The value of the connectorSizing annotation must be a literal false or true value [since if the value is an expression, the connectorSizing functionality is conditional and this will then lead easily to wrong models]. If connectorSizing = false, this annotation has no effect. If connectorSizing = true, the corresponding variable must be declared with the parameter prefix, must be a subtype of a scalar Integer and must have a literal default value of zero [since this annotation is designed for a parameter that is used as vector dimension and the dimension of the vector should be zero when the component is dragged or redeclared; furthermore, when a tool does not support the connectorSizing annotation, dragging will still result in a correct model]. -If connectorSizing = true, a tool may set the parameter value in a modifier automatically, if used as dimension size of a vector of connectors. [The connectorSizing annotation is used in cases where connections to a vector of connectors shall be made and a new connection requires to resize the vector and to connect to the new index (unary connections). The annotation allows a tool to perform these two actions in many cases automatically. This is, e.g., very useful for state machines and for certain components of fluid libraries.] -

-

-Annotation \"Dialog\" is defined as: -

-
record Dialog
-  parameter String  tab                = \"General\";
-  parameter String  group              = \"Parameters\";
-  parameter String  groupImage         = \"\";
-  parameter Boolean enable             = true;
-  parameter Boolean showStartAttribute = false;
-  parameter Boolean connectorSizing    = false;
-  parameter Boolean colorSelector      = false;
-  parameter Selector loadSelector;
-  parameter Selector saveSelector;
-end Dialog;
-
-record Selector
-  parameter String filter=\"\";
-  parameter String caption=\"\";
-end Selector;
-
- -

Examples

-

-A parameter dialog is a sequence of tabs with a sequence of groups inside them. -

-

-A Selector displays a file dialog to select a file: Parameter filter only shows files that fulfill the given pattern defined by \"text1 (*.ext1);;text2 (*.ext2);\" to show only files with file extension *.ext1 or *.ext2 and displaying a description text \"text1\" and \"text2\", respectively. Parameter caption is the text displayed in the dialog menu. Parameter loadSelector is used to select an existing file for reading, whereas parameter saveSelector is used to define a file for writing. -

- -
model DialogDemo
-  parameter Boolean b = true \"Boolean parameter\";
-  parameter Modelica.Units.SI.Length length \"Real parameter with unit\";
-  parameter Integer nInports=0 annotation(Dialog(connectorSizing=true));
-  parameter Real r1 \"Real parameter in Group 1\" annotation(Dialog(group=\"Group 1\"));
-  parameter Real r2 \"Disabled Real parameter in group 1\"
-                     annotation(Dialog(group=\"Group 1\", enable = not b));
-  parameter Real r3 \"Real parameter in Tab 1\" annotation(Dialog(tab=\"Tab 1\"));
-  parameter Real r4 \"Real parameter in Tab 1 and Group 2\"
-                     annotation(Dialog(tab=\"Tab 1\", group=\"Group 2\"));
-  StepIn stepIn[nInports];
-  ...
-end DialogDemo;
-
-")); - end Dialog; - - class Documentation "Documentation" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Annotations for documentation -

-

Syntax

-
-documentation_annotation:
-   annotation\"(\" Documentation \"(\" \"info\" \"=\" STRING
-                            [\",\" \"revisions\" \"=\" STRING ] \")\" \")\"
-
-

Description

-

-The \"Documentation\" annotation can contain the \"info\" annotation giving a textual description, the \"revisions\" annotation giving a list of revisions and other annotations defined by a tool [The \"revisions\" documentation may be omitted in printed documentation]. How the tool interprets the information in \"Documentation\" is unspecified. Within a string of the \"Documentation\" annotation, the tags <HTML> and </HTML> or <html> and </html> define the start and end of content that is HTML encoded. Links to Modelica classes may be defined with the HTML link command using scheme \"Modelica\", e.g., -

-
-    <a href=\"modelica://ExamplePackage.Tutorial\">ExamplePackage.Tutorial</a>
-
-

-Together with scheme \"Modelica\" the (URI) fragment specifiers #diagram, #info, #text, #icon may be used to reference different layers. Example: -

-
-   <a href=\"modelica://ExamplePackage.SimpleModel#info\">SimpleModel</a>
-
-")); - end Documentation; - -class DocumentationClass "DocumentationClass" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Annotation for defining documentation classes -

- -

Syntax

- -
documentation class_annotation:
-   annotation\"(\" DocumentationClass \"=\" true \")\"
-
- -

Description

- -

-Only allowed as class annotation on any kind of class and implies that this class and all -classes within it are treated as having the annotation preferredView=\"info\". -If the annotation preferredView is explicitly set for a class, it has precedence over -a DocumentationClass annotation. -

- -

-[A tool may display such classes in special ways. For example, the -description texts of the classes might be displayed instead of the class -names, and if no icon is defined, a special information default icon may be -displayed in the package browser.] -

-")); -end DocumentationClass; - - class DynamicSelect "DynamicSelect" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define schematic animation of diagram layer -

- -

Examples

- -

-The level of a tank is animated by a rectangle expanding in vertical direction and its color depending on a variable overflow: -

- -
annotation(
-  Icon(graphics={Rectangle(
-    extent=DynamicSelect({{0,0},{20,20}},{{0,0},{20,level}}),
-    fillColor=DynamicSelect({0,0,255},
-                            if overflow then {255,0,0} else {0,0,255}))}
-);
-
- -

Description

- -

-Any value (coordinates, color, text, etc.) in graphical annotations can be dependent on class variables using the DynamicSelect expression. DynamicSelect has the syntax of a function call with two arguments, where the first argument specifies the value of the editing state and the second argument the value of the non-editing state. The first argument must be a literal expression -and this value is used for the annotation when editing and/or browsing the diagram layer. -The second argument may contain references to variables to enable a dynamic behavior -and the actual value is used for the annotation for schematic animation -of the diagram layer, e.g., after a simulation. -

- -")); - end DynamicSelect; - - class Evaluate "Evaluate" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Annotation for code generation (evaluate parameter value) -

- -

Syntax

- -
   annotation\"(\" Evaluate \"=\" ( false | true ) \")
-
- -

Description

-

-The annotation Evaluate can occur in the component declaration, its type declaration, or a base-class of the type-declaration. -In the case of multiple conflicting annotations it is handled similarly to modifiers (e.g., an Evaluate-annotation on the component declaration takes precedence). -The annotation Evaluate only has effect for a component declared with the prefix parameter. -

- -

-If Evaluate = true, the model developer proposes to utilize the value for the symbolic processing. In that case, it is not possible to change the parameter value after symbolic pre-processing. -

- -

-If Evaluate = false, the model developer proposes to not utilize the value of the corresponding parameter for the symbolic processing. -

- -

-Evaluate is for example used for axis of rotation parameters in the Modelica.Mechanics.MultiBody library in order to improve the efficiency of the generated code -

- -")); - end Evaluate; - - class experiment "experiment" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define default experiment parameters -

- -

Examples

- -
annotation(experiment(StartTime=0, StopTime=5, Tolerance=1e-6))
-
- -

Syntax

- -
experiment_annotation:
-   annotation\"(\" \"experiment\" \"(\" [experimentOption] {, experimentOption}] \")\"
-
-experimentOption:
-   StartTime  \"=\" [\"+\" | \"-\"] UNSIGNED_NUMBER |
-   StopTime   \"=\" [\"+\" | \"-\"] UNSIGNED_NUMBER |
-   Interval   \"=\" UNSIGNED_NUMBER
-   Tolerance  \"=\" UNSIGNED_NUMBER
-
- -

Description

-

-The experiment annotation defines the default start time (StartTime) in [s], the default stop time (StopTime) in [s], the suitable time resolution for the result grid (Interval) in [s], and the default relative integration tolerance (Tolerance) for simulation experiments to be carried out with the model or block at hand. -

-")); - end experiment; - - class HideResult "HideResult" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Annotation for code generation (hide result) -

- -

Syntax

- -
   annotation\"(\" HideResult \"=\" ( false | true ) \")
-
- -

Description

- -

-HideResult = true defines that the model developer proposes to not show the simulator results of the corresponding component [e.g., it will not be possible to plot this variable]. -

- -

-HideResult = false defines that the developer proposes to show the corresponding component [if a variable is declared in a protected section, a tool might not include it in a simulation result. By setting HideResult = false, the modeler would like to have the variable in the simulation result, even if in the protected section]. -

- -

-HideResult is for example used in the connectors of the Modelica.StateGraph library to not show variables to the modeler that are of no interest to him and would confuse him. -

- -")); - end HideResult; - - class Inline "Inline" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Annotation for code generation (inline function body) -

- -

Syntax

- -
-   annotation\"(\" Inline \"=\" ( false | true ) \")
-
- -

Description

- -

-Has only an effect within a function declaration. -

- -

-If \"Inline = true\", the model developer proposes to inline the function. -This means, that the body of the function is included at all places where the function is called. -

- -

-If \"Inline = false\", the model developer proposes to not inline the function. -

- -

Example usage

- -

-Inline = true is for example used in Modelica.Mechanics.MultiBody.Frames and in functions of Modelica.Media to have no overhead for function calls such as resolving a vector in a different coordinate system and at the same time the function can be analytically differentiated, e.g., for index reduction needed for mechanical systems. -

-")); - end Inline; - - class InlineAfterIndexReduction "InlineAfterIndexReduction" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Annotation for code generation -

- -

Syntax

- -
-   annotation\"(\" InlineAfterIndexReduction \"=\" ( false | true ) \")
-
- -

Description

- -

-Has only an effect within a function declaration. -If true, the model developer proposes to inline the function after the function is differentiated for index reduction, and before any other symbolic transformations are performed. -

-

-This annotation cannot be combined with annotations Inline and LateInline! -

- -

Example usage

-

-InlineAfterIndexReduction = true is for example used in Modelica.Mechanics.Rotational.Components.AngleToTorqueAdaptor to define that an input signal is the derivative of another input signal. -

-")); - end InlineAfterIndexReduction; - - class inverse "inverse" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

Every function with one output argument may have one or more "inverse" annotations to define inverses of this function.

-

Syntax

-
function f1
-  input A1 u1;
-  ...
-  input T1 uk;
-  ...
-  input Am um = am;
-  ...
-  input An un;
-  output T2 y;
-  annotation(inverse(uk = f2(..., y, ....), ui = f3(..., y, ...), ...));
-algorithm
-  ...
-end f1;
-

Description

-

The meaning is that function "f2" is one inverse to function "f1" where the previous output "y" is now an input and the previous input "uk" is now an output. More than one inverse can be defined within the same inverse annotation. Several inverses are separated by commas. (The inverse requires that for all valid values of the input arguments of f2(...,y, ...) and uk being calculated as uk := f2(..., y, ...) implies the equality y = f1(..., uk, ...,) up to a certain precision.)

-

Function "f1" can have any number and types of arguments with and without default value. The restriction is that the number of unknown variables in the output argument of both "f1" and "f2" must be the same and that "f2" must have exactly the same arguments as "f1" (with the same defaults, if an argument um has a default), but the order of the arguments may be permuted.

-

Examples

-
function h_pTX
-  input Real p    "pressure";
-  input Real T    "temperature";
-  input Real X[:] "mass fractions";
-  output Real h   "specific enthalpy";
-  annotation(inverse(T = T_phX(p,h,X)));
-algorithm
-  ...
-end h_pTX;
-
-function T_phX
-  input Real  p    "pressure";
-  input Real  h    "specific enthalpy";
-  input Real  X[:] "mass fractions";
-  output Real T    "temperature";
-algorithm
-  ...
-end T_phX;
-")); - end inverse; - - class LateInline "LateInline" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Annotation for code generation (inline function body after symbolic processing) -

- -

Syntax

- -
   annotation\"(\" LateInline \"=\" ( false | true ) \")
-
- -

Description

- -

-Has only an effect within a function declaration. -

- -

-If \"LateInline = true\", the model developer proposes to inline the function after all symbolic transformations have been performed, but before common subexpression elimination takes place. -

- -

-If \"LateInline = false\", the model developer proposes to not inline the function after symbolic transformations have been performed. -

- -

Example usage

-

-This annotation is for example used in Modelica.Media.Water.IF97_Utilities.T_props_ph to provide in combination with common subexpression elimination the automatic caching of function calls. Furthermore, it is used in order that a tool is able to propagate specific enthalpy over connectors in the Modelica.Fluid library. -

-")); - end LateInline; - - class missingInnerMessage "missingInnerMessage" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Diagnostic message, if inner declaration is missing -

- -

Examples

- -
model World
-  annotation(defaultComponentName     = \"world\",
-             defaultComponentPrefixes = \"inner replaceable\",
-             missingInnerMessage      = \"The World object is missing\");
-  ...
-end World;
-
- -

Syntax

- -
   annotation\"(\" missingInnerMessage \"=\" STRING \")\"
-
- -

Description

- -

-When an outer component of the class does not have a corresponding inner component, the string message may be used as a diagnostic message. -However, the inner component is automatically added - if unique - regardless of this annotation. -

- -")); - end missingInnerMessage; - - class obsolete "obsolete" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-A class may have the following annotation: -

-
-    annotation(obsolete = \"message\");
-
- -

Syntax

- -
-   annotation\"(\" obsolete \"=\" STRING \")\"
-
- -

Description

- -

-It indicates that the class ideally should not be used anymore and gives a message indicating the recommended action. -

-")); - end obsolete; - - class preferredView "preferredView" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define default view when selecting class -

- -

Syntax

- -
preferred view_annotation:
-   annotation\"(\" preferredView \"=\" (\"info\" | \"diagram\" | \"text\") \")\"
-
- -

Description

- -

-The preferredView annotation defines the default view when selecting the class. info means info layer, i.e., the documentation of the class, diagram means diagram layer and text means the Modelica text layer. -

- -")); - end preferredView; - - class revisionId "revisionId" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

Revision identifier of the version management system used to manage this library. It marks the latest submitted change to any file belonging to the package.

-

Syntax

-
-annotation"(" revisionId "=" STRING ")"
-
-

Description

-

-“revisionId” is a tool specific revision identifier possibly generated by a source code management system (e.g., Subversion or Git). This information allows to exactly identify the library source code in the source code management system. -

-

Examples

-
package Modelica
-  annotation(version      = "3.2.3",
-             versionDate  = "2018-08-01",
-             dateModified = "2018-12-12 07:40:19Z",
-             revisionId   = "c04e23a0d 2018-08-01 12:00:00 +0200");
-  ...
-  end Modelica;
-
Related annotations
- -")); - end revisionId; - - class smoothOrder "smoothOrder" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define differentiability of function body -

- -

Syntax

-
-   annotation\"(\" smoothOrder \"=\" UNSIGNED_INTEGER \")\"
-   annotation\"(\" smoothOrder \"(\" normallyConstant=NAME [\",\" normallyConstant=NAME] \")\"
-                             \"=\" UNSIGNED_NUMBER \")\"
-
- -

Description

-

-This annotation has only an effect within a function declaration. -

- -

-smoothOrder defines the number of differentiations of the function, in order that all of the differentiated outputs are continuous provided all input arguments and their derivatives up to order smoothOrder are continuous. -

- -

-This means that the function is at least CsmoothOrder. smoothOrder = 1 means that the function can be differentiated at least once in order that all output arguments are still continuous, provided the input arguments are continuous. If a tool needs the derivative of a function, e.g., for index reduction or to compute an analytic Jacobian, the function can be differentiated analytically at most smoothOrder times. -

-

-The optional argument normallyConstant of smoothOrder defines that the function argument NAME is usually constant. -

- -

Examples

-

-This annotation is used by many functions of the Modelica.Fluid library, such as Modelica.Fluid.Dissipation.PressureLoss.StraightPipe.dp_laminar_DP, since geometric arguments to these functions are usually constant. -

-
-function SpecialPolynomial
-  input  Real u;
-  output Real y;
-algorithm
-   y = if u > 0 then u^2 else 0;
-  annotation(smoothOrder = 1);
-end SpecialPolynomial;
-
-model TestSpecialPolynomial
-   Real y;
-   Real yd;
-   Real ydd;
-equation
-   y   = SpecialPolynomial(sin(time));
-   yd  = der(y);     // fine, SpecialPolynomial is analytically differentiated once
-   ydd = der(yd);    // error, SpecialPolynomial cannot be differentiated twice
-end TestSpecialPolynomial;
-
-")); - end smoothOrder; - - class unassignedMessage "unassignedMessage" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Error message, if variable is not assigned -

- -

Examples

- -
connector Frame \"Frame of a mechanical system\"
-    ...
-  flow Modelica.Units.SI.Force f[3] annotation(unassignedMessage =
-\"All Forces cannot be uniquely calculated. The reason could be that the
-mechanism contains a planar loop or that joints constrain the same motion.
-For planar loops, use in one revolute joint per loop the option
-PlanarCutJoint=true in the Advanced menu.
-\");
-end Frame;
-
- -

Syntax

- -
-   annotation\"(\" unassignedMessage \"=\" STRING \")\"
-
- -

Description

- -

-When the variable to which this annotation is attached in the declaration cannot be computed due to the structure of the equations, the string message can be used as a diagnostic message. When using BLT partitioning, this means if a variable \"a\" or one of its aliases \"b = a\", \"b = -a\", cannot be assigned, the message is displayed. This annotation is used to provide library specific error messages. -

-")); - end unassignedMessage; - - class uses "uses" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Defines that classes within this top-level class uses a specific version of another top-level class -

- -

Examples

- -
-model A
-  annotation(version=\"1.0\",
-     uses(Modelica(version=\"1.5\")));
-  ...
-end A;
-
-model B
-  annotation(uses(Modelica(version=\"2.1 Beta 1\")));
-  ...
-end B;
-
- -

Description

- -
    -
  • uses(IDENT (version = VERSION-NUMBER) )
    - Defines that classes within this top-level class uses version - VERSION-NUMBER of classes within the top-level class IDENT. - The annotations uses and conversion may contain several different sub-entries.
  • -
- -
Related annotations
- -")); - end uses; - - class version "version" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define version information of package -

- -

Examples

- -
package Modelica
-  annotation(version=\"2.1\",
-             conversion(noneFromVersion=\"2.1 Beta 1\",
-                        from(version=\"1.5\",
-                             script=\"convertFromModelica1_5.mos\")));
-  ...
-end Modelica;
-
-model A
-  annotation(version=\"1.0\",
-     uses(Modelica(version=\"1.5\")));
-  ...
-end A;
-
-model B
-  annotation(uses(Modelica(version=\"2.1 Beta 1\")));
-  ...
-end B;
-
- -

-In this example the model A uses an older version of the Modelica library and can be upgraded using the given script, and model B uses an older version of the Modelica library but no changes are required when upgrading. -

- -

Description

- -

-Version numbers are of the forms: -

- -
    -
  • Main release versions: -
    \"\"\" UNSIGNED_INTEGER { \".\" UNSIGNED_INTEGER } \"\"\"
    - Example: \"2.1\"
     
  • - -
  • Pre-release versions: -
    \"\"\" UNSIGNED_INTEGER { \".\" UNSIGNED_INTEGER } \" \" {S-CHAR} \"\"\"
    - Example: \"2.1 Beta 1\"
     
  • - -
  • Un-ordered versions: -
     \"\"\" NON-DIGIT {S-CHAR} \"\"\" 
    - Example: \"Test 1\"
  • -
- -

-The main release versions are ordered using the hierarchical numerical names, and follow the corresponding pre-release versions. The pre-release versions of the same main release version are internally ordered alphabetically. -

- -

-In a top-level class, the version number and the dependency to earlier versions of this class are defined using one or more of the following annotations: -

- -
    -
  • version = CURRENT-VERSION-NUMBER
    - Defines the version number of the model or package. - All classes within this top-level class have this version number.
     
  • - -
  • conversion ( noneFromVersion = VERSION-NUMBER)
    - Defines that user models using the VERSION-NUMBER can be upgraded to - the CURRENT-VERSION-NUMBER of the current class without any changes.
     
  • - -
  • conversion ( from (version = VERSION-NUMBER, [to = VERSION_NUMBER \",\"] script = \"?\" ) )
    - Defines that user models using the VERSION-NUMBER or any of the given VERSION-NUMBER can be upgraded to the given VERSION-NUMBER - (if the to-tag is missing this is the CURRENT-VERSION-NUMBER) of the current class by applying the given conversion rules. - The to-tag is added for clarity and optionally allows a tool to convert in multiple steps. -
     
  • - -
  • uses(IDENT (version = VERSION-NUMBER) )
    - Defines that classes within this top-level class uses version - VERSION-NUMBER of classes within the top-level class IDENT. - The annotations uses and conversion may contain several different sub-entries.
  • -
- -

-A top-level class, IDENT, with version VERSION-NUMBER can be stored in one -of the following ways in a directory given in the MODELICAPATH: -

- -
    -
  • The file IDENT \".mo\"
    - Example: Modelica.mo
  • -
  • The file IDENT \" \" VERSION-NUMBER \".mo\"
    - Example: Modelica 2.1.mo
  • -
  • The directory IDENT
    - Example: Modelica
  • -
  • The directory IDENT \" \" VERSION-NUMBER
    - Example: Modelica 2.1
  • -
-

-This allows a tool to access multiple versions of the same package. -

-
Related annotations
- -")); - end version; - - class versionBuild "versionBuild" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

Defines the optional build number of the library.

- -
-This is a deprecated annotation. It should no longer be used, since it will be removed in one of the next Modelica releases. Use instead Semantic Versioning which provides a better mechanism for maintaining releases and bug-fixes in a well defined way. -
- -

Syntax

-
-annotation"(" versionBuild "=" INTEGER ")"
-
-

Description

-

versionBuild” is the optional build number of the library. -When a new version is released “versionBuild” should be omitted or “versionBuild = 1”. -There might be bug fixes to the library that do not justify a new library version. -Such maintenance changes are called a “build” release of the library. -For every new maintenance change, the “versionBuild” number is increased. -A “versionBuild” number A that is higher as “versionBuild” number B, is a newer release of the library. There are no conversions between the same versions with different build numbers. -

-

Examples

-
-package Modelica
-  annotation(version      = "3.0.1",
-             versionDate  = "2008-04-10",
-             versionBuild = 4,
-             dateModified = "2009-02-15 16:33:14Z",
-             revisionId   = "c04e23a0d 2018-08-01 12:00:00 +0200");
-  ...
-  end Modelica;
-
-
Related annotations
- -")); - end versionBuild; - - class versionDate "versionDate" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

UTC date of first version build (in format: YYYY-MM-DD).

-

Syntax

-
-annotation"(" versionDate "=" STRING ")"
-
-

Description

-

versionDate” is the date in UTC format (according to ISO 8601) when the library was released.

-

Examples

-
-package Modelica
-  annotation(version      = "3.0.1",
-             versionDate  = "2008-04-10",
-             dateModified = "2009-02-15 16:33:14Z",
-             revisionId   = "c04e23a0d 2018-08-01 12:00:00 +0200");
-  ...
-  end Modelica;
-
Related annotations
- -")); - end versionDate; - - annotation (Documentation(info=" -

-In this package annotations are described. -Annotations are intended for storing extra information about a model, such as graphics, documentation or versioning. A Modelica tool is free to define and use other annotations, in addition to those defined here. The only requirement is that any tool shall save files with all annotations from this chapter and all vendor-specific annotations intact. To ensure this, annotations must be represented with constructs according to the Modelica grammar. The Modelica language specification defines the semantic meaning if a tool implements any of these annotations. -

-")); -end Annotations; - -package Classes "Classes (model, function, ...)" - extends ModelicaReference.Icons.Information; - class 'block' "block" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define specialized class block -

-

Examples

- -
block Integrator
-  input Real u;
-  output Real y;
-protected
-  Real x;
-equation
-  der(x) = u;
-  y = x;
-end Integrator;
- -

Syntax

- -
   [ encapsulated ][ partial] block
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

-

-A block class is the same as a model class -with the restriction that each connector component of a block must -have prefixes input and/or output for all connector variables. -The purpose is to model input/output blocks of block diagrams. -Due to the restrictions on input and output prefixes, -connections between blocks are only possible according -to block diagram semantic. -

-")); - end 'block'; - - class 'class' "class" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define class -

-

Examples

- -
class MyTable
-  extends ExternalObject;
-  function constructor
-     ...
-  end constructor;
-
-  function destructor
-     ...
-  end destructor;
-end MyTable;
- -

Syntax

-
   [ encapsulated ][ partial] class
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

- -

-The keyword class is used to define general classes (without any restrictions). -It is identical to the keyword model. -In most cases, it is recommended to use specialized classes as -connector, -model, -block, -package, -record, -function, -type. -\"class\" should be used to define -ExternalObjects, -and can be used for classes merely containing documentation and/or graphics. -

-")); - end 'class'; - - class 'connector' "connector" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define specialized class connector -

-

Examples

- -
connector flange
-  Modelica.Units.SI.Angle phi;
-  flow Modelica.Units.SI.Torque tau;
-end flange;
- -

Syntax

-
   [ encapsulated ][ partial] connector
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

-

The keyword connector is used to define connectors, which are used -in -connect() -statements. In connectors, no equations are allowed in the -definition or in any of its components. -With respect to \"class\", it is enhanced to allow connect(..) to components -of connector classes. -

- -

-Variable declarations in a connector can have the additional prefixes -flow or -stream, besides -the prefixes -input and -output, that are -also allowed outside of a connector. Based on the prefix, a -connect() -statement leads to specific connection equations, that describe the -balance equations in the infinitesimal connection points. -

- -

Example

- -

-If three connectors c1, c2, c3 with the definition -

- -
-connector Demo
-  Real        p;  // potential variable
-  flow   Real f;  // flow variable
-  stream Real s;  // stream variable
-end Demo;
-
- -

-are connected together with -

- -
-   connect(c1,c2);
-   connect(c1,c3);
-
- -

-then this leads to the following equations: -

- -
-  // Potential variables are identical
-  c1.p = c2.p;
-  c1.p = c3.p;
-
-  // The sum of the flow variables is zero
-  0 = c1.f + c2.f + c3.f;
-
-  /* The sum of the product of flow variables and upstream stream variables is zero
-     (this implicit set of equations is explicitly solved when generating code;
-     the \"<undefined>\" parts are defined in such a way that
-     inStream(..) is continuous).
-  */
-  0 = c1.f*(if c1.f > 0 then s_mix else c1.s) +
-      c2.f*(if c2.f > 0 then s_mix else c2.s) +
-      c3.f*(if c3.f > 0 then s_mix else c3.s);
-
-  inStream(c1.s) = if c1.f > 0 then s_mix else <undefined>;
-  inStream(c2.s) = if c2.f > 0 then s_mix else <undefined>;
-  inStream(c3.s) = if c3.f > 0 then s_mix else <undefined>;
-
-")); - end 'connector'; - - class ExternalObject "ExternalObject" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define external functions with internal memory. -

- -

Description

- -

-External functions may have internal memory reported between function calls. Within Modelica this memory is defined as instance of the predefined class ExternalObject according to the following rules: -

- -
    -
  • There is a predefined partial class ExternalObject - [since the class is partial, it is not possible to define an - instance of this class].
  • - -
  • An external object class shall be directly extended from - ExternalObject, shall have exactly two function definitions, - called \"constructor\" and \"destructor\", and - shall not contain other elements.
  • - -
  • The constructor function is called exactly once before the first use of - the object. For each completely constructed object, the destructor - is called exactly once, after the last use of the object, even - if an error occurs. The constructor shall have exactly one output - argument in which the constructed ExternalObject is returned. - The destructor shall have no output arguments and the only input - argument of the destructor shall be the ExternalObject. - It is not legal to call explicitly the constructor and destructor - functions.
  • - -
  • Classes derived from ExternalObject can neither be used in an - extends-clause nor in a short class definition.
  • - -
  • External functions may be defined which operate on the internal memory - of an ExternalObject. An ExternalObject used as input argument or - return value of an external C-function is mapped to the C-type \"void*\".
  • -
- -

Examples

- -

-A user-defined table may be defined in the following way as an ExternalObject -(the table is read in a user-defined format from file and has memory for the last used table interval): -

- -
-class MyTable
-  extends ExternalObject;
-  function constructor
-    input  String  fileName = \"\";
-    input  String  tableName = \"\";
-    output MyTable table;
-    external \"C\" table = initMyTable(fileName, tableName);
-  end constructor;
-
-  function destructor \"Release storage of table\"
-    input  MyTable table;
-    external \"C\" closeMyTable(table);
-  end destructor;
-end MyTable;
-
- -

-and used in the following way: -

- -
-model test \"Define a new table and interpolate in it\"
-  MyTable table=MyTable(fileName =\"testTables.txt\",
-                        tableName=\"table1\");  // call initMyTable
-  Real y;
-equation
-  y = interpolateMyTable(table, time);
-end test;
-
- -

-This requires to provide the following Modelica function: -

- -
-function interpolateMyTable \"Interpolate in table\"
-  input  MyTable table;
-  input  Real  u;
-  output Real  y;
-  external \"C\" y = interpolateMyTable(table, u);
-end interpolateTable;
-
- -

-The external C-functions may be defined in the following way: -

- -
-typedef struct {  /* User-defined data structure of the table */
-  double* array;      /* nrow*ncolumn vector       */
-  int     nrow;       /* number of rows            */
-  int     ncol;       /* number of columns         */
-  int     type;       /* interpolation type        */
-  int     lastIndex;  /* last row index for search */
-} MyTable;
-
-void* initMyTable(const char* fileName, const char* tableName) {
-  MyTable* table = malloc(sizeof(MyTable));
-  if ( table == NULL ) ModelicaError(\"Not enough memory\");
-        // read table from file and store all data in *table
-  return (void*) table;
-}
-
-void closeMyTable(void* object) { /* Release table storage */
-  MyTable* table = (MyTable*) object;
-  if ( object == NULL ) return;
-  free(table->array);
-  free(table);
-}
-
-double interpolateMyTable(void* object, double u) {
-  MyTable* table = (MyTable*) object;
-  double y;
-  // Interpolate using \"table\" data (compute y)
-  return y;
-}
-
-")); - end ExternalObject; - - class 'function' "function" - extends ModelicaReference.Icons.Information; - -class 'function partial application' "function partial application" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-A function partial application is a function call with certain -formal parameters bound to expressions. A function partial application -returns a partially evaluated function that is also a function, -with the remaining not bound formal parameters still present in the -same order as in the original function declaration. A function partial -application is specified by the function keyword followed by a function -call to func_name giving named formal parameter associations for the -formal parameters to be bound, e.g.: -

- -
-function func_name(..., formal_parameter_name = expr, ...)
-
- -

-[Note that the keyword function in a function partial application -differentiates the syntax from a normal function call where some -parameters have been left out, and instead supplied via default values.] -The function created by the function partial application acts as the -original function but with the bound formal input parameters(s) removed, -i.e., they cannot be supplied arguments at function call. The binding -occurs when the partially evaluated function is created. A partially -evaluated function is \"function compatible\" to the same function where -all bound arguments are removed [thus, for checking function type -compatibility, bound formal parameters are ignored]. -

- -

-Example of function partial application as argument, positional argument passing, according to case (b) above: -

- -
-model Test
-   parameter Integer N;
-   Real area;
-algorithm
-   area := 0;
-   for i in 1:N loop
-     area  := area + quadrature(0, 1, function Sine(A=2, w=i*time));
-   end for;
-end Test;
-
-function Sine  \"y = Sine(x,A,w)\"
-  extends Integrand;
-  input Real A;
-  input Real w;
-algorithm
-  y:=A*Modelica.Math.sin(w*x);
-end Sine;
-
-//Call with function partial application as named input argument:
-area  := area + quadrature(0, 1, integrand = function Sine(A=2, w=i*time));
-
- -

-Example showing that function types are matching after -removing the bound arguments A and w in a function partial -application: -

- -
-function Sine2  \"y = Sine2(A,w,x)\"
-  input Real A;
-  input Real w;
-  input Real x; // Note: x is now last in argument list.
-  output Real y;
-algorithm
-  y:=A*Modelica.Math.sin(w*x);
-end Sine2;
-
-// The partially evaluated Sine2 has only one argument:
-// x - and is thus type compatible with Integrand.
-area = quadrature(0, 1, integrand = function Sine2(A=2, w=3));
-
- -

-Example of a function partial application of a function that is -a component, according to case (d) above: -

- -
-partial function SurfaceIntegrand
-   input Real x;
-   input Real y;
-   output Real z;
-end SurfaceIntegrand;
-
-function quadratureOnce
-  input Real x;
-  input Real y1;
-  input Real y2;
-  input SurfaceIntegrand integrand;
-  output Real z;
-algorithm
-  // This is according to case (d) and needs to bind the 2nd argument
-  z := quadrature(y1, y2, function integrand(y=x));
-end quadratureOnce;
-
-function surfaceQuadrature
-  input Real x1;
-  input Real x2;
-  input Real y1;
-  input Real y2;
-  input SurfaceIntegrand integrand;
-  output Real integral;
-algorithm
-   // Case (b) and (c)
-   integral := quadrature(x1, x2,
-     function quadratureOnce(y1=y1, y2=y2, integrand=integrand);
-end surfaceQuadrature;
-
-")); - end 'function partial application'; - - class 'pure function' "pure function" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Modelica functions are normally pure which makes it easy for humans to reason about the code -since they behave as mathematical functions, and possible for compilers to optimize.

-
    -
  • -Pure Modelica functions always give the same output values or errors for the same input values -and only the output values influence the simulation result, i.e. is seen as equivalent to a mathematical map from input values to output values. -Some input values may map to errors. Pure functions are thus allowed to fail by -calling assert, or ModelicaError in C-code, or dividing by zero. -Such errors will only be reported when and if the function is called. -Pure Modelica functions are not assumed to be thread-safe.
  • -
  • A Modelica function which does not have the pure function properties is impure.
  • -
-

The declaration of functions follows these rules:

-
    -
  • Functions defined in Modelica (non-external) are normally assumed to be pure (the exception is the deprecated case below), -if they are impure they shall be marked with the impure keyword. They can be explicitly marked as pure.
  • -
  • External functions must be explicitly declared with pure or impure.
  • -
  • A deprecated semantics is that external functions (and functions defined in Modelica directly or indirectly calling them) -without pure or impure keyword are assumed to be impure – but without any restriction on calling them. -Except for the function Modelica.Utilities.Streams.print diagnostics must be given if called in a simulation model.
  • -
- ")); - end 'pure function'; - annotation (Documentation(info=" -

-Define specialized class function -

-

Examples

- -
function si
-  input Real x;
-  output Real y;
-algorithm
-  y = if abs(x) < Modelica.Constants.eps then 1 else Modelica.Math.sin(x)/x;
-end si;
- -
-\"Simulation -
- -

Syntax

- -
   [ encapsulated ][ partial] [ pure | impure] function
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

- -

The keyword function is used to define functions as known from programming -languages. -

- -

-The syntax and semantics of a function have many similarities to those of the block -specialized class. A function has many of the properties of a general class, -e.g., being able to inherit other functions, or to redeclare or modify -elements of a function declaration. -

- -

-Modelica functions have the following restrictions compared to a -general Modelica class: -

- -
    -
  • Each input formal parameter of the function must be - prefixed by the keyword input, and each result formal parameter - by the keyword output. All public variables are formal parameters.
  • - -
  • Input formal parameters are read-only after being bound to the - actual arguments or default values, i.e., they may not be assigned - values in the body of the function.
  • - -
  • A function may not be used in connections, may not have equations, may not have initial algorithms.
  • - -
  • A function can have at most one algorithm section or one external function interface (not both), which, if present, is the body of the function.
  • - -
  • For a function to be called in a simulation model, the function may not be partial, - and the output variables must be assigned inside the function either in declaration assignments - or in an algorithm section, or have an external function interface as its body, or be defined as a function partial derivative. - The output variables of a function should be computed.
  • - -
  • A function cannot contain calls to the Modelica built-in operators - der, initial, terminal, sample, pre, edge, change, reinit, delay, - cardinality, inStream, actualStream, to the operators of the built-in package Connections, - and is not allowed to contain when-statements.
  • - -
  • The dimension sizes not declared with (:) of each array result or - array local variable [i.e., a non-input components] of a function must - be either given by the input formal parameters, or given by constant - or parameter expressions, or by expressions containing combinations - of those. If an output or a local array dimension is declared with (:), - the size of the dimension can be changed in the function. A size change - takes place by assigning a full array with the respective sizes to the - dynamically sized array on the left hand side of an equal sign.
  • - -
  • The local variables of a function are not automatically initialized to - the implicit default values of the data type [(e.g., 0.0 for Real) - for performance reasons. It is the responsibility of the user to - provide explicit defaults or to define the values of such variables - before they are referenced.]
  • - -
  • Components of a function will inside the function behave as though - they had discrete-time variability.
  • -
- -

-Modelica functions have the following enhancements compared to a general Modelica class: -

- -
    -
  • A function may be called using a mix of positional (as in conventional programming languages) and named arguments.
  • - -
  • A function can be recursive.
  • - -
  • A formal parameter or local variable may be initialized - through a binding (=) of a default value in its declaration. - Initialization through an equation is not possible.
  • - -
  • A function is dynamically instantiated when it is called rather than - being statically instantiated by an instance declaration, - which is the case for other kinds of classes.
  • - -
  • A function may have an external function interface specifier as its body.
  • - -
  • A function may have a return statement in its algorithm section body.
  • - -
  • A function allows dimension sizes declared with (:) to be resized - for non-input array variables (so the actual dimension need not to be known when - the function is translated).
  • -
- -

-A function may have a function as an input argument. -The declared type of such an input formal parameter in a function can be -the class-name of a partial function that has no replaceable elements. -It cannot be the class-name of a record [i.e., record constructor functions are not -allowed in this context.] Such an input formal parameter of function type -can also have an optional functional default value. Example: -

- -
-function quadrature \"Integrate function y=integrand(x) from x1 to x2\"
-  input  Real x1;
-  input  Real x2;
-  input  Integrand integrand;   // Integrand is a partial function, see below
-  // With default: input Integrand integrand := Modelica.Math.sin;
-  output Real integral;
-algorithm
-  integral :=(x2-x1)*(integrand(x1) + integrand(x2))/2;
-end quadrature;
-
-partial function Integrand
-  input  Real x;
-  output Real y;
-end Integrand;
-
- -

-A functional argument can be provided in one of the following forms -to be passed to a formal parameter of function type in a function call -(see examples below): -

-
    -
  1. as a function name,
  2. -
  3. as a function partial application,
  4. -
  5. as a function that is a component,
  6. -
  7. as a function partial application of a function that is a component.
  8. -
- -

-In all cases the provided function must be \"function type compatible\" -to the corresponding formal parameter of function type. Example: -

- -
-// A function as a positional input argument according to case (a)
-function Parabola
-   extends Integrand;
-algorithm
-   y = x*x;
-end Parabola;
-
-area = quadrature(0, 1, Parabola);
-
-// The quadrature2 example below uses a function integrand that
-// is a component as input argument according to case (c):
-function quadrature2 \"Integrate function y=integrand(x) from x1 to x2\"
-  input  Real x1;
-  input  Real x2;
-  input  Integrand integrand;   // Integrand is a partial function type
-  output Real integral;
-algorithm
-   integral := quadrature(x1,       (x1+x2)/2, integrand)+
-               quadrature((x1+x2)/2, x2,       integrand);
-end quadrature2;
-
")); - end 'function'; - - class 'model' "model" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define specialized class model -

-

Examples

- -
model SlidingMass
-  parameter Modelica.Units.SI.Mass m=1;
-  parameter Modelica.Units.SI.Force f=1;
-  Modelica.Units.SI.Position s;
-  Modelica.Units.SI.Velocity v;
-  Modelica.Units.SI.Acceleration a;
-equation
-  der(s) = v;
-  der(v) = a;
-  m*a = f;
-end SlidingMass;
- -

Syntax

-
   [ encapsulated ][ partial] model
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

-

-The keyword model is identical to the keyword class, i.e., -no restrictions and no enhancements. -

-")); - end 'model'; - - class 'package' "package" - extends ModelicaReference.Icons.Information; - - annotation (Documentation(info=" -

-Define specialized class package -

-

Examples

- -
package Library
-  constant Real k = 0.1;
-
-  type X = Real(min=0);
-
-  model A
-    ...
-  end A;
-
-  model B
-    ...
-  end B;
-end Library;
- -

Syntax

-
   [ encapsulated ][ partial] package
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

-

May only contain declarations of classes and constants. - Enhanced to allow import of elements of packages.

- -")); - end 'package'; - - class 'record' "record" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Define specialized class record -

-

Examples

- -
  record States
-    Modelica.Units.SI.Position s;
-    Modelica.Units.SI.Velocity v;
-  end States;
-
-  record System
-    parameter Modelica.Units.SI.Mass m=1;
-    parameter Modelica.Units.SI.Force f=1;
-    Modelica.Units.SI.Acceleration a;
-    States states;
-  end System;
-
-  model SlidingMass
-    System sys;
-  equation
-    der(sys.states.s) = sys.states.v;
-    der(sys.states.v) = sys.a;
-    sys.m*sys.a = sys.f;
-  end SlidingMass;
- -

Syntax

-
   [ encapsulated ][ partial] record
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

- -

-The keyword record is used to define records which are generally used in -order to group variables. Only public sections are allowed in the definition -or in any of its components (i.e., equation, algorithm, initial equation, -initial algorithm and protected sections are not allowed). May not be used in -connections. The elements of a record may not have prefixes input, output, inner, outer, -or flow. Enhanced with implicitly available record constructor function. -Additionally, record components can be used as component references in -expressions and in the left hand side of assignments, subject to -normal type compatibility rules. -

- -")); - end 'record'; - - class 'type' "type" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Define specialized class type -

-

Examples

- -
type R0Plus = Real(min=0);
- -

Syntax

-
   [ encapsulated ][ partial] type
-   IDENT class_specifier
-
-class_specifier :
-   string_comment composition end IDENT
-   | \"=\" base_prefix name [ array_subscripts ] [ class_modification ] comment
-   | \"=\" enumeration \"(\" ( [enum_list] | \":\" ) \")\" comment
- -

See Modelica Grammar for further details.

- -

Description

-

The keyword type is used to define types, which may only be extensions to the predefined types, enumerations, array of type, or classes extending from type. -Enhanced to extend from predefined types [No other specialized class has this property]. -

- -")); - end 'type'; - - annotation (Documentation(info=" -

-In this package specialized kinds of classes (earlier known as restricted classes) are -described. They have the properties of a general class, apart from restrictions. -Moreover, they have additional properties called enhancements. -

-")); -end Classes; - -package Operators "Operators (+, der, size, ...)" - extends ModelicaReference.Icons.Information; - class ElementaryOperators "Elementary operators (+, >, or, ..)" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Elementary operators are overloaded and operate on variables -of type Real, Integer, Boolean, and String, as well as on scalars -or arrays. -

-

Syntax

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Arithmetic Operators (operate on Real, Integer scalars or arrays)
OperatorsExampleDescription
+, -, .+, .-a + b
- a .+ b
addition and subtraction; element-wise on arrays
*a * bmultiplication;
- scalar*array: element-wise multiplication
- vector*vector: element-wise multiplication (result: scalar)
- matrix*matrix: matrix product
- vector*matrix: row-matrix*matrix (result: vector)
- matrix*vector: matrix*column-matrix (result: vector)
/a / bdivision of two scalars or an array by a scalar;
- division of an array by a scalar is defined element-wise.
- The result is always of real type. In order to get integer
- division with truncation use the function div.
^a^bscalar power or integer power of a square matrix
.*, ./, .^a .* belement-wise multiplication, division and exponentiation of - scalars and arrays
=a * b = c + dequal operator of an equation; element-wise on arrays
:=a := c + dassignment operator; element-wise on arrays
- -  - - - - - - - - - - - - - - - - - - - - - - - - - -
Relational Operators (operate on Real, Integer, Boolean, String scalars)
OperatorsExampleDescription
==a == bequal; for strings: identical characters
<>a <> bnot equal; for strings: a is lexicographically less than b
<a < bless than
<=a <= bless than or equal
>a > bgreater than
>=a >= bgreater than or equal
- -  - - - - - - - - - - - - - - - - -
Boolean Operators (operate on scalars or element-wise on arrays)
OperatorsExampleDescription
anda and blogical and
ora or blogical or
notnot alogical not
- -  - - - - - - - - - - - - - - - - - - - -
Other Operators
OperatorsExampleDescription
[..][1,2;3,4]Matrix constructor; \",\" separates columns, \";\" separates rows
{..}{{1,2}, {3,4}}Array constructor; every {..} adds one dimension
\"...\"\"string value\"
- \"string \"value\"\"
String literal (\" is used inside a string for \")
+\"abc\" + \"def\"Concatenation of string scalars or arrays
- -

Operator precedence determines the order of evaluation of operators in an expression. An operator with higher precedence is evaluated before an operator with lower precedence in the same expression.

- -

The following table presents all the expression operators in order of precedence from highest to lowest. All operators are binary except exponentiation, the postfix operators and those shown as unary together with expr, the conditional operator, the array construction operator {} and concatenation operator [ ], and the array range constructor which is either binary or ternary. Operators with the same precedence occur at the same line of the table:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Operator GroupOperator SyntaxExamples
postfix array index operator[]arr[index]
postfix access operator.a.b
postfix function callfuncName(function-arguments)sin(4.36)
array construct/concat{expressions}
- [expressions]
- [expressions; expressions...] -
{2,3}
[5,6]
[2,3; 7,8]
exponentiation^2^3
multiplicative and
array elementwise multiplicative
*  /  .*  ./2*3   2/3
- [1,2;3,4].*[2,3;5,6]
additive and
array elementwise additive
+  -  +expr  -expr
- .+  .-
a+b, a-b, +a, -a
- [1,2;3,4].+[2,3;5,6]
relational<  <=  >  >=  ==  <>a<b, a<=b, a>b, ...
...
unary negationnot exprnot b1
logical andandb1 and b2
logical or<orb1 or b2
array rangeexpr : expr : expr1:5:100, start:step:stop
conditionalif expr then expr else exprif b then 3 else x
named argumentident = exprx = 2.26
-

The conditional operator may also include elseif-clauses. Equality = and assignment := are not expression operators since they are allowed only in equations and in assignment statements respectively. All binary expression -operators are left associative.

- -

Note, the unary minus and plus in Modelica -is slightly different than in Mathematica (Mathematica is a registered trademark -of Wolfram Research Inc.) and in MATLAB (MATLAB is a registered trademark of MathWorks Inc.), -since the following expressions are illegal (whereas in -Mathematica and in MATLAB these are valid expressions): -

- -
  2*-2   // = -4 in Mathematica/MATLAB; is illegal in Modelica
-  --2    // =  2 in Mathematica/MATLAB; is illegal in Modelica
-  ++2    // =  2 in Mathematica/MATLAB; is illegal in Modelica
-  2--2   // =  4 in Mathematica/MATLAB; is illegal in Modelica
-
- -")); - end ElementaryOperators; - - class 'abs()' "abs()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Absolute value of Real or Integer variable. -

-

Syntax

-
abs(v)
-

Description

-

Is expanded into "noEvent(if v ≥ 0 -then v else -v)". Argument v -needs to be an Integer or Real expression.

-

Examples

-
-  abs({-3, 0, 3})
- = {3, 0, 3}
-")); - end 'abs()'; - - class 'acos()' "acos()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigonometric inverse cosine function -

-

Syntax

-
acos(u)
-

Description

- -

Returns the inverse of cos of u, with -1 ≤ u ≤ +1. -Argument u needs to be an Integer or Real expression.

- -

-The acos function can also be accessed as Modelica.Math.acos. -

- -
-\"acos\" -
- -

Examples

-
acos(0)
- = 1.5707963267949
-")); - end 'acos()'; - - class 'activeState()' "activeState()" -extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-This operator returns true if state is active in a state machine. -

-

Syntax

-
activeState(state)
-

Description

-

-Argument state is a block instance. -The operator returns true, if this instance is a state of a state machine and this state is active at the actual clock tick. -If it is not active, the operator returns false. -

-")); - end 'activeState()'; - - class 'actualStream()' "actualStream()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-The actualStream(v) operator is provided for convenience, in order to return the actual value of the stream variable, depending on the actual flow direction. The only argument of this built-in operator needs to be a reference to a stream variable. The operator is vectorizable, in the case of vector arguments. For the following definition it is assumed that an (inside or outside) connector c contains a stream variable h_outflow which is associated with a flow variable m_flow in the same connector c:

- -
-actualStream(port.h_outflow) = if port.m_flow > 0 then inStream(port.h_outflow)
-                                                  else port.h_outflow;
-
- -

Example

-

-The actualStream(v) operator is typically used in two contexts: -

-
-der(U) = c.m_flow*actualStream(c.h_outflow); // (1)energy balance equation
-h_port = actualStream(port.h);               // (2)monitoring the enthalpy at a port
-
-

-In the case of equation (1), although the actualStream() operator is discontinuous, the product with the flow variable is not, because actualStream()) is discontinuous when the flow is zero by construction. -Therefore, a tool might infer that the expression is smooth(0, ...) automatically, and decide whether or not to generate an event. -If a user wants to avoid events entirely, he/she may enclose the right-hand side of (1) with the noEvent() operator. -

-

-Equations like (2) might be used for monitoring purposes (e.g. plots), in order to inspect what the actual enthalpy of the fluid flowing through a port is. -In this case, the user will probably want to see the change due to flow reversal at the exact instant, so an event should be generated. -If the user does not bother, then he/she should enclose the right-hand side of (2) with noEvent(). -Since the output of actualStream() will be discontinuous, it should not be used by itself to model physical behaviour (e.g., to compute densities used in momentum balances) - inStream() should be used for this purpose. The operator actualStream() should be used to model physical behaviour only when multiplied by the corresponding flow variable (like in the above energy balance equation), because this removes the discontinuity. -

-")); - end 'actualStream()'; - - class 'array()' "array()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-The constructor function array(A,B,C,...) constructs an array from its arguments. -

- -

Examples

- -
-{1,2,3} is a 3-vector of type Integer
-{{11,12,13}, {21,22,23}} is a 2x3 matrix of type Integer
-{{{1.0, 2.0, 3.0}}} is a 1x1x3 array of type Real
-
-Real[3] v = array(1, 2, 3.0);
-type Angle = Real(unit=\"rad\");
-parameter Angle alpha = 2.0; // type of alpha is Real.
-// array(alpha, 2, 3.0) or {alpha, 2, 3.0} is a 3-vector of type Real.
-Angle[3] a = {1.0, alpha, 4}; // type of a is Real[3].
-
- -

Description

- -The constructor function array(A,B,C,...) constructs an array from its arguments according to the following -rules: -
    -
  • Size matching: All arguments must have the same sizes, i.e., size(A)=size(B)=size(C)=...
  • -
  • All arguments must be type compatible expressions giving the type of the elements. The data type of the result array is the maximally expanded type of the arguments. Real and Integer subtypes can be mixed resulting in a Real result array where the Integer numbers have been transformed to Real numbers.
  • -
  • Each application of this constructor function adds a one-sized dimension to the left in the result compared to the dimensions of the argument arrays, i.e., ndims(array(A,B,C)) = ndims(A) + 1 = ndims(B) + 1, ...
  • -
  • {A, B, C, ...} is a shorthand notation for array(A, B, C, ...).
  • -
  • There must be at least one argument [i.e., array() or {} are not defined].
  • -
-")); - end 'array()'; - - class 'asin()' "asin()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigonometric inverse sine function -

-

Syntax

-
asin(u)
-

Description

- -

Returns the inverse of sin of u, with -1 ≤ u ≤ +1. -Argument u needs to be an Integer or Real expression.

- -

-The asin function can also be accessed as Modelica.Math.asin. -

- -
-\"asin\" -
- -

Examples

-
asin(0)
- = 0.0
-")); - end 'asin()'; - - class 'assert()' "assert()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigger error and print error message if assertion condition is not fulfilled -

-

Syntax

-
assert(condition, message, level = AssertionLevel.error)
-

Description

-

The Boolean expression condition shall be true for successful model evaluations. -Otherwise, an error occurs using the string expression message -as error message.

-

If the condition of an assert statement is true, message is not -evaluated and the procedure call is ignored. If the condition -evaluates to false different actions are taken depending on the level input: -

- -
    -
  • level = AssertionLevel.error:
    - The current evaluation is aborted. The simulation may - continue with another evaluation [e.g., with a shorter step-size, - or by changing the values of iteration variables]. - If the simulation is aborted, message indicates the cause of the - error. Failed assertions takes precedence over successful - termination, such that if the model first triggers the - end of successful analysis by reaching the stop-time - or explicitly with terminate(), but the evaluation with - terminal()=true triggers an assert, the analysis failed.
  • -
  • level = AssertionLevel.warning:
    - The current evaluation is not aborted, message indicates - the cause of the warning [It is recommended to report the - warning only once when the condition becomes false, and it is - reported that the condition is no longer violated when the - condition returns to true. The assert(..) statement shall - have no influence on the behavior of the model. - For example, by evaluating the condition and reporting the - message only after accepted integrator steps. The condition - needs to be implicitly treated with noEvent(..) since - otherwise events might be triggered that can lead to slightly - changed simulation results].
  • -
- -

-The AssertionLevel.error case can be used to avoid evaluating a model outside its limits of validity; for instance, a function to compute the saturated liquid temperature cannot be called with a pressure lower than the triple point value. -The AssertionLevel.warning case can be used when the boundary of validity is not hard: for instance, a fluid property model based on a polynomial interpolation curve might give accurate results between temperatures of 250 K and 400 K, but still give reasonable results in the range 200 K and 500 K. When the temperature gets out of the smaller interval, but still stays in the largest one, the user should be warned, but the simulation should continue without any further action. The corresponding code would be -

-
  assert(T > 250 and T < 400, \"Medium model outside full accuracy range\",
-         AssertionLevel.warning);
-  assert(T > 200 and T < 500, \"Medium model outside feasible region\");
-
- -

Examples

-
  parameter Real upperLimit=2;
-  parameter Real lowerLimit=-2;
-equation
-  assert(upperLimit > lowerLimit, \"upperLimit must be greater than lowerLimit.\");
-
-")); - end 'assert()'; - - class 'atan()' "atan()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigonometric inverse tangent function -

-

Syntax

-
atan(u)
-

Description

- -

Returns the inverse of tan of u, with -∞ < u < ∞. -Argument u needs to be an Integer or Real expression.

- -

-The atan function can also be accessed as Modelica.Math.atan. -

- -
-\"atan\" -
- -

Examples

-
atan(1)
- = 0.785398163397448
-")); - end 'atan()'; - - class 'atan2()' "atan2()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Four quadrant inverse tangent -

-

Syntax

-
atan2(u1,u2)
-

Description

- -

-Returns y = atan2(u1,u2) such that tan(y) = u1/u2 and -y is in the range -pi < y ≤ pi. u2 may be zero, provided -u1 is not zero. Usually u1, u2 is provided in such a form that -u1 = sin(y) and u2 = cos(y). -Arguments u1 and u2 need to be Integer or Real expressions. -

- -

-The atan2 function can also be accessed as Modelica.Math.atan2. -

- -
-\"atan2\" -
- -

Examples

-
atan2(1,0)
- = 1.5707963267949
-")); - end 'atan2()'; - - class 'backSample()' "backSample()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Shifts a clocked expressions to undo a delay as part of the synchronous language elements. -

-

Syntax

-
backSample(u, shiftCounter, resolution)
-

Examples

-
-
-  Real x=sample(time, u);
-  // Ticks at 0, 3/10, 6/10 with values corresponding to time
-
-  Real x2=shiftSample(x, 1, 3);
-  // Ticks at 1/10 with value 0/10, and at 4/10 with value 3/10 etc
-
-  Real x3=backSample(x2, 1, 3);
-  // Same as x.
-
-")); - end 'backSample()'; - - class 'cardinality()' "cardinality()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Number of connectors in connection. -This is a deprecated operator. It should no longer be used, since it will be removed in one of the next Modelica releases. -

- -

Syntax

-
cardinality(c)
-

Description

-

Returns the number of (inside and outside) occurrences -of connector instance c in a connect statement as an Integer number.

-

[The cardinality operator allows the definition of connection dependent equations in a model.]

- -

-Instead of the cardinality(..) operator, often conditional -connectors can be used, that are enabled/disabled via Boolean -parameters. -

- -

Examples

-
connector Pin
-  Real      v;
-  flow Real i;
-end Pin;
-model Resistor
-   Pin p, n;
-equation
-   // Handle cases if pins are not connected
-      if cardinality(p) == 0 and cardinality(n) == 0 then
-         p.v = 0;
-         n.v = 0;
-      elseif cardinality(p) == 0 then
-         p.i = 0;
-      elseif cardinality(n) == 0 then
-         n.i = 0;
-      end if;
-   // Equations of resistor
-      ...
-end Resistor;
-")); - end 'cardinality()'; - - class 'cat()' "cat()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-The function cat(k,A,B,C,...)concatenates arrays A,B,C,... along dimension k. -

- -

Examples

- -
-Real[2,3] r1 = cat(1, {{1.0, 2.0, 3}}, {{4, 5, 6}});
-Real[2,6] r2 = cat(2, r1, 2*r1);
-
- -

Description

- -The function cat(k,A,B,C,...)concatenates arrays A,B,C,... along dimension k according to the following rules: -
    -
  • Arrays A, B, C, ... must have the same number of dimensions, i.e., ndims(A) = ndims(B) = ...
  • -
  • Arrays A, B, C, ... must be type compatible expressions giving the type of the elements of the result. The maximally expanded types should be equivalent. Real and Integer subtypes can be mixed resulting in a Real result array where the Integer numbers have been transformed to Real numbers.
  • -
  • k has to characterize an existing dimension, i.e., 1 <= k <= ndims(A) = ndims(B) = ndims(C); k shall be an integer number.
  • -
  • Size matching: Arrays A, B, C, ... must have identical array sizes with the exception of the size of dimension k, i.e., size(A,j) = size(B,j), for 1 <= j <= ndims(A) and j <> k.
  • -
- -

Concatenation is formally defined according to:

-
-Let R = cat(k,A,B,C,...), and let n = ndims(A) = ndims(B) = ndims(C) = ...., then
-size(R,k) = size(A,k) + size(B,k) + size(C,k) + ...
-size(R,j) = size(A,j) = size(B,j) = size(C,j) = ...., for 1 <= j <= n and j <> k.
-R[i_1, ..., i_k, ..., i_n] = A[i_1, ..., i_k, ..., i_n], for i_k <= size(A,k),
-R[i_1, ..., i_k, ..., i_n] = B[i_1, ..., i_k - size(A,i), ..., i_n], for i_k <= size(A,k) + size(B,k),
-....
-where 1 <= i_j <= size(R,j) for 1 <= j <= n.
-
-")); - end 'cat()'; - - class 'ceil()' "ceil()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Round a Real number towards plus infinity -

-

Syntax

-
ceil(x)
-

Description

-

Returns the smallest integer not less than x. -Result and argument shall have type Real. -[Note, outside of a when clause state events are -triggered when the return value changes discontinuously.]

-

Examples

-
ceil({-3.14, 3.14})
- = {-3.0, 4.0}
-")); - end 'ceil()'; - - class 'change()' "change()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Indicate discrete variable changing -

-

Syntax

-
change(v)
-

Description

-

Is expanded into "(v<>pre(v))". -The same restrictions as for the pre() operator apply.

-

Examples

-
model BothEdges
-  Boolean u;
-  Integer i;
-equation
-  u = Modelica.Math.sin(time) > 0.5;
-  when change(u) then
-    i = pre(i) + 1;
-  end when;
-end BothEdges;
- -
-\"Simulation -
-")); - end 'change()'; - - class 'Clock()' "Clock()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Generates clocks as part of the synchronous language elements. -

-

Examples

-
-  Clock c=Clock(2, 1000); // Defines a clock variable
-  Real interval1(start=2e-3);
-equation
-  when Clock() then
-    // Inferred Clock
-    x=A*previous(x)+B*u;
-  end when;
-  when Clock(2,1000) then
-    // periodic clock that ticks at 0, 0.002, 0.004, ...
-    // Could also use when c then
-    y1 = previous(y1) + 1;
-  end when;
-  when Clock(interval1) then
-    // Clock with a Real interval
-    // The clock starts at the start of the simulation, tstart, or when the controller is switched on.
-    // Here the next clock tick is scheduled at previous(interval1)=interval1.start=2e-3
-    // At the second clock tick at tstart+interval1.start the next clock tick is scheduled at
-    // previous(interval1)=5e-3
-    interval1=previous(interval1)+3e-3;
-  end when;
-  when Clock(angle>0, 0.1) then
-    // clock with a boolean interval, triggers when angle>0 becomes true.
-    y2 = previous(y2) + 1;
-  end when;
-  when Clock(c, \"ImplicitTrapezoid\") then
-    // Solver Clock
-    // Ticks at the same rate as c but uses the ImplicitTrapezoid method to solve the differential equations
-    der(x)=x;
-  end when;
-
-")); - end 'Clock()'; - - class 'connect()' "connect()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Connect objects -

-

Examples

- -
model Integrate
-  Modelica.Blocks.Sources.Step step;
-  Modelica.Blocks.Continuous.Integrator integrator;
-equation
-  connect(step.outPort, integrator.inPort);
-end Integrate;
- -

Example of array use:

- -
connector InPort = input Real;
-
-connector OutPort = output Real;
-
-block MatrixGain
-  input InPort u[size(A,1)];
-  output OutPort y[size(A,2)]
-  parameter Real A[:,:]=[1];
-equation
-  y=A*u;
-end MatrixGain;
-
-  sin sinSource[5];
-  MatrixGain gain(A=5*identity(5));
-  MatrixGain gain2(A=ones(5,2));
-  OutPort x[2];
-equation
-  connect(sinSource.y, gain.u); // Legal
-  connect(gain.y, gain2.u);     // Legal
-  connect(gain2.y, x);          // Legal
- -

Syntax

- -

See section on connect_clause in the Modelica Grammar.

- -

Description

- -

Connections between objects are introduced by the connect -statement in the equation part of a class. The connect -construct takes two references to connectors, each of which is -either of the following forms:

- -
    -
  • c1.c2. ... .cn, where c1 is a connector of the class, n≥1 - and ci+1 is a connector element of ci for i=1:(n-1).
  • -
  • m.c, where m is a non-connector element in the class and c is - a connector element of m.
  • -
- -

There may optionally be array subscripts on any of the components; -the array subscripts shall be parameter expressions. If the connect -construct references array of connectors, the array dimensions must -match, and each corresponding pair of elements from the arrays is -connected as a pair of scalar connectors.

- -

The two main tasks are to:

- -
    -
  • Build connection sets from connect statements.
  • -
  • Generate equations for the complete model.
  • -
- -

Definitions:

- -
    -
  • Connection sets
    - A connection set is a set of variables connected by means of - connect clauses. A connection set shall contain either only flow - variables or only non-flow variables.
  • -
  • Inside and outside connectors
    - In an element instance M, each connector element of M is called - an outside connector with respect to M. All other connector elements - that are hierarchically inside M, but not in one of the outside - connectors of M, is called an inside connector with respect to M.
    - [Example: in connect(a,b.c) 'a' is an outside connector and 'b.c' - is an inside connector, unless 'b' is a connector.]
  • -
-")); - end 'connect()'; - - class 'Connections.branch()' "Connections.branch()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Defines required branch of spanning-tree -

- -

Syntax

-
-Connections.branch(A.R,B.R);
-
- -

Description

-

-Defines a branch from the overdetermined type or record instance R in connector instance A to the corresponding overdetermined type or record instance R in connector instance B for a virtual connection graph. -These branches are required to be part of the spanning-tree for the virtual connection graph (they do not directly generate equations, but should be combined with equations coupling A.R to B.R), -whereas connect-statements are optional for the spanning-tree (and generate different equations depending on whether they are part of the spanning-tree or not). -

-

Examples

-

-This function can be used at all places where a connect(...) statement is allowed. -

-

-E.g., it is not allowed to use this function in a when-clause. -This definition shall be used if in a model with connectors A and B the overdetermined records A.R and B.R are algebraically coupled in the model, e.g., due to B.R = f(A.R, <other unknowns>). -

-")); - end 'Connections.branch()'; - - class 'Connections.root()' "Connections.root()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Defines a definite root node. -

-

Syntax

-
-Connections.root(A.R);
-
- -

Description

-

-The overdetermined type or record instance R in connector instance A is a (definite) root node in a virtual connection graph. -

- -

Examples

-

-This definition shall be used if in a model with connector A the overdetermined record A.R is (consistently) assigned, e.g., from a parameter expressions. -

-")); - end 'Connections.root()'; - - class 'Connections.potentialRoot()' "Connection.potentialRoot()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Defines a potential root node. -

-

Syntax

-
-Connections.potentialRoot(A.R);
-Connections.potentialRoot(A.R, priority = p);
-
- -

Description

-

-The overdetermined type or record instance R in connector instance A is a potential root node in a virtual connection graph with priority p (with p ≥ 0). -If no second argument is provided, the priority is zero. p shall be a parameter expression of type Integer. -In a virtual connection subgraph without a Connections.root() definition, one of the potential roots with the lowest priority number is selected as root. -

- -

Examples

-

-This definition may be used if in a model with connector A the overdetermined record A.R appears differentiated, der(A.R), together with the constraint equations of A.R, i.e., a non-redundant subset of A.R maybe used as states. -

-")); - end 'Connections.potentialRoot()'; - - class 'Connections.isRoot()' "Connections.isRoot()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns root status. -

-

Syntax

-
-b = Connections.isRoot(A.R);
-
- -

Description

-

-Returns true, if the overdetermined type or record instance R in connector instance A is selected as a root in the virtual connection graph. -

-")); - end 'Connections.isRoot()'; - - class 'Connections.rooted()' "Connections.rooted()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns which node of a connection branch is closer to root. -

-

Syntax

-
-b = Connections.rooted(A.R);
-b = rooted(A.R);  // deprecated
-
- -

Description

-

-If the operator Connections.rooted(A.R) is used, or the equivalent but deprecated operator rooted(A.R), then there must be exactly one statement Connections.branch(A.R,B.R) involving A.R (the argument of Connections.rooted must be the first argument of Connections.branch). -In that case Connections.rooted(A.R) returns true, if A.R is closer to the root of the spanning tree than B.R; otherwise false is returned. -

-

Examples

-

-This operator can be used to avoid equation systems by providing analytic inverses, see Modelica.Mechanics.MultiBody.Parts.FixedRotation. -

-")); - end 'Connections.rooted()'; - - class 'cos()' "cos()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigonometric cosine function -

-

Syntax

-
cos(u)
-

Description

-

Returns the cosine of u, with -∞ < u < ∞ -Argument u needs to be an Integer or Real expression.

- -

-The cosine function can also be accessed as Modelica.Math.cos. -

- -
-\"cos\" -
- -

Examples

-
cos(3.14159265358979)
- = -1.0
-")); - end 'cos()'; - - class 'cosh()' "cosh()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Hyperbolic cosine function -

-

Syntax

-
cosh(u)
-

Description

-

Returns the cosh of u, with -∞ < u < ∞. -Argument u needs to be an Integer or Real expression.

- -

-The cosh function can also be accessed as Modelica.Math.cosh. -

- -
-\"cosh\" -
- -

Examples

-
cosh(1)
-  = 1.54308063481524
-")); - end 'cosh()'; - - class 'cross()' "cross()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Return cross product of two vectors -

-

Syntax

-
cross(x, y)
-

Description

-

-Returns the cross product of the 3-vectors x and y, i.e. -

-
-cross(x,y) = vector( [ x[2]*y[3]-x[3]*y[2];
-                       x[3]*y[1]-x[1]*y[3];
-                       x[1]*y[2]-x[2]*y[1] ] );
-
-")); - end 'cross()'; - - class 'delay()' "delay()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Delay expression -

-

Syntax

-
delay(expr, delayTime, delayMax)
-delay(expr, delayTime)
-

Description

-

Returns \"expr(time - delayTime)\" for time > time.start + delayTime -and \"expr(time.start)\" for time ≤ time.start + delayTime. The -arguments, i.e., expr, delayTime and delayMax, need to be subtypes of Real. -delayMax needs to be additionally a parameter expression. The following relation -shall hold: 0 ≤ delayTime ≤ delayMax, otherwise an error occurs. If -delayMax is not supplied in the argument list, delayTime need to be a -parameter expression.

-

[The delay operator allows a numerical sound implementation -by interpolating in the (internal) integrator polynomials, as well as a -more simple realization by interpolating linearly in a buffer containing -past values of expression expr. Without further information, the complete -time history of the delayed signals need to be stored, because the delay -time may change during simulation. To avoid excessive storage requirements -and to enhance efficiency, the maximum allowed delay time has to be given -via delayMax, or delayTime must be a parameter expression (so that the -constant delay is known before simulation starts). -This gives an upper bound on the values of the delayed -signals which have to be stored. For realtime simulation where fixed step -size integrators are used, this information is sufficient to allocate the -necessary storage for the internal buffer before the simulation starts. -For variable step size integrators, the buffer size is dynamic during -integration. In principal, a delay operator could break algebraic loops. -For simplicity, this is not supported because the minimum delay time has -to be give as additional argument to be fixed at compile time. Furthermore, -the maximum step size of the integrator is limited by this minimum delay -time in order to avoid extrapolation in the delay buffer.]

-

Examples

-
model Delay
-  Real x;
-  Real y;
-equation
-  der(x) = 2;
-  y = delay(x, 1);
-end Delay;
- -
-\"Simulation -
-")); - end 'delay()'; - - class 'der()' "der()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Time derivative of expression or
-partial derivative of function -

- -

Syntax

- -
der(expr) or
-IDENT \"=\" der \"(\" name \",\" IDENT { \",\" IDENT } \")\" comment
- -

Description

-

-The first form is the time derivative of expression expr. -If the expression expr is a scalar it needs to be a subtype of Real. The expression and all its subexpressions must be differentiable. If expr is an array, the operator is applied to all elements of the array. For Real parameters and -constants the result is a zero scalar or array of the same size as the -variable.

- -

-The second form is the partial derivative of a function -and may only be used as declarations of functions. -The semantics is that a function [and only a function] can be specified in this form, defining that it is the partial derivative of the function to the right of the equal sign (looked up in the same way as a short class definition - the looked up name must be a function), and partially differentiated with respect to each IDENT in order (starting from the first one). The IDENT must be Real inputs to the function. -The comment allows a user to comment the function (in the info-layer and as one-line description, and as icon). -

- -

Examples

- -
  Real x, xdot1, xdot2;
-equation
-  xdot1 = der(x);
-  xdot2 = der(x*sin(x));
-
- -

-The specific enthalpy can be computed from a Gibbs-function as follows: -

- -
function Gibbs
-  input Real p,T;
-  output Real g;
-algorithm
-  ...
-end Gibbs;
-
-function Gibbs_T=der(Gibbs, T);
-
-function specificEnthalpy
-  input Real p,T;
-  output Real h;
-algorithm
-  h:=Gibbs(p,T)-T*Gibbs_T(p,T);
-end specificEnthalpy;
-
-")); - end 'der()'; - - class 'diagonal()' "diagonal()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns a diagonal matrix -

-

Syntax

-
diagonal(v)
-

Description

-

-Returns a square matrix with the elements of vector v -on the diagonal and all other elements zero. -

-")); - end 'diagonal()'; - - class 'div()' "div()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Integer part of division of two Real numbers -

-

Syntax

-
div(x, y)
-

Description

-

Returns the algebraic quotient x/y with any -fractional part discarded (also known as truncation -toward zero). [Note: this is defined for / in C99; -in C89 the result for negative numbers is -implementation-defined, so the standard function -div() must be used.] Result and arguments -shall have type Real or Integer. If either of the -arguments is Real the result is Real otherwise Integer.

- -

[Note, outside of a when clause state events are triggered -when the return value changes discontinuously.]

- -

Examples

-
div(13,6)
- = 2
-")); - end 'div()'; - - class 'edge()' "edge()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Indicate rising edge -

-

Syntax

-
edge(b)
-

Description

-

Is expanded into "(b and not pre(b))" -for Boolean variable b. The same restrictions as for the -pre operator apply (e.g., not to be used in function -classes).

-

Examples

-
model RisingEdge
-  Boolean u;
-  Integer i;
-equation
-  u = Modelica.Math.sin(time) > 0.5;
-  when edge(u) then
-    i = pre(i) + 1;
-  end when;
-end RisingEdge;
- -
-\"Simulation -
-")); - end 'edge()'; - - class 'exp()' "exp()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Exponential, base e. -

-

Syntax

-
exp(u)
-

Description

-

Returns the base e exponential of u, with -∞ < u < ∞ -Argument u needs to be an Integer or Real expression.

- -

-The exponential function can also be accessed as Modelica.Math.exp. -

- -
-\"exp\" -
- -

Examples

-
exp(1)
- = 2.71828182845905
-")); - end 'exp()'; - - class 'fill()' "fill()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Return a Real, Integer, Boolean or String array with all elements equal -

-

Syntax

-
fill(s, n1, n2, n3, ...)
-

Description

-

-Returns the n1 x n2 x n3 x ... array with all elements equal -to scalar or array expression s (ni >= 0). The returned -array has the same type as s. Recursive definition: -

-
-fill(s,n1,n2,n3, ...) = fill(fill(s,n2,n3, ...), n1);
-fill(s,n) = {s,s,..., s}
-
-

Examples

-
-Real    mr[2,2] = fill(-1,2,2);  // = [-1,-1;-1,-1]
-Boolean vb[3]   = fill(true,3);  // = {true, true, true}
-
-")); - end 'fill()'; - - class 'firstTick()' "firstTick()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns true for the first tick of the clock, part of the synchronous language elements. -

-

Syntax

-
firstTick(u)
-

Description

-

-This operator returns true at the first tick of the clock of the expression, in which this operator is called. -The operator returns false at all subsequent ticks of the clock. The optional argument u is only used for clock inference. -

-")); - end 'firstTick()'; - - class 'floor()' "floor()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Round Real number towards minus infinity -

-

Syntax

-
floor(x)
-

Description

-

Returns the largest integer not greater than x. -Result and argument shall have type Real. [Note, outside -of a when clause state events are triggered when the return -value changes discontinuously.]

-

Examples

-
floor({-3.14, 3.14})
- = {-4.0, 3.0}
-")); - end 'floor()'; - - class 'hold()' "hold()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns a piecewise constant signal based on a clocked variable as part of the synchronous language elements. -

-

Syntax

-
hold(u)
-

Description

-

-Input argument u is a clocked Component Expression or a parameter expression. -The operator returns a piecewise constant signal of the same type of u. -When the clock of u ticks, the operator returns u and -otherwise returns the value of u from the last clock activation. -Before the first clock activation of u, the operator returns the start value of u. -

-")); - end 'hold()'; - - class 'homotopy()' "homotopy()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-During the initialization phase of a dynamic simulation problem, it often happens that large nonlinear systems of equations must be solved by means of an iterative solver. -The convergence of such solvers critically depends on the choice of initial guesses for the unknown variables. -The process can be made more robust by providing an alternative, simplified version of the model, such that convergence is possible even without accurate initial guess values, and then by continuously transforming the simplified model into the actual model. -This transformation can be formulated using expressions of this kind: -

- -
-lambda*actual + (1-lambda)*simplified
-
- -

-in the formulation of the system equations, and is usually called a homotopy transformation. -If the simplified expression is chosen carefully, the solution of the problem changes continuously with lambda, so by taking small enough steps it is possible to eventually obtain the solution of the actual problem. -

-

-It is recommended to perform (conceptually) one homotopy iteration over the whole model, and not several homotopy iterations over the respective non-linear algebraic equation systems. -The reason is that the following structure can be present: -

-
-w = f1(x) // has homotopy operator
-0 = f2(der(x), x, z, w)
-
-

-Here, a non-linear equation system f2 is present. -The homotopy operator is, however used on a variable that is an 'input' to the non-linear algebraic equation system, and modifies the characteristics of the non-linear algebraic equation system. -The only useful way is to perform the homotopy iteration over f1 and f2 together. -

-

-The suggested approach is 'conceptual', because more efficient implementations are possible, e.g., by determining the smallest iteration loop, that contains the equations of the first BLT block in which a homotopy operator is present and all equations up to the last BLT block that describes a non-linear algebraic equation system. -

-

-A trivial implementation of the homotopy operator is obtained by defining the following function in the globalscope: -

- -
-function homotopy
-  input Real actual;
-  input Real simplified;
-  output Real y;
-algorithm
-  y := actual;
-  annotation(Inline = true);
-end homotopy;
-
- -

Syntax

-
-homotopy(actual=actual, simplified=simplified)
-
- -

Description

-

-The scalar expressions 'actual' and 'simplified' are subtypes of Real. -A Modelica translator should map this operator into either of the two forms: -

-
    -
  1. Returns 'actual' [a trivial implementation].
  2. -
  3. In order to solve algebraic systems of equations, the operator might during the solution process return a combination of the two arguments, ending at actual, e.g.,

    -
    
    -actual*lambda + simplified*(1-lambda),
    -
    -

    where lambda is a homotopy parameter going from 0 to 1.

    -

    The solution must fulfill the equations for homotopy returning 'actual'.

  4. -
- -

Examples

-
Example 1
-

-In electrical systems it is often difficult to solve non-linear algebraic equations if switches are part of the -algebraic loop. -An idealized diode model might be implemented in the following way, by starting with a 'flat' diode characteristic and then move with the homotopy operator to the desired 'steep' characteristic: -

-
-model IdealDiode
-  ...
-  parameter Real Goff = 1e-5;
-protected
-  Real Goff_flat = max(0.01, Goff);
-  Real Goff2;
-equation
-  off = s < 0;
-  Goff2 = homotopy(actual=Goff, simplified=Goff_flat);
-  u = s*(if off then 1     else Ron2) + Vknee;
-  i = s*(if off then Goff2 else 1   ) + Goff2*Vknee;
-  ...
-end IdealDiode;
-
- -
Example 2
-

-In electrical systems it is often useful that all voltage sources start with zero voltage and all current sources with zero current, since steady state initialization with zero sources can be easily obtained. -A typical voltage source would then be defined as: -

- -
-model ConstantVoltageSource
-  extends Modelica.Electrical.Analog.Interfaces.OnePort;
-  parameter Modelica.Units.SI.Voltage V;
-equation
-  v = homotopy(actual=V, simplified=0.0);
-end ConstantVoltageSource;
-
- -
Example 3
-

-In fluid system modelling, the pressure/flowrate relationships are highly nonlinear due to the quadratic terms and due to the dependency on fluid properties. -A simplified linear model, tuned on the nominal operating point, can be used to make the overall model less nonlinear and thus easier to solve without accurate start values. -Named arguments are used here in order to further improve the readability. -

- -
-model PressureLoss
-  import SI = Modelica.Units.SI;
-  ...
-  parameter SI.MassFlowRate m_flow_nominal \"Nominal mass flow rate\";
-  parameter SI.Pressure     dp_nominal     \"Nominal pressure drop\";
-  SI.Density                rho            \"Upstream density\";
-  SI.DynamicViscosity       lambda         \"Upstream viscosity\";
-equation
-  ...
-  m_flow = homotopy(actual     = turbulentFlow_dp(dp, rho, lambda),
-                    simplified = dp/dp_nominal*m_flow_nominal);
-  ...
-end PressureLoss;
-
- -
Example 4
-

-Note that the homotopy operator shall not be used to combine unrelated expressions, since this can generate singular systems from combining two well-defined systems. -

- -
-model DoNotUse
-  Real x;
-  parameter Real x0 = 0;
-equation
-  der(x) = 1-x;
-initial equation
-  0 = homotopy(der(x), x - x0);
-end DoNotUse;
-
-

-The initial equation is expanded into -

-
-0 = lambda*der(x) + (1-lambda)*(x-x0)
-
-

-and you can solve the two equations to give -

-
-x = (lambda+(lambda-1)*x0)/(2*lambda - 1)
-
-

-which has the correct value of x0 at lambda = 0 and of 1 at lambda = 1, but unfortunately has a singularity at lambda = 0.5. -

-")); - end 'homotopy()'; - - class 'identity()' "identity()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the identity matrix of the desired size -

-

Syntax

-
identity(n)
-

Description

-

-Returns the n x n Integer identity matrix, with ones -on the diagonal and zeros at the other places. -

-")); - end 'identity()'; - - class 'initial()' "initial()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-True during initialization -

-

Syntax

-
initial()
-

Description

-

Returns true during the initialization phase and false otherwise.

-

Examples

-
  Boolean off;
-  Real x;
-equation
-  off = x < -2 or initial();
-")); - end 'initial()'; - - class 'initialState()' "initialState()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Defines the initially active block instance of the state machine. -

-

Syntax

-
initialState(state)
-

Description

-

Argument state is the block instance that is defined to be the initial state of a state machine. -At the first clock tick of the state machine, this state becomes active.

-")); - end 'initialState()'; - - class 'inStream()' "inStream()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the mixing value of a stream variable if it flows into the component where the inStream operator -is used. -

- -

-For an introduction into stream variables and an example for the inStream(..) operator, see -stream. -

- -

Syntax

- -
inStream(IDENT) 
- -

-where IDENT must be a variable reference in a connector component declared with the -stream prefix. -

- -

Description

- -

-In combination with the stream variables of a connector, the inStream() operator -is designed to describe in a numerically reliable way the bi-directional -transport of specific quantities carried by a flow of matter. inStream(v) is -only allowed on stream variables v and is informally the value the stream -variable has, assuming that the flow is from the connection point into the -component. This value is computed from the stream connection equations of the -flow variables and of the stream variables. For the following definition it is -assumed that N inside connectors mj.c (j=1,2,...,N) and M outside connectors -ck(k=1,2,...,M) belonging to the same connection set -are connected together and a stream variable h_outflow is associated with -a flow variable m_flow in connector c. -

- -
connector FluidPort
-   ...
-   flow   Real m_flow     \"Flow of matter; m_flow > 0 if flow into component\";
-   stream Real h_outflow  \"Specific variable in component if m_flow < 0\"
-end FluidPort;
-
-model FluidSystem
-   ...
-   FluidComponent m1, m2, ..., mN;
-   FluidPort      c1, c2, ..., cM;
-equation
-   connect(m1.c, m2.c);
-   connect(m1.c, m3.c);
-      ...
-   connect(m1.c, mN.c);
-   connect(m1.c, c1);
-   connect(m1.c, c2);
-      ...
-   connect(m1.c, cM);
-   ...
-end FluidSystem;
-
- -

-With these prerequisites, the semantics of the expression -

- -
inStream(mi.c.h_outflow)
-
- -

-is given implicitly by defining an additional variable h_mix_ini, -and by adding to the model the conservation equations for mass and energy corresponding -to the infinitesimally small volume spanning the connection set. The connect equation -for the flow variables has already been added to the system according to the connection -semantics of flow variables: -

- -
// Standard connection equation for flow variables
-0 = sum(mj.c.m_flow for j in 1:N) + sum(-ck.m_flow for k in 1:M);
-
- -

-Whenever the inStream() operator is applied to a stream variable of an -inside connector, the balance equation of the transported property must -be added under the assumption of flow going into the connector -

- -
// Implicit definition of the inStream() operator applied to inside connector i
-0 = sum(mj.c.m_flow*(if mj.c.m_flow > 0 or j==i then h_mix_ini else mj.c.h_outflow) for j in 1:N) +
-    sum(-ck.m_flow* (if ck.m_flow > 0 then h_mix_ini else inStream(ck.h_outflow) for k in 1:M);
-inStream(mi.c.h_outflow) = h_mix_ini;
-
- -

-Note that the result of the inStream(mi.c.h_outflow) operator is different for each port i, -because the assumption of flow entering the port is different for each of them. -Additional equations need to be generated for the stream variables of outside connectors. -

- -
// Additional connection equations for outside connectors
-for q in 1:M loop
-  0 = sum(mj.c.m_flow*(if mj.c.m_flow > 0 then h_mix_outq else mj.c.h_outflow) for j in 1:N) +
-      sum(-ck.m_flow* (if ck.m_flow > 0 or k==q then h_mix_outq else inStream(ck.h_outflow)
-          for k in 1:M);
-  cq.h_outflow = h_mix_outq;
-end for;
-
- -

-Neglecting zero flow conditions, the above implicit equations can be -analytically solved for the inStream(..) operators. -The details are given in Section 15.2 (Stream Operator inStream and Connection Equations) of the Modelica 3.4 specification. -The stream connection equations have singularities and/or multiple solutions if one or more -of the flow variables become zero. When all the flows are zero, a singularity is always -present, so it is necessary to approximate the solution in an open neighborhood -of that point. [For example assume that mj.c.m_flow = ck.m_flow = 0, -then all equations above are identically fulfilled and inStream(..) can have any value]. -It is required that the inStream() operator is appropriately approximated in that case -and the approximation must fulfill the following requirements: -

- -
    -
  1. inStream(mi.c.h_outflow) and inStream(ck.h_outflow) - must be unique with respect to all values of the flow and stream - variables in the connection set, and must have a continuous dependency on them.
     
  2. -
  3. Every solution of the implicit equation system above must fulfill the equation - system identically [up to the usual numerical accuracy], - provided the absolute value of every flow variable in the connection set is - greater than a small value (|m1.c.m_flow| > eps and |m2.c.m_flow| > eps - and ... and |cM.m_flow| > eps).
  4. -
- -

-In Section 15.2 a recommended implementation of the solution of the implicit equation system is -given, that fulfills the above requirements. -

- -")); - end 'inStream()'; - - class 'Integer()' "Integer()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns ordinal number of enumeration -

-

Syntax

-
Integer(<expression of enumeration type>)
-

Description

-

-Returns the ordinal number of the enumeration value E.enumvalue, to which the expression -is evaluated, where Integer(E.e1) =1, Integer(E.en) =size(E), for an enumeration -type E=enumeration(e1, ..., en). -

- -

Examples

-
-type Size = enumeration(small, medium, large, xlarge);
-Size tshirt = Size.large;
-Integer tshirtValue = Integer(tshirt);  // = 3
-
-")); - end 'Integer()'; - - class 'integer()' "integer()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Round Real number towards minus infinity -

-

Syntax

-
integer(x)
-

Description

-

Returns the largest integer not greater than x. -The argument shall have type Real. The result has type Integer.

-

[Note, outside of a when clause state events are triggered -when the return value changes discontinuously.]

-

Examples

-
integer({-3.14, 3.14})
- = {-4, 3}
-")); - end 'integer()'; - - class 'interval()' "interval()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Part of the synchronous language elements. -

-

Syntax

-
interval(u)
-

Description

-

-This operator returns the interval between the previous and present tick of the clock of the expression, in which this operator is called. -The optional argument u is only used for clock inference. -

-")); - end 'interval()'; - - class 'linspace()' "linspace()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Return Real vector with equally spaced elements -

-

Syntax

-
linspace(x1, x2, n)
-

Description

-

-Returns a Real vector with n equally spaced elements, -such that -

-
-v[i] = x1 + (x2-x1)*(i-1)/(n-1) for 1 ≤ i ≤ n.
-
-

-It is required that n ≥ 2. The arguments x1 and x2 shall -be Real or Integer scalar expressions. -

-

Examples

-
-Real v[:] = linspace(1,7,4);  // = {1, 3, 5, 7}
-
-")); - end 'linspace()'; - - class 'log()' "log()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Natural (base e) logarithm -

-

Syntax

-
log(u)
-

Description

-

Returns the base e logarithm of u, with u > 0. -Argument u needs to be an Integer or Real expression.

- -

-The natural logarithm can also be accessed as Modelica.Math.log. -

- -
-\"log\" -
- -

Examples

-
log(1)
- = 0
-")); - end 'log()'; - - class 'log10()' "log10()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Base 10 logarithm -

-

Syntax

-
log10(u)
-

Description

-

Returns the base 10 logarithm of u, with u > 0. -Argument u needs to be an Integer or Real expression.

- -

-The base 10 logarithm can also be accessed as Modelica.Math.log10. -

- -
-\"log10\" -
- -

Examples

-
log10(1)
- = 0
-")); - end 'log10()'; - - class 'matrix()' "matrix()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the first two dimensions of an array as matrix -

-

Syntax

-
matrix(A)
-

Description

-

-Returns promote(A,2), if A is a scalar or vector and -otherwise returns the elements of the first two dimensions -as a matrix. size(A,i) = 1 is required for -2 < i ≤ ndims(A). -

-

-Function promote(A,n) fills dimensions of size 1 -from the right to array A up to dimension n, where -\"n > ndims(A)\" is required. Let -C = promote(A,n), with nA = ndims(A), -then -

-
-ndims(C) = n,
-size(C,j) = size(A,j) for 1 ≤ j ≤ nA,
-size(C,j) = 1 for nA+1 ≤ j ≤ n,
-C[i_1, ..., i_nA, 1, ..., 1] = A[i_1, ..., i_nA].
-
-")); - end 'matrix()'; - - class 'max()' "max()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the largest element -

-

Syntax

-
-max(A)
-max(x,y)
-max(e(i, ..., j) for i in u, ..., j in v)
-
-

Description

-

-The first form returns the largest element of array expression A. -

-

-The second form returns the largest element of the scalars x and y. -

-

-The third form is a reduction expression and -returns the largest value of the -scalar expression e(i, ..., j) evaluated for all -combinations of i in u, ..., j in v -

-

Examples

-
-max(i^2 for i in {3,7,6})  // = 49
-
-")); - end 'max()'; - - class 'min()' "min()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the smallest element -

-

Syntax

-
-min(A)
-min(x,y)
-min(e(i, ..., j) for i in u, ..., j in v)
-
-

Description

-

-The first form returns the smallest element of array expression A. -

-

-The second form returns the smallest element of the scalars x and y. -

-

-The third form is a reduction expression and -returns the smallest value of the -scalar expression e(i, ..., j) evaluated for all -combinations of i in u, ..., j in v -

-

Examples

-
-min(i^2 for i in {3,7,6})  // = 9
-
-")); - end 'min()'; - - class 'mod()' "mod()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Integer modulus of a division of two Real numbers -

-

Syntax

-
mod(x, y)
-

Description

-

Returns the integer modulus of x/y, i.e., mod(x, y) = x - floor(x/y)*y. -Result and arguments shall have type Real or Integer. If either of the -arguments is Real the result is Real otherwise Integer. [Note, outside of -a when clause state events are triggered when the return value changes -discontinuously.]

-

Examples

-
mod(3,1.4)
- = 0.2
-mod(-3,1.4)
- = 1.2
-mod(3,-1.4)
- = -1.2
-")); - end 'mod()'; - - class 'ndims()' "ndims()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Return number of array dimensions -

-

Syntax

-
ndims(A)
-

Description

-

-Returns the number of dimensions k of array expression -A, with k >= 0. -

-

Examples

-
-Real A[8,4,5];
-Integer n = ndims(A);  // = 3
-
-")); - end 'ndims()'; - - class 'noClock()' "noClock()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Part of the synchronous language elements. -

-

Syntax

-
noClock(u)
-

Description

-

-The clock of y = noClock(u) is always inferred. -At every tick of the clock of y, the operator returns the value of u from the last tick of the clock of u. -If noClock(u) is called before the first tick of the clock of u, the start value of u is returned. -

-")); - end 'noClock()'; - - class 'noEvent()' "noEvent()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Turn off event triggering -

-

Syntax

-
noEvent(expr)
-

Description

-

Real elementary relations within expr are taken literally, i.e., no state or time event is triggered.

-

smooth vs. noEvent

-

The noEvent operator implies that real elementary expressions are taken -literally instead of generating crossing functions. The smooth operator -should be used instead of noEvent, in order to avoid events for efficiency -reasons. A tool is free to not generate events for expressions inside smooth. -However, smooth does not guarantee that no events will be generated, and thus -it can be necessary to use noEvent inside smooth. [Note that smooth does -not guarantee a smooth output if any of the occurring variables change -discontinuously.]

-

[Example:

-
  Real x, y, z;
-equation
-  x = if time<1 then 2 else time-2;
-  z = smooth(0, if time<0 then 0 else time);
-  y = smooth(1, noEvent(if x<0 then 0 else sqrt(x)*x));
-  // noEvent is necessary.
-

]

-

Examples

-
der(h)=if noEvent(h>0) then -c*sqrt(h) else 0;
-")); - end 'noEvent()'; - - class 'ones()' "ones()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns an array with \"1\" elements -

-

Syntax

-
ones(n1, n2, n3, ...)
-

Description

-

-Return the n1 x n2 x n3 x ... Integer array with all -elements equal to one (ni >=0 ). -

-")); - end 'ones()'; - - class 'outerProduct()' "outerProduct()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the outer product of two vectors -

-

Syntax

-
outerProduct(v1,v2)
-

Description

-

-Returns the outer product of vectors v1 and v2
-(= matrix(v)*transpose( matrix(v) ) ). -

-")); - end 'outerProduct()'; - - class 'pre()' "pre()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Refer to left limit -

-

Syntax

-
pre(y)
-

Description

-

Returns the "left limit" y(tpre) -of variable y(t) at a time instant t. At an event instant, -y(tpre) is the value of y after the last event -iteration at time instant t. The -pre operator can be applied if the following three -conditions are fulfilled simultaneously:

-
    -
  • variable y is a subtype of a simple type
  • -
  • y is a discrete-time expression
  • -
  • the operator is not applied in a function class
  • -
-

The first value of pre(y) is -determined in the initialization phase.

-

A new event is triggered if at least for one variable v -"pre(v) <> v" after the active model -equations are evaluated at an event instant. In this case -the model is at once reevaluated. This evaluation sequence -is called "event iteration". The integration -is restarted, if for all v used in pre-operators the -following condition holds: "pre(v) == v".

-

[If v and pre(v) are only used in when clauses, -the translator might mask event iteration for variable v since -v cannot change during event iteration. It is a "quality -of implementation" to find the minimal loops for event -iteration, i.e., not all parts of the model need to be -reevaluated.

-

The language allows mixed algebraic systems of equations -where the unknown variables are of type Real, Integer, Boolean, -or an enumeration. These systems of equations can be solved by -a global fix point iteration scheme, similarly to the event -iteration, by fixing the Boolean, Integer, and/or enumeration -unknowns during one iteration. Again, it is a quality of -implementation to solve these systems more efficiently, e.g., -by applying the fix point iteration scheme to a subset of the -model equations.]

-

Note that pre(v) requires the argument to be a variable and a discrete-time expression, -this formulation was chosen to allow using pre(v) both for discrete-time variables and -for continuous-time variables inside when-clauses. -

-

Examples

-
model Hysteresis
-  Real u;
-  Boolean y;
-equation
-  u = Modelica.Math.sin(time);
-  y = u > 0.5 or pre(y) and u >= -0.5;
-end Hysteresis;
- -
-\"Simulation -
-")); - end 'pre()'; - - class 'previous()' "previous()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Gives the previous value of a clocked expression as part of the synchronous language elements. -

-

Syntax

-
previous(u)
-

Description

-

-The return argument has the same type as the input argument. -Input and return arguments are on the same clock. -At the first tick of the clock of u or after a reset transition, -the start value of u is returned. -At subsequent activations of the clock of u, the value of u from the previous clock activation is returned. -

-")); - end 'previous()'; - - class 'product()' "product()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the scalar product -

-

Syntax

-
-product(A)
-product(e(i, ..., j) for i in u, ..., j in v)
-
-

Description

-

-The first form returns the scalar product of all the elements of -array expression A:
-A[1,...,1]*A[2,...,1]*....*A[end,...,1]*A[end,...,end] -

-

-The second form is a reduction expression and -returns the product of the expression e(i, ..., j) evaluated for all combinations of i in u, ..., j in v: -

-
-e(u[1],...,v[1]) * e(u[2],...,v[1]) * ... *
-e(u[end],...,v[1]) * ... * e(u[end],...,v[end])
-
-

-The type of product(e(i, ..., j) for i in -u, ..., j in v) is the same as the type of e(i,...j). -

-

Examples

-
-{product(j for j in 1:i) for i in 0:4} // = {1,1,2,6,24}
-
-")); - end 'product()'; - - class 'reinit()' "reinit()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Reinitialize state variable -

- -

Syntax

-
reinit(x, expr)
-

Description

-

-The operator reinitializes x with expr at an event instant. x is a Real variable -(or an array of Real variables) that must be selected as a state (resp., states), that is -reinit on x implies stateSelect = StateSelect.always on x. -expr needs to be type-compatible with x. The reinit operator can for the same variable -(resp. array of variables) only be applied (either as an individual variable or as part -of an array of variables) in one equation (having reinit of the same variable in when and -else-when of the same variable is allowed). -The reinit operator can only be used in the body of a when-equation. It cannot be used -in an algorithm section. -

- -

-The reinit operator does not break the single assignment rule, because reinit(x,expr) -in equations evaluates expr to a value (value), then at the end of the current event iteration step -it assigns this value to x (this copying from values to reinitialized state(s) is done after -all other evaluations of the model and before copying x to pre(x)). -

- -

- -[If a higher index system is present, that is constraints between state variables, -some state variables need to be redefined to non-state variables. During simulation, -non-state variables should be chosen in such a way that variables with an applied reinit -operator are selected as states at least when the corresponding when-clauses become active. -If this is not possible, an error occurs, since otherwise the reinit operator would be applied -on a non-state variable.] - -

- -

Examples

-
-// Bouncing ball
-   parameter Real e=0.5 \"Coefficient of restitution\"
-   Real h, v;
-   Boolean flying;
-equation
-   der(h) = v;
-   der(v) = if flying then -g else 0;
-   flying = not (h<=0 and v<=0);
-
-   when h < 0 then
-     reinit(v, -e*pre(v));
-   end when;
-
-")); - end 'reinit()'; - - class 'rem()' "rem()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Integer remainder of the division of two Real numbers -

-

Syntax

-
rem(x, y)
-

Description

-

Returns the integer remainder of x/y, -such that div(x,y) * y + rem(x, y) = x. -Result and arguments shall have type Real or -Integer. If either of the arguments is Real the -result is Real otherwise Integer. [Note, outside -of a when clause state events are triggered when -the return value changes discontinuously.]

-

Examples

-
rem(3,1.4)
- = 0.2
-rem(-3,1.4)
- = -0.2
-rem(3,-1.4)
- = 0.2
-")); - end 'rem()'; - - class 'rooted()' "rooted() - deprecated" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Deprecated operator, see Connections.rooted() instead. -

-")); - end 'rooted()'; - - class 'sample()' "sample()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigger time events -

-

Syntax

-
sample(start, interval)
-

Description

-

Returns true and triggers time events at time instants -"start + i*interval" (i=0, 1, ...). -During continuous integration the operator returns always -false. The starting time "start" and the sample -interval "interval" need to be parameter -expressions and need to be a subtype of Real or Integer. -

-

Examples

-
model Sampling
-  Integer i;
-equation
-  when sample(1, 0.1) then
-    i = pre(i) + 1;
-  end when;
-end Sampling;
- -
-\"Simulation -
-")); - end 'sample()'; - - class 'sample()clocked' "sample() Clocked" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Samples a value according to a clock as part of the synchronous language elements. -

-

Syntax

-
sample(u)
-
sample(u, c)
-

Description

-

- The operator returns a clocked variable that has c as associated clock and has the value of the - left limit of u when c is active (that is the value of u just before the event of c is triggered). - If argument c is not provided, it is inferred -

-

-The return argument has the same type as the first input argument. -The optional argument c is of type Clock. -

-")); - end 'sample()clocked'; - - class 'scalar()' "scalar()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns a one-element array as scalar -

-

Syntax

-
scalar(A)
-

Description

-

-Returns the single element of array A. -size(A,i) = 1 is required for 1 ≤ i ≤ ndims(A). -

-

Examples

-
-Real A[1,1,1] = {{{3}}};
-Real e = scalar(A);  // = 3
-
-")); - end 'scalar()'; - - class 'semiLinear()' "semiLinear()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns \"if x >= 0 then positiveSlope*x else negativeSlope*x\" and handle x=0 in a meaningful way -

-

Syntax

-
semiLinear(x, positiveSlope, negativeSlope)
-

Description

-

-Returns \"if x >= 0 then positiveSlope*x else negativeSlope*x\". -In some situations, equations with the semiLinear function -become underdetermined if the first argument (x) becomes -zero, i.e., there are an infinite number of solutions. -It is recommended that the following rules are used to -transform the equations during the translation phase in -order to select one meaningful solution in such cases: -

-

-Rule 1: The equations -

-
-y = semiLinear(x, sa, s1);
-y = semiLinear(x, s1, s2);
-y = semiLinear(x, s2, s3);
-   ...
-y = semiLinear(x, sN, sb);
-
-

-may be replaced by -

-
-s1 = if x >= 0 then sa else sb
-s2 = s1;
-s3 = s2;
-   ...
-sN = sN-1;
-y = semiLinear(x, sa, sb);
-
-

-Rule 2: The equations -

-
-x = 0;
-y = 0;
-y = semiLinear(x, sa, sb);
-
-

-may be replaced by -

-
-x = 0
-y = 0;
-sa = sb;
-
-

- [For symbolic transformations, the following property is -useful (this follows from the definition): -

-
-semiLinear(m_flow, port_h, h);
-
-

-is identical to -

-
--semiLinear(-m_flow, h, port_h);
-
-

- The semiLinear function is designed to handle reversing -flow in fluid systems, such as -

-
-H_flow = semiLinear(m_flow, port.h, h);
-
-

- i.e., the enthalpy flow rate H _flow is computed from the mass flow -rate m_flow and the upstream specific enthalpy depending on the -flow direction.] -

-")); - end 'semiLinear()'; - - class 'shiftSample()' "shiftSample()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Shifts a clocked expressions to delay it as part of the synchronous language elements. -

-

Syntax

-
shiftSample(u, shiftCounter, resolution)
-

Examples

-
-  Clock u  = Clock(3, 10);
-  // ticks: 0, 3/10, 6/10, ..
-
-  Clock y1 = shiftSample(u,1,3);
-  // ticks: 1/10, 4/10, ...
-
-  Real x=sample(time, u);
-  // Ticks at 0, 3/10, 6/10 with values corresponding to time
-
-  Real x2=shiftSample(x, 1, 3);
-  // Ticks at 1/10 with value 0/10, and at 4/10 with value 3/10 etc
-
-")); - end 'shiftSample()'; - - class 'sign()' "sign()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Sign function of a Real or Integer number -

-

Syntax

-
sign(v)
-

Description

-

Is expanded into "noEvent(if v > 0 then 1 else -if v < 0 then -1 else 0)". Argument v -needs to be an Integer or Real expression.

-

Examples

-
sign({-3, 0, 3})
- = {-1, 0, 1}
-")); - end 'sign()'; - - class 'sin()' "sin()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigonometric sine function -

-

Syntax

-
sin(u)
-

Description

-

Returns the sine of u, with -∞ < u < ∞. -Argument u needs to be an Integer or Real expression.

- -

-The sine function can also be accessed as Modelica.Math.sin. -

- -
-\"sin\" -
- -

Examples

-
sin(3.14159265358979)
- = 0.0
-")); - end 'sin()'; - - class 'sinh()' "sinh()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Hyperbolic sine function -

-

Syntax

-
sinh(u)
-

Description

-

Returns the sinh of u, with -∞ < u < ∞. -Argument u needs to be an Integer or Real expression.

- -

-The sinh function can also be accessed as Modelica.Math.sinh. -

- -
-\"sinh\" -
- -

Examples

-
sinh(1)
-  = 1.1752011936438
-")); - end 'sinh()'; - - class 'size()' "size()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns dimensions of an array -

-

Syntax

-
-   size(A,i)
-   size(A)
-
-

Description

-

-The first form returns the size of dimension i of array expression A -where i shall be > 0 and ≤ ndims(A). -

-

-The second form returns a vector of length ndims(A) -containing the dimension sizes of A. -

-

Examples

-
-Real A[8,4,5];
-Integer n3   = size(A,3);  // = 5
-Integer n[:] = size(A);    // = {8,4,5}
-
-")); - end 'size()'; - - class 'skew()' "skew()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the skew matrix that is associated with a vector -

-

Syntax

-
skew(x)
-

Description

-

-Returns the 3 x 3 skew symmetric matrix associated with a -3-vector, i.e., -

-
-cross(x,y) = skew(x)*y;
-skew(x) = [ 0   , -x[3],  x[2];
-            x[3],  0   , -x[1];
-           -x[2],  x[1],  0   ];
-
-")); - end 'skew()'; - - class 'smooth()' "smooth()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Indicate smoothness of expression -

-

Syntax

-
smooth(p, expr)
-

Description

-

If p>=0 smooth(p, expr) returns expr and states -that expr is p times continuously differentiable, i.e.: expr -is continuous in all real variables appearing in the expression -and all partial derivatives with respect to all appearing real -variables exist and are continuous up to order p.

-

The only allowed types for expr in smooth are: real expressions, -arrays of allowed expressions, and records containing only -components of allowed expressions.

-

smooth vs. noEvent

-

The noEvent operator implies that real elementary expressions are taken -literally instead of generating crossing functions. The smooth operator -should be used instead of noEvent, in order to avoid events for efficiency -reasons. A tool is free to not generate events for expressions inside smooth. -However, smooth does not guarantee that no events will be generated, and thus -it can be necessary to use noEvent inside smooth. [Note that smooth does -not guarantee a smooth output if any of the occurring variables change -discontinuously.]

-

Examples

-
  Real x, y, z;
-equation
-  x = if time<1 then 2 else time-2;
-  z = smooth(0, if time<0 then 0 else time);
-  y = smooth(1, noEvent(if x<0 then 0 else sqrt(x)*x));
-  // noEvent is necessary.
-")); - end 'smooth()'; - - class 'sqrt()' "sqrt()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Square root -

-

Syntax

-
sqrt(v)
-

Description

-

Returns the square root of v if v>=0, otherwise an error occurs. -Argument v needs to be an Integer or Real expression.

-

Examples

-
sqrt(9)
- = 3.0
-")); - end 'sqrt()'; - - class 'String()' "String()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Convert a scalar Real, Integer or Boolean expression to a String representation -

-

Syntax

-
-String(b_expr, minimumLength=0, leftJustified=true)
-String(i_expr, minimumLength=0, leftJustified=true)
-String(r_expr, significantDigits=6, minimumLength=0, leftJustified=true)
-String(r_expr, format)
-String(e_expr, minimumLength=0, leftJustified=true)
-
-

Description

-

-The arguments have the following meaning -(the default values of the optional arguments are shown in the left column): -

- - - - - - - - - - - - - - - - - - - - - - - - - -
Boolean b_expr Boolean expression
Integer i_expr Integer expression
Real r_expr Real expression
type e_expr = enumeration(..) Enumeration expression
Integer minimumLength = 0 Minimum length of the resulting string. If necessary,
- the blank character is used to fill up unused space.
Boolean leftJustified = true if true, the converted result is left justified;
- if false, it is right justified in the string.
Integer significantDigits = 6 defines the number of significant digits in the result string
- (e.g., \"12.3456\", \"0.0123456\", \"12345600\", \"1.23456E-10\")
String format defines the string formatting according to ANSI-C without \"%\" and \"*\" character
- (e.g., \".6g\", \"14.5e\", \"+6f\"). In particular:
-     -format = \"[<flags>] [<width>] [.<precision>] <conversion>\"
-with - - - - - - - - - - - - -
<flags> zero, one or more of
- \"-\": left adjustment of the converted number
- \"+\": number will always be printed with a sign
- \"0\": padding to the field width with leading zeros
<width> Minimum field width. The converted number will be printed in a field at
- least this wide and wider if necessary. If the converted number has
- fewer characters it will be padded on the left (or the right depending
- on <flags>) with blanks or 0 (depending on <flags>).
<precision> The number of digits to be printed after the decimal point for
- e, E, or f conversions, or the number of significant digits for
- g or G conversions.
<conversion> = \"e\": Exponential notation using a lower case e
- = \"E\": Exponential notation using an upper case E
- = \"f\": Fixed point notation
- = \"g\": Either \"e\" or \"f\"
- = \"G\": Same as \"g\", but with upper case E
-

Examples

-
-String(2.0)   // = \"2.0\"
-String(true)  // = \"true\"
-String(123, minimumLength=6, leftJustified=false)  // = \"   123\"
-
-")); - end 'String()'; - - class 'subSample()' "subSample()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Subsamples a clocked expressions as part of the synchronous language elements. -

-

Syntax

-
subSample(u, factor)
-

Description

-

-The clock of y = subSample(u,factor) is factor-times slower than the clock of u. -At every factor ticks of the clock of u, the operator returns the value of u. -The first activation of the clock of y coincides with the first activation of the clock of u. -If argument factor is not provided or is equal to zero, it is inferred. -

-")); - end 'subSample()'; - - class 'sum()' "sum()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns the scalar sum -

-

Syntax

-
-sum(A)
-sum(e(i, ..., j) for i in u, ..., j in v)
-
-

Description

-

-The first form returns the scalar sum of all the elements of -array expression A:
-A[1,...,1]+A[2,...,1]+....+A[end,...,1]+A[end,...,end] -

-

-The second form is a reduction expression and -returns the sum of the expression e(i, ..., j) evaluated for all combinations of i in u, ..., j in v: -

-
-e(u[1],...,v[1]) + e(u[2],...,v[1]) + ... +
-e(u[end],...,v[1]) + ... + e(u[end],...,v[end])
-
-

-The type of sum(e(i, ..., j) for i in -u, ..., j in v) is the same as the type of e(i,...j). -

-

Examples

-
-sum(i for i in 1:10)  // Gives  1+2+...+10=55
-   // Read it as: compute the sum of i for i in the range 1 to 10.
-
-")); - end 'sum()'; - - class 'superSample()' "superSample()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Supersamples a clocked expressions as part of the synchronous language elements. -

-

Syntax

-
superSample(u, factor)
-

Description

-

-The clock of y = superSample(u,factor) is factor-times faster than the clock of u. -At every tick of the clock of u, the operator returns the value of u. -The first activation of the clock of y coincides with the first activation of the clock of u. -If argument factor is not provided or is equal to zero, it is inferred. -

-")); - end 'superSample()'; - - class 'symmetric()' "symmetric()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns a symmetric matrix -

-

Syntax

-
symmetric(A)
-

Description

-

-Returns a matrix where the diagonal elements and the -elements above the diagonal are identical to the -corresponding elements of matrix A and where the -elements below the diagonal are set equal to the elements -above the diagonal of A, i.e., -

-
-B := symmetric(A)
-     -> B[i,j] := A[i,j], if i ≤ j,
-        B[i,j] := A[j,i], if i > j.
-
-")); - end 'symmetric()'; - - class 'tan()' "tan()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Trigonometric tangent function -

-

Syntax

-
tan(u)
-

Description

-

Returns the tangent of u, with -∞ < u < ∞ -(if u is a multiple of (2n-1)*pi/2, y = tan(u) is +/- infinity). -Argument u needs to be an Integer or Real expression.

- -

-The tangent function can also be accessed as Modelica.Math.tan. -

- -
-\"tan\" -
- -

Examples

-
tan(3.14159265358979)
- = 0.0
-
-")); - end 'tan()'; - - class 'tanh()' "tanh()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Hyperbolic tangent function -

-

Syntax

-
tanh(u)
-

Description

-

Returns the tanh of u, with -∞ < u < ∞. -Argument u needs to be an Integer or Real expression.

- -

-The tanh function can also be accessed as Modelica.Math.tanh. -

- -
-\"tanh\" -
- -

Examples

-
tanh(1)
-  = 0.761594155955765
-")); - end 'tanh()'; - - class 'terminal()' "terminal()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-True after successful analysis -

-

Syntax

-
terminal()
-

Description

-

Returns true at the end of a successful analysis.

-

Examples

-
  Boolean a, b;
-equation
-  a = change(b) or terminal();
-")); - end 'terminal()'; - - class 'terminate()' "terminate()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Successfully terminate current analysis -

-

Syntax

-
terminate(message)
-

Description

-

The terminate function successfully terminates the analysis -which was carried out. The function has a string argument -indicating the reason for the success. [The intention is to -give more complex stopping criteria than a fixed point in time.]

-

Examples

-
model ThrowingBall
-  Real x(start=0);
-  Real y(start=1);
-equation
-  der(x)= ... ;
-  der(y)= ... ;
-algorithm
-  when y < 0 then
-    terminate(\"The ball touches the ground\");
-  end when;
-end ThrowingBall;
-")); - end 'terminate()'; - - class 'ticksInState()' "ticksInState()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-This operator returns the number of ticks since a transition was made to the active state in a state machine. -

-

Syntax

-
ticksInState()
-

Description

-

-Returns the number of ticks of the clock of the state machine since a transition was made to the currently active state. -

-")); - end 'ticksInState()'; - - class 'timeInState()' "timeInState()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-This operator returns the time (in seconds) since a transition was made to the active state in a state machine. -

-

Syntax

-
timeInState()
-

Description

-

-Returns the time duration as Real in [s] since a transition was made to the currently active state. -

-")); - end 'timeInState()'; - - class 'transition()' "transition()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-This operator defines a transition in a state machine. -

-

Syntax

-
transition(from, to, condition, immediate, reset, synchronize, priority)
-

Description

-

-This operator defines a transition from instance from to instance to. -The from and to instances become states of a state machine. -The transition fires when condition = true if immediate = true (this is called an immediate transition) -or previous(condition) when immediate = false (this is called a delayed transition). -Argument priority defines the priority of firing when several transitions could fire. -In this case the transition with the smallest value of priority fires. -It is required that priority is greater or equal to 1 and that for all transitions from the same state, the priorities are different. -If reset = true, the states of the target state are reinitialized, i.e. state machines are restarted in initial state and state variables are reset to their start values. If synchronize=true, any transition is disabled until all state machines of the from-state have reached final states, i.e. states without outgoing transitions. -

-

-Arguments from and to are block instances and condition -is a Boolean argument. The optional arguments immediate, reset, and synchronize -are of type Boolean, have parametric variability and a default of true, true, false respectively. -The optional argument priority is of type Integer, has parametric variability and a default of 1. -

-")); - end 'transition()'; - - class 'transpose()' "transpose()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Transpose of a matrix or permutation of the first two dimensions of an array -

-

Syntax

-
transpose(A)
-

Description

-

-Permutes the first two dimensions of array A. -It is an error, if array A does not have at least -2 dimensions. -

-")); - end 'transpose()'; - - class 'vector()' "vector()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns an array with one non-singleton dimension as vector -

-

Syntax

-
vector(A)
-

Description

-

-Returns a 1-vector, if A is a scalar and otherwise returns a vector containing all the elements of the array, provided there is at -most one dimension size > 1. -

-

Examples

-
-Real A[1,2,1] = {{{3},{4}}};
-Real v[2] = vector(A);  // = {3,4}
-
-")); - end 'vector()'; - - class 'zeros()' "zeros()" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Returns a zero array. -

-

Syntax

-
zeros(n1, n2, n3, ...)
-

Description

-

-Returns the n1 x n2 x n3 x ... Integer array with all -elements equal to zero (ni >= 0). -

-")); - end 'zeros()'; - annotation (Documentation(info=" -

-In this chapter operators of Modelica are documented. -Elementary operators, such as \"+\" or \"-\" are overloaded and -operate on scalar and array variables. Other operators -have the same syntax as a -Modelica function -call. However, they do not behave as a Modelica function, -either because the result depends not only on the input arguments but -also on the status of the simulation (such as \"pre(..)\"), or -the function operates on input arguments of different types -(such as \"String(..)\"). Neither of these \"functions\" -can be defined with a \"standard\" Modelica function and are -therefore builtin operators of the Modelica language -(with exception of the basic mathematical functions, -sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, -log, log10 that are provided for convenience as built-in functions). -

-")); -end Operators; - -class BalancedModel "Balanced model" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-The basic concept to count unknowns and equations. -

- -

-Restrictions for model and block classes are present, in order that missing -or too many equations can be detected and localized by a Modelica -translator before using the respective model or block class. -

- -

Examples

- -
   partial model BaseCorrelation
-     input Real x;
-     Real y;
-   end BaseCorrelation;
-
-   model SpecialCorrelation // correct in Modelica 2.2 and 3.0
-      extends BaseCorrelation(x=2);
-   equation
-       y=2/x;
-   end SpecialCorrelation;
-
-   model UseCorrelation // correct according to Modelica 2.2
-                        // not valid according to Modelica 3.0
-      replaceable model Correlation=BaseCorrelation;
-      Correlation correlation;
-   equation
-      correlation.y=time;
-   end UseCorrelation;
-
-   model Broken // after redeclaration, there is 1 equation too much in Modelica 2.2
-      UseCorrelation example(redeclare Correlation=SpecialCorrelation);
-   end Broken;
-
- -

-In this case one can argue that both UseCorrelation (adding an acausal equation) and SpecialCorrelation (adding a default to an input) are correct, but still when combined they lead to a model with too many equations - and it is not possible to determine which model is incorrect without strict rules. -In Modelica 2.2, model Broken will work with some models. However, by just redeclaring it to model SpecialCorrelation, an error will occur and it will be very difficult in a larger model to figure out the source of this error. -In Modelica 3.0, model UseCorrelation is no longer allowed and the translator will give an error. In fact, it is guaranteed that a redeclaration cannot lead to an unbalanced model any more. -

- -

Description

- -

-The restrictions below apply after flattening \" i.e., inherited components are included \" possibly modified. -

- -

-Definition 1: Local Number of Unknowns -

- -

-The local number of unknowns of a model or block class is the sum based on the components: -

- -
    -
  • For each declared component of specialized class type (Real, Integer, String, Boolean, enumeration and arrays of those, etc.) or record, not declared as outer, it is the \"number of unknown variables\" inside it (i.e., excluding parameters and constants and counting the elements after expanding all records and arrays to a set of scalars of primitive types).
  • - -
  • Each declared component of specialized class type or record declared as outer is ignored [i.e., all variables inside the component are treated as known].
  • - -
  • For each declared component of specialized class connector component, it is the \"number of unknown variables\" inside it (i.e., excluding parameters and constants and counting the elements after expanding all records and arrays to a set of scalars of primitive types).
  • - -
  • For each declared component of specialized class block or model, it is the \"sum of the number of inputs and flow variables\" in the (top level) public connector components of these components (and counting the elements after expanding all records and arrays to a set of scalars of primitive types).
  • -
- -

-Definition 2: Local Equation Size -

- -

-The local equation size of a model or block class is the sum of the following numbers: -

- -
    -
  • The number of equations defined locally (i.e., not in any model or block component), including binding equations, and equations generated from connect-equations. This includes the proper count for when-clauses, and algorithms, and is also used for the flat Hybrid DAE formulation.
  • - -
  • The number of input and flow-variables present in each (top-level) public connector component. [This represents -the number of connection equations that will be provided when the class is used.]
  • - -
  • The number of (top level) public input variables that neither are connectors nor have binding equations [i.e., top-level inputs are treated as known variables. This represents the number of binding equations that will be provided when the class is used.]. -[To clarify top-level inputs without binding equation (for non-inherited inputs binding equation is identical to declaration equation, but binding equations also include the case where another model extends M and has a modifier on \"u\" giving the value): -
      model M
    -    input Real u;
    -    input Real u2=2;
    -  end M;
    -
    -Here \"u\" and \"u2\" are top-level inputs and not connectors. The variable u2 has a binding equation, but u does not have a binding equation. In the equation count, it is assumed that an equation for u is supplied when using the model.]
  • -
- -

-Definition 3: Locally Balanced -

- -

-A model or block class is \"locally balanced\" if the \"local number of unknowns\" is identical to the \"local equation size\" for all legal values of constants and parameters [respecting final bindings and min/max-restrictions. A tool shall verify the \"locally balanced\" property for the actual values of parameters and constants in the simulation model. It is a quality of implementation for a tool to verify this property in general, due to arrays of (locally) undefined sizes, conditional declarations, for loops, etc.]. -

- -

-Definition 4: Globally Balanced -

- -

-Similarly as locally balanced, but including all unknowns and equations from all components. The global number of unknowns is computed by expanding all unknowns (i.e., excluding parameters and constants) into a set of scalars of primitive types. This should match the global equation size defined as: -

- -
    -
  • The number of equations defined (included in any model or block component), including equations generated from connect-equations.
  • -
  • The number of input and flow-variables present in each (top-level) public connector component.
  • -
  • The number of (top level) public input variables that neither are connectors nor have binding equations [i.e., top-level inputs are treated as known variables].
  • -
- -

-The following restrictions hold: -

- -
    -
  • In a non-partial model or block, all non-connector inputs of model or block components must have binding equations. [E.g., if the model contains a component, firstOrder (of specialized class model) and firstOrder has \"input Real u\" then there must be a binding equation for firstOrder.u.]
  • -
  • A component declared with the inner or outer prefix shall not be of a class having top-level public connectors containing inputs.
  • -
  • Modifiers for components shall only contain redeclarations of replaceable elements and binding equations for parameters, constants (that do not yet have binding equations), inputs and variables having a default binding equation.
  • -
  • All non-partial model and block classes must be locally balanced [this means that the local number of unknowns equals the local equation size].
  • -
- -

-Based on these restrictions, the following strong guarantee can be given for simulation models and blocks: -

- -

-Proposition 1: All simulation models and blocks are globally balanced.
-[Therefore the number of unknowns equal to the number of equations of a simulation model or block, provided that every used non-partial model or block class is locally balanced.] -

- -
Example 1:
-
-connector Pin
-   Real v;
-   flow Real i;
-end Pin;
-
-model Capacitor
-   parameter Real C;
-   Pin  p, n;
-   Real u;
-equation
-   0 = p.i + n.i;
-   u = p.v - n.v;
-   C*der(u) = p.i;
-end Capacitor;
-
- -

-Model Capacitor is a locally balanced model according to the following analysis: -

- -
Locally unknown variables: p.i, p.v, n.i, n.v, u
-Local equations:  0 = p.i + n.i;
-                  u = p.v - n.v;
-                  C*der(u) = p.i;
-                  and 2 equations corresponding to the
-                  2 flow-variables p.i and n.i.
-
- -

-These are 5 equations in 5 unknowns (locally balanced model). A more detailed analysis would reveal that this is structurally non-singular, i.e., that the hybrid DAE will not contain a singularity independent of actual values. -If the equation \"u = p.v - n.v\" would be missing in the Capacitor model, there would be 4 equations in 5 unknowns and the model would be locally unbalanced and thus simulation models in which this model is used would be usually structurally singular and thus not solvable. -If the equation \"u = p.v - n.v\" would be replaced by the equation \"u = 0\" and the equation C*der(u) = p.i would be replaced by the equation \"C*der(u) = 0\", there would be 5 equations in 5 unknowns (locally balanced), but the equations would be singular, regardless of how the equations corresponding to the flow-variables are constructed because the information that \"u\" is constant is given twice in a slightly different form. -

- -
Example 2:
-
-connector Pin
-   Real v;
-   flow Real i;
-end Pin;
-
-partial model TwoPin
-   Pin p,n;
-end TwoPin;
-
-model Capacitor
-   parameter Real C;
-   extends TwoPin;
-   Real u;
-equation
-   0 = p.i + n.i;
-   u = p.v \" n.v;
-   C*der(u) = p.i;
-end Capacitor;
-
-model Circuit
-   extends TwoPin;
-   replaceable TwoPin t;
-   Capacitor c(C=12);
-equation
-   connect(p, t.p);
-   connect(t.n, c.p);
-   connect(c.n, n);
-end Circuit;
-
- -

-Since t is partial we cannot check whether this is a globally balanced model, but we can check that Circuit is locally balanced. -Counting on model Circuit results in the following balance sheet: -

- -
Locally unknown variables (8): p.i, p.v, n.i, n.v, and 2 flow variables for t (t.p.i, t.n.i)
-                                                   and 2 flow variable for c (c.p.i, c.n.i).
-Local equations:     p.v = t.p.v;
-                       0 = p.i - t.p.i;
-                   c.p.v = load.n.v;
-                       0 = c.p.i+load.n.i;
-                     n.v = c.n.v;
-                       0 = n.i - c.n.i;
-                    and 2 equation corresponding to the
-                    flow variables p.i, n.i
-
- -

-In total we have 8 scalar unknowns and 8 scalar equations, i.e., a locally balanced model (and this feature holds for any models used for the replaceable component \"t\"). -Some more analysis reveals that this local set of equations and unknowns is structurally non-singular. However, this does not provide any guarantees for the global set of equations, and specific combinations of models that are \"locally non-singular\" may lead to a globally non-singular model.] -

- -
Example 3:
-
-import Modelica.Units.SI;
-partial model BaseProperties
-   \"Interface of medium model for all type of media\"
-   parameter Boolean preferredMediumStates=false;
-   constant  Integer nXi \"Number of independent mass fractions\";
-   InputAbsolutePressure     p;
-   InputSpecificEnthalpy     h;
-   InputMassFraction         Xi[nXi];
-   SI.Temperature            T;
-   SI.Density                d;
-   SI.SpecificInternalEnergy u;
-
-   connector InputAbsolutePressure = input SI.AbsolutePressure;
-   connector InputSpecificEnthalpy = input SI.SpecificEnthalpy;
-   connector InputMassFraction = input SI.MassFraction;
-end BaseProperties;
-
- -

-The use of connector here is a special design pattern. The variables p, h, Xi are marked as input to get correct equation count. Since they are connectors they should neither be given binding equations in derived classes nor when using the model. The design pattern is to give textual equations for them (as below); using connect-statements for these connectors would be possible (and would work) but is not part of the design. -This partial model defines that T,d,u can be computed from the medium model, provided p,h,Xi are given. Every medium with one or multiple substances and one or multiple phases, including incompressible media, has the property that T,d,u can be computed from p,h,Xi. A particular medium may have different \"independent variables\" from which all other intrinsic thermodynamic variables can be recursively computed. For example, a simple air model could be defined as: -

- -
model SimpleAir \"Medium model of simple air. Independent variables: p,T\"
-   extends BaseProperties(nXi = 0,
-        p(stateSelect = if preferredMediumStates then StateSelect.prefer
-                                   else StateSelect.default),
-        T(stateSelect = if preferredMediumStates then StateSelect.prefer
-                                   else StateSelect.default));
-   constant SI.SpecificHeatCapacity R_s  = 287;
-   constant SI.SpecificHeatCapacity cp = 1005.45;
-   constant SI.Temperature          T0 = 298.15
-equation
-   d = p/(R_s*T);
-   h = cp*(T-T0);
-   u = h - p/d;
-end SimpleAir;
-
- -

-The local number of unknowns in model SimpleAir (after flattening) is: -

- -
    -
  • 3 (T, d, u: variables defined in BaseProperties and inherited in SimpleAir), plus
  • -
  • 2+nXi (p, h, Xi: variables inside connectors defined in BaseProperties and inherited in SimpleAir) -resulting in 5+nXi unknowns.
  • -
- -

-The local equation size is: -

- -
    -
  • 3 (equations defined in SimpleAir), plus
  • -
  • 2+nXi (input variables in the connectors inherited from BaseProperties)
  • -
- -

-Therefore, the model is locally balanced. -The generic medium model BaseProperties is used as a replaceable model in different components, like a dynamic volume or a fixed boundary condition: -

- -
import Modelica.Units.SI;
-connector FluidPort
-  replaceable model Medium = BaseProperties;
-
-  SI.AbsolutePressure  p;
-  flow SI.MassFlowRate m_flow;
-
-  SI.SpecificEnthalpy      h;
-  flow SI.EnthalpyFlowRate H_flow;
-
-  SI.MassFraction       Xi     [Medium.nXi] \"Independent mixture mass fractions\";
-  flow SI.MassFlowRate mXi_flow[Medium.nXi] \"Independent substance mass flow rates\";
-end FluidPort;
-
-model DynamicVolume
-   parameter SI.Volume V;
-   replaceable model Medium = BaseProperties;
-   FluidPort port(redeclare model Medium = Medium);
-   Medium    medium(preferredMediumStates=true); // No modifier for p,h,Xi
-   SI.InternalEnergy U;
-   SI.Mass           M;
-   SI.Mass           MXi[medium.nXi];
-equation
-   U   = medium.u*M;
-   M   = medium.d*V;
-   MXi = medium.Xi*M;
-   der(U)   = port.H_flow;   // Energy balance
-   der(M)   = port.m_flow;   // Mass balance
-   der(MXi) = port.mXi_flow; // Substance mass balance
-
-// Equations binding to medium (inputs)
-   medium.p  = port.p;
-   medium.h  = port.h;
-   medium.Xi = port.Xi;
-end DynamicVolume;
-
- -

-The local number of unknowns of DynamicVolume is: -

- -
    -
  • 4+2*nXi (inside the port connector), plus
  • -
  • 2+nXi (variables U, M and MXi), plus
  • -
  • 2+nXi (the input variables in the connectors of the medium model)
  • -
- -

-resulting in 8+4*nXi unknowns; the local equation size is -

- -
    -
  • 6+3*nXi from the equation section, plus
  • -
  • 2+nXi flow variables in the port connector.
  • -
- -

-Therefore, DynamicVolume is a locally balanced model. -Note, when the DynamicVolume is used and the Medium model is redeclared to \"SimpleAir\", then a tool will try to select p,T as states, since these variables have StateSelect.prefer in the SimpleAir model (this means that the default states U,M are derived quantities). If this state selection is performed, all intrinsic medium variables are computed from medium.p and medium.T, although p and h are the input arguments to the medium model. This demonstrates that in Modelica input/output does not define the computational causality. Instead, it defines that equations have to be provided here for p,h,Xi, in order that the equation count is correct. The actual computational causality can be different as it is demonstrated with the SimpleAir model. -

- -
model FixedBoundary_pTX
-   parameter SI.AbsolutePressure p \"Predefined boundary pressure\";
-   parameter SI.Temperature      T \"Predefined boundary temperature\";
-   parameter SI.MassFraction     Xi[medium.nXi]
-                                   \"Predefined boundary mass fraction\";
-   replaceable model Medium = BaseProperties;
-   FluidPort port(redeclare model Medium = Medium);
-   Medium medium;
-equation
-   port.p        = p;
-   port.H_flow   = semiLinear(port.m_flow, port.h , medium.h);
-   port.MXi_flow = semiLinear(port.m_flow, port.Xi, medium.Xi);
-
-// Equations binding to medium (note: T is not an input).
-   medium.p  = p;
-   medium.T  = T;
-   medium.Xi = Xi;
-end FixedBoundary_pTX;
-
- -

-The number of local variables in FixedBoundary_pTX is: -

- -
    -
  • 4+2*nXi (inside the port connector), plus
  • -
  • 2+nXi (the input variables in the connectors of the medium model)
  • -
- -

-resulting in 6+3*nXi unknowns, while the local equation size is -

- -
    -
  • 4+2*nXi from the equation section, plus
  • -
  • 2+nXi flow variables in the port connector.
  • -
- -

-Therefore, FixedBoundary_pTX is a locally balanced model. The predefined boundary variables p and Xi are provided via equations to the input arguments medium.p and medium.Xi, in addition there is an equation for T in the same way \" even though T is not an input. Depending on the flow direction, either the specific enthalpy in the port (port.h) or h is used to compute the enthalpy flow rate H_flow. \"h\" is provided as binding equation to the medium. With the equation \"medium.T = T\", the specific enthalpy \"h\" of the reservoir is indirectly computed via the medium equations. Again, this demonstrates, that an \"input\" just defines the number of equations have to be provided, but that it not necessarily defines the computational causality. -

- -")); -end BalancedModel; - -class 'encapsulated' "encapsulated" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Break lookup in hierarchy -

-

Examples

- -
encapsulated model Test
-  import Modelica.Mechanics.Rotational;
-
-  Rotational.Components.Inertia inertia; // lookup successful
-  Modelica.Mechanics.Translational.SlidingMass slidingMass; // lookup fails
-equation
-  ...
-end Test;
- -

Syntax

- -

See section on class_definition in the Modelica Grammar.

- -

Description

- -

When an element, equation or algorithm is instantiated, any name is -looked up sequentially in each member of the ordered set of parents -until a match is found or a parent is encapsulated. In the latter case -the lookup stops except for the predefined types, functions and -operators defined in this specification. For these cases the lookup -continues in the global scope, where they are defined. [E.g., abs is -searched upwards in the hierarchy as usual. If an encapsulated boundary -is reached, abs is searched in the global scope instead. The operator -abs cannot be redefined in the global scope, because an existing class -cannot be redefined at the same level.]

-")); -end 'encapsulated'; - -class 'extends' "extends" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Inheritance from base class -

-

Examples

- -
class A
-  parameter Real a, b;
-end A;
-
-class B
-  extends A(b=2);
-end B;
-
-class C
-  extends B(a=1);
-end C;
- -

From the example above we get the following instantiated -class:

- -
class Cinstance
-  parameter Real a=1;
-  parameter Real b=2;
-end Cinstance;
- -

The ordering of the merging rules ensures that, given -classes A and B defined above,

- -
class C2
-  B bcomp(b=3);
-end C2;
- -

yields an instance with bcomp.b=3, which overrides b=2.

- -

Syntax

- -

See section on extends_clause in the Modelica Grammar.

- -

Description

- -

The name of the base class is looked up in the partially -instantiated parent of the extends clause. The found base -class is instantiated with a new environment and the -partially instantiated parent of the extends clause. The new -environment is the result of merging

- -
    -
  1. arguments of all parent environments that match names in the instantiated base class
  2. -
  3. the optional class modification of the extends clause
  4. -
- -

in that order.

- -

The elements of the instantiated base class become elements -of the instantiated parent class.

- -

The declaration elements of the instantiated base class shall either

- -
    -
  • not already exist in the partially instantiated parent class - [i.e., have different names].
  • -
  • be exactly identical to any element of the instantiated parent - class with the same name and the same level of protection - (public or protected) and same contents. In this - case, one of the elements is ignored (since they are identical - it does not matter which one).
  • -
- -

Otherwise the model is incorrect.

- -

Equations of the instantiated base class that are syntactically -equivalent to equations in the instantiated parent class are discarded. -[Note: equations that are mathematically equivalent but not -syntactically equivalent are not discarded, hence yield an -overdetermined system of equations.]

- -

Since specialized classes of different kinds have different properties, -only specialized classes that are \"in some sense compatible\" to each other -can be derived from each other via inheritance. The following table -shows which kind of specialized class can be used in an extends clause of -another kind of specialized class (the \"grey\" cells mark the few exceptional -cases, where a specialized class can be derived from a specialized class of -another kind):

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Base Class
Derived Classpackageoperatorfunctionoperator functiontyperecordoperator recordexpandable connectorconnectorblockmodelclass
packageyesyes
operatoryesyes
functionyesyes
operator
function
yesyesyes
typeyesyes
recordyesyes
operator
record
yesyes
expandable
connector
yesyes
connectoryesyesyesyesyesyes
blockyesyesyes
modelyesyesyesyes
classyes
- -

The specialized classes package, operator, -function, type, record, -operator record and expandable connector -can only be derived from their own kind -[(e.g., a package can only be base class for packages. -All other kinds of classes can use the import statement to use the contents -of a package)] and from class.

- -")); -end 'extends'; - -class 'flow' "flow" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Declare flow (through) variable, which have to sum up to zero in connections -

-

Examples

- -
connector Pin
-  Modelica.Units.SI.Voltage v;
-  flow Modelica.Units.SI.Current i;
-end Pin;
-
-model A
-  Pin p;
-end A;
-
-model Composition
-  A a;
-  A b;
-  A c;
-equation
-  connect(a.p, b.p);
-  connect(a.p, c.p);
-end Composition;
- -

From the connect statements in model Composition, the following connect equations are derived:

- -
a.p.v = b.p.v;
-a.p.v = c.p.v;
-a.p.i + b.p.i + c.p.i = 0;
- -

Syntax

- -

See section on type_prefix in the Modelica Grammar.

- -

Description

- -

The flow prefix is used in order to generate equations for through variables, which sum up to zero in connections, -whereas variables without the flow prefix are identical in a connection.

-")); -end 'flow'; - -class 'for' "for" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Repeat equations or statements a specific number of times -

-

Examples

-

-for clauses are mostly used in algorithm sections, such as -

-
-    parameter Integer np=10;
-    Real p[np], x, y;
-  algorithm
-     y := p[1];
-     for i in 2:np loop   // i shall not be declared
-        y := y*x + p[i];
-     end for;
-
-

-Other forms of the for condition: -

-
-    for i in 1:10 loop            // i takes the values 1,2,3,...,10
-    for r in 1.0 : 1.5 : 5.5 loop // r takes the values 1.0, 2.5, 4.0, 5.5
-    for i in {1,3,6,7} loop       // i takes the values 1, 3, 6, 7
-
-

-In equation sections, for clauses are expanded at translation time -in order that symbolic transformations can be applied. Typically, a -for clause in an equation section is used on component arrays, -e.g., to connect elements of an array of components together: -

-
-    parameter Integer nR=10 \"Number of resistances\";
-    Modelica.Electrical.Analog.Basic.Resistor R[nR];
-  equation
-     for i in 1:nR-1 loop
-        connect(R[i].p R[i+1].n);   // 9 connect equations
-     end for;
-
-

Syntax

-

-In equation sections: -

-
-  for for_indices loop
-     { equation \";\" }
-  end for;
-  for_indices : for_index {\",\" for_index}
-  for_index   : IDENT [ in expression ]
-
-

-In algorithm sections: -

-
-  for for_indices loop
-     { algorithm \";\" }
-  end for;
-  for_indices : for_index {\",\" for_index}
-  for_index   : IDENT [ in expression ]
-
-

Description

-

A clause

-
    for IDENT in expression loop
-

is one example of a for clause.

-

The expression of a for clause shall be a vector expression. It is -evaluated once for each for clause, and is evaluated in the scope -immediately enclosing the for clause. In an equation section, -the expression of a for clause shall be a parameter expression (in order -that the for clause can be expanded into equations during translation). -The loop-variable is in scope inside the loop-construct and shall not be assigned -to.

-

[Example:

-

The loop-variable may hide other variables as in the following example. -Using another name for the loop-variable -is, however, strongly recommended.

-
    constant Integer j=4;
-    Real x[j];
-  equation
-    for j in 1:j loop // The loop-variable j takes the values 1,2,3,4
-      x[j]=j; // Uses the loop-variable j
-    end for;
-

]

-

Several iterators

-

The notation with several iterators is a shorthand notation for nested for-clauses (or reduction-expressions). For -for-clauses it can be expanded into the usual form by replacing each \",\" by 'loop for' and adding extra 'end -for'. For reduction-expressions it can be expanded into the usual form by replacing each ',' by ') for' and -prepending the reduction-expression with 'function-name('.

-

[Example:

-
    Real x[4,3];
-  equation
-    for j, i in 1:2 loop
-      // The loop-variable j takes the values 1,2,3,4 (due to use)
-      // The loop-variable i takes the values 1,2 (given range)
-      x[j,i]=j+i;
-    end for;
-

]

-")); -end 'for'; - -class 'if' "if" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Declare equations or execute statements conditionally -

-

Examples

-

If clause

- -
    parameter Boolean linear=true;
-    parameter Boolean quadratic=false;
-    Real x, y;
-  equation
-    if linear then
-      y = x + 1;
-    elseif quadratic then
-      y = x^2 + x + 1;
-    else
-      y = Modelica.Math.sin(x) + 1;
-    end if;
- -

If expression

-
  Integer i;
-  Integer sign_of_i=if i<0 then -1 else if i==0 then 0 else 1;
-

Syntax

-

-In equation sections: -

-
   if expression then
-     { equation \";\" }
-   { elseif expression then
-     { equation \";\" }
-   }
-   [ else
-     { equation \";\" }
-   ]
-   end if
-

-In algorithm sections: -

-
   if expression then
-     { algorithm \";\" }
-   { elseif expression then
-     { algorithm \";\" }
-   }
-   [ else
-     { algorithm \";\" }
-   ]
-   end if
-

Description

-

If clause

-

-The expression of an if and elseif-clause must be scalar Boolean expression. -One if-clause, and zero or more elseif-clauses, and an optional else-clause -together form a list of branches. One or zero of the bodies of these if-, elseif- -and else-clauses is selected, by evaluating the conditions of the if- and -elseif-clauses sequentially until a condition that evaluates to true is found. If none of -the conditions evaluate to true the body of the else-clause is selected (if an -else-clause exists, otherwise no body is selected). In an algorithm section, the selected -body is then executed. In an equation section, the equations in the body are seen as equations -that must be satisfied. The bodies that are not selected have no effect on that model evaluation. -

-

-If clauses in equation sections which do not have exclusively parameter expressions as -switching conditions shall have an else clause and each branch shall have the same -number of equations. [If this condition is violated, the single assignment rule -would not hold, because the number of equations may change during simulation although the number -of unknowns remains the same]. -

- -

If expression

- -

An expression

-
   if expression1 then expression2 else expression3
-

is one example of if-expression. First expression1, which must be Boolean expression, -is evaluated. If expression1 is true expression2 is evaluated and is the value of the -if-expression, else expression3 is evaluated and is the value of the if-expression. -The two expressions, expression2 and expression3, must be type compatible and give the -type of the if-expression. If-expressions with elseif are defined by replacing -elseif by else if.[Note: elseif is added for symmetry with if-clauses.] -

-")); -end 'if'; - -class 'import' "import" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Import classes -

-

Examples

- -
class Lookup
-  import SI = Modelica.Units.SI; // #1 (Try to avoid renaming imports!)
-  import Modelica.Math.*; // #2 (Try to avoid wildcard imports!)
-  import Modelica.Mechanics.Rotational; // #3
-  import Modelica.Units.SI.{Molality, Molarity}; // #4
-
-  SI.Torque torque; // due to #1 (Modelica.Units.SI.Torque)
-  Rotational.Components.Inertia inertia; // due to #3 (Modelica.Mechanics.Rotational.Components.Inertia)
-  Molarity c = 1; // due to #4 (Modelica.Units.SI.Molarity)
-equation
-  torque = sin(time); // due to #2 (Modelica.Math.sin)
-  ...
-end Lookup;
- -

Syntax

- -

See section on import_clause in the Modelica Grammar.

- -

Description

- -

Using import statements extends the static name lookup to additional import names. -The generated import names are:

- -
    -
  • C for import A.B.C;
  • -
  • D for import D = A.B.C;
  • -
  • C and all other classes in B for import A.B.*;
  • -
-
Note
-

Especially the renaming and wildcard import statements should be avoided since they might lead to name-lookup conflicts.

-")); -end 'import'; - -class 'input' "input" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Define causality and/or block diagram connection semantic -(depending on context) -

-

Examples

- -
connector RealInput = input Real;
-connector RealOutput = output Real;
-
-block Integrator
-  RealInput  u;
-  RealOutput y;
-protected
-  Real x;
-equation
-  der(x) = u;
-  y = x;
-end Integrator;
- -

Syntax

- -

See section on type_prefix in the Modelica Grammar.

- -

Description

- -

-The prefixes input and output have a slightly different semantic meaning depending on the context where they are used: -

- -
    -
  • In functions, these prefixes define the computational causality of the - function body, i.e., given the variables declared as input, - the variables declared as output are computed in the function body.
     
  • - -
  • In simulation models and blocks (i.e., on the top level of a model or - block that shall be simulated), these prefixes define the interaction - with the environment where the simulation model or block is used. - Especially, the input prefix defines that values for such a variable - have to be provided from the simulation environment and the output - prefix defines that the values of the corresponding variable - can be directly utilized in the simulation environment.
     
  • - -
  • In component models and blocks, the input prefix defines that a - binding equation has to be provided for the corresponding variable - when the component is utilized in order to guarantee a locally - balanced model (i.e., the number of local equations is identical - to the local number of unknowns). Example: -
      block FirstOrder
    -     input Real u;
    -       ...
    -  end FirstOrder;
    -
    -  model UseFirstOrder
    -     FirstOrder firstOrder(u=time); // binding equation for u
    -      ...
    -  end UseFirstOrder;
    -
    - The output prefix does not have a particular effect in a model - or block component and is ignored.
     
  • - -
  • In connectors, prefixes input and output define that the - corresponding connectors can only be connected according - to block diagram semantics (e.g., a connector with an output - variable can only be connected to a connector where the - corresponding variable is declared as input). There is the - restriction that connectors which have at least one variable - declared as input must be externally connected - (in order to get a locally balanced model, where the number - of local unknowns is identical to the number of unknown equations). - Together with the block diagram semantics rule this means, - that such connectors must be connected exactly once externally.
     
  • - -
  • In records, prefixes input and output are not allowed, - since otherwise a record could not be, e.g., passed as input - argument to a function.
  • -
- -")); -end 'input'; - -class 'output' "output" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Define causality and/or block diagram connection semantic -(depending on context) -

- -

Examples

- -
connector RealInput = input Real;
-connector RealOutput = output Real;
-
-block Integrator
-  RealInput  u;
-  RealOutput y;
-protected
-  Real x;
-equation
-  der(x) = u;
-  y = x;
-end Integrator;
- -

Syntax

- -

See section on type_prefix in the Modelica Grammar.

- -

Description

- -

-The prefixes input and output have a slightly different semantic meaning depending on the context where they are used: -

- -
    -
  • In functions, these prefixes define the computational causality of the - function body, i.e., given the variables declared as input, - the variables declared as output are computed in the function body.
     
  • - -
  • In simulation models and blocks (i.e., on the top level of a model or - block that shall be simulated), these prefixes define the interaction - with the environment where the simulation model or block is used. - Especially, the input prefix defines that values for such a variable - have to be provided from the simulation environment and the output - prefix defines that the values of the corresponding variable - can be directly utilized in the simulation environment.
     
  • - -
  • In component models and blocks, the input prefix defines that a - binding equation has to be provided for the corresponding variable - when the component is utilized in order to guarantee a locally - balanced model (i.e., the number of local equations is identical - to the local number of unknowns). Example: -
      block FirstOrder
    -     input Real u;
    -       ...
    -  end FirstOrder;
    -
    -  model UseFirstOrder
    -     FirstOrder firstOrder(u=time); // binding equation for u
    -      ...
    -  end UseFirstOrder;
    -
    - The output prefix does not have a particular effect in a model - or block component and is ignored.
     
  • - -
  • In connectors, prefixes input and output define that the - corresponding connectors can only be connected according - to block diagram semantics (e.g., a connector with an output - variable can only be connected to a connector where the - corresponding variable is declared as input). There is the - restriction that connectors which have at least one variable - declared as input must be externally connected - (in order to get a locally balanced model, where the number - of local unknowns is identical to the number of unknown equations). - Together with the block diagram semantics rule this means, - that such connectors must be connected exactly once externally.
     
  • - -
  • In records, prefixes input and output are not allowed, - since otherwise a record could not be, e.g., passed as input - argument to a function.
  • -
- -")); -end 'output'; - -class 'partial' "partial" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Prohibit instantiation of components of the class -

-

Examples

- -
partial block PartialBlock
-  input Real u;
-  output Real y;
-protected
-  Real x;
-equation
-  x = y;
-end PartialBlock;
-
-block Integrator
-  extends PartialBlock;
-equation
-  der(x) = u;
-end Integrator;
-
-block Gain
-  extends PartialBlock;
-  parameter k = 1;
-equation
-  x = k*u;
-end Gain;
-
-model Composition
-  PartialBlock block1; // Illegal
-  Integrator block2; // Legal
-  Gain block3; // Legal
-end Composition;
- -

Syntax

- -

See section on class_definition in the Modelica Grammar.

- -

Description

- -

-The keyword partial defines that a class is incomplete and -that it cannot be instantiated. For example, defining -

- -
   PartialBlock block1;
- -

-is illegal. A partial class can only be used in an \"extends\" clause to inherit from it -or in a \"constrainedby\" clause to define the constraints of a replaceable class. -

- -")); -end 'partial'; - -class StateMachines "State Machines" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-The state machines defined in the Modelica Language are based on the synchronous language elements. -Note that the state machines defined in the Modelica Standard Library are not based on this. -

-

Examples

-
-  inner Integer v(start=0);
-  block Increase
-    outer output Integer v;
-  equation
-    v = previous(v) + 2;
-  end Increase;
-  Increase increase;
-  block Decrease
-    outer output Integer v;
-  equation
-    v = previous(v) - 1;
-  end Decrease;
-  Decrease decrease;
-equation
-  initialState(increase);
-  transition(increase, decrease, v>=6, immediate=false);
-  transition(decrease, increase, v==0, immediate=false);
-
-In this example we will start in increase and increase v until a limit, and then decrease it, and repeat. - -

Description

-A detailed description of the State Machines using Synchronous Language Elements is given in Chapter 17 (State Machines) of the Modelica 3.4 specification. -")); -end StateMachines; - -class 'stream' "stream" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Declare stream variable in a connector to describe bi-directional flow of matter -

-

Examples

- -
connector FluidPort
-  replaceable package Medium = Modelica.Media.Interfaces.PartialMedium;
-  Medium.AbsolutePressure        p          \"Pressure in connection point\";
-  flow   Medium.MassFlowRate     m_flow     \"> 0, if flow into component\";
-  stream Medium.SpecificEnthalpy h_outflow  \"h close to port if m_flow < 0\";
-end FluidPort;
-
-

-FluidPort is a stream connector, because a connector variable has the -stream prefix. The Medium definition and the stream variables are associated -with the only flow variable (m_flow) that defines a fluid stream. -The Medium and the stream variables are transported with this flow variable. -The stream variable h_outflow is the stream property inside the component -close to the boundary, when fluid flows out of the component into -the connection point. The stream properties for the other flow direction -can be inquired with the built-in operator -'inStream()'. The value of the -stream variable corresponding to the actual flow direction can be -inquired through the built-in operator 'actualStream()'. -

- -
model IsenthalpicFlow \"No energy storage/losses, e.g., pressure drop, valve, ...\"
-  replaceable package Medium=Modelica.Media.Interfaces.PartialMedium;
-  FluidPort port_a, port_b:
-  Medium.ThermodynamicState port_a_state_inflow \"State at port_a if inflowing\";
-  Medium.ThermodynamicState port_b_state_inflow \"State at port_b if inflowing\";
-equation
-  // Medium states for inflowing fluid
-  port_a_state_inflow = Medium.setState_phX(port_a.p,
-                                            inStream(port_a.h_outflow));
-  port_b_state_inflow = Medium.setState_phX(port_b.p,
-                                            inStream(port_b.h_outflow));
-  // Mass balance
-  0 = port_a.m_flow + port_b.m_flow;
-
-  // Instantaneous propagation of enthalpy flow between the ports with
-  // isenthalpic state transformation (no storage and no loss of energy)
-  port_a.h_outflow = inStream(port_b.h_outflow);
-  port_b.h_outflow = inStream(port_a.h_outflow);
-
-  // (Regularized) Momentum balance
-  port_a.m_flow = f(port_a.p, port_b.p,
-                    Medium.density(port_a_state_inflow),
-                    Medium.density(port_b_state_inflow));
-end IsenthalpicFlow;
-
- -

When two or more FluidPort (inside) connectors are connected together, then no -connection equations are generated for stream variables. Instead, these -equations are constructed by the inStream(..) built-in operator -(see example model IsenthalpicFlow) above. If two IsenthalpicFlow components -are connected together: -

- -
   IsenthalpicFlow dp1;
-   IsenthalpicFlow dp2;
-equation
-  connect(dp1, dp2);
-
- -

-Then, the following connection equations are generated -

- -
dp1.p = dp2.p;
-0 = dp1.m_flow + dp2.m_flow;
-
- -

-Note, no equation for a stream variable is generated. However, the inStream(..) -operators inside the components provide the \"ideal mixing\" equations: -

- -
// within dp1:
-  inStream(dp1.port_b.h_outflow) := dp2.port_a.h_outflow;
-
-// within dp2:
-  inStream(dp2.port_a.h_outflow) := dp1.port_b.h_outflow;
-
- -

Syntax

- -

See section on type_prefix in the Modelica Grammar.

- -

Description

- -

-A detailed description of the stream keyword and the inStream operator is given -in Chapter 15 (Stream Connectors) -and Appendix D (Derivation of Stream Equations) -of the Modelica 3.4 specification. -An overview and a rational is provided in a -slide set. -

- -

-The two basic variable types in a connector potential (or across) variable -and flow (or through) variable are not sufficient to describe in a numerically -sound way the bi-directional flow of matter with convective transport of specific -quantities, such as specific enthalpy and chemical composition. The values of these -specific quantities are determined from the upstream side of the flow, i.e., they depend -on the flow direction. When using across and through variables, the corresponding models -would include nonlinear systems of equations with Boolean unknowns for the flow directions -and singularities around zero flow. Such equation systems cannot be solved reliably in -general. The model formulations can be simplified when formulating two different balance -equations for the two possible flow directions. This is not possible with across and -through variables though. -

- -

-This fundamental problem is addressed in Modelica 3.1 by -introducing a third type of connector variable, called stream variable, -declared with the prefix stream. A stream variable describes a quantity that -is carried by a flow variable, i.e., a purely convective transport phenomenon. -The value of the stream variable is the specific property inside the component -close to the boundary, assuming that matter flows out of the component into the -connection point. In other words, it is the value the carried quantity would -have if the fluid was flowing out of the connector, irrespective of the actual flow direction. -

- -

-The basic idea is sketched at hand of an example: -Three connectors c1, c2, c3 with the definition -

- -
-connector Demo
-  Real        p;  // potential variable
-  flow   Real m_flow;  // flow variable
-  stream Real h;  // stream variable
-end Demo;
-
- -

-are connected together with -

- -
-connect(c1,c2);
-connect(c1,c3);
-
- -

-then this leads to the following equations: -

- -
-// Potential variables are identical
-c1.p = c2.p;
-c1.p = c3.p;
-
-// The sum of the flow variables is zero
-0 = c1.m_flow + c2.m_flow + c3.m_flow;
-
-/* The sum of the product of flow variables and upstream stream variables is zero
-   (this implicit set of equations is explicitly solved when generating code;
-   the \"<undefined>\" parts are defined in such a way that
-   inStream(..) is continuous).
-*/
-0 = c1.m_flow*(if c1.m_flow > 0 then h_mix else c1.h) +
-    c2.m_flow*(if c2.m_flow > 0 then h_mix else c2.h) +
-    c3.m_flow*(if c3.m_flow > 0 then h_mix else c3.h);
-
-inStream(c1.h) = if c1.m_flow > 0 then h_mix else <undefined>;
-inStream(c2.h) = if c2.m_flow > 0 then h_mix else <undefined>;
-inStream(c3.h) = if c3.m_flow > 0 then h_mix else <undefined>;
-
-
- -

-If at least one variable in a connector has the stream prefix, the connector -is called stream connector and the corresponding variable is called -stream variable. The following definitions hold: -

- -
    -
  • The stream prefix can only be used in a connector declaration.
  • -
  • A stream connector must have exactly one scalar variable with the flow prefix. - [The idea is that all stream variables of a connector are associated with - this flow variable].
  • -
  • For every outside connector, one equation is generated for every variable - with the stream prefix [to describe the propagation of the stream - variable along a model hierarchy]. For the exact definition, - see the end of section 15.2.
  • -
  • For inside connectors, variables with the stream prefix do not lead to - connection equations.
  • -
  • Connection equations with stream variables are generated in a - model when using the inStream() operator or the actualStream() operator.
  • -
- -

-For further details, see the definition of the -'inStream()' operator. -

- -")); -end 'stream'; - -class Synchronous "Synchronous Language Elements" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Synchronous language elements are added to Modelica as an alternative to normal when-clauses to -making modeling of complex sampled systems safer and easier. -

-

Examples

-
-  // Discrete controller
-  when Clock() then
-    E*dc.xd=A*previous(dc.xd)+B*dc.yd;
-      dc.ud=C*previous(dc.xd)+D*dc.yd;
-  end when;
-
-  // hold controller output:
-  plant.u=hold(dc.ud);
-
-  // Plant
-  0=f(der(plant.x),plant.x,plant.u);
-  plant.y=g(plant.x);
-
-  // Sample continuous signal
-  dc.yd=sample(plant.y, Clock(3));
-
-In this example dc.xd and dc.ud are Clocked variables, and only defined when the Clock is active (every 3rd second). -At time instants where the associated clock is not active, the value of a clocked variable can be inquired by using an explicit cast operator, e.g., hold. - -

Description

-A detailed description of the Synchronous Language Elements is given in Chapter 16 (Synchronous Language Elements) of the Modelica 3.4 specification. -")); -end Synchronous; - -class 'time' "time" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Built-in variable time -

-

Examples

- -
encapsulated model SineSource
-  import Modelica.Math.sin;
-  connector OutPort=output Real;
-  OutPort y=sin(time); // Uses the built-in variable time.
-end SineSource;
- -

Syntax

- -
time
- -

Description

- -

All declared variables are functions of the independent -variable time. Time is a built-in variable available -in all classes, which is treated as an input variable. It -is implicitly defined as:

- -
input Real time (final quantity = \"Time\",
-                 final unit     = \"s\");
- -

The value of the start attribute of time is set to -the time instant at which the simulation is started.

- -")); -end 'time'; - -class 'when' "when" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Activate equations or statements when condition becomes true -

-

Examples

-
 equation
-   when x > 2 then
-     y3 = 2*x +y1+y2; // Order of y1 and y3 equations does not matter
-     y1 = sin(x);
-   end when;
-   y2 = sin(y1);
- -

Syntax

- -

-In equation sections: -

- -
  when expression then
-    { equation \";\" }
-  { elsewhen expression then
-    { equation \";\" } }
-  end when
- -

-In algorithm sections: -

-
  when expression then
-    { algorithm \";\" }
-  { elsewhen expression then
-    { algorithm \";\" } }
-  end when
- -

Description

- -

The expression of a when clause shall be a discrete-time Boolean scalar -or vector expression. The equations and algorithm statements within a when -clause are activated when the scalar or any one of the elements of the vector -expression becomes true. When-clauses in equation sections are allowed, provided -the equations within the when-clause have one of the following forms:

- -
    -
  • v = expr;
  • -
  • (out1, out2, out3, ...) = function_call(in1, in2, ...);
  • -
  • operators assert(), terminate(), reinit()
  • -
  • For and if-clause if the equations within the for and if-clauses satisfy these requirements.
  • -
  • In an equation section, the different branches of when/elsewhen must have the same set of component references on the left-hand side.
  • -
  • In an equation section, the branches of an if-then-else clause inside when-clauses must have the same set of component references on the left-hand side, unless the if-then-else have exclusively parameter expressions as switching conditions.
  • -
- -

A when clause shall not be used within a function class.

- -

[Example:

- -

Algorithms are activated when x becomes > 2:

- -
   when x > 2 then
-     y1 := sin(x);
-     y3 := 2*x + y1 + y2;
-   end when;
- -

Algorithms are activated when either x becomes > 2 or sample(0,2) becomes true or x becomes less than 5:

- -
   when {x > 2, sample(0,2), x < 5} then
-     y1 := sin(x);
-     y3 := 2*x + y1 + y2;
-   end when;
- -

For when in equation sections the order between the equations does not matter, e.g.,

-
 equation
-   when x > 2 then
-     y3 = 2*x +y1+y2; // Order of y1 and y3 equations does not matter
-     y1 = sin(x);
-   end when;
-   y2 = sin(y1);
- -

The needed restrictions on equations within a when-clause becomes apparent with the following example:

- -
   Real x, y;
-equation
-   x + y = 5;
-   when condition then
-      2*x + y = 7;         // error: not valid Modelica
-   end when;
- -

When the equations of the when-clause are not activated it is not clear which -variable to hold constant, either x or y. A corrected version of this example is:

- -
   Real x, y;
-equation
-   x + y = 5;
-   when condition then
-      y = 7 - 2*x;        // fine
-   end when;
- -

Here, variable y is held constant when the when-clause is de-activated and x -is computed from the first equation using the value of y from the previous event instant.

- -

For when in algorithm sections the order is significant and it is advisable to have only -one assignment within the when-clause and instead use several algorithms having when-clauses -with identical conditions, e.g.,

- -
 algorithm
-   when x > 2 then
-     y1 := sin(x);
-   end when;
- equation
-   y2 = sin(y1);
- algorithm
-   when x > 2 then
-     y3 := 2*x + y1 + y2;
-   end when;
- -

Merging the when-clauses can lead to less efficient code and different models -with different behaviour depending on the order of the assignment to y1 and y3 in the algorithm.]

- -

A when clause

- -
 algorithm
-   when {x>1, ..., y>p} then
-     ...
-   elsewhen x > y.start then
-     ...
-   end when;
- -

is equivalent to the following special if-clause, where Boolean b1[N] -and Boolean b2 are necessary because the edge() operator can only -be applied to variables

- -
   Boolean b1[N](start={x.start>1, ..., y.start>p});
-   Boolean b2(start=x.start>y.start);
- algorithm
-   b1:={x>1, ..., y>p};
-   b2:=x>y.start;
-
-   if edge(b1[1]) or edge(b1[2]) or ... edge(b1[N]) then
-     ...
-   elseif edge(b2) then
-     ...
-   end if;
- -

with "edge(A)= A and not pre(A)" and the additional -guarantee, that the algorithms within this special if clause are only evaluated -at event instants.

- -

A when-clause

- -
 equation
-   when x>2 then
-     v1 = expr1 ;
-     v2 = expr2 ;
-   end when;
- -

is equivalent to the following special if-expressions

- -
   Boolean b(start=x.start>2);
- equation
-   b  = x>2;
-   v1 = if edge(b) then expr1 else pre(v1);
-   v2 = if edge(b) then expr2 else pre(v2);
- -

The start-values of the introduced Boolean variables are defined by -the taking the start-value of the when-condition, as above where p is a -parameter variable. The start-values of the special functions -initial, terminal, and sample is false.

- -

When clauses cannot be nested.

- -

[Example:

- -

The following when clause is invalid:

- -
   when x > 2 then
-     when y1 > 3 then
-       y2 = sin(x);
-     end when;
-   end when;
- -

]

-")); -end 'when'; - -class 'while' "while" - extends ModelicaReference.Icons.Information; - annotation (Documentation(info=" -

-Repeat statements as long as a condition is fulfilled -

-

Examples

-
    Integer i;
-  algorithm
-    i := 1;
-    while i < 10 loop
-      i := i + 1;
-      ...
-    end while;
- -

Syntax

- -
  while expression loop
-    { algorithm \";\" }
-  end while
- -

Description

- -

The expression of a while clause shall be a scalar Boolean expression. -The while-clause corresponds to while-statements in programming languages, -and is formally defined as follows

- -
    -
  1. The expression of the while clause is evaluated.
  2. -
  3. If the expression of the while-clause is false, the execution - continues after the while-clause.
  4. -
  5. If the expression of the while-clause is true, the entire body of - the while clause is executed (except if a break statement or return - statement is executed), and then execution proceeds at step 1.
  6. -
- -")); -end 'while'; - -class Contact "Contact" - extends ModelicaReference.Icons.Contact; - - annotation (Documentation(info=" -
-
Library Officers:
-
Dietmar Winkler and Hans Olsson
-
-

Acknowledgements:

-
    -
  • The initial version of ModelicaReference is from Christian Schweiger (DLR) who - provided it up to Modelica version 2.2.
  • - -
  • Martin Otter (DLR) updated ModelicaReference for Modelica 3.0.
  • - -
  • Dietmar Winkler (DWE) updated ModelicaReference for - Modelica 3.1 and 3.2
  • - -
  • Stefan Vorkoetter (Maplesoft) provided ModelicaReference.ModelicaGrammar - for Modelica 3.2.
  • -
- -")); - -end Contact; - -package Icons "Library of icons" - extends ModelicaReference.Icons.IconsPackage; - partial class Information "Icon for general information packages" - - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics={ - Ellipse( - lineColor={75,138,73}, - fillColor={75,138,73}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - extent={{-100.0,-100.0},{100.0,100.0}}), - Polygon( - origin={-4.167,-15.0}, - fillColor={255,255,255}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-15.833,20.0},{-15.833,30.0},{14.167,40.0},{24.167,20.0},{ - 4.167,-30.0},{14.167,-30.0},{24.167,-30.0},{24.167,-40.0},{-5.833, - -50.0},{-15.833,-30.0},{4.167,20.0},{-5.833,20.0}}, - smooth=Smooth.Bezier), - Ellipse( - origin={7.5,56.5}, - fillColor={255,255,255}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - extent={{-12.5,-12.5},{12.5,12.5}})}), Documentation(info=" -

This icon indicate classes containing only documentation, intended for general description of, e.g., concepts and features of a package.

-")); - end Information; - - partial class Contact "Icon for contact information" - - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics={ - Rectangle( - extent={{-100,70},{100,-72}}, - fillColor={235,235,235}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-100,-72},{100,-72},{0,20},{-100,-72}}, - fillColor={215,215,215}, - fillPattern=FillPattern.Solid), - Polygon( - points={{22,0},{100,70},{100,-72},{22,0}}, - fillColor={235,235,235}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-100,70},{100,70},{0,-20},{-100,70}}, - fillColor={241,241,241}, - fillPattern=FillPattern.Solid)}), Documentation(info=" -

This icon shall be used for the contact information of the library developers.

-")); - end Contact; - - partial class IconsPackage "Icon for packages containing icons" - extends ModelicaReference.Icons.Package; - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100, - -100},{100,100}}), graphics={Polygon( - origin={-8.167,-17}, - fillColor={128,128,128}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - points={{-15.833,20.0},{-15.833,30.0},{14.167,40.0},{24.167,20.0},{ - 4.167,-30.0},{14.167,-30.0},{24.167,-30.0},{24.167,-40.0},{-5.833, - -50.0},{-15.833,-30.0},{4.167,20.0},{-5.833,20.0}}, - smooth=Smooth.Bezier), Ellipse( - origin={-0.5,56.5}, - fillColor={128,128,128}, - pattern=LinePattern.None, - fillPattern=FillPattern.Solid, - extent={{-12.5,-12.5},{12.5,12.5}})})); - end IconsPackage; - - partial class Package "Icon for standard packages" - - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}), graphics={ - Rectangle( - lineColor={200,200,200}, - fillColor={248,248,248}, - fillPattern=FillPattern.HorizontalCylinder, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0), - Rectangle( - lineColor={128,128,128}, - extent={{-100.0,-100.0},{100.0,100.0}}, - radius=25.0)}), Documentation(info=" -

Standard package icon.

-")); - end Package; -end Icons; - -annotation ( - DocumentationClass=true, - version="4.0.0", - versionDate="2020-06-04", - dateModified = "2020-06-04 11:00:00Z", - revisionId="$Format:%h %ci$", - Documentation(info=" -

-This package is a reference to Modelica keywords, -Modelica builtin operators, -and the Modelica grammar. -It is based on the -Modelica Language Specification version 3.4 from 10th April 2017. Currently, not the whole Modelica language is documented in ModelicaReference (but a large subset). -

- -

-Copyright © 2003-2020, Modelica Association and contributors -

- -

-This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the 3-Clause BSD license. For license conditions (including the disclaimer of warranty) visit https://modelica.org/licenses/modelica-3-clause-bsd. -

-", revisions=" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RevisionDateAuthorComment
2020-02-24Hans Olsson - Add minimal parts for synchronous and state machines - making the reference feature-complete. -
2019-09-27Hans Olsson - Update to Modelica Specification 3.4 (except grammar): -
    -
  • Change of missingInnerMessage, to indicate that it less important.
  • -
  • Example for InlineAfterIndexReduction.
  • -
  • Version conversions are specified, and to-version is possible.
  • -
  • The function section was rewritten, and pure functions added as a sub-class, and function partial application also moved to a sub-class.
  • -
  • Correct constrained to constrainedby (could also be constraining-clause).
  • -
  • Remaining: synchronous, state machines, specifying conversions(?), ...
  • -
-
2017-09-22Hans Olsson -
    -
  • Changed grammar to have colon emphasized as well, since it may otherwise look like a dot after 't' due to lack of kerning.
  • -
  • Annotation inverse moved to annotations.
  • -
  • The operator sign does not generate events, #2324
  • -
  • Some stylistic improvements of the English text
  • -
-
2013-07-26Dietmar Winkler,
- Martin Otter
-
    -
  • Update of grammar from Maplesoft which reflects changes from - #1140
  • -
  • Introduced the same new icons as in Modelica 3.2.1
  • -
  • Fixing incorrect links and HTML errors in documentation.
  • -
  • Fixing trivial typos.
  • -
  • Moves operators from the top level (array, cat, ..) to subpackage Operators
  • -
  • Adding homotopy() operator.
  • -
  • #1007: png figures are compressed.
  • -
  • #670: Adds more function and operator descriptions
  • -
  • #644: Improved description of operator delay
  • -
  • Updated the documentation to reflect Modelica Specification 3.2 Rev2: -
      -
    • Update of reinit(), Integer(), DocumentationClass
    • -
    • #988: Adding the annotations:
      - checkBox
      - choicesAllMatching
      - colorSelector
      - loadSelector
      - saveSelector
      - normallyConstant
    • -
    • #802: Adding the additional connection operators
      - Connections.branch()
      - Connections.root()
      - Connections.potentialRoot()
      - Connections.isRoot()
      - Connections.rooted()
      - rooted() with deprecation notice
    • -
    • #1048: GenerateEvents annotation removed in Modelica 3.2 rev2
    • -
  • -
-
r47812011-12-15Dietmar WinklerUse quoted class names for function descriptions (closes ticket #565)
r42562010-10-06Dietmar WinklerRemoved 'uses' annotation and added icons so it can be used with multiple versions of the MSL (closes ticket #425)
r42182010-09-25Dietmar WinklerMajor clean up of the documentation by use of LinkChecker (closes ticket #228)
r41452010-09-07Dietmar WinklerAdded an update of the Modelica 3.2 grammar - from Stefan Vorkoetter (Maplesoft).
r37422010-04-13Martin OtterAdded the Modelica 3.2 grammar - from Stefan Vorkoetter (Maplesoft).
- Introduced a \"Contact\" subpackage with updated contact and - acknowledgment information.
r35982010-03-10Dietmar WinklerAdded some annotations from Modelica language version 3.1 and 3.2 (see ticket #228)
r9482008-01-02Martin OtterAdapted to Modelica language version 3.0
2004-09-30Martin OtterMoved the content of \"Functions\" into \"Operators\" and updated \"Operators\" according to Modelica 2.1
2003-07-10Christian SchweigerImplemented.
-")); -end ModelicaReference; diff --git a/ModelicaReference/package.order b/ModelicaReference/package.order deleted file mode 100644 index 3d84af5b62..0000000000 --- a/ModelicaReference/package.order +++ /dev/null @@ -1,22 +0,0 @@ -ModelicaGrammar -Annotations -Classes -Operators -BalancedModel -'encapsulated' -'extends' -'flow' -'for' -'if' -'import' -'input' -'output' -'partial' -StateMachines -'stream' -Synchronous -'time' -'when' -'while' -Contact -Icons