Ticket #5911: P.mo

File P.mo, 1.6 KB (added by Adeel Asghar, 5 years ago)
Line 
1package P
2 model M
3 P.C c1 annotation (
4 Placement(visible = true, transformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {110, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
5 parameter Real r = 5;
6 equation
7
8 annotation (Diagram(coordinateSystem(preserveAspectRatio=false)), Icon(
9 coordinateSystem(preserveAspectRatio=false)));
10 end M;
11
12 model N
13 P.M m1(r(displayUnit="K") = 10, s = 12) annotation (
14 Placement(visible = true, transformation(origin = {-2, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
15 P.M m2 annotation (
16 Placement(visible = true, transformation(origin={39,10}, extent={{-10,-11},
17 {10,11}}, rotation = 90)));
18 C c annotation(
19 Placement(visible = true, transformation(origin = {66, 66}, extent = {{-10, -10}, {10, 10}}, rotation = 0), iconTransformation(origin = {66, 66}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
20 equation
21 connect(m1.c1, m2.c1) annotation (
22 Line(points={{9,10},{24,10},{24,21},{39,21}}));
23 annotation (
24 Diagram(coordinateSystem(initialScale = 0.1)));
25 end N;
26
27 connector C
28 annotation (
29 Icon(graphics={ Rectangle(fillPattern = FillPattern.Solid, extent = {{-100, 100}, {100, -100}})}));
30 end C;
31
32 model N1
33 extends N;
34 M m1 annotation (
35 Placement(visible = true, transformation(origin = {58, 36}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
36 equation
37
38 end N1;
39end P;