-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stochastic and Graphical Revision (#55)
Animations of the simulation for Dymola Revised New symbol of test arrows and stochastic transition Transition TS Renamed to TDS Error fixed at the time of generating random numbers at TDS New Stochhastic Event Transition TES Added Added Truncated normal distribution to TDS, TES, and TFDS RA removed because not needed == 0 out of 92 tests failed [Testing/OpenModelica, time: 1492]
- Loading branch information
Showing
45 changed files
with
605 additions
and
175 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
PNlib/Examples/ExtTest/TSTest.mo → PNlib/Examples/ExtTest/TDSTest.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
within PNlib.Examples.ExtTest; | ||
model TSTest | ||
model TDSTest | ||
extends Modelica.Icons.Example; | ||
inner PNlib.Settings settings annotation(Placement(transformation(extent={{20, 20}, {40, 40}}))); | ||
PD P1(nOut=1, startTokens=8) annotation(Placement(transformation(extent={{-40, -10}, {-20, 10}}))); | ||
PD P2(nIn=1) annotation(Placement(transformation(extent={{20, -10}, {40, 10}}))); | ||
TS T1(localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
TDS T1(localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
equation | ||
connect(P1.outTransition[1], T1.inPlaces[1]) annotation(Line(points={{-19.2, 0}, {-4.8, 0}}, color={0, 0, 0})); | ||
connect(T1.outPlaces[1], P2.inTransition[1]) annotation(Line(points={{4.8, 0}, {19.2, 0}}, color={0, 0, 0})); | ||
annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-40, -40}, {40, 40}})), experiment(StartTime=0.0, StopTime=10.0, Tolerance = 1e-6)); | ||
end TSTest; | ||
end TDSTest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
within PNlib.Examples.ExtTest; | ||
model TDSTestinterrupt | ||
extends Modelica.Icons.Example; | ||
inner PNlib.Settings settings annotation(Placement(transformation(extent={{20, 20}, {40, 40}}))); | ||
PNlib.PD P1(nIn = 1, nOut = 2, startTokens= 1) annotation(Placement(visible = true, transformation(extent = {{-48, -20}, {-28, 0}}, rotation = 0))); | ||
PNlib.PD P2(nIn=1) annotation(Placement(visible = true, transformation(extent = {{12, -20}, {32, 0}}, rotation = 0))); | ||
PNlib.TDS T1(a = 0.5, b = 1.5, c = 1,distributionType=PNlib.Types.DistributionType.Triangular, localSeed=1, nIn=1, nOut=1) annotation(Placement(visible = true, transformation(extent = {{-18, -20}, {2, 0}}, rotation = 0))); | ||
PNlib.TE T2(event = {0.4}, nIn = 1) annotation( | ||
Placement(visible = true, transformation(origin = {-8, 20}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
PNlib.TE T3(event = {2, 4}, nOut = 1) annotation( | ||
Placement(visible = true, transformation(origin = {-66, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
equation | ||
connect(T1.outPlaces[1], P2.inTransition[1]) annotation( | ||
Line(points = {{-3.2, -10}, {11.2, -10}})); | ||
connect(P1.outTransition[1], T1.inPlaces[1]) annotation( | ||
Line(points = {{-27.2, -10}, {-12.8, -10}})); | ||
connect(P1.outTransition[2], T2.inPlaces[1]) annotation( | ||
Line(points = {{-27.2, -10}, {-19.2, -10}, {-19.2, 20}, {-11.2, 20}, {-11.2, 20}}, thickness = 0.5)); | ||
connect(T3.outPlaces[1], P1.inTransition[1]) annotation( | ||
Line(points = {{-61.2, -10}, {-49.2, -10}, {-49.2, -10}, {-47.2, -10}}, thickness = 0.5)); | ||
annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-80, -40}, {40, 40}})), experiment(StartTime=0.0, StopTime=8.0, Tolerance = 1e-6)); | ||
end TDSTestinterrupt; |
6 changes: 3 additions & 3 deletions
6
PNlib/Examples/ExtTest/TSdiscrete.mo → PNlib/Examples/ExtTest/TDSdiscrete.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
within PNlib.Examples.ExtTest; | ||
model TSdiscrete | ||
model TDSdiscrete | ||
extends Modelica.Icons.Example; | ||
inner PNlib.Settings settings annotation(Placement(transformation(extent={{20, 20}, {40, 40}}))); | ||
PD P1(nOut=1, startTokens=18) annotation(Placement(transformation(extent={{-40, -10}, {-20, 10}}))); | ||
PD P2(nIn=1) annotation(Placement(transformation(extent={{20, -10}, {40, 10}}))); | ||
TS T1(distributionType=PNlib.Types.DistributionType.Discrete, localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
TDS T1(distributionType=PNlib.Types.DistributionType.Discrete, localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
equation | ||
connect(P1.outTransition[1], T1.inPlaces[1]) annotation(Line(points={{-19.2, 0}, {-4.8, 0}}, color={0, 0, 0})); | ||
connect(T1.outPlaces[1], P2.inTransition[1]) annotation(Line(points={{4.8, 0}, {19.2, 0}}, color={0, 0, 0})); | ||
annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-40, -40}, {40, 40}})), experiment(StartTime=0.0, StopTime=60.0, Tolerance = 1e-6)); | ||
end TSdiscrete; | ||
end TDSdiscrete; |
6 changes: 3 additions & 3 deletions
6
PNlib/Examples/ExtTest/TStriangular.mo → PNlib/Examples/ExtTest/TDStriangular.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
within PNlib.Examples.ExtTest; | ||
model TStriangular | ||
model TDStriangular | ||
extends Modelica.Icons.Example; | ||
inner PNlib.Settings settings annotation(Placement(transformation(extent={{20, 20}, {40, 40}}))); | ||
PD P1(nOut=1, startTokens=8) annotation(Placement(transformation(extent={{-40, -10}, {-20, 10}}))); | ||
PD P2(nIn=1) annotation(Placement(transformation(extent={{20, -10}, {40, 10}}))); | ||
TS T1(distributionType=PNlib.Types.DistributionType.Triangular, localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
TDS T1(distributionType=PNlib.Types.DistributionType.Triangular, localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
equation | ||
connect(P1.outTransition[1], T1.inPlaces[1]) annotation(Line(points={{-19.2, 0}, {-4.8, 0}}, color={0, 0, 0})); | ||
connect(T1.outPlaces[1], P2.inTransition[1]) annotation(Line(points={{4.8, 0}, {19.2, 0}}, color={0, 0, 0})); | ||
annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-40, -40}, {40, 40}})), experiment(StartTime=0.0, StopTime=10.0, Tolerance = 1e-6)); | ||
end TStriangular; | ||
end TDStriangular; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
within PNlib.Examples.ExtTest; | ||
model TDStruncatednormal | ||
extends Modelica.Icons.Example; | ||
inner PNlib.Settings settings annotation(Placement(transformation(extent={{20, 20}, {40, 40}}))); | ||
PD P1(nOut=1, startTokens=8) annotation(Placement(transformation(extent={{-40, -10}, {-20, 10}}))); | ||
PD P2(nIn=1) annotation(Placement(transformation(extent={{20, -10}, {40, 10}}))); | ||
TDS T1(distributionType = PNlib.Types.DistributionType.TruncatedNormal,localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
equation | ||
connect(P1.outTransition[1], T1.inPlaces[1]) annotation(Line(points={{-19.2, 0}, {-4.8, 0}}, color={0, 0, 0})); | ||
connect(T1.outPlaces[1], P2.inTransition[1]) annotation(Line(points={{4.8, 0}, {19.2, 0}}, color={0, 0, 0})); | ||
annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-40, -40}, {40, 40}})), experiment(StartTime=0.0, StopTime=5.0, Tolerance = 1e-6)); | ||
end TDStruncatednormal; |
6 changes: 3 additions & 3 deletions
6
PNlib/Examples/ExtTest/TSuniform.mo → PNlib/Examples/ExtTest/TDSuniform.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
within PNlib.Examples.ExtTest; | ||
model TSuniform | ||
model TDSuniform | ||
extends Modelica.Icons.Example; | ||
inner PNlib.Settings settings annotation(Placement(transformation(extent={{20, 20}, {40, 40}}))); | ||
PD P1(nOut=1, startTokens=8) annotation(Placement(transformation(extent={{-40, -10}, {-20, 10}}))); | ||
PD P2(nIn=1) annotation(Placement(transformation(extent={{20, -10}, {40, 10}}))); | ||
TS T1(a = 2, b = 4,distributionType=PNlib.Types.DistributionType.Uniform, localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
TDS T1(a = 2, b = 4,distributionType=PNlib.Types.DistributionType.Uniform, localSeed=1, nIn=1, nOut=1) annotation(Placement(transformation(extent={{-10, -10}, {10, 10}}))); | ||
equation | ||
connect(P1.outTransition[1], T1.inPlaces[1]) annotation(Line(points={{-19.2, 0}, {-4.8, 0}}, color={0, 0, 0})); | ||
connect(T1.outPlaces[1], P2.inTransition[1]) annotation(Line(points={{4.8, 0}, {19.2, 0}}, color={0, 0, 0})); | ||
annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-40, -40}, {40, 40}})), experiment(StartTime=0.0, StopTime=20.0, Tolerance = 1e-6)); | ||
end TSuniform; | ||
end TDSuniform; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
within PNlib.Examples.ExtTest; | ||
model TESTest | ||
extends Modelica.Icons.Example; | ||
inner PNlib.Settings settings annotation(Placement(transformation(extent={{20, 20}, {40, 40}}))); | ||
PNlib.PD P1(nIn = 1, nOut = 1, startTokens= 1) annotation(Placement(visible = true, transformation(extent = {{-48, -20}, {-28, 0}}, rotation = 0))); | ||
PNlib.PD P2(nIn=1) annotation(Placement(visible = true, transformation(extent = {{12, -20}, {32, 0}}, rotation = 0))); | ||
PNlib.TE T2(event = {3, 4, 5, 9}, nOut = 1) annotation( | ||
Placement(visible = true, transformation(origin = {-66, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
TES T1(distributionType = PNlib.Types.DistributionType.Triangular, nIn = 1, nOut = 1) annotation( | ||
Placement(visible = true, transformation(origin = {-8, -10}, extent = {{-10, -10}, {10, 10}}, rotation = 0))); | ||
equation | ||
connect(T1.outPlaces[1], P2.inTransition[1]) annotation( | ||
Line(points = {{-4, -10}, {10, -10}, {10, -10}, {12, -10}}, thickness = 0.5)); | ||
connect(T1.inPlaces[1], P1.outTransition[1]) annotation( | ||
Line(points = {{-12, -10}, {-28, -10}, {-28, -10}, {-28, -10}}, thickness = 0.5)); | ||
connect(T2.outPlaces[1], P1.inTransition[1]) annotation( | ||
Line(points = {{-61.2, -10}, {-49.2, -10}, {-49.2, -10}, {-47.2, -10}}, thickness = 0.5)); | ||
annotation(Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-80, -40}, {40, 40}})), experiment(StartTime=0.0, StopTime=10.0, Tolerance = 1e-6)); | ||
end TESTest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
counter | ||
randomexp | ||
randomtriangular | ||
randomuniform | ||
randomdis |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.