1 | package Extending
|
---|
2 | model Model1
|
---|
3 | Modelica.Electrical.Analog.Basic.Ground ground annotation(
|
---|
4 | Placement(visible = true, transformation(origin = {0, -30}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
|
---|
5 | Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltage annotation(
|
---|
6 | Placement(visible = true, transformation(origin = {0, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
|
---|
7 | equation
|
---|
8 | connect(constantVoltage.n, ground.p) annotation(
|
---|
9 | Line(points = {{0, -10}, {0, -20}}, color = {0, 0, 255}));
|
---|
10 | end Model1;
|
---|
11 |
|
---|
12 | model Model2
|
---|
13 | extends Extending.Model1(constantVoltage.V = 10);
|
---|
14 | equation
|
---|
15 |
|
---|
16 | end Model2;
|
---|
17 |
|
---|
18 | model Model3
|
---|
19 | extends Extending.Model2;
|
---|
20 | equation
|
---|
21 |
|
---|
22 | end Model3;
|
---|
23 | annotation(
|
---|
24 | uses(Modelica(version = "3.2.3")));
|
---|
25 | end Extending;
|
---|