|
1 | 1 | within PNlib.Examples.ConTest;
|
| 2 | + |
2 | 3 | model Conflict
|
3 | 4 | extends Modelica.Icons.Example;
|
4 |
| - |
5 |
| - PNlib.Components.TC T1(nOut = 1) annotation(Placement(transformation(extent={{-40, -10}, { |
6 |
| - -20, 10}}))); |
7 |
| - PNlib.Components.TC T2(maximumSpeed = 2, nIn = 1, nOut = 1) annotation(Placement(transformation(extent={{20, 10}, |
8 |
| - {40, 30}}))); |
9 |
| - PNlib.Components.TC T3(nIn = 1, nOut = 1) annotation(Placement(transformation(extent={{20, -30}, |
10 |
| - {40, -10}}))); |
11 |
| - PNlib.Components.PC P1(nIn = 1, nOut = 2) annotation(Placement(transformation(extent={{-10, -10}, |
12 |
| - {10, 10}}))); |
13 |
| - PNlib.Components.PC P2(nIn = 1) annotation(Placement(transformation(extent={{50, 10}, {70, |
14 |
| - 30}}))); |
15 |
| - PNlib.Components.PC P3(nIn = 1) annotation(Placement(transformation(extent={{50, -30}, {70, |
16 |
| - -10}}))); |
17 |
| - inner PNlib.Components.Settings settings annotation(Placement(transformation(extent={{-40, 20}, |
18 |
| - {-20, 40}}))); |
| 5 | + PNlib.Components.TC T1(nOut = 1) annotation( |
| 6 | + Placement(transformation(extent = {{-40, -10}, {-20, 10}}))); |
| 7 | + PNlib.Components.TC T2(maximumSpeed = 2, nIn = 1, nOut = 1) annotation( |
| 8 | + Placement(transformation(extent = {{20, 10}, {40, 30}}))); |
| 9 | + PNlib.Components.TC T3(nIn = 1, nOut = 1) annotation( |
| 10 | + Placement(transformation(extent = {{20, -30}, {40, -10}}))); |
| 11 | + PNlib.Components.PC P1(nIn = 1, nOut = 2) annotation( |
| 12 | + Placement(transformation(extent = {{-10, -10}, {10, 10}}))); |
| 13 | + PNlib.Components.PC P2(nIn = 1) annotation( |
| 14 | + Placement(transformation(extent = {{50, 10}, {70, 30}}))); |
| 15 | + PNlib.Components.PC P3(nIn = 1) annotation( |
| 16 | + Placement(transformation(extent = {{50, -30}, {70, -10}}))); |
| 17 | + inner PNlib.Components.Settings settings annotation( |
| 18 | + Placement(transformation(extent = {{-40, 20}, {-20, 40}}))); |
19 | 19 | equation
|
20 |
| - connect(T1.outPlaces[1], P1.inTransition[1]) annotation(Line(points={{-25.2, 0}, |
21 |
| - {-10.8, 0}}, color = {0, 0, 0}, smooth = Smooth.None)); |
22 |
| - connect(P1.outTransition[1], T2.inPlaces[1]) annotation(Line(points={{10.8, |
23 |
| - -0.5}, {20, -0.5}, {20, 20}, {25.2, 20}}, color = {0, 0, 0}, smooth = Smooth.None)); |
24 |
| - connect(T2.outPlaces[1], P2.inTransition[1]) annotation(Line(points={{34.8, 20}, |
25 |
| - {49.2, 20}}, color = {0, 0, 0}, smooth = Smooth.None)); |
26 |
| - connect(T3.inPlaces[1], P1.outTransition[2]) annotation(Line(points={{25.2, |
27 |
| - -20}, {20, -20}, {20, 0.5}, {10.8, 0.5}}, color = {0, 0, 0}, smooth = Smooth.None)); |
28 |
| - connect(P3.inTransition[1], T3.outPlaces[1]) annotation(Line(points={{49.2, |
29 |
| - -20}, {34.8, -20}}, color = {0, 0, 0}, smooth = Smooth.None)); |
30 |
| - annotation(Diagram(coordinateSystem(preserveAspectRatio = false, extent={{-40, -40}, |
31 |
| - {80, 40}}), graphics), experiment(StartTime=0.0, StopTime=10.0, Tolerance = 1e-6)); |
| 20 | + connect(T1.outPlaces[1], P1.inTransition[1]) annotation( |
| 21 | + Line(points = {{-25.2, 0}, {-10.8, 0}}, color = {0, 0, 0}, smooth = Smooth.None)); |
| 22 | + connect(P1.outTransition[1], T2.inPlaces[1]) annotation( |
| 23 | + Line(points = {{10.8, -0.5}, {20, -0.5}, {20, 20}, {25.2, 20}}, color = {0, 0, 0}, smooth = Smooth.None)); |
| 24 | + connect(T2.outPlaces[1], P2.inTransition[1]) annotation( |
| 25 | + Line(points = {{34.8, 20}, {49.2, 20}}, color = {0, 0, 0}, smooth = Smooth.None)); |
| 26 | + connect(T3.inPlaces[1], P1.outTransition[2]) annotation( |
| 27 | + Line(points = {{25.2, -20}, {20, -20}, {20, 0.5}, {10.8, 0.5}}, color = {0, 0, 0}, smooth = Smooth.None)); |
| 28 | + connect(P3.inTransition[1], T3.outPlaces[1]) annotation( |
| 29 | + Line(points = {{49.2, -20}, {34.8, -20}}, color = {0, 0, 0}, smooth = Smooth.None)); |
| 30 | + annotation( |
| 31 | + Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-40, -40}, {80, 40}}), graphics), |
| 32 | + experiment(StartTime = 0, StopTime = 10, Tolerance = 1e-06, Interval = 0.02), |
| 33 | + __OpenModelica_simulationFlags(nls = "newton", s = "rungekutta")); |
32 | 34 | end Conflict;
|
0 commit comments