Ticket #2899: TestModelTotal.mo

File TestModelTotal.mo, 45.8 KB (added by karinh@…, 10 years ago)

test model for expandable connectors

Line 
1package Modelica "Modelica Standard Library - Version 3.2.1 (Build 2)"
2 extends Modelica.Icons.Package;
3
4 package Blocks "Library of basic input/output control blocks (continuous, discrete, logical, table blocks)"
5 import SI = Modelica.SIunits;
6 extends Modelica.Icons.Package;
7
8 package Interfaces "Library of connectors and partial models for input/output blocks"
9 import Modelica.SIunits;
10 extends Modelica.Icons.InterfacesPackage;
11 connector RealInput = input Real "'input Real' as connector" annotation(defaultComponentName = "u", Icon(graphics = {Polygon(lineColor = {0, 0, 127}, fillColor = {0, 0, 127}, fillPattern = FillPattern.Solid, points = {{-100.0, 100.0}, {100.0, 0.0}, {-100.0, -100.0}})}, coordinateSystem(extent = {{-100.0, -100.0}, {100.0, 100.0}}, preserveAspectRatio = true, initialScale = 0.2)), Diagram(coordinateSystem(preserveAspectRatio = true, initialScale = 0.2, extent = {{-100.0, -100.0}, {100.0, 100.0}}), graphics = {Polygon(lineColor = {0, 0, 127}, fillColor = {0, 0, 127}, fillPattern = FillPattern.Solid, points = {{0.0, 50.0}, {100.0, 0.0}, {0.0, -50.0}, {0.0, 50.0}}), Text(lineColor = {0, 0, 127}, extent = {{-10.0, 60.0}, {-10.0, 85.0}}, textString = "%name")}), Documentation(info = "<html>
12
13 <p>
14
15 Connector with one input signal of type Real.
16
17 </p>
18
19 </html>"));
20 connector RealOutput = output Real "'output Real' as connector" annotation(defaultComponentName = "y", Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100.0, -100.0}, {100.0, 100.0}}, initialScale = 0.1), graphics = {Polygon(lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, points = {{-100.0, 100.0}, {100.0, 0.0}, {-100.0, -100.0}})}), Diagram(coordinateSystem(preserveAspectRatio = true, extent = {{-100.0, -100.0}, {100.0, 100.0}}, initialScale = 0.1), graphics = {Polygon(lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, points = {{-100.0, 50.0}, {0.0, 0.0}, {-100.0, -50.0}}), Text(lineColor = {0, 0, 127}, extent = {{30.0, 60.0}, {30.0, 110.0}}, textString = "%name")}), Documentation(info = "<html>
21
22 <p>
23
24 Connector with one output signal of type Real.
25
26 </p>
27
28 </html>"));
29
30 partial block SO "Single Output continuous control block"
31 extends Modelica.Blocks.Icons.Block;
32 RealOutput y "Connector of Real output signal" annotation(Placement(transformation(extent = {{100, -10}, {120, 10}}, rotation = 0)));
33 annotation(Documentation(info = "<html>
34
35 <p>
36
37 Block has one continuous Real output signal.
38
39 </p>
40
41 </html>"));
42 end SO;
43
44 package Adaptors "Obsolete package with components to send signals to a bus or receive signals from a bus (only for backward compatibility)"
45 extends Modelica.Icons.Package;
46 // extends Modelica.Icons.ObsoleteModel;
47
48 block SendReal "Obsolete block to send Real signal to bus"
49 // extends Modelica.Icons.ObsoleteModel;
50 RealOutput toBus "Output signal to be connected to bus" annotation(Placement(transformation(extent = {{100, -10}, {120, 10}}, rotation = 0)));
51 RealInput u "Input signal to be send to bus" annotation(Placement(transformation(extent = {{-140, -20}, {-100, 20}}, rotation = 0)));
52 equation
53 toBus = u;
54 annotation(Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Rectangle(extent = {{-100, 40}, {100, -40}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Text(extent = {{-144, 96}, {144, 46}}, lineColor = {0, 0, 0}, textString = "%name"), Text(extent = {{-100, 30}, {100, -30}}, lineColor = {0, 0, 127}, textString = "send")}), Documentation(info = "<html>
55
56 <p>
57
58 Obsolete block that was previously used to connect a Real signal
59
60 to a signal in a connector. This block is only provided for
61
62 backward compatibility.
63
64 </p>
65
66
67
68 <p>
69
70 It is much more convenient and more powerful to use \"expandable connectors\"
71
72 for signal buses, see example
73
74 <a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
75
76 </p>
77
78 </html>"));
79 end SendReal;
80
81 block ReceiveReal "Obsolete block to receive Real signal from bus"
82 // extends Modelica.Icons.ObsoleteModel;
83 RealInput fromBus "To be connected with signal on bus" annotation(Placement(transformation(extent = {{-120, -10}, {-100, 10}}, rotation = 0)));
84 RealOutput y "Output signal to be received from bus" annotation(Placement(transformation(extent = {{100, -10}, {120, 10}}, rotation = 0)));
85 equation
86 y = fromBus;
87 annotation(Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Rectangle(extent = {{-100, 40}, {100, -40}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Text(extent = {{-100, 30}, {100, -30}}, lineColor = {0, 0, 127}, textString = "receive"), Text(extent = {{-144, 96}, {144, 46}}, lineColor = {0, 0, 0}, textString = "%name")}), Documentation(info = "<html>
88
89 <p>
90
91 Obsolete block that was previously used to connect a Real signal
92
93 in a connector to an input of a block. This block is only provided for
94
95 backward compatibility.
96
97 </p>
98
99
100
101 <p>
102
103 It is much more convenient and more powerful to use \"expandable connectors\"
104
105 for signal buses, see example
106
107 <a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
108
109 </p>
110
111 </html>"));
112 end ReceiveReal;
113 annotation(Documentation(info = "<html>
114
115 <p>
116
117 The components of this package should no longer be used.
118
119 They are only provided for backward compatibility.
120
121 It is much more convenient and more powerful to use \"expandable connectors\"
122
123 for signal buses, see example
124
125 <a href=\"modelica://Modelica.Blocks.Examples.BusUsage\">BusUsage</a>.
126
127 </p>
128
129 </html>"));
130 end Adaptors;
131 annotation(Documentation(info = "<HTML>
132
133 <p>
134
135 This package contains interface definitions for
136
137 <b>continuous</b> input/output blocks with Real,
138
139 Integer and Boolean signals. Furthermore, it contains
140
141 partial models for continuous and discrete blocks.
142
143 </p>
144
145
146
147 </html>", revisions = "<html>
148
149 <ul>
150
151 <li><i>Oct. 21, 2002</i>
152
153 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
154
155 and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
156
157 Added several new interfaces.
158
159 <li><i>Oct. 24, 1999</i>
160
161 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
162
163 RealInputSignal renamed to RealInput. RealOutputSignal renamed to
164
165 output RealOutput. GraphBlock renamed to BlockIcon. SISOreal renamed to
166
167 SISO. SOreal renamed to SO. I2SOreal renamed to M2SO.
168
169 SignalGenerator renamed to SignalSource. Introduced the following
170
171 new models: MIMO, MIMOs, SVcontrol, MVcontrol, DiscreteBlockIcon,
172
173 DiscreteBlock, DiscreteSISO, DiscreteMIMO, DiscreteMIMOs,
174
175 BooleanBlockIcon, BooleanSISO, BooleanSignalSource, MI2BooleanMOs.</li>
176
177 <li><i>June 30, 1999</i>
178
179 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
180
181 Realized a first version, based on an existing Dymola library
182
183 of Dieter Moormann and Hilding Elmqvist.</li>
184
185 </ul>
186
187 </html>"));
188 end Interfaces;
189
190 package Sources "Library of signal source blocks generating Real and Boolean signals"
191 import Modelica.Blocks.Interfaces;
192 import Modelica.SIunits;
193 extends Modelica.Icons.SourcesPackage;
194
195 block Constant "Generate constant signal of type Real"
196 parameter Real k(start = 1) "Constant output value";
197 extends Interfaces.SO;
198 equation
199 y = k;
200 annotation(defaultComponentName = "const", Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Line(points = {{-80, 68}, {-80, -80}}, color = {192, 192, 192}), Polygon(points = {{-80, 90}, {-88, 68}, {-72, 68}, {-80, 90}}, lineColor = {192, 192, 192}, fillColor = {192, 192, 192}, fillPattern = FillPattern.Solid), Line(points = {{-90, -70}, {82, -70}}, color = {192, 192, 192}), Polygon(points = {{90, -70}, {68, -62}, {68, -78}, {90, -70}}, lineColor = {192, 192, 192}, fillColor = {192, 192, 192}, fillPattern = FillPattern.Solid), Line(points = {{-80, 0}, {80, 0}}, color = {0, 0, 0}), Text(extent = {{-150, -150}, {150, -110}}, lineColor = {0, 0, 0}, textString = "k=%k")}), Diagram(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Polygon(points = {{-80, 90}, {-86, 68}, {-74, 68}, {-80, 90}}, lineColor = {95, 95, 95}, fillColor = {95, 95, 95}, fillPattern = FillPattern.Solid), Line(points = {{-80, 68}, {-80, -80}}, color = {95, 95, 95}), Line(points = {{-80, 0}, {80, 0}}, color = {0, 0, 255}, thickness = 0.5), Line(points = {{-90, -70}, {82, -70}}, color = {95, 95, 95}), Polygon(points = {{90, -70}, {68, -64}, {68, -76}, {90, -70}}, lineColor = {95, 95, 95}, fillColor = {95, 95, 95}, fillPattern = FillPattern.Solid), Text(extent = {{-83, 92}, {-30, 74}}, lineColor = {0, 0, 0}, textString = "y"), Text(extent = {{70, -80}, {94, -100}}, lineColor = {0, 0, 0}, textString = "time"), Text(extent = {{-101, 8}, {-81, -12}}, lineColor = {0, 0, 0}, textString = "k")}), Documentation(info = "<html>
201
202 <p>
203
204 The Real output y is a constant signal:
205
206 </p>
207
208
209
210 <p>
211
212 <img src=\"modelica://Modelica/Resources/Images/Blocks/Sources/Constant.png\"
213
214 alt=\"Constant.png\">
215
216 </p>
217
218 </html>"));
219 end Constant;
220 annotation(Documentation(info = "<HTML>
221
222 <p>
223
224 This package contains <b>source</b> components, i.e., blocks which
225
226 have only output signals. These blocks are used as signal generators
227
228 for Real, Integer and Boolean signals.
229
230 </p>
231
232
233
234 <p>
235
236 All Real source signals (with the exception of the Constant source)
237
238 have at least the following two parameters:
239
240 </p>
241
242
243
244 <table border=1 cellspacing=0 cellpadding=2>
245
246 <tr><td valign=\"top\"><b>offset</b></td>
247
248 <td valign=\"top\">Value which is added to the signal</td>
249
250 </tr>
251
252 <tr><td valign=\"top\"><b>startTime</b></td>
253
254 <td valign=\"top\">Start time of signal. For time &lt; startTime,
255
256 the output y is set to offset.</td>
257
258 </tr>
259
260 </table>
261
262
263
264 <p>
265
266 The <b>offset</b> parameter is especially useful in order to shift
267
268 the corresponding source, such that at initial time the system
269
270 is stationary. To determine the corresponding value of offset,
271
272 usually requires a trimming calculation.
273
274 </p>
275
276 </html>", revisions = "<html>
277
278 <ul>
279
280 <li><i>October 21, 2002</i>
281
282 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
283
284 and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
285
286 Integer sources added. Step, TimeTable and BooleanStep slightly changed.</li>
287
288 <li><i>Nov. 8, 1999</i>
289
290 by <a href=\"mailto:clauss@eas.iis.fhg.de\">Christoph Clau&szlig;</a>,
291
292 <a href=\"mailto:Andre.Schneider@eas.iis.fraunhofer.de\">Andre.Schneider@eas.iis.fraunhofer.de</a>,
293
294 <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
295
296 New sources: Exponentials, TimeTable. Trapezoid slightly enhanced
297
298 (nperiod=-1 is an infinite number of periods).</li>
299
300 <li><i>Oct. 31, 1999</i>
301
302 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
303
304 <a href=\"mailto:clauss@eas.iis.fhg.de\">Christoph Clau&szlig;</a>,
305
306 <a href=\"mailto:Andre.Schneider@eas.iis.fraunhofer.de\">Andre.Schneider@eas.iis.fraunhofer.de</a>,
307
308 All sources vectorized. New sources: ExpSine, Trapezoid,
309
310 BooleanConstant, BooleanStep, BooleanPulse, SampleTrigger.
311
312 Improved documentation, especially detailed description of
313
314 signals in diagram layer.</li>
315
316 <li><i>June 29, 1999</i>
317
318 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
319
320 Realized a first version, based on an existing Dymola library
321
322 of Dieter Moormann and Hilding Elmqvist.</li>
323
324 </ul>
325
326 </html>"));
327 end Sources;
328
329 package Icons "Icons for Blocks"
330 extends Modelica.Icons.IconsPackage;
331
332 partial block Block "Basic graphical layout of input/output block"
333 annotation(Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100, -100}, {100, 100}}), graphics = {Rectangle(extent = {{-100, -100}, {100, 100}}, lineColor = {0, 0, 127}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Text(extent = {{-150, 150}, {150, 110}}, textString = "%name", lineColor = {0, 0, 255})}), Documentation(info = "<html>
334
335 <p>
336
337 Block that has only the basic icon for an input/output
338
339 block (no declarations, no equations). Most blocks
340
341 of package Modelica.Blocks inherit directly or indirectly
342
343 from this block.
344
345 </p>
346
347 </html>"));
348 end Block;
349 end Icons;
350 annotation(Icon(coordinateSystem(preserveAspectRatio = true, extent = {{-100.0, -100.0}, {100.0, 100.0}}, initialScale = 0.1), graphics = {Rectangle(origin = {0.0, 35.1488}, fillColor = {255, 255, 255}, extent = {{-30.0, -20.1488}, {30.0, 20.1488}}), Rectangle(origin = {0.0, -34.8512}, fillColor = {255, 255, 255}, extent = {{-30.0, -20.1488}, {30.0, 20.1488}}), Line(origin = {-51.25, 0.0}, points = {{21.25, -35.0}, {-13.75, -35.0}, {-13.75, 35.0}, {6.25, 35.0}}), Polygon(origin = {-40.0, 35.0}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{10.0, 0.0}, {-5.0, 5.0}, {-5.0, -5.0}}), Line(origin = {51.25, 0.0}, points = {{-21.25, 35.0}, {13.75, 35.0}, {13.75, -35.0}, {-6.25, -35.0}}), Polygon(origin = {40.0, -35.0}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{-10.0, 0.0}, {5.0, 5.0}, {5.0, -5.0}})}), Documentation(info = "<html>
351
352 <p>
353
354 This library contains input/output blocks to build up block diagrams.
355
356 </p>
357
358
359
360 <dl>
361
362 <dt><b>Main Author:</b>
363
364 <dd><a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a><br>
365
366 Deutsches Zentrum f&uuml;r Luft und Raumfahrt e. V. (DLR)<br>
367
368 Oberpfaffenhofen<br>
369
370 Postfach 1116<br>
371
372 D-82230 Wessling<br>
373
374 email: <A HREF=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</A><br>
375
376 </dl>
377
378 <p>
379
380 Copyright &copy; 1998-2013, Modelica Association and DLR.
381
382 </p>
383
384 <p>
385
386 <i>This Modelica package is <u>free</u> software and the use is completely at <u>your own risk</u>; it can be redistributed and/or modified under the terms of the Modelica License 2. For license conditions (including the disclaimer of warranty) see <a href=\"modelica://Modelica.UsersGuide.ModelicaLicense2\">Modelica.UsersGuide.ModelicaLicense2</a> or visit <a href=\"https://www.modelica.org/licenses/ModelicaLicense2\"> https://www.modelica.org/licenses/ModelicaLicense2</a>.</i>
387
388 </p>
389
390 </html>", revisions = "<html>
391
392 <ul>
393
394 <li><i>June 23, 2004</i>
395
396 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
397
398 Introduced new block connectors and adapted all blocks to the new connectors.
399
400 Included subpackages Continuous, Discrete, Logical, Nonlinear from
401
402 package ModelicaAdditions.Blocks.
403
404 Included subpackage ModelicaAdditions.Table in Modelica.Blocks.Sources
405
406 and in the new package Modelica.Blocks.Tables.
407
408 Added new blocks to Blocks.Sources and Blocks.Logical.
409
410 </li>
411
412 <li><i>October 21, 2002</i>
413
414 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
415
416 and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
417
418 New subpackage Examples, additional components.
419
420 </li>
421
422 <li><i>June 20, 2000</i>
423
424 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> and
425
426 Michael Tiller:<br>
427
428 Introduced a replaceable signal type into
429
430 Blocks.Interfaces.RealInput/RealOutput:
431
432 <pre>
433
434 replaceable type SignalType = Real
435
436 </pre>
437
438 in order that the type of the signal of an input/output block
439
440 can be changed to a physical type, for example:
441
442 <pre>
443
444 Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque))
445
446 </pre>
447
448 </li>
449
450 <li><i>Sept. 18, 1999</i>
451
452 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
453
454 Renamed to Blocks. New subpackages Math, Nonlinear.
455
456 Additional components in subpackages Interfaces, Continuous
457
458 and Sources. </li>
459
460 <li><i>June 30, 1999</i>
461
462 by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
463
464 Realized a first version, based on an existing Dymola library
465
466 of Dieter Moormann and Hilding Elmqvist.</li>
467
468 </ul>
469
470 </html>"));
471 end Blocks;
472
473 package Icons "Library of icons"
474 extends Icons.Package;
475
476 partial model Example "Icon for runnable examples"
477 annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Ellipse(lineColor = {75, 138, 73}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, extent = {{-100, -100}, {100, 100}}), Polygon(lineColor = {0, 0, 255}, fillColor = {75, 138, 73}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{-36, 60}, {64, 0}, {-36, -60}, {-36, 60}})}), Documentation(info = "<html>
478
479 <p>This icon indicates an example. The play button suggests that the example can be executed.</p>
480
481 </html>"));
482 end Example;
483
484 partial package Package "Icon for standard packages"
485 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}, fillPattern = FillPattern.None, extent = {{-100.0, -100.0}, {100.0, 100.0}}, radius = 25.0)}), Documentation(info = "<html>
486
487 <p>Standard package icon.</p>
488
489 </html>"));
490 end Package;
491
492 partial package InterfacesPackage "Icon for packages containing interfaces"
493 extends Modelica.Icons.Package;
494 annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Polygon(origin = {20.0, 0.0}, lineColor = {64, 64, 64}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid, points = {{-10.0, 70.0}, {10.0, 70.0}, {40.0, 20.0}, {80.0, 20.0}, {80.0, -20.0}, {40.0, -20.0}, {10.0, -70.0}, {-10.0, -70.0}}), Polygon(fillColor = {102, 102, 102}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{-100.0, 20.0}, {-60.0, 20.0}, {-30.0, 70.0}, {-10.0, 70.0}, {-10.0, -70.0}, {-30.0, -70.0}, {-60.0, -20.0}, {-100.0, -20.0}})}), Documentation(info = "<html>
495
496 <p>This icon indicates packages containing interfaces.</p>
497
498 </html>"));
499 end InterfacesPackage;
500
501 partial package SourcesPackage "Icon for packages containing sources"
502 extends Modelica.Icons.Package;
503 annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Polygon(origin = {23.3333, 0.0}, fillColor = {128, 128, 128}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{-23.333, 30.0}, {46.667, 0.0}, {-23.333, -30.0}}), Rectangle(fillColor = {128, 128, 128}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-70, -4.5}, {0, 4.5}})}), Documentation(info = "<html>
504
505 <p>This icon indicates a package which contains sources.</p>
506
507 </html>"));
508 end SourcesPackage;
509
510 partial package IconsPackage "Icon for packages containing icons"
511 extends Modelica.Icons.Package;
512 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, lineColor = {0, 0, 0}), 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}}, lineColor = {0, 0, 0})}));
513 end IconsPackage;
514
515 expandable connector SignalBus "Icon for signal bus"
516 annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, initialScale = 0.2), graphics = {Rectangle(lineColor = {255, 204, 51}, lineThickness = 0.5, extent = {{-20.0, -2.0}, {20.0, 2.0}}), Polygon(fillColor = {255, 215, 136}, fillPattern = FillPattern.Solid, points = {{-80.0, 50.0}, {80.0, 50.0}, {100.0, 30.0}, {80.0, -40.0}, {60.0, -50.0}, {-60.0, -50.0}, {-80.0, -40.0}, {-100.0, 30.0}}, smooth = Smooth.Bezier), Ellipse(fillPattern = FillPattern.Solid, extent = {{-65.0, 15.0}, {-55.0, 25.0}}), Ellipse(fillPattern = FillPattern.Solid, extent = {{-5.0, 15.0}, {5.0, 25.0}}), Ellipse(fillPattern = FillPattern.Solid, extent = {{55.0, 15.0}, {65.0, 25.0}}), Ellipse(fillPattern = FillPattern.Solid, extent = {{-35.0, -25.0}, {-25.0, -15.0}}), Ellipse(fillPattern = FillPattern.Solid, extent = {{25.0, -25.0}, {35.0, -15.0}})}), Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, initialScale = 0.2), graphics = {Polygon(points = {{-40, 25}, {40, 25}, {50, 15}, {40, -20}, {30, -25}, {-30, -25}, {-40, -20}, {-50, 15}}, lineColor = {0, 0, 0}, fillColor = {255, 204, 51}, fillPattern = FillPattern.Solid, smooth = Smooth.Bezier), Ellipse(extent = {{-32.5, 7.5}, {-27.5, 12.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-2.5, 12.5}, {2.5, 7.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{27.5, 12.5}, {32.5, 7.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-17.5, -7.5}, {-12.5, -12.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{12.5, -7.5}, {17.5, -12.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Text(extent = {{-150, 70}, {150, 40}}, lineColor = {0, 0, 0}, textString = "%name")}), Documentation(info = "<html>
517
518 This icon is designed for a <b>signal bus</b> connector.
519
520 </html>"));
521 end SignalBus;
522
523 expandable connector SignalSubBus "Icon for signal sub-bus"
524 annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, initialScale = 0.1), graphics = {Line(points = {{-16.0, 2.0}, {16.0, 2.0}}, color = {255, 204, 51}, thickness = 0.5), Rectangle(lineColor = {255, 204, 51}, lineThickness = 0.5, extent = {{-10.0, 0.0}, {8.0, 8.0}}), Polygon(fillColor = {255, 215, 136}, fillPattern = FillPattern.Solid, points = {{-80.0, 50.0}, {80.0, 50.0}, {100.0, 30.0}, {80.0, -40.0}, {60.0, -50.0}, {-60.0, -50.0}, {-80.0, -40.0}, {-100.0, 30.0}}, smooth = Smooth.Bezier), Ellipse(fillPattern = FillPattern.Solid, extent = {{-55.0, 15.0}, {-45.0, 25.0}}), Ellipse(fillPattern = FillPattern.Solid, extent = {{45.0, 15.0}, {55.0, 25.0}}), Ellipse(fillPattern = FillPattern.Solid, extent = {{-5.0, -25.0}, {5.0, -15.0}}), Rectangle(lineColor = {255, 215, 136}, lineThickness = 0.5, extent = {{-20.0, 0.0}, {20.0, 4.0}})}), Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}, initialScale = 0.1), graphics = {Polygon(points = {{-40, 25}, {40, 25}, {50, 15}, {40, -20}, {30, -25}, {-30, -25}, {-40, -20}, {-50, 15}}, lineColor = {0, 0, 0}, fillColor = {255, 204, 51}, fillPattern = FillPattern.Solid, smooth = Smooth.Bezier), Ellipse(extent = {{-22.5, 7.5}, {-17.5, 12.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{17.5, 12.5}, {22.5, 7.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Ellipse(extent = {{-2.5, -7.5}, {2.5, -12.5}}, lineColor = {0, 0, 0}, fillColor = {0, 0, 0}, fillPattern = FillPattern.Solid), Text(extent = {{-150, 70}, {150, 40}}, lineColor = {0, 0, 0}, textString = "%name")}), Documentation(info = "<html>
525
526 <p>
527
528 This icon is designed for a <b>sub-bus</b> in a signal connector.
529
530 </p>
531
532 </html>"));
533 end SignalSubBus;
534 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, lineColor = {0, 0, 0}), 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}}, lineColor = {0, 0, 0})}), Documentation(info = "<html>
535
536 <p>This package contains definitions for the graphical layout of components which may be used in different libraries. The icons can be utilized by inheriting them in the desired class using &quot;extends&quot; or by directly copying the &quot;icon&quot; layer. </p>
537
538
539
540 <h4>Main Authors:</h4>
541
542
543
544 <dl>
545
546 <dt><a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a></dt>
547
548 <dd>Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)</dd>
549
550 <dd>Oberpfaffenhofen</dd>
551
552 <dd>Postfach 1116</dd>
553
554 <dd>D-82230 Wessling</dd>
555
556 <dd>email: <a href=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</a></dd>
557
558 <dt>Christian Kral</dt>
559
560 <dd><a href=\"http://www.ait.ac.at/\">Austrian Institute of Technology, AIT</a></dd>
561
562 <dd>Mobility Department</dd><dd>Giefinggasse 2</dd>
563
564 <dd>1210 Vienna, Austria</dd>
565
566 <dd>email: <a href=\"mailto:dr.christian.kral@gmail.com\">dr.christian.kral@gmail.com</a></dd>
567
568 <dt>Johan Andreasson</dt>
569
570 <dd><a href=\"http://www.modelon.se/\">Modelon AB</a></dd>
571
572 <dd>Ideon Science Park</dd>
573
574 <dd>22370 Lund, Sweden</dd>
575
576 <dd>email: <a href=\"mailto:johan.andreasson@modelon.se\">johan.andreasson@modelon.se</a></dd>
577
578 </dl>
579
580
581
582 <p>Copyright &copy; 1998-2013, Modelica Association, DLR, AIT, and Modelon AB. </p>
583
584 <p><i>This Modelica package is <b>free</b> software; it can be redistributed and/or modified under the terms of the <b>Modelica license</b>, see the license conditions and the accompanying <b>disclaimer</b> in <a href=\"modelica://Modelica.UsersGuide.ModelicaLicense2\">Modelica.UsersGuide.ModelicaLicense2</a>.</i> </p>
585
586 </html>"));
587 end Icons;
588
589 package SIunits "Library of type and unit definitions based on SI units according to ISO 31-1992"
590 extends Modelica.Icons.Package;
591 // Space and Time (chapter 1 of ISO 31-1992)
592 // Periodic and related phenomens (chapter 2 of ISO 31-1992)
593 // For compatibility reasons only
594 // added to ISO-chapter
595 // Mechanics (chapter 3 of ISO 31-1992)
596 // added to ISO-chapter 3
597 // Heat (chapter 4 of ISO 31-1992)
598 // added to ISO-chapter 4
599 // Electricity and Magnetism (chapter 5 of ISO 31-1992)
600 // added to ISO-chapter 5
601 // Light and Related Electromagnetic Radiations (chapter 6 of ISO 31-1992)"
602 // Acoustics (chapter 7 of ISO 31-1992)
603 // Physical chemistry and molecular physics (chapter 8 of ISO 31-1992)
604 // Atomic and Nuclear Physics (chapter 9 of ISO 31-1992)
605 // Nuclear Reactions and Ionizing Radiations (chapter 10 of ISO 31-1992)
606 // chapter 11 is not defined in ISO 31-1992
607 // Characteristic Numbers (chapter 12 of ISO 31-1992)
608 // The Biot number (Bi) is used when
609 // the Nusselt number is reserved
610 // for convective transport of heat.
611 // Solid State Physics (chapter 13 of ISO 31-1992)
612 // Other types not defined in ISO 31-1992
613 // Complex types for electrical systems (not defined in ISO 31-1992)
614 annotation(Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -100}, {100, 100}}), graphics = {Line(points = {{-66, 78}, {-66, -40}}, color = {64, 64, 64}, smooth = Smooth.None), Ellipse(extent = {{12, 36}, {68, -38}}, lineColor = {64, 64, 64}, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid), Rectangle(extent = {{-74, 78}, {-66, -40}}, lineColor = {64, 64, 64}, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid), Polygon(points = {{-66, -4}, {-66, 6}, {-16, 56}, {-16, 46}, {-66, -4}}, lineColor = {64, 64, 64}, smooth = Smooth.None, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid), Polygon(points = {{-46, 16}, {-40, 22}, {-2, -40}, {-10, -40}, {-46, 16}}, lineColor = {64, 64, 64}, smooth = Smooth.None, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid), Ellipse(extent = {{22, 26}, {58, -28}}, lineColor = {64, 64, 64}, fillColor = {255, 255, 255}, fillPattern = FillPattern.Solid), Polygon(points = {{68, 2}, {68, -46}, {64, -60}, {58, -68}, {48, -72}, {18, -72}, {18, -64}, {46, -64}, {54, -60}, {58, -54}, {60, -46}, {60, -26}, {64, -20}, {68, -6}, {68, 2}}, lineColor = {64, 64, 64}, smooth = Smooth.Bezier, fillColor = {175, 175, 175}, fillPattern = FillPattern.Solid)}), Documentation(info = "<html>
615
616 <p>This package provides predefined types, such as <i>Mass</i>,
617
618 <i>Angle</i>, <i>Time</i>, based on the international standard
619
620 on units, e.g.,
621
622 </p>
623
624
625
626 <pre> <b>type</b> Angle = Real(<b>final</b> quantity = \"Angle\",
627
628 <b>final</b> unit = \"rad\",
629
630 displayUnit = \"deg\");
631
632 </pre>
633
634
635
636 <p>
637
638 as well as conversion functions from non SI-units to SI-units
639
640 and vice versa in subpackage
641
642 <a href=\"modelica://Modelica.SIunits.Conversions\">Conversions</a>.
643
644 </p>
645
646
647
648 <p>
649
650 For an introduction how units are used in the Modelica standard library
651
652 with package SIunits, have a look at:
653
654 <a href=\"modelica://Modelica.SIunits.UsersGuide.HowToUseSIunits\">How to use SIunits</a>.
655
656 </p>
657
658
659
660 <p>
661
662 Copyright &copy; 1998-2013, Modelica Association and DLR.
663
664 </p>
665
666 <p>
667
668 <i>This Modelica package is <u>free</u> software and the use is completely at <u>your own risk</u>; it can be redistributed and/or modified under the terms of the Modelica License 2. For license conditions (including the disclaimer of warranty) see <a href=\"modelica://Modelica.UsersGuide.ModelicaLicense2\">Modelica.UsersGuide.ModelicaLicense2</a> or visit <a href=\"https://www.modelica.org/licenses/ModelicaLicense2\"> https://www.modelica.org/licenses/ModelicaLicense2</a>.</i>
669
670 </p>
671
672 </html>", revisions = "<html>
673
674 <ul>
675
676 <li><i>May 25, 2011</i> by Stefan Wischhusen:<br/>Added molar units for energy and enthalpy.</li>
677
678 <li><i>Jan. 27, 2010</i> by Christian Kral:<br/>Added complex units.</li>
679
680 <li><i>Dec. 14, 2005</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br/>Add User&#39;;s Guide and removed &quot;min&quot; values for Resistance and Conductance.</li>
681
682 <li><i>October 21, 2002</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br/>Added new package <b>Conversions</b>. Corrected typo <i>Wavelenght</i>.</li>
683
684 <li><i>June 6, 2000</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br/>Introduced the following new types<br/>type Temperature = ThermodynamicTemperature;<br/>types DerDensityByEnthalpy, DerDensityByPressure, DerDensityByTemperature, DerEnthalpyByPressure, DerEnergyByDensity, DerEnergyByPressure<br/>Attribute &quot;final&quot; removed from min and max values in order that these values can still be changed to narrow the allowed range of values.<br/>Quantity=&quot;Stress&quot; removed from type &quot;Stress&quot;, in order that a type &quot;Stress&quot; can be connected to a type &quot;Pressure&quot;.</li>
685
686 <li><i>Oct. 27, 1999</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br/>New types due to electrical library: Transconductance, InversePotential, Damping.</li>
687
688 <li><i>Sept. 18, 1999</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br/>Renamed from SIunit to SIunits. Subpackages expanded, i.e., the SIunits package, does no longer contain subpackages.</li>
689
690 <li><i>Aug 12, 1999</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br/>Type &quot;Pressure&quot; renamed to &quot;AbsolutePressure&quot; and introduced a new type &quot;Pressure&quot; which does not contain a minimum of zero in order to allow convenient handling of relative pressure. Redefined BulkModulus as an alias to AbsolutePressure instead of Stress, since needed in hydraulics.</li>
691
692 <li><i>June 29, 1999</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br/>Bug-fix: Double definition of &quot;Compressibility&quot; removed and appropriate &quot;extends Heat&quot; clause introduced in package SolidStatePhysics to incorporate ThermodynamicTemperature.</li>
693
694 <li><i>April 8, 1998</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> and Astrid Jaschinski:<br/>Complete ISO 31 chapters realized.</li>
695
696 <li><i>Nov. 15, 1997</i> by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> and <a href=\"http://www.control.lth.se/~hubertus/\">Hubertus Tummescheit</a>:<br/>Some chapters realized.</li>
697
698 </ul>
699
700 </html>"));
701 end SIunits;
702 annotation(__Wolfram(totalModelPart = true, totalModelId = "{cbefb7cf-3381-4147-b9f1-e599d11e1678}"), preferredView = "info", version = "3.2.1", versionBuild = 2, versionDate = "2013-08-14", dateModified = "2013-08-14 08:44:41Z", revisionId = "$Id:: package.mo 6931 2013-08-14 11:38:51Z #$", uses(Complex(version = "3.2.1"), ModelicaServices(version = "3.2.1")), conversion(noneFromVersion = "3.2", noneFromVersion = "3.1", noneFromVersion = "3.0.1", noneFromVersion = "3.0", from(version = "2.1", script = "modelica://Modelica/Resources/Scripts/Dymola/ConvertModelica_from_2.2.2_to_3.0.mos"), from(version = "2.2", script = "modelica://Modelica/Resources/Scripts/Dymola/ConvertModelica_from_2.2.2_to_3.0.mos"), from(version = "2.2.1", script = "modelica://Modelica/Resources/Scripts/Dymola/ConvertModelica_from_2.2.2_to_3.0.mos"), from(version = "2.2.2", script = "modelica://Modelica/Resources/Scripts/Dymola/ConvertModelica_from_2.2.2_to_3.0.mos")), Icon(coordinateSystem(extent = {{-100.0, -100.0}, {100.0, 100.0}}), graphics = {Polygon(origin = {-6.9888, 20.048}, fillColor = {0, 0, 0}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, points = {{-93.0112, 10.3188}, {-93.0112, 10.3188}, {-73.011, 24.6}, {-63.011, 31.221}, {-51.219, 36.777}, {-39.842, 38.629}, {-31.376, 36.248}, {-25.819, 29.369}, {-24.232, 22.49}, {-23.703, 17.463}, {-15.501, 25.135}, {-6.24, 32.015}, {3.02, 36.777}, {15.191, 39.423}, {27.097, 37.306}, {32.653, 29.633}, {35.035, 20.108}, {43.501, 28.046}, {54.085, 35.19}, {65.991, 39.952}, {77.89700000000001, 39.688}, {87.422, 33.338}, {91.12600000000001, 21.696}, {90.068, 9.525}, {86.099, -1.058}, {79.749, -10.054}, {71.283, -21.431}, {62.816, -33.337}, {60.964, -32.808}, {70.489, -16.14}, {77.368, -2.381}, {81.072, 10.054}, {79.749, 19.05}, {72.605, 24.342}, {61.758, 23.019}, {49.587, 14.817}, {39.003, 4.763}, {29.214, -6.085}, {21.012, -16.669}, {13.339, -26.458}, {5.401, -36.777}, {-1.213, -46.037}, {-6.24, -53.446}, {-8.092000000000001, -52.387}, {-0.6840000000000001, -40.746}, {5.401, -30.692}, {12.81, -17.198}, {19.424, -3.969}, {23.658, 7.938}, {22.335, 18.785}, {16.514, 23.283}, {8.047000000000001, 23.019}, {-1.478, 19.05}, {-11.267, 11.113}, {-19.734, 2.381}, {-29.259, -8.202}, {-38.519, -19.579}, {-48.044, -31.221}, {-56.511, -43.392}, {-64.449, -55.298}, {-72.386, -66.93899999999999}, {-77.678, -74.612}, {-79.53, -74.083}, {-71.857, -61.383}, {-62.861, -46.037}, {-52.278, -28.046}, {-44.869, -15.346}, {-38.784, -2.117}, {-35.344, 8.731}, {-36.403, 19.844}, {-42.488, 23.813}, {-52.013, 22.49}, {-60.744, 16.933}, {-68.947, 10.054}, {-76.884, 2.646}, {-93.0112, -12.1707}, {-93.0112, -12.1707}}, smooth = Smooth.Bezier), Ellipse(origin = {40.8208, -37.7602}, fillColor = {161, 0, 4}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-17.8562, -17.8563}, {17.8563, 17.8562}})}), Documentation(info = "<HTML>
703
704 <p>
705
706 Package <b>Modelica&reg;</b> is a <b>standardized</b> and <b>free</b> package
707
708 that is developed together with the Modelica&reg; language from the
709
710 Modelica Association, see
711
712 <a href=\"https://www.Modelica.org\">https://www.Modelica.org</a>.
713
714 It is also called <b>Modelica Standard Library</b>.
715
716 It provides model components in many domains that are based on
717
718 standardized interface definitions. Some typical examples are shown
719
720 in the next figure:
721
722 </p>
723
724
725
726 <p>
727
728 <img src=\"modelica://Modelica/Resources/Images/UsersGuide/ModelicaLibraries.png\">
729
730 </p>
731
732
733
734 <p>
735
736 For an introduction, have especially a look at:
737
738 </p>
739
740 <ul>
741
742 <li> <a href=\"modelica://Modelica.UsersGuide.Overview\">Overview</a>
743
744 provides an overview of the Modelica Standard Library
745
746 inside the <a href=\"modelica://Modelica.UsersGuide\">User's Guide</a>.</li>
747
748 <li><a href=\"modelica://Modelica.UsersGuide.ReleaseNotes\">Release Notes</a>
749
750 summarizes the changes of new versions of this package.</li>
751
752 <li> <a href=\"modelica://Modelica.UsersGuide.Contact\">Contact</a>
753
754 lists the contributors of the Modelica Standard Library.</li>
755
756 <li> The <b>Examples</b> packages in the various libraries, demonstrate
757
758 how to use the components of the corresponding sublibrary.</li>
759
760 </ul>
761
762
763
764 <p>
765
766 This version of the Modelica Standard Library consists of
767
768 </p>
769
770 <ul>
771
772 <li><b>1360</b> models and blocks, and</li>
773
774 <li><b>1280</b> functions</li>
775
776 </ul>
777
778 <p>
779
780 that are directly usable (= number of public, non-partial classes). It is fully compliant
781
782 to <a href=\"https://www.modelica.org/documents/ModelicaSpec32Revision2.pdf\">Modelica Specification Version 3.2 Revision 2</a>
783
784 and it has been tested with Modelica tools from different vendors.
785
786 </p>
787
788
789
790 <p>
791
792 <b>Licensed by the Modelica Association under the Modelica License 2</b><br>
793
794 Copyright &copy; 1998-2013, ABB, AIT, T.&nbsp;B&ouml;drich, DLR, Dassault Syst&egrave;mes AB, Fraunhofer, A.Haumer, ITI, Modelon,
795
796 TU Hamburg-Harburg, Politecnico di Milano, XRG Simulation.
797
798 </p>
799
800
801
802 <p>
803
804 <i>This Modelica package is <u>free</u> software and the use is completely at <u>your own risk</u>; it can be redistributed and/or modified under the terms of the Modelica License 2. For license conditions (including the disclaimer of warranty) see <a href=\"modelica://Modelica.UsersGuide.ModelicaLicense2\">Modelica.UsersGuide.ModelicaLicense2</a> or visit <a href=\"https://www.modelica.org/licenses/ModelicaLicense2\"> https://www.modelica.org/licenses/ModelicaLicense2</a>.</i>
805
806 </p>
807
808
809
810 <p>
811
812 <b>Modelica&reg;</b> is a registered trademark of the Modelica Association.
813
814 </p>
815
816 </html>"));
817end Modelica;
818
819package TestPackage
820 model TestModel
821 extends Modelica.Icons.Example;
822 TestPackage.OutputFromBus OutputFromBus annotation(Placement(transformation(extent = {{-20, 70}, {0, 90}}, rotation = 0, origin = {30, -70}), visible = true));
823 TestPackage.InputToBus inputToBus annotation(Placement(visible = true, transformation(origin = {-50, 10}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
824 protected
825 equation
826 connect(OutputFromBus.controlBus, inputToBus.controlBus) annotation(Line(visible = true, origin = {-15, -1.513}, points = {{35, 1.513}, {35, -1.513}, {-35, -1.513}, {-35, 1.512}}, color = {85, 85, 255}));
827 annotation(Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10})), experiment(StopTime = 200, NumberOfIntervals = 2000), experimentSetupOutput);
828 end TestModel;
829
830 expandable connector MyBus
831 extends Modelica.Icons.SignalBus;
832 annotation(Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})));
833 end MyBus;
834
835 model InputToBus
836 MyBus controlBus annotation(Placement(transformation(extent = {{-20, -80}, {20, -120}}, rotation = 0)));
837 RealToBus velocityIn annotation(Placement(visible = true, transformation(origin = {-20, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
838 Modelica.Blocks.Sources.Constant const(k = 30) annotation(Placement(visible = true, transformation(origin = {-60, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
839 protected
840 MySubBus chassisBus annotation(Placement(visible = true, transformation(origin = {0, 0}, extent = {{-40, -100}, {-20, -80}}, rotation = 0)));
841 equation
842 connect(velocityIn.subBus, chassisBus) annotation(Line(visible = true, origin = {-23, -61}, points = {{7, 61}, {7, -16}, {-7, -16}, {-7, -29}}, color = {85, 85, 255}));
843 connect(chassisBus, controlBus.chassis) annotation(Line(visible = true, origin = {-20, -96.667}, points = {{-10, 6.667}, {-10, -3.333}, {20, -3.333}}, color = {85, 85, 255}));
844 connect(const.y, velocityIn.u) annotation(Line(visible = true, origin = {-36.5, 0}, points = {{-12.5, -0}, {12.5, 0}}, color = {0, 0, 127}));
845 annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10}), graphics = {Rectangle(visible = true, fillColor = {255, 255, 255}, lineThickness = 0.5, extent = {{-100, -100}, {100, 100}}), Text(visible = true, extent = {{-100, -100}, {100, 100}}, textString = "Input")}));
846 end InputToBus;
847
848 model OutputFromBus
849 MyBus controlBus annotation(Placement(transformation(extent = {{-20, -80}, {20, -120}}, rotation = 0)));
850 RealFromBus vehicleVelocity annotation(Placement(transformation(extent = {{-90, 50}, {-70, 70}}, rotation = 0)));
851 protected
852 MySubBus chassisBus annotation(Placement(visible = true, transformation(origin = {0, 0}, extent = {{-40, -100}, {-20, -80}}, rotation = 0)));
853 equation
854 connect(chassisBus, controlBus.chassis) annotation(Line(visible = true, points = {{-30, -90}, {-30, -100}, {0, -100}}, color = {255, 204, 51}, thickness = 0.5));
855 connect(vehicleVelocity.subBus, chassisBus) annotation(Line(visible = true, points = {{-84, 60}, {-100, 60}, {-100, -100}, {-30, -100}, {-30, -90}}, color = {255, 204, 51}, thickness = 0.5));
856 annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10}), graphics = {Rectangle(visible = true, fillColor = {255, 255, 255}, lineThickness = 0.5, extent = {{-100, -100}, {100, 100}}), Text(visible = true, origin = {-0.349, -0}, extent = {{-100.349, -100}, {100.349, 100}}, textString = "Output")}), Diagram(graphics));
857 end OutputFromBus;
858
859 expandable connector MySubBus
860 extends Modelica.Icons.SignalSubBus;
861 annotation(Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10})));
862 end MySubBus;
863
864 model RealToBus
865 Modelica.Blocks.Interfaces.RealInput u annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 0, origin = {-40, 0}), iconTransformation(extent = {{-50, -10}, {-30, 10}})));
866 MySubBus subBus annotation(Placement(transformation(extent = {{-20, -20}, {20, 20}}, rotation = 270, origin = {40, 0}), iconTransformation(extent = {{-20, -20}, {20, 20}}, rotation = 270, origin = {40, 0})));
867 Modelica.Blocks.Interfaces.Adaptors.SendReal velocity(toBus(unit = "m/s")) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}})));
868 equation
869 connect(u, velocity.u) annotation(Line(points = {{-40, 0}, {-12, 0}}, color = {0, 0, 127}, smooth = Smooth.None));
870 connect(velocity.toBus, subBus.velocity) annotation(Line(points = {{11, 0}, {40, 0}}, color = {0, 0, 127}, smooth = Smooth.None));
871 annotation(Diagram(graphics), Icon(graphics = {Text(visible = true, textColor = {0, 0, 127}, extent = {{-0, 60}, {0, 100}}, textString = "%name"), Polygon(visible = true, origin = {-0.459, 0}, lineColor = {0, 0, 128}, fillColor = {255, 255, 255}, lineThickness = 2, points = {{-29.541, 50}, {-29.541, -50}, {30.459, 0}})}, coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10})));
872 end RealToBus;
873
874 model RealFromBus
875 Modelica.Blocks.Interfaces.RealOutput y annotation(Placement(transformation(extent = {{30, -10}, {50, 10}}, rotation = 0), iconTransformation(extent = {{30, -10}, {50, 10}})));
876 MySubBus subBus annotation(Placement(transformation(extent = {{-20, -20}, {20, 20}}, rotation = 90, origin = {-40, 0}), iconTransformation(extent = {{-20, -20}, {20, 20}}, rotation = 90, origin = {-40, 0})));
877 Modelica.Blocks.Interfaces.Adaptors.ReceiveReal velocity(y(unit = "m/s")) annotation(Placement(transformation(extent = {{-10, -10}, {10, 10}})));
878 equation
879 connect(velocity.y, y) annotation(Line(points = {{11, 0}, {40, 0}}, color = {0, 0, 127}, smooth = Smooth.None));
880 connect(velocity.fromBus, subBus.velocity) annotation(Line(points = {{-11, 0}, {-40, 0}}, color = {0, 0, 127}, smooth = Smooth.None));
881 annotation(Diagram(graphics), Icon(graphics = {Text(visible = true, textColor = {0, 0, 127}, extent = {{-0, 60}, {0, 100}}, textString = "%name"), Polygon(visible = true, origin = {-10, 0}, lineColor = {0, 0, 128}, fillColor = {0, 0, 128}, fillPattern = FillPattern.Solid, points = {{-20, 50}, {-20, -50}, {40, 0}})}, coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10})));
882 end RealFromBus;
883 annotation(__Wolfram(totalModelPart = true, totalModelId = "{cbefb7cf-3381-4147-b9f1-e599d11e1678}"), Diagram(coordinateSystem(extent = {{-148.5, -105}, {148.5, 105}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5})));
884end TestPackage;
885
886model TestPackage_TestModel
887 extends TestPackage.TestModel;
888 annotation(__Wolfram(totalModelMain = true, totalModelId = "{cbefb7cf-3381-4147-b9f1-e599d11e1678}"));
889end TestPackage_TestModel;