1 | package Tests_OM_pour_OM
|
---|
2 | model when_init_complex
|
---|
3 | Real a_re;
|
---|
4 | Real a_im;
|
---|
5 | Complex Eo;
|
---|
6 | equation
|
---|
7 | a_re = 10;
|
---|
8 | a_im = 0;
|
---|
9 | when initial() then
|
---|
10 | Eo = Complex(a_re, a_im) + Complex(10, 0);
|
---|
11 | end when;
|
---|
12 | end when_init_complex;
|
---|
13 |
|
---|
14 | model if_complex_if_expression
|
---|
15 | parameter Complex E = Complex(1, 0);
|
---|
16 | parameter Complex Z = Complex(0.1, 0.1);
|
---|
17 | Complex V;
|
---|
18 | parameter Boolean model_type = true;
|
---|
19 | equation
|
---|
20 | Complex(E.re - V.re, E.im - V.im) = if model_type then Complex(0, 0) else Complex(Z.re, Z.im);
|
---|
21 | end if_complex_if_expression;
|
---|
22 | end Tests_OM_pour_OM;
|
---|