Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr PNlib_PNlib.Examples.ConTest.LoopAndArcweight.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/PNlib 3.0.0-master/package.mo", uses=false) Using package PNlib with version 3.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PNlib 3.0.0-master/package.mo) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(PNlib.Examples.ConTest.LoopAndArcweight,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="P1.t|P2.t|T1.fire|T1.instantaneousSpeed|T1.maximumSpeed|time",fileNamePrefix="PNlib_PNlib.Examples.ConTest.LoopAndArcweight") translateModel(PNlib.Examples.ConTest.LoopAndArcweight,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="P1.t|P2.t|T1.fire|T1.instantaneousSpeed|T1.maximumSpeed|time",fileNamePrefix="PNlib_PNlib.Examples.ConTest.LoopAndArcweight") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001455/0.001455, allocations: 106.2 kB / 16.38 MB, free: 6.48 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001646/0.001647, allocations: 192.7 kB / 17.32 MB, free: 5.797 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.264/1.264, allocations: 222.9 MB / 241 MB, free: 15.18 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PNlib 3.0.0-master/package.mo): time 0.07068/0.07068, allocations: 16.74 MB / 307.9 MB, free: 14.26 MB / 254.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.322e-05/2.325e-05, allocations: 5.734 kB / 373 MB, free: 49.09 MB / 302.1 MB Notification: Performance of NFInst.instantiate(PNlib.Examples.ConTest.LoopAndArcweight): time 0.003217/0.003255, allocations: 2.714 MB / 375.7 MB, free: 48.48 MB / 302.1 MB Notification: Performance of NFInst.instExpressions: time 0.00291/0.006178, allocations: 2.26 MB / 378 MB, free: 48.1 MB / 302.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002374/0.006427, allocations: 19.31 kB / 378 MB, free: 48.1 MB / 302.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0003433/0.006778, allocations: 217 kB / 378.2 MB, free: 48.1 MB / 302.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0004713/0.007263, allocations: 220.1 kB / 378.4 MB, free: 48.09 MB / 302.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.001316/0.008588, allocations: 1.026 MB / 379.4 MB, free: 48.03 MB / 302.1 MB Notification: Performance of NFFlatten.flatten: time 0.002209/0.01081, allocations: 2.887 MB / 382.3 MB, free: 47.84 MB / 302.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0005133/0.01134, allocations: 441.7 kB / 382.7 MB, free: 47.7 MB / 302.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0008998/0.01224, allocations: 1.085 MB / 383.8 MB, free: 47.23 MB / 302.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0007164/0.01297, allocations: 0.8826 MB / 384.7 MB, free: 46.83 MB / 302.1 MB Notification: Performance of NFPackage.collectConstants: time 0.000279/0.01326, allocations: 199.2 kB / 384.9 MB, free: 46.83 MB / 302.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0008637/0.01413, allocations: 0.6146 MB / 385.5 MB, free: 46.7 MB / 302.1 MB Notification: Performance of combineBinaries: time 0.001356/0.01549, allocations: 2.285 MB / 387.8 MB, free: 45.19 MB / 302.1 MB Notification: Performance of replaceArrayConstructors: time 0.0006054/0.01611, allocations: 1.25 MB / 389.1 MB, free: 44.29 MB / 302.1 MB Notification: Performance of NFVerifyModel.verify: time 0.000452/0.01657, allocations: 310.2 kB / 389.4 MB, free: 44.16 MB / 302.1 MB Notification: Performance of FrontEnd: time 0.0001906/0.01676, allocations: 128 kB / 389.5 MB, free: 44.11 MB / 302.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 415 (302) * Number of variables: 415 (360) Notification: Performance of Bindings: time 0.007027/0.0238, allocations: 7.223 MB / 396.7 MB, free: 39.56 MB / 302.1 MB Notification: Performance of FunctionAlias: time 0.001659/0.02547, allocations: 1.395 MB / 398.1 MB, free: 38.75 MB / 302.1 MB Notification: Performance of Early Inline: time 0.006233/0.03172, allocations: 7.764 MB / 405.9 MB, free: 31.89 MB / 302.1 MB Notification: Performance of simplify1: time 0.0002805/0.03202, allocations: 242.9 kB / 406.1 MB, free: 31.71 MB / 302.1 MB Notification: Performance of Alias: time 0.004044/0.03607, allocations: 5.02 MB / 411.1 MB, free: 26.35 MB / 302.1 MB Notification: Performance of simplify2: time 0.0001613/0.03624, allocations: 218.4 kB / 411.3 MB, free: 26.14 MB / 302.1 MB Notification: Performance of Events: time 0.001765/0.03802, allocations: 2.207 MB / 413.5 MB, free: 24.04 MB / 302.1 MB Notification: Performance of Detect States: time 0.001769/0.0398, allocations: 2.773 MB / 416.3 MB, free: 21.22 MB / 302.1 MB Notification: Performance of Partitioning: time 0.002006/0.04181, allocations: 2.539 MB / 418.9 MB, free: 18.57 MB / 302.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency $SEV_103 could not be devided by the body size 3 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (3) P2.color = if settings.animatePlace then if $SEV_103 then {255.0, 255.0 - 2.55 * P2.tokenscale, 255.0 - 2.55 * P2.tokenscale} else {255.0, 0.0, 0.0} else {255.0, 255.0, 255.0} ($RES_SIM_24) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (385/447) **************************** (1) [DISC] (1) Boolean[1] P2.inTransition.disTransition = {P2.disTransitionIn[1]} (2) [DISC] (1) protected discrete Real[1] P1.enableIn.cumEnablingProb (fixed = {true for $i1 in 1:1}, start = {0.0 for $i1 in 1:1}) (3) [ALGB] (1) Real[1] T1.inPlaces.decreasingFactor = {T1.decreasingFactorIn[1]} (4) [ALGB] (1) Real[1] P2.inTransition.speedSum = {P2.firingSumOut.conFiringSum} (5) [ALGB] (2) protected Real[2] T1.tOut (6) [DISC] (1) protected Boolean P2.feeding.anytrue (7) [DISC] (1) Boolean[1] P1.outTransition.fire = {P1.fireOut[1]} (8) [ALGB] (1) Real[1] P1.outTransition.decreasingFactor = {P1.decFactorOut[1]} (9) [ALGB] (1) Real[1] P2.inTransition.instSpeed = {P2.instSpeedIn[1]} (10) [DISC] (1) Boolean $SEV_108 (11) [ALGB] (2) Real[2] T1.outPlaces.arcWeight = {T1.arcWeightOut[$outPlaces1] for $outPlaces1 in 1:2} (12) [DISC] (1) Boolean $SEV_107 (13) [ALGB] (3) Real[3] P1.color (14) [DISC] (1) Boolean $SEV_106 (15) [DISC] (1) Boolean $SEV_105 (16) [DISC] (1) protected Integer P1.disMarksIn.numtrue (17) [DISC] (1) Boolean $SEV_104 (18) [DISC] (1) Boolean $SEV_103 (19) [ALGB] (1) Real T1.actualSpeed = if T1.fire then T1.instantaneousSpeed else 0.0 (20) [DISC] (1) Boolean[1] P2.inTransition.disPlace = {false for $i1 in 1:1} (21) [ALGB] (1) protected Real[1] P1.maxSpeedOut (22) [DISC] (1) protected Boolean[1] P2.firingSumIn.disTransition = P2.disTransitionIn (23) [ALGB] (1) protected Real[1] P1.firingSumOut.vec1 (24) [DISC] (1) protected Boolean P1.disMarksOut.anytrue (25) [ALGB] (1) protected Real[1] P1.firingSumOut.vec2 (26) [DISC] (1) Integer[1] T1.inPlaces.tint = {T1.tIntIn[1]} (27) [ALGB] (1) protected Real P1.firingSumOut.conFiringSum (28) [DISC] (1) protected Boolean[1] P1.enableIn.active = P1.activeIn (29) [DISC] (1) protected Boolean[1] P2.fireIn (fixed = {true for $i1 in 1:1}, start = {false for $i1 in 1:1}) (30) [DISC] (1) protected Boolean[1] P1.delayPassedIn.vec = P1.activeIn and P1.disTransitionIn (31) [ALGB] (1) protected Real[1] T1.activation.arcWeightIn = T1.arcWeightIn (32) [ALGB] (1) Real[1] P2.inTransition.prelimSpeed = {P2.prelimSpeedIn[1]} (33) [DISC] (1) Boolean[1] P1.inTransition.fire = {P1.fireIn[1]} (34) [DISC] (1) protected discrete Real P1.enableOut.randNum (35) [DISC] (1) protected discrete Real P1.enableIn.sumEnablingProbTAin (36) [DISC] (1) protected Integer P1.enableIn.k (37) [DISC] (2) protected Boolean[2] T1.emptied (38) [DISC] (1) protected Boolean[1] P1.preFireIn (39) [ALGB] (1) protected Real[1] P1.prelimSpeedIn (40) [ALGB] (1) protected Real[1] P2.arcWeightIn (41) [DISC] (2) Boolean[2] T1.outPlaces.enable (42) [ALGB] (1) protected Real[1] P1.enableOut.enablingProb = P1.enablingProbOut (43) [DISC] (1) protected Boolean[1] T1.normalArc (44) [DISC] (4) protected Integer[4] P1.enableIn.state128 (45) [DISC] (1) protected Boolean[1] P2.activeIn (46) [DISC] (1) protected Integer P2.feeding.numtrue (47) [ALGB] (1) protected Real[1] P1.maxSpeedIn (48) [DISC] (1) protected Integer[1] P1.enableIn.enablingPrio = P1.enablingPrioIn (49) [DISC] (4) protected Integer[4] P1.enableOut.state128 (50) [DISC] (1) protected Boolean P1.feeding.anytrue (51) [DISC] (1) protected Boolean P1.disMarksIn.anytrue (52) [DISC] (1) Boolean[1] P1.outTransition.fed = {P1.feeding.anytrue} (53) [ALGB] (1) protected Real[1] P2.firingSumIn.instSpeed = P2.instSpeedIn (54) [DISC] (1) Boolean[1] P1.inTransition.emptied = {P1.emptying.anytrue} (55) [ALGB] (1) protected Real[1] P1.decFactorOut (56) [DISC] (1) protected Boolean[1] T1.fed (57) [DISC] (1) protected Boolean P2.disMarksIn.anytrue (58) [DISC] (1) protected discrete Real P1.enableOut.arcWeightSum (59) [ALGB] (1) Real[1] P2.inTransition.maxTokens = {P2.maxMarks} (60) [ALGB] (1) Real[1] T1.inPlaces.minTokens = {T1.minTokens[1]} (61) [ALGB] (1) Real[1] P1.inTransition.maxSpeed = {P1.maxSpeedIn[1]} (62) [DISC] (1) protected Boolean[1] P1.fireIn (fixed = {true for $i1 in 1:1}, start = {false for $i1 in 1:1}) (63) [DISC] (1) protected Boolean[1] P2.firingSumIn.fire = P2.preFireIn (64) [ALGB] (1) protected Real[1] P1.decFactorIn (65) [ALGB] (1) protected Real[1] P1.firingSumIn.vec1 (66) [DISC] (1) Integer[1] P1.outTransition.arcWeightint (67) [ALGB] (1) protected Real[1] P1.firingSumIn.vec2 (68) [DISC] (1) protected Integer P2.enableIn.k (69) [DISC] (1) protected Boolean P1.enableOut.delayPassed = P1.enableOut.delayPassed (70) [ALGB] (2) Real[2] T1.outPlaces.speedSum = {T1.speedSumOut[$outPlaces1] for $outPlaces1 in 1:2} (71) [DISC] (1) protected discrete Real P2.enableIn.arcWeightSum (72) [DISC] (1) Integer[1] T1.inPlaces.minTokensint = {T1.minTokensInt[1]} (73) [ALGB] (1) protected Real[1] P1.firingSumOut.instSpeed = P1.instSpeedOut (74) [DISC] (1) Integer[1] P2.inTransition.tint = {1 for $i1 in 1:1} (75) [ALGB] (1) Real[1] T1.inPlaces.instSpeed = {T1.instantaneousSpeed} (76) [ALGB] (1) protected Real P2.firingSumIn.disFiringSum (77) [DISC] (2) Boolean[2] T1.outPlaces.disPlace = {T1.disPlaceOut[$outPlaces1] for $outPlaces1 in 1:2} (78) [ALGB] (1) protected Real[1] P1.instSpeedOut (79) [DISC] (4) protected Integer[4] P2.enableIn.state128 (80) [ALGB] (1) protected Real[1] T1.testValue (81) [DISC] (1) Boolean $TEV_7 (82) [DISC] (1) Boolean[1] P1.outTransition.normalArc = {false for $i1 in 1:1} (83) [DISC] (1) protected Boolean[1] P2.enableIn.disTransition = P2.disTransitionIn (84) [DISC] (1) Boolean $TEV_6 (85) [DISC] (1) Boolean $TEV_5 (86) [DISC] (1) Boolean $TEV_4 (87) [DISC] (1) protected Boolean[1] P1.enableIn.TAein = P1.enabledByInPlaces and P1.activeIn (88) [DISC] (1) protected Integer P1.enableIn.Index (89) [DISC] (1) Boolean $TEV_3 (90) [ALGB] (1) protected Real[1] P2.enableIn.enablingProb = P2.enablingProbIn (91) [DISC] (1) Boolean $TEV_2 (92) [DISC] (1) Boolean $TEV_1 (93) [ALGB] (1) Real[1] P1.outTransition.arcWeight = {P1.arcWeightOut[1]} (94) [ALGB] (1) protected Real[1] P2.maxSpeedIn (95) [DISC] (2) Integer[2] T1.outPlaces.arcWeightint = {T1.arcWeightIntOut[$outPlaces1] for $outPlaces1 in 1:2} (96) [ALGB] (2) protected Real[2] T1.activation.maxTokens = T1.maxTokens (97) [DISC] (1) protected Boolean P1.disMarksInOut (fixed = true, start = false) (98) [DISC] (1) Integer[1] P2.inTransition.arcWeightint (99) [DISC] (1) protected Boolean[1] P1.enableIn.TEin (100) [DISC] (1) protected Integer[1] T1.activation.arcWeightIntIn = T1.arcWeightIntIn (101) [ALGB] (1) protected Real[1] P1.enableIn.arcWeight = P1.arcWeightIn (102) [ALGB] (1) protected Real[1] P1.arcWeightOut (103) [ALGB] (1) protected Real P1.firingSumOut.disFiringSum (104) [DISC] (1) protected Integer P1.feeding.numtrue (105) [DISC] (1) protected Boolean[1] P1.emptying.vec = P1.preFireOut and not P1.disTransitionOut (106) [ALGB] (1) Real[1] P1.outTransition.maxSpeed = {P1.maxSpeedOut[1]} (107) [DISC] (1) protected Integer[1] T1.arcWeightIntIn (108) [DISC] (1) protected Boolean[1] P2.delayPassedIn.vec = P2.activeIn and P2.disTransitionIn (109) [DISC] (1) protected Boolean[1] T1.enableIn (110) [DISC] (1) protected Integer P2.disMarksIn.numtrue (111) [DISC] (1) protected Integer[1] P1.enableOut.remTAout (fixed = {true for $i1 in 1:1}, start = {0 for $i1 in 1:1}) (112) [ALGB] (1) Real[1] T1.arcWeightIn = {3.0} (113) [ALGB] (1) protected Real[1] P1.arcWeightIn (114) [ALGB] (2) protected Real[2] T1.decreasingFactorOut (115) [DISC] (1) protected Integer[1] T1.activation.tIntIn = T1.tIntIn (116) [DISC] (1) enumeration PNlib.Types.ArcType(NormalArc, RealTestArc, TestArc, RealInhibitorArc, InhibitorArc)[1] P1.outTransition.arcType = {PNlib.Types.ArcType.NormalArc for $i1 in 1:1} (117) [DISC] (1) protected Integer P1.enableOut.posTE (118) [DISC] (1) protected Integer P2.delayPassedIn.numtrue (119) [DISC] (1) protected Integer[1] T1.activation.minTokensInt = T1.minTokensInt (120) [ALGB] (1) protected Real P1.firingSumIn.disFiringSum (121) [DISC] (1) protected Integer[1] P2.enableIn.remTAin (fixed = {true for $i1 in 1:1}, start = {0 for $i1 in 1:1}) (122) [DISC] (1) protected Boolean[1] P1.disTransitionIn (123) [ALGB] (1) protected Real[1] T1.activation.tIn = T1.tIn (124) [DISC] (1) protected Boolean[1] P2.enableIn.TAein = P2.enabledByInPlaces and P2.activeIn (125) [DISC] (1) protected Integer P2.enableIn.Index (126) [ALGB] (1) Real[1] T1.inPlaces.maxSpeed = {T1.maximumSpeed} (127) [ALGB] (2) Real[2] T1.arcWeightOut = {2.0, 2.0} (128) [ALGB] (1) protected Real P2.disMarkChange (129) [ALGB] (1) protected Real T1.prelimSpeed (130) [DISC] (1) protected Boolean P2.disMarksOut.anytrue (131) [ALGB] (1) Real[1] P1.inTransition.instSpeed = {P1.instSpeedIn[1]} (132) [ALGB] (1) Real[1] P1.outTransition.testValue = {-1.0 for $i1 in 1:1} (133) [DISC] (1) protected Integer P1.delayPassedIn.numtrue (134) [DISC] (2) protected Boolean[2] T1.activation.weaklyOutputActiveVec (135) [DISC] (1) Boolean[1] P1.inTransition.enable = {P1.enableIn.TEin_[1]} (136) [DISC] (1) protected Boolean[1] P1.enableOut.TEout (137) [DISC] (1) protected Boolean[1] P1.enableOut.disTAout (fixed = {true for $i1 in 1:1}, start = {false for $i1 in 1:1}) (138) [ALGB] (1) protected Real[1] P2.firingSumIn.vec1 (139) [DISC] (2) protected Integer[2] T1.activation.arcWeightIntOut = T1.arcWeightIntOut (140) [ALGB] (1) protected Real[1] P2.firingSumIn.vec2 (141) [DISC] (2) protected Boolean[2] T1.activation.disPlaceOut = T1.disPlaceOut (142) [ALGB] (1) protected Real[1] P2.enableIn.arcWeight = P2.arcWeightIn (143) [DISC] (1) protected Boolean[1] P1.enabledByInPlaces (144) [DISC] (1) protected Boolean[1] P2.enableIn.TEin (145) [DISC] (1) protected Boolean[1] T1.disPlaceIn (146) [DISC] (2) protected Integer[2] T1.activation.tIntOut = T1.tIntOut (147) [DISC] (1) protected discrete Real P2.enableIn.sumEnablingProbTAin (148) [DISC] (2) protected Integer[2] T1.arcWeightIntOut (149) [ALGB] (2) protected Real[2] T1.activation.tOut = T1.tOut (150) [DISC] (1) protected Boolean P2.enableIn.endWhile (151) [DISC] (2) Integer[2] T1.outPlaces.tint = {T1.tIntOut[$outPlaces1] for $outPlaces1 in 1:2} (152) [DISC] (1) Boolean[1] T1.inPlaces.enable = {T1.enableIn[1]} (153) [DISC] (1) protected Boolean[1] P1.delayPassedOut.vec = P1.activeOut and P1.disTransitionOut (154) [ALGB] (1) protected Real[1] P1.firingSumIn.instSpeed = P1.instSpeedIn (155) [DISC] (1) Boolean[1] P1.outTransition.active = {P1.activeOut[1]} (156) [ALGB] (2) Real[2] T1.outPlaces.maxTokens = {T1.maxTokens[$outPlaces1] for $outPlaces1 in 1:2} (157) [DISC] (1) Boolean[1] P2.inTransition.enable = {P2.enableIn.TEin_[1]} (158) [ALGB] (1) Real[1] P2.inTransition.maxSpeed = {P2.maxSpeedIn[1]} (159) [DISC] (2) Integer[2] T1.outPlaces.maxTokensint = {T1.maxTokensInt[$outPlaces1] for $outPlaces1 in 1:2} (160) [DISC] (1) protected Boolean[1] P1.activeIn (161) [DISC] (1) Integer[1] P1.outTransition.testValueint = {-1 for $i1 in 1:1} (162) [ALGB] (1) protected Real P2.firingSumIn.conFiringSum (163) [DISC] (1) Integer[1] P2.inTransition.maxTokensint = {1 for $i1 in 1:1} (164) [ALGB] (1) protected Real[1] P1.prelimSpeedOut (165) [DISC] (1) Integer[1] P1.outTransition.tint = {1 for $i1 in 1:1} (166) [ALGB] (1) Real P2.levelCon (167) [DISC] (1) protected Boolean[1] P2.disMarksIn.vec = P2.fireIn and P2.disTransitionIn (168) [DISC] (1) protected discrete Real P2.enableIn.randNum (169) [ALGB] (1) Real[1] P2.inTransition.decreasingFactor = {P2.decFactorIn[1]} (170) [ALGB] (1) protected Real[1] T1.activation.minTokens = T1.minTokens (171) [DISC] (1) protected Integer[1] P1.enableOut.enablingPrio = P1.enablingPrioOut (172) [DISC] (1) protected Boolean[1] P1.enableOut.TAout = P1.activeOut (173) [DISC] (1) protected Boolean[1] P1.firingSumOut.disTransition = P1.disTransitionOut (174) [DISC] (1) enumeration PNlib.Types.ArcType(NormalArc, RealTestArc, TestArc, RealInhibitorArc, InhibitorArc)[1] T1.inPlaces.arcType = {T1.arcType[1]} (175) [DISC] (1) protected Boolean[1] P2.feeding.vec = P2.preFireIn and not P2.disTransitionIn (176) [DISC] (1) protected Boolean[1] P1.disMarksOut.vec = P1.fireOut and P1.disTransitionOut (177) [DISC] (1) protected Integer P2.enableIn.nremTAin (178) [DISC] (1) protected Integer P2.disMarksOut.numtrue (179) [DISC] (1) protected Boolean P2.emptying.anytrue (180) [ALGB] (1) protected Real P2.conMarkChange (181) [DISC] (1) Boolean[1] P1.inTransition.enabledByInPlaces = {P1.enabledByInPlaces[1]} (182) [DISC] (1) protected enumeration PNlib.Types.ArcType(NormalArc, RealTestArc, TestArc, RealInhibitorArc, InhibitorArc)[1] T1.activation.arcType = T1.arcType (183) [ALGB] (1) protected Real[1] T1.speedSumIn (184) [DISC] (1) Boolean[1] T1.inPlaces.fed = {T1.fed[1]} (185) [DISC] (1) Integer[1] P1.inTransition.arcWeightint (186) [DISC] (1) protected Integer P1.enableOut.nTAout (187) [DISC] (2) Boolean[2] T1.outPlaces.emptied = {T1.emptied[$outPlaces1] for $outPlaces1 in 1:2} (188) [DISC] (2) protected Integer[2] T1.maxTokensInt (189) [DISC] (1) Boolean[1] T1.inPlaces.tokenInOut (190) [ALGB] (1) Real[1] P1.inTransition.maxTokens = {P1.maxMarks} (191) [ALGB] (3) Real[3] T1.color (192) [DISC] (1) protected Integer P1.emptying.numtrue (193) [ALGB] (1) Real[1] P1.outTransition.prelimSpeed = {P1.prelimSpeedOut[1]} (194) [ALGB] (1) protected Real P1.conMarkChange (195) [DISC] (1) Boolean T1.fire (196) [DISC] (1) protected Boolean[1] T1.activation.disPlaceIn = T1.disPlaceIn (197) [ALGB] (1) protected Real P1.firingSumIn.conFiringSum (198) [DISC] (1) Boolean[1] P2.inTransition.emptied = {P2.emptying.anytrue} (199) [DISC] (1) protected Boolean[1] P1.disTransitionOut (200) [DISC] (1) protected discrete Real[1] P1.enableOut.cumEnablingProb (fixed = {true for $i1 in 1:1}, start = {0.0 for $i1 in 1:1}) (201) [ALGB] (2) protected Real[2] T1.maxTokens (202) [DISC] (1) Integer[1] T1.inPlaces.testValueint = {T1.testValueInt[1]} (203) [ALGB] (1) protected Real[1] P2.firingSumIn.arcWeight = P2.arcWeightIn (204) [DISC] (1) protected Boolean[1] P2.enableIn.disTAin (fixed = {true for $i1 in 1:1}, start = {false for $i1 in 1:1}) (205) [DISC] (1) protected Boolean[1] P1.enableOut.TEout_ (206) [DISC] (2) Boolean[2] T1.outPlaces.active = {T1.activation.active for $outPlaces1 in 1:2} (207) [ALGB] (1) Real[1] P1.inTransition.t = {P1.t_} (208) [ALGB] (1) Real[1] P2.inTransition.t = {P2.t_} (209) [DISC] (1) protected Boolean[1] P1.enableIn.disTAin (fixed = {true for $i1 in 1:1}, start = {false for $i1 in 1:1}) (210) [DISC] (1) Boolean[1] T1.inPlaces.fire = {T1.fire} (211) [ALGB] (1) protected Real[1] T1.decreasingFactorIn (212) [DISC] (1) protected Integer[1] T1.tIntIn (213) [ALGB] (1) Real[1] P2.inTransition.arcWeight = {P2.arcWeightIn[1]} (214) [ALGB] (2) Real[2] T1.outPlaces.instSpeed = {T1.instantaneousSpeed for $outPlaces1 in 1:2} (215) [DISC] (1) protected Boolean[1] P1.enableIn.disTransition = P1.disTransitionIn (216) [DISC] (1) protected Integer[1] T1.testValueInt (217) [DISC] (1) protected Integer P1.enableOut.k (218) [ALGB] (1) Real P1.pc_t = P1.pc_t (219) [DISC] (1) Integer[1] P1.inTransition.tint = {1 for $i1 in 1:1} (220) [ALGB] (1) Real[1] P1.outTransition.t = {P1.t_} (221) [ALGB] (1) Real[1] T1.inPlaces.t = {T1.tIn[1]} (222) [DISC] (1) Boolean[1] $FUN_37 (223) [DISC] (1) protected Integer P2.emptying.numtrue (224) [DISC] (1) Integer[1] $FUN_36 (225) [DISC] (1) protected Boolean[1] P2.preFireIn (226) [DISC] (4) Integer[4] $FUN_35 (227) [ALGB] (1) Real $FUN_34 (228) [ALGB] (1) Real $FUN_33 (229) [DISC] (1) Integer $FUN_32 (230) [DISC] (2) protected Boolean[2] T1.disPlaceOut (231) [DISC] (1) Boolean[1] $FUN_31 (232) [ALGB] (1) Real $FUN_30 (233) [ALGB] (2) Real[2] T1.outPlaces.maxSpeed = {T1.maximumSpeed for $outPlaces1 in 1:2} (234) [ALGB] (1) protected Real[1] T1.tIn (235) [ALGB] (2) Real[2] T1.outPlaces.t = {T1.tOut[$outPlaces1] for $outPlaces1 in 1:2} (236) [DISC] (1) Boolean[1] P2.inTransition.fire = {P2.fireIn[1]} (237) [DISC] (1) protected Boolean P1.emptying.anytrue (238) [DISC] (1) protected Boolean[1] P1.feeding.vec = P1.preFireIn and not P1.disTransitionIn (239) [DISC] (1) protected Boolean[1] P1.fireOut (fixed = {true for $i1 in 1:1}, start = {false for $i1 in 1:1}) (240) [DISC] (1) Boolean[1] $FUN_29 (241) [DISC] (1) Integer[1] $FUN_28 (242) [DISC] (1) protected Boolean[1] P1.enableOut.disTransition = P1.disTransitionOut (243) [ALGB] (1) protected Real P1.disMarkChange (244) [ALGB] (1) Real P2.pc_t = P2.pc_t (245) [DISC] (4) Integer[4] $FUN_27 (246) [DISC] (1) Boolean[1] P1.inTransition.disTransition = {P1.disTransitionIn[1]} (247) [DISC] (1) Integer[1] P1.inTransition.maxTokensint = {1 for $i1 in 1:1} (248) [ALGB] (1) Real $FUN_26 (249) [DISC] (1) protected Boolean[1] P1.enableIn.TEin_ (250) [ALGB] (1) protected Real P1.tokenscale (251) [ALGB] (1) Real[1] $FUN_6 (252) [ALGB] (1) Real $FUN_25 (253) [ALGB] (1) Real[1] T1.inPlaces.testValue = {T1.testValue[1]} (254) [ALGB] (1) Real[1] $FUN_5 (255) [DISC] (1) Integer $FUN_24 (256) [DISC] (1) protected discrete Real P1.enableIn.randNum (257) [DISC] (1) protected Integer P1.enableIn.nTAin (258) [DISC] (1) Boolean[1] $FUN_23 (259) [ALGB] (1) Real $FUN_22 (260) [DISC] (1) Boolean[1] $FUN_21 (261) [DISC] (1) Integer[1] $FUN_20 (262) [ALGB] (2) protected Real[2] T1.activation.arcWeightOut = T1.arcWeightOut (263) [ALGB] (1) protected Real[1] P2.instSpeedIn (264) [ALGB] (1) Real[1] P1.inTransition.speedSum = {P1.firingSumOut.conFiringSum} (265) [ALGB] (3) Real[3] P2.color (266) [DISC] (1) Boolean[1] P1.outTransition.tokenInOut = {pre(P1.disMarksInOut)} (267) [DISC] (1) protected Integer P1.enableIn.posTE (268) [DISC] (1) protected Boolean[1] P1.preFireOut (269) [DISC] (2) protected Integer[2] T1.tIntOut (270) [DISC] (2) protected Boolean[2] T1.activation.emptied = T1.emptied (271) [DISC] (1) protected Boolean T1.activation.NoTokens (272) [DISC] (1) Boolean[1] P1.inTransition.disPlace = {false for $i1 in 1:1} (273) [DISC] (2) Boolean[2] T1.outPlaces.disTransition = {false for $i1 in 1:2} (274) [DISC] (4) Integer[4] $FUN_19 (275) [ALGB] (1) Real $FUN_18 (276) [ALGB] (1) Real $FUN_17 (277) [DISC] (1) Integer $FUN_16 (278) [DISC] (1) Boolean[1] $FUN_15 (279) [ALGB] (1) Real $FUN_14 (280) [DISC] (1) Boolean[1] $FUN_13 (281) [ALGB] (0) Real[0] $FUN_12 (282) [ALGB] (1) Real[1] $FUN_11 (283) [ALGB] (2) Real[2] T1.outPlaces.decreasingFactor = {T1.decreasingFactorOut[$outPlaces1] for $outPlaces1 in 1:2} (284) [ALGB] (1) protected Real[1] T1.minTokens (285) [DISC] (1) Boolean $SEV_141 (286) [DISC] (1) Boolean $SEV_140 (287) [DISC] (1) protected Boolean P2.disMarksInOut (fixed = true, start = false) (288) [ALGB] (1) Real P1.levelCon (289) [ALGB] (1) protected Real[1] P1.enableIn.enablingProb = P1.enablingProbIn (290) [DISC] (2) Boolean[2] $SEV_110[$i1] (291) [DISC] (1) protected Boolean T1.fire_ = PNlib.Functions.OddsAndEnds.allTrue(PNlib.Functions.OddsAndEnds.boolOr(T1.enableIn, not T1.disPlaceIn)) (292) [ALGB] (1) Real T1.instantaneousSpeed (293) [DISC] (1) protected Boolean[1] P1.firingSumIn.disTransition = P1.disTransitionIn (294) [ALGB] (1) protected Real[1] P1.firingSumOut.arcWeight = P1.arcWeightOut (295) [DISC] (1) protected Boolean T1.activation.active (296) [ALGB] (1) Real[1] T1.inPlaces.arcWeight = {T1.arcWeightIn[1]} (297) [DISC] (1) protected Integer P1.enableOut.Index (298) [DISC] (2) Boolean[2] T1.outPlaces.enabledByInPlaces = {true for $i1 in 1:2} (299) [ALGB] (1) protected Real P2.tokenscale (300) [DISC] (1) Integer[1] P1.outTransition.minTokensint = {1 for $i1 in 1:1} (301) [DISC] (1) Boolean[1] T1.inPlaces.normalArc = {T1.normalArc[1]} (302) [DISC] (2) Boolean[2] $SEV_109[$i1] (303) [DISC] (1) protected Boolean[1] P1.firingSumOut.fire = P1.preFireOut (304) [DISC] (1) Boolean $SEV_139 (305) [DISC] (1) Boolean $SEV_138 (306) [DISC] (1) protected Boolean[1] T1.activation.normalArc = T1.normalArc (307) [DISC] (1) Boolean $SEV_137 (308) [DISC] (1) Boolean $SEV_136 (309) [DISC] (1) Boolean $SEV_135 (310) [DISC] (1) Boolean $SEV_134 (311) [DISC] (1) protected Boolean[1] T1.activation.fed = T1.fed (312) [DISC] (1) Boolean $SEV_133 (313) [DISC] (1) protected Integer[1] P1.enableIn.remTAin (fixed = {true for $i1 in 1:1}, start = {0 for $i1 in 1:1}) (314) [DISC] (1) Boolean $SEV_132 (315) [DISC] (1) Boolean $SEV_131 (316) [DISC] (1) Integer[1] T1.inPlaces.arcWeightint = {T1.arcWeightIntIn[1]} (317) [DISC] (1) Boolean $SEV_130 (318) [DISC] (1) protected enumeration PNlib.Types.ArcType(NormalArc, RealTestArc, TestArc, RealInhibitorArc, InhibitorArc)[1] T1.arcType (319) [DISC] (1) Boolean[1] T1.inPlaces.disTransition = {false for $i1 in 1:1} (320) [DISC] (1) protected discrete Real P1.enableIn.arcWeightSum (321) [DISC] (1) protected Integer P1.delayPassedOut.numtrue (322) [DISC] (1) protected Boolean[1] P2.disTransitionIn (323) [ALGB] (1) Real[1] P1.outTransition.speedSum = {P1.firingSumIn.conFiringSum} (324) [ALGB] (1) Real[1] P1.outTransition.instSpeed = {P1.instSpeedOut[1]} (325) [DER-] (1) Real $DER.P1.t_ (326) [ALGB] (1) protected Real[1] P1.firingSumIn.arcWeight = P1.arcWeightIn (327) [ALGB] (1) Real[1] T1.inPlaces.prelimSpeed = {T1.prelimSpeed} (328) [DISC] (1) protected Integer P2.enableIn.posTE (329) [DISC] (1) protected Boolean[1] P1.disMarksIn.vec = P1.fireIn and P1.disTransitionIn (330) [DISC] (1) Boolean[1] P1.outTransition.disPlace = {false for $i1 in 1:1} (331) [DISC] (1) protected discrete Real[1] P2.enableIn.cumEnablingProb (fixed = {true for $i1 in 1:1}, start = {0.0 for $i1 in 1:1}) (332) [ALGB] (2) protected Real[2] T1.speedSumOut (333) [DER-] (1) Real $DER.P2.t_ (334) [DISC] (1) protected discrete Real P1.enableOut.sumEnablingProbTAout (335) [DISC] (1) protected Integer P1.enableIn.nremTAin (336) [DISC] (2) protected Integer[2] T1.activation.maxTokensInt = T1.maxTokensInt (337) [ALGB] (1) Real[1] P1.inTransition.decreasingFactor = {P1.decFactorIn[1]} (338) [DISC] (1) Boolean[1] $SEV_111[$i1] (339) [DISC] (1) Boolean $SEV_129 (340) [DISC] (1) Boolean $SEV_128 (341) [DISC] (1) Boolean $SEV_127 (342) [DISC] (1) Boolean $SEV_126 (343) [DISC] (1) Boolean $SEV_125 (344) [DISC] (1) Boolean $SEV_124 (345) [DISC] (1) Boolean[1] P1.inTransition.active = {P1.activeIn[1]} (346) [DISC] (1) Boolean $SEV_123 (347) [ALGB] (1) Real[1] P1.outTransition.minTokens = {P1.minMarks} (348) [DISC] (1) protected Boolean P1.enableIn.delayPassed = P1.enableIn.delayPassed (349) [DISC] (1) Boolean $SEV_122 (350) [DISC] (1) Boolean $SEV_121 (351) [DISC] (1) protected Integer[1] P2.enableIn.enablingPrio = P2.enablingPrioIn (352) [DISC] (1) protected Integer P2.enableIn.nTAin (353) [DISC] (1) Boolean $SEV_120 (354) [DISC] (1) protected Integer P1.disMarksOut.numtrue (355) [DISC] (1) protected Boolean[1] P1.activeOut (356) [DISC] (1) protected Boolean[1] P2.enableIn.TEin_ (357) [DISC] (1) Boolean[1] P2.inTransition.enabledByInPlaces = {P2.enabledByInPlaces[1]} (358) [DISC] (1) protected Boolean[1] P2.enableIn.active = P2.activeIn (359) [ALGB] (1) protected Real[1] P1.instSpeedIn (360) [DISC] (1) protected Boolean[1] T1.activation.weaklyInputActiveVec (361) [ALGB] (1) Real[1] T1.inPlaces.speedSum = {T1.speedSumIn[1]} (362) [DISC] (1) protected Integer P1.enableOut.nremTAout (363) [ALGB] (1) protected Real[1] P1.enableOut.arcWeight = P1.arcWeightOut (364) [DISC] (1) Boolean[1] T1.inPlaces.disPlace = {T1.disPlaceIn[1]} (365) [ALGB] (2) Real[2] T1.outPlaces.prelimSpeed = {T1.prelimSpeed for $outPlaces1 in 1:2} (366) [DISC] (1) Boolean[1] P1.outTransition.disTransition = {P1.disTransitionOut[1]} (367) [ALGB] (1) protected Real[1] T1.activation.testValue = T1.testValue (368) [DISC] (1) protected Boolean P2.enableIn.delayPassed = P2.enableIn.delayPassed (369) [DISC] (1) protected Boolean P1.enableIn.endWhile (370) [DISC] (1) Boolean[1] T1.inPlaces.active = {T1.activation.active} (371) [ALGB] (1) Real[1] P1.inTransition.arcWeight = {P1.arcWeightIn[1]} (372) [ALGB] (1) protected Real[1] P2.prelimSpeedIn (373) [DISC] (1) Boolean $SEV_114 (374) [DISC] (1) Boolean[1] P1.outTransition.enable = {P1.enableOut.TEout_[1]} (375) [DISC] (1) Boolean $SEV_113 (376) [DISC] (1) protected Integer[1] T1.minTokensInt (377) [DISC] (1) protected Integer[1] T1.activation.testValueInt = T1.testValueInt (378) [ALGB] (1) Real[1] P1.inTransition.prelimSpeed = {P1.prelimSpeedIn[1]} (379) [DISC] (1) protected Boolean P1.enableOut.endWhile (380) [DISC] (1) Boolean[1] $SEV_112[$i1] (381) [DISC] (1) Boolean[1] P2.inTransition.active = {P2.activeIn[1]} (382) [DISC] (1) protected Boolean[1] P2.enabledByInPlaces (383) [DISC] (1) protected Boolean[1] P1.firingSumIn.fire = P1.preFireIn (384) [DISC] (2) Boolean[2] T1.outPlaces.fire = {T1.fire for $outPlaces1 in 1:2} (385) [ALGB] (1) protected Real[1] P2.decFactorIn System Equations (333/447) **************************** (1) [SCAL] (1) $TEV_1 = $PRE.P2.fireIn[1] ($RES_EVT_399) (2) [ALGO] (2) ($RES_SIM_8) (2) [----] P2.enableIn.delayPassed := false; (2) [----] P2.delayPassedIn.numtrue := 0; (2) [----] for i in 1:1 loop (2) [----] P2.enableIn.delayPassed := P2.enableIn.delayPassed or P2.delayPassedIn.vec[i]; (2) [----] if P2.delayPassedIn.vec[i] then (2) [----] P2.delayPassedIn.numtrue := P2.delayPassedIn.numtrue + 1; (2) [----] end if; (2) [----] end for; (3) [ALGO] (2) ($RES_SIM_7) (3) [----] P2.disMarksOut.anytrue := false; (3) [----] P2.disMarksOut.numtrue := 0; (4) [ALGO] (2) ($RES_SIM_6) (4) [----] P2.disMarksIn.anytrue := false; (4) [----] P2.disMarksIn.numtrue := 0; (4) [----] for i in 1:1 loop (4) [----] P2.disMarksIn.anytrue := P2.disMarksIn.anytrue or P2.disMarksIn.vec[i]; (4) [----] if P2.disMarksIn.vec[i] then (4) [----] P2.disMarksIn.numtrue := P2.disMarksIn.numtrue + 1; (4) [----] end if; (4) [----] end for; (5) [ALGO] (2) ($RES_SIM_5) (5) [----] P2.feeding.anytrue := false; (5) [----] P2.feeding.numtrue := 0; (5) [----] for i in 1:1 loop (5) [----] P2.feeding.anytrue := P2.feeding.anytrue or P2.feeding.vec[i]; (5) [----] if P2.feeding.vec[i] then (5) [----] P2.feeding.numtrue := P2.feeding.numtrue + 1; (5) [----] end if; (5) [----] end for; (6) [ALGO] (2) ($RES_SIM_4) (6) [----] P2.emptying.anytrue := false; (6) [----] P2.emptying.numtrue := 0; (7) [ALGO] (18) ($RES_SIM_11) (7) [----] P2.enableIn.TEin := fill(false, 1); (7) [----] when P2.enableIn.delayPassed then (7) [----] P2.enableIn.disTAin := $FUN_29; (7) [----] P2.enableIn.arcWeightSum := $FUN_30; (7) [----] if (P2.enableIn.arcWeightSum + P2.t_) - P2.maxMarks <= 1e-9 or abs(P2.enableIn.arcWeightSum) <= 1e-8 then (7) [----] P2.enableIn.TEin := P2.enableIn.TAein; (7) [----] elseif true then (7) [----] P2.enableIn.TEin := $FUN_31; (7) [----] if P2.enablingType == PNlib.Types.EnablingType.Priority then (7) [----] P2.enableIn.arcWeightSum := 0.0; (7) [----] for i in 1:1 loop (7) [----] P2.enableIn.Index := $FUN_32; (7) [----] if (P2.enableIn.Index > 0 and P2.enableIn.disTAin[P2.enableIn.Index]) and ((P2.enableIn.arcWeight[P2.enableIn.Index] + P2.enableIn.arcWeightSum + P2.t_) - P2.maxMarks <= 1e-9 or abs(P2.enableIn.arcWeight[P2.enableIn.Index]) <= 1e-8) then (7) [----] P2.enableIn.TEin[P2.enableIn.Index] := true; (7) [----] P2.enableIn.arcWeightSum := P2.enableIn.arcWeightSum + P2.enableIn.arcWeight[P2.enableIn.Index]; (7) [----] end if; (7) [----] end for; (7) [----] elseif true then (7) [----] P2.enableIn.arcWeightSum := 0.0; (7) [----] P2.enableIn.remTAin := fill(0, 1); (7) [----] P2.enableIn.nremTAin := 0; (7) [----] for i in 1:1 loop (7) [----] if P2.enableIn.disTAin[i] then (7) [----] P2.enableIn.nremTAin := P2.enableIn.nremTAin + 1; (7) [----] P2.enableIn.remTAin[P2.enableIn.nremTAin] := i; (7) [----] end if; (7) [----] end for; (7) [----] P2.enableIn.nTAin := P2.enableIn.nremTAin; (7) [----] P2.enableIn.sumEnablingProbTAin := $FUN_33; (7) [----] P2.enableIn.cumEnablingProb := fill(0.0, 1); (7) [----] P2.enableIn.cumEnablingProb[1] := P2.enableIn.enablingProb[P2.enableIn.remTAin[1]] / P2.enableIn.sumEnablingProbTAin; (7) [----] for j in 2:P2.enableIn.nremTAin loop (7) [----] P2.enableIn.cumEnablingProb[j] := P2.enableIn.cumEnablingProb[j - 1] + P2.enableIn.enablingProb[P2.enableIn.remTAin[j]] / P2.enableIn.sumEnablingProbTAin; (7) [----] end for; (7) [----] for i in 1:P2.enableIn.nTAin loop (7) [----] (P2.enableIn.randNum, P2.enableIn.state128) := ($FUN_34, $FUN_35); (7) [----] P2.enableIn.endWhile := false; (7) [----] P2.enableIn.k := 1; (7) [----] while P2.enableIn.k <= P2.enableIn.nremTAin and not P2.enableIn.endWhile then (7) [----] if P2.enableIn.randNum <= P2.enableIn.cumEnablingProb[P2.enableIn.k] then (7) [----] P2.enableIn.posTE := P2.enableIn.remTAin[P2.enableIn.k]; (7) [----] P2.enableIn.endWhile := true; (7) [----] elseif true then (7) [----] P2.enableIn.k := P2.enableIn.k + 1; (7) [----] end if; (7) [----] end while; (7) [----] if (P2.enableIn.arcWeight[P2.enableIn.posTE] + P2.enableIn.arcWeightSum + P2.t_) - P2.maxMarks <= 1e-9 or abs(P2.enableIn.arcWeight[i]) <= 1e-8 then (7) [----] P2.enableIn.arcWeightSum := P2.enableIn.arcWeightSum + P2.enableIn.arcWeight[P2.enableIn.posTE]; (7) [----] P2.enableIn.TEin[P2.enableIn.posTE] := true; (7) [----] end if; (7) [----] P2.enableIn.nremTAin := P2.enableIn.nremTAin - 1; (7) [----] if P2.enableIn.nremTAin > 0 then (7) [----] P2.enableIn.remTAin := $FUN_36; (7) [----] P2.enableIn.cumEnablingProb := fill(0.0, 1); (7) [----] P2.enableIn.sumEnablingProbTAin := $FUN_33; (7) [----] if P2.enableIn.sumEnablingProbTAin > 0.0 then (7) [----] P2.enableIn.cumEnablingProb[1] := P2.enableIn.enablingProb[P2.enableIn.remTAin[1]] / P2.enableIn.sumEnablingProbTAin; (7) [----] for j in 2:P2.enableIn.nremTAin loop (7) [----] P2.enableIn.cumEnablingProb[j] := P2.enableIn.cumEnablingProb[j - 1] + P2.enableIn.enablingProb[P2.enableIn.remTAin[j]] / P2.enableIn.sumEnablingProbTAin; (7) [----] end for; (7) [----] elseif true then (7) [----] P2.enableIn.cumEnablingProb[1:P2.enableIn.nremTAin] := fill(1.0 / P2.enableIn.nremTAin, P2.enableIn.nremTAin); (7) [----] end if; (7) [----] end if; (7) [----] end for; (7) [----] end if; (7) [----] end if; (7) [----] end when; (7) [----] for i in 1:1 loop (7) [----] P2.enableIn.TEin_[i] := P2.enableIn.TEin[i] and P2.enableIn.active[i]; (7) [----] end for; (8) [ALGO] (5) ($RES_SIM_12) (8) [----] T1.activation.NoTokens := false; (8) [----] T1.activation.active := true; (8) [----] T1.activation.weaklyInputActiveVec := fill(false, 1); (8) [----] T1.activation.weaklyOutputActiveVec := fill(false, 2); (8) [----] for i in 1:1 loop (8) [----] if T1.activation.disPlaceIn[i] then (8) [----] if T1.activation.arcType[i] == PNlib.Types.ArcType.NormalArc and T1.activation.tIntIn[i] - T1.activation.arcWeightIntIn[i] < T1.activation.minTokensInt[i] then (8) [----] T1.activation.active := false; (8) [----] elseif T1.activation.arcType[i] == PNlib.Types.ArcType.RealTestArc and T1.activation.tIntIn[i] <= T1.activation.testValueInt[i] then (8) [----] T1.activation.active := false; (8) [----] elseif T1.activation.arcType[i] == PNlib.Types.ArcType.TestArc and T1.activation.tIntIn[i] < T1.activation.testValueInt[i] then (8) [----] T1.activation.active := false; (8) [----] elseif T1.activation.arcType[i] == PNlib.Types.ArcType.RealInhibitorArc and T1.activation.tIntIn[i] >= T1.activation.testValueInt[i] then (8) [----] T1.activation.active := false; (8) [----] elseif T1.activation.arcType[i] == PNlib.Types.ArcType.InhibitorArc and T1.activation.tIntIn[i] > T1.activation.testValueInt[i] then (8) [----] T1.activation.active := false; (8) [----] end if; (8) [----] elseif true then (8) [----] if T1.activation.arcType[i] == PNlib.Types.ArcType.NormalArc or not T1.activation.normalArc[i] then (8) [----] T1.activation.NoTokens := not T1.activation.tIn[i] - T1.activation.minTokens[i] >= (-1e-9); (8) [----] if T1.activation.arcWeightIn[i] <= 0.0 then (8) [----] elseif T1.activation.NoTokens and not T1.activation.fed[i] then (8) [----] T1.activation.active := false; (8) [----] elseif T1.activation.NoTokens and T1.activation.fed[i] then (8) [----] T1.activation.weaklyInputActiveVec[i] := true; (8) [----] end if; (8) [----] end if; (8) [----] if T1.activation.arcType[i] == PNlib.Types.ArcType.RealTestArc then (8) [----] if T1.activation.tIn[i] <= (T1.activation.testValue[i] + 1e-9) then (8) [----] T1.activation.active := false; (8) [----] end if; (8) [----] if (T1.activation.tIn[i] > (T1.activation.testValue[i] + 1e-9) and T1.activation.fed[i]) and not T1.activation.normalArc[i] then (8) [----] T1.activation.weaklyInputActiveVec[i] := true; (8) [----] end if; (8) [----] elseif T1.activation.arcType[i] == PNlib.Types.ArcType.TestArc then (8) [----] if T1.activation.tIn[i] < (T1.activation.testValue[i] - 1e-9) then (8) [----] T1.activation.active := false; (8) [----] end if; (8) [----] if (T1.activation.tIn[i] >= (T1.activation.testValue[i] - 1e-9) and T1.activation.fed[i]) and not T1.activation.normalArc[i] then (8) [----] T1.activation.weaklyInputActiveVec[i] := true; (8) [----] end if; (8) [----] elseif T1.activation.arcType[i] == PNlib.Types.ArcType.RealInhibitorArc and T1.activation.tIn[i] >= (T1.activation.testValue[i] - 1e-9) then (8) [----] T1.activation.active := false; (8) [----] elseif T1.activation.arcType[i] == PNlib.Types.ArcType.InhibitorArc and T1.activation.tIn[i] > (T1.activation.testValue[i] + 1e-9) then (8) [----] T1.activation.active := false; (8) [----] end if; (8) [----] end if; (8) [----] end for; (8) [----] for i in 1:2 loop (8) [----] if T1.activation.disPlaceOut[i] then (8) [----] if T1.activation.tIntOut[i] + T1.activation.arcWeightIntOut[i] > T1.activation.maxTokensInt[i] then (8) [----] T1.activation.active := false; (8) [----] end if; (8) [----] elseif true then (8) [----] if T1.activation.tOut[i] >= T1.activation.maxTokens[i] then (8) [----] if T1.activation.emptied[i] then (8) [----] T1.activation.weaklyOutputActiveVec[i] := true; (8) [----] elseif true then (8) [----] T1.activation.active := false; (8) [----] end if; (8) [----] end if; (8) [----] end if; (8) [----] end for; (8) [----] T1.activation.active := T1.activation.active and true; (8) [----] for i in 1:2 loop (8) [----] T1.activation.weaklyOutputActiveVec[i] := T1.activation.weaklyOutputActiveVec[i] and true; (8) [----] end for; (8) [----] for i in 1:1 loop (8) [----] T1.activation.weaklyInputActiveVec[i] := T1.activation.weaklyInputActiveVec[i] and true; (8) [----] end for; (9) [ALGO] (2) ($RES_SIM_13) (9) [----] P1.emptying.anytrue := false; (9) [----] P1.emptying.numtrue := 0; (9) [----] for i in 1:1 loop (9) [----] P1.emptying.anytrue := P1.emptying.anytrue or P1.emptying.vec[i]; (9) [----] if P1.emptying.vec[i] then (9) [----] P1.emptying.numtrue := P1.emptying.numtrue + 1; (9) [----] end if; (9) [----] end for; (10) [ALGO] (2) ($RES_SIM_14) (10) [----] P1.feeding.anytrue := false; (10) [----] P1.feeding.numtrue := 0; (10) [----] for i in 1:1 loop (10) [----] P1.feeding.anytrue := P1.feeding.anytrue or P1.feeding.vec[i]; (10) [----] if P1.feeding.vec[i] then (10) [----] P1.feeding.numtrue := P1.feeding.numtrue + 1; (10) [----] end if; (10) [----] end for; (11) [ALGO] (2) ($RES_SIM_15) (11) [----] P1.disMarksIn.anytrue := false; (11) [----] P1.disMarksIn.numtrue := 0; (11) [----] for i in 1:1 loop (11) [----] P1.disMarksIn.anytrue := P1.disMarksIn.anytrue or P1.disMarksIn.vec[i]; (11) [----] if P1.disMarksIn.vec[i] then (11) [----] P1.disMarksIn.numtrue := P1.disMarksIn.numtrue + 1; (11) [----] end if; (11) [----] end for; (12) [ALGO] (2) ($RES_SIM_16) (12) [----] P1.disMarksOut.anytrue := false; (12) [----] P1.disMarksOut.numtrue := 0; (12) [----] for i in 1:1 loop (12) [----] P1.disMarksOut.anytrue := P1.disMarksOut.anytrue or P1.disMarksOut.vec[i]; (12) [----] if P1.disMarksOut.vec[i] then (12) [----] P1.disMarksOut.numtrue := P1.disMarksOut.numtrue + 1; (12) [----] end if; (12) [----] end for; (13) [ALGO] (2) ($RES_SIM_17) (13) [----] P1.enableIn.delayPassed := false; (13) [----] P1.delayPassedIn.numtrue := 0; (13) [----] for i in 1:1 loop (13) [----] P1.enableIn.delayPassed := P1.enableIn.delayPassed or P1.delayPassedIn.vec[i]; (13) [----] if P1.delayPassedIn.vec[i] then (13) [----] P1.delayPassedIn.numtrue := P1.delayPassedIn.numtrue + 1; (13) [----] end if; (13) [----] end for; (14) [ALGO] (2) ($RES_SIM_18) (14) [----] P1.enableOut.delayPassed := false; (14) [----] P1.delayPassedOut.numtrue := 0; (14) [----] for i in 1:1 loop (14) [----] P1.enableOut.delayPassed := P1.enableOut.delayPassed or P1.delayPassedOut.vec[i]; (14) [----] if P1.delayPassedOut.vec[i] then (14) [----] P1.delayPassedOut.numtrue := P1.delayPassedOut.numtrue + 1; (14) [----] end if; (14) [----] end for; (15) [ALGO] (18) ($RES_SIM_19) (15) [----] P1.enableOut.TEout := fill(false, 1); (15) [----] when P1.enableOut.delayPassed then (15) [----] P1.enableOut.disTAout := $FUN_21; (15) [----] P1.enableOut.arcWeightSum := $FUN_22; (15) [----] if P1.t_ - (P1.minMarks + P1.enableOut.arcWeightSum) >= (-1e-9) or abs(P1.enableOut.arcWeightSum) <= 1e-8 then (15) [----] P1.enableOut.TEout := P1.enableOut.TAout; (15) [----] elseif true then (15) [----] P1.enableOut.TEout := $FUN_23; (15) [----] if P1.enablingType == PNlib.Types.EnablingType.Priority then (15) [----] P1.enableOut.arcWeightSum := 0.0; (15) [----] for i in 1:1 loop (15) [----] P1.enableOut.Index := $FUN_24; (15) [----] if (P1.enableOut.Index > 0 and P1.enableOut.disTAout[P1.enableOut.Index]) and (P1.t_ - (P1.minMarks + P1.enableOut.arcWeight[P1.enableOut.Index] + P1.enableOut.arcWeightSum) >= (-1e-9) or abs(P1.enableOut.arcWeight[P1.enableOut.Index]) <= 1e-8) then (15) [----] P1.enableOut.TEout[P1.enableOut.Index] := true; (15) [----] P1.enableOut.arcWeightSum := P1.enableOut.arcWeightSum + P1.enableOut.arcWeight[P1.enableOut.Index]; (15) [----] end if; (15) [----] end for; (15) [----] elseif true then (15) [----] P1.enableOut.arcWeightSum := 0.0; (15) [----] P1.enableOut.remTAout := fill(0, 1); (15) [----] P1.enableOut.nremTAout := 0; (15) [----] for i in 1:1 loop (15) [----] if P1.enableOut.disTAout[i] then (15) [----] P1.enableOut.nremTAout := P1.enableOut.nremTAout + 1; (15) [----] P1.enableOut.remTAout[P1.enableOut.nremTAout] := i; (15) [----] end if; (15) [----] end for; (15) [----] P1.enableOut.nTAout := P1.enableOut.nremTAout; (15) [----] P1.enableOut.sumEnablingProbTAout := $FUN_25; (15) [----] P1.enableOut.cumEnablingProb := fill(0.0, 1); (15) [----] P1.enableOut.cumEnablingProb[1] := P1.enableOut.enablingProb[P1.enableOut.remTAout[1]] / P1.enableOut.sumEnablingProbTAout; (15) [----] for j in 2:P1.enableOut.nremTAout loop (15) [----] P1.enableOut.cumEnablingProb[j] := P1.enableOut.cumEnablingProb[j - 1] + P1.enableOut.enablingProb[P1.enableOut.remTAout[j]] / P1.enableOut.sumEnablingProbTAout; (15) [----] end for; (15) [----] for i in 1:P1.enableOut.nTAout loop (15) [----] (P1.enableOut.randNum, P1.enableOut.state128) := ($FUN_26, $FUN_27); (15) [----] P1.enableOut.endWhile := false; (15) [----] P1.enableOut.k := 1; (15) [----] while P1.enableOut.k <= P1.enableOut.nremTAout and not P1.enableOut.endWhile then (15) [----] if P1.enableOut.randNum <= P1.enableOut.cumEnablingProb[P1.enableOut.k] then (15) [----] P1.enableOut.posTE := P1.enableOut.remTAout[P1.enableOut.k]; (15) [----] P1.enableOut.endWhile := true; (15) [----] elseif true then (15) [----] P1.enableOut.k := P1.enableOut.k + 1; (15) [----] end if; (15) [----] end while; (15) [----] if P1.t_ - (P1.minMarks + P1.enableOut.arcWeight[P1.enableOut.posTE] + P1.enableOut.arcWeightSum) >= (-1e-9) or abs(P1.enableOut.arcWeight[i]) <= 1e-8 then (15) [----] P1.enableOut.arcWeightSum := P1.enableOut.arcWeightSum + P1.enableOut.arcWeight[P1.enableOut.posTE]; (15) [----] P1.enableOut.TEout[P1.enableOut.posTE] := true; (15) [----] end if; (15) [----] P1.enableOut.nremTAout := P1.enableOut.nremTAout - 1; (15) [----] if P1.enableOut.nremTAout > 0 then (15) [----] P1.enableOut.remTAout := $FUN_28; (15) [----] P1.enableOut.cumEnablingProb := fill(0.0, 1); (15) [----] P1.enableOut.sumEnablingProbTAout := $FUN_25; (15) [----] if P1.enableOut.sumEnablingProbTAout > 0.0 then (15) [----] P1.enableOut.cumEnablingProb[1] := P1.enableOut.enablingProb[P1.enableOut.remTAout[1]] / P1.enableOut.sumEnablingProbTAout; (15) [----] for j in 2:P1.enableOut.nremTAout loop (15) [----] P1.enableOut.cumEnablingProb[j] := P1.enableOut.cumEnablingProb[j - 1] + P1.enableOut.enablingProb[P1.enableOut.remTAout[j]] / P1.enableOut.sumEnablingProbTAout; (15) [----] end for; (15) [----] elseif true then (15) [----] P1.enableOut.cumEnablingProb[1:P1.enableOut.nremTAout] := fill(1.0 / P1.enableOut.nremTAout, P1.enableOut.nremTAout); (15) [----] end if; (15) [----] end if; (15) [----] end for; (15) [----] end if; (15) [----] end if; (15) [----] end when; (15) [----] for i in 1:1 loop (15) [----] P1.enableOut.TEout_[i] := P1.enableOut.TEout[i] and P1.enableOut.TAout[i]; (15) [----] end for; (16) [ALGO] (18) ($RES_SIM_20) (16) [----] P1.enableIn.TEin := fill(false, 1); (16) [----] when P1.enableIn.delayPassed then (16) [----] P1.enableIn.disTAin := $FUN_13; (16) [----] P1.enableIn.arcWeightSum := $FUN_14; (16) [----] if (P1.enableIn.arcWeightSum + P1.t_) - P1.maxMarks <= 1e-9 or abs(P1.enableIn.arcWeightSum) <= 1e-8 then (16) [----] P1.enableIn.TEin := P1.enableIn.TAein; (16) [----] elseif true then (16) [----] P1.enableIn.TEin := $FUN_15; (16) [----] if P1.enablingType == PNlib.Types.EnablingType.Priority then (16) [----] P1.enableIn.arcWeightSum := 0.0; (16) [----] for i in 1:1 loop (16) [----] P1.enableIn.Index := $FUN_16; (16) [----] if (P1.enableIn.Index > 0 and P1.enableIn.disTAin[P1.enableIn.Index]) and ((P1.enableIn.arcWeight[P1.enableIn.Index] + P1.enableIn.arcWeightSum + P1.t_) - P1.maxMarks <= 1e-9 or abs(P1.enableIn.arcWeight[P1.enableIn.Index]) <= 1e-8) then (16) [----] P1.enableIn.TEin[P1.enableIn.Index] := true; (16) [----] P1.enableIn.arcWeightSum := P1.enableIn.arcWeightSum + P1.enableIn.arcWeight[P1.enableIn.Index]; (16) [----] end if; (16) [----] end for; (16) [----] elseif true then (16) [----] P1.enableIn.arcWeightSum := 0.0; (16) [----] P1.enableIn.remTAin := fill(0, 1); (16) [----] P1.enableIn.nremTAin := 0; (16) [----] for i in 1:1 loop (16) [----] if P1.enableIn.disTAin[i] then (16) [----] P1.enableIn.nremTAin := P1.enableIn.nremTAin + 1; (16) [----] P1.enableIn.remTAin[P1.enableIn.nremTAin] := i; (16) [----] end if; (16) [----] end for; (16) [----] P1.enableIn.nTAin := P1.enableIn.nremTAin; (16) [----] P1.enableIn.sumEnablingProbTAin := $FUN_17; (16) [----] P1.enableIn.cumEnablingProb := fill(0.0, 1); (16) [----] P1.enableIn.cumEnablingProb[1] := P1.enableIn.enablingProb[P1.enableIn.remTAin[1]] / P1.enableIn.sumEnablingProbTAin; (16) [----] for j in 2:P1.enableIn.nremTAin loop (16) [----] P1.enableIn.cumEnablingProb[j] := P1.enableIn.cumEnablingProb[j - 1] + P1.enableIn.enablingProb[P1.enableIn.remTAin[j]] / P1.enableIn.sumEnablingProbTAin; (16) [----] end for; (16) [----] for i in 1:P1.enableIn.nTAin loop (16) [----] (P1.enableIn.randNum, P1.enableIn.state128) := ($FUN_18, $FUN_19); (16) [----] P1.enableIn.endWhile := false; (16) [----] P1.enableIn.k := 1; (16) [----] while P1.enableIn.k <= P1.enableIn.nremTAin and not P1.enableIn.endWhile then (16) [----] if P1.enableIn.randNum <= P1.enableIn.cumEnablingProb[P1.enableIn.k] then (16) [----] P1.enableIn.posTE := P1.enableIn.remTAin[P1.enableIn.k]; (16) [----] P1.enableIn.endWhile := true; (16) [----] elseif true then (16) [----] P1.enableIn.k := P1.enableIn.k + 1; (16) [----] end if; (16) [----] end while; (16) [----] if (P1.enableIn.arcWeight[P1.enableIn.posTE] + P1.enableIn.arcWeightSum + P1.t_) - P1.maxMarks <= 1e-9 or abs(P1.enableIn.arcWeight[i]) <= 1e-8 then (16) [----] P1.enableIn.arcWeightSum := P1.enableIn.arcWeightSum + P1.enableIn.arcWeight[P1.enableIn.posTE]; (16) [----] P1.enableIn.TEin[P1.enableIn.posTE] := true; (16) [----] end if; (16) [----] P1.enableIn.nremTAin := P1.enableIn.nremTAin - 1; (16) [----] if P1.enableIn.nremTAin > 0 then (16) [----] P1.enableIn.remTAin := $FUN_20; (16) [----] P1.enableIn.cumEnablingProb := fill(0.0, 1); (16) [----] P1.enableIn.sumEnablingProbTAin := $FUN_17; (16) [----] if P1.enableIn.sumEnablingProbTAin > 0.0 then (16) [----] P1.enableIn.cumEnablingProb[1] := P1.enableIn.enablingProb[P1.enableIn.remTAin[1]] / P1.enableIn.sumEnablingProbTAin; (16) [----] for j in 2:P1.enableIn.nremTAin loop (16) [----] P1.enableIn.cumEnablingProb[j] := P1.enableIn.cumEnablingProb[j - 1] + P1.enableIn.enablingProb[P1.enableIn.remTAin[j]] / P1.enableIn.sumEnablingProbTAin; (16) [----] end for; (16) [----] elseif true then (16) [----] P1.enableIn.cumEnablingProb[1:P1.enableIn.nremTAin] := fill(1.0 / P1.enableIn.nremTAin, P1.enableIn.nremTAin); (16) [----] end if; (16) [----] end if; (16) [----] end for; (16) [----] end if; (16) [----] end if; (16) [----] end when; (16) [----] for i in 1:1 loop (16) [----] P1.enableIn.TEin_[i] := P1.enableIn.TEin[i] and P1.enableIn.active[i]; (16) [----] end for; (17) [ARRY] (3) P2.color = if settings.animatePlace then if $SEV_103 then {255.0, 255.0 - 2.55 * P2.tokenscale, 255.0 - 2.55 * P2.tokenscale} else {255.0, 0.0, 0.0} else {255.0, 255.0, 255.0} ($RES_SIM_24) (18) [SCAL] (1) P2.tokenscale = P2.pc_t * settings.scale ($RES_SIM_25) (19) [SCAL] (1) P2.pc_t = noEvent(if $SEV_104 then P2.minMarks else if $SEV_105 then P2.maxMarks else P2.t_) ($RES_SIM_26) (20) [SCAL] (1) P2.preFireIn[1] = if P2.disTransitionIn[1] then P2.fireIn[1] else $TEV_1 ($RES_SIM_27) (21) [SCAL] (1) P2.levelCon = (settings.M * P2.pc_t) / P2.N ($RES_SIM_28) (22) [ARRY] (1) P1.enableIn.TAein = $SEV_138 ($RES_BND_201) (23) [ARRY] (1) P1.enableIn.enablingPrio = P1.enablingPrioIn ($RES_BND_203) (24) [ARRY] (1) P1.enableIn.enablingProb = P1.enablingProbIn ($RES_BND_204) (25) [ARRY] (1) P1.enableIn.disTransition = P1.disTransitionIn ($RES_BND_205) (26) [ARRY] (1) P1.enableIn.active = P1.activeIn ($RES_BND_207) (27) [SCAL] (1) P2.disMarksInOut = $SEV_106 ($RES_SIM_30) (28) [ARRY] (1) P1.enableOut.arcWeight = P1.arcWeightOut ($RES_BND_208) (29) [SCAL] (1) P2.disMarkChange = P2.firingSumIn.disFiringSum ($RES_SIM_31) (30) [SCAL] (1) $DER.P2.t_ = P2.conMarkChange ($RES_SIM_32) (31) [SCAL] (1) P2.conMarkChange = P2.firingSumIn.conFiringSum ($RES_SIM_33) (32) [-IF-] (1)if $SEV_107 then (32) [----] [SCAL] (1) P2.firingSumIn.vec1[1] = P2.firingSumIn.arcWeight[1] * P2.firingSumIn.instSpeed[1] ($RES_SIM_40) (32) [----] else (32) [----] [SCAL] (1) P2.firingSumIn.vec1[1] = 0.0 ($RES_SIM_41) (32) [----] end if; (33) [ARRY] (1) P1.enableOut.TAout = P1.activeOut ($RES_BND_211) (34) [ARRY] (1) P1.enableOut.enablingPrio = P1.enablingPrioOut ($RES_BND_213) (35) [ARRY] (1) P1.enableOut.enablingProb = P1.enablingProbOut ($RES_BND_214) (36) [ARRY] (1) P1.enableOut.disTransition = P1.disTransitionOut ($RES_BND_215) (37) [ARRY] (1) P1.delayPassedOut.vec = $SEV_137 ($RES_BND_217) (38) [ARRY] (1) P1.delayPassedIn.vec = $SEV_136 ($RES_BND_218) (39) [ARRY] (1) P1.disMarksOut.vec = $SEV_135 ($RES_BND_219) (40) [-IF-] (1)if $SEV_108 then (40) [----] [SCAL] (1) P2.firingSumIn.vec2[1] = P2.firingSumIn.arcWeight[1] ($RES_SIM_43) (40) [----] else (40) [----] [SCAL] (1) P2.firingSumIn.vec2[1] = 0.0 ($RES_SIM_44) (40) [----] end if; (41) [FOR-] (2) ($RES_SIM_45) (41) [----] for $i1 in 1:2 loop (41) [----] [-IF-] (1)if T1.disPlaceOut[$i1] then (41) [----] [----] [SCAL] (1) T1.arcWeightIntOut[$i1] = integer(T1.arcWeightOut[$i1]) ($RES_SIM_47) (41) [----] [----] else (41) [----] [----] [SCAL] (1) T1.arcWeightIntOut[$i1] = 1 ($RES_SIM_48) (41) [----] [----] end if; (41) [----] end for; (42) [ARRY] (1) T1.activation.arcWeightIntIn = T1.arcWeightIntIn ($RES_BND_300) (43) [ARRY] (2) T1.activation.arcWeightIntOut = T1.arcWeightIntOut ($RES_BND_301) (44) [ARRY] (1) T1.activation.minTokens = T1.minTokens ($RES_BND_302) (45) [ARRY] (2) T1.activation.maxTokens = T1.maxTokens ($RES_BND_303) (46) [ARRY] (1) T1.activation.minTokensInt = T1.minTokensInt ($RES_BND_304) (47) [ARRY] (2) T1.activation.maxTokensInt = T1.maxTokensInt ($RES_BND_305) (48) [ARRY] (1) T1.activation.fed = T1.fed ($RES_BND_307) (49) [ARRY] (2) T1.activation.emptied = T1.emptied ($RES_BND_308) (50) [ARRY] (1) T1.activation.disPlaceIn = T1.disPlaceIn ($RES_BND_309) (51) [ARRY] (1) P1.disMarksIn.vec = $SEV_134 ($RES_BND_220) (52) [ARRY] (1) P1.feeding.vec = $SEV_133 ($RES_BND_221) (53) [ARRY] (1) P1.emptying.vec = $SEV_132 ($RES_BND_222) (54) [ARRY] (1) P1.firingSumIn.fire = P1.preFireIn ($RES_BND_223) (55) [ARRY] (1) P1.firingSumIn.arcWeight = P1.arcWeightIn ($RES_BND_224) (56) [ARRY] (1) P1.firingSumIn.instSpeed = P1.instSpeedIn ($RES_BND_225) (57) [ARRY] (1) P1.firingSumIn.disTransition = P1.disTransitionIn ($RES_BND_226) (58) [ARRY] (1) P1.firingSumOut.fire = P1.preFireOut ($RES_BND_227) (59) [ARRY] (1) P1.firingSumOut.arcWeight = P1.arcWeightOut ($RES_BND_228) (60) [ARRY] (1) P1.firingSumOut.instSpeed = P1.instSpeedOut ($RES_BND_229) (61) [-IF-] (1)if T1.disPlaceIn[1] then (61) [----] [SCAL] (1) T1.arcWeightIntIn[1] = integer(T1.arcWeightIn[1]) ($RES_SIM_54) (61) [----] else (61) [----] [SCAL] (1) T1.arcWeightIntIn[1] = 1 ($RES_SIM_55) (61) [----] end if; (62) [ARRY] (2) T1.activation.disPlaceOut = T1.disPlaceOut ($RES_BND_310) (63) [ARRY] (1) T1.activation.testValue = T1.testValue ($RES_BND_311) (64) [ARRY] (1) T1.activation.testValueInt = T1.testValueInt ($RES_BND_312) (65) [ARRY] (1) T1.activation.normalArc = T1.normalArc ($RES_BND_313) (66) [ARRY] (1) P2.inTransition.speedSum = {0.0} ($RES_BND_319) (67) [SCAL] (1) P2.inTransition[1].prelimSpeed = T1.outPlaces[2].prelimSpeed ($RES_SIM_100) (68) [SCAL] (1) P2.inTransition[1].maxTokensint = T1.outPlaces[2].maxTokensint ($RES_SIM_101) (69) [SCAL] (1) P2.inTransition[1].maxTokens = T1.outPlaces[2].maxTokens ($RES_SIM_102) (70) [SCAL] (1) P2.inTransition[1].maxSpeed = T1.outPlaces[2].maxSpeed ($RES_SIM_103) (71) [SCAL] (1) P2.inTransition[1].instSpeed = T1.outPlaces[2].instSpeed ($RES_SIM_104) (72) [SCAL] (1) $TEV_2 = $PRE.P1.fireIn[1] ($RES_EVT_400) (73) [SCAL] (1) P2.inTransition[1].fire = T1.outPlaces[2].fire ($RES_SIM_105) (74) [ARRY] (1) P1.firingSumOut.disTransition = P1.disTransitionOut ($RES_BND_230) (75) [SCAL] (1) $TEV_3 = $PRE.P1.fireOut[1] ($RES_EVT_401) (76) [SCAL] (1) P2.inTransition[1].enabledByInPlaces = T1.outPlaces[2].enabledByInPlaces ($RES_SIM_106) (77) [SCAL] (1) $TEV_4 = $PRE.P1.disMarksInOut ($RES_EVT_402) (78) [SCAL] (1) P2.inTransition[1].enable = T1.outPlaces[2].enable ($RES_SIM_107) (79) [ARRY] (1) T1.arcWeightIn = {3.0} ($RES_BND_232) (80) [SCAL] (1) $TEV_5 = $PRE.P1.enableIn.state128 ($RES_EVT_403) (81) [SCAL] (1) P2.inTransition[1].emptied = T1.outPlaces[2].emptied ($RES_SIM_108) (82) [ARRY] (2) T1.arcWeightOut = {2.0, 2.0} ($RES_BND_233) (83) [SCAL] (1) $TEV_6 = $PRE.P1.enableOut.state128 ($RES_EVT_404) (84) [SCAL] (1) P2.inTransition[1].disTransition = T1.outPlaces[2].disTransition ($RES_SIM_109) (85) [SCAL] (1) $TEV_7 = $PRE.P2.enableIn.state128 ($RES_EVT_405) (86) [SCAL] (1) T1.actualSpeed = if T1.fire then T1.instantaneousSpeed else 0.0 ($RES_BND_235) (87) [ARRY] (3) T1.color = if $SEV_113 then {255.0, 255.0, 0.0} else {255.0, 255.0, 255.0} ($RES_SIM_60) (88) [ARRY] (1) T1.inPlaces.maxSpeed = {1.0} ($RES_BND_238) (89) [SCAL] (1) T1.instantaneousSpeed = min(min(T1.decreasingFactorIn[1], min(T1.decreasingFactorOut)), T1.prelimSpeed) ($RES_SIM_61) (90) [SCAL] (1) $SEV_103 = P2.tokenscale < 100.0 ($RES_EVT_409) (91) [ARRY] (1) T1.inPlaces.prelimSpeed = {T1.prelimSpeed} ($RES_BND_239) (92) [SCAL] (1) T1.fire = $SEV_114 ($RES_SIM_62) (93) [ARRY] (1) P2.inTransition.emptied = {P2.emptying.anytrue} ($RES_BND_320) (94) [SCAL] (1) P2.inTransition[1].disPlace = false ($RES_BND_321) (95) [ARRY] (1) P2.inTransition.decreasingFactor = {P2.decFactorIn[1]} ($RES_BND_322) (96) [ARRY] (3) P1.color = if settings.animatePlace then if $SEV_120 then {255.0, 255.0 - 2.55 * P1.tokenscale, 255.0 - 2.55 * P1.tokenscale} else {255.0, 0.0, 0.0} else {255.0, 255.0, 255.0} ($RES_SIM_69) (97) [ARRY] (1) P2.inTransition.enable = {P2.enableIn.TEin_[1]} ($RES_BND_323) (98) [SCAL] (1) P2.inTransition[1].maxTokensint = 1 ($RES_BND_324) (99) [ARRY] (1) P2.inTransition.maxTokens = {P2.maxMarks} ($RES_BND_325) (100) [SCAL] (1) P2.inTransition[1].tint = 1 ($RES_BND_326) (101) [ARRY] (1) P2.inTransition.t = {P2.t_} ($RES_BND_327) (102) [ARRY] (1) P2.inTransition.maxSpeed = {P2.maxSpeedIn[1]} ($RES_BND_328) (103) [ARRY] (1) P2.inTransition.prelimSpeed = {P2.prelimSpeedIn[1]} ($RES_BND_329) (104) [SCAL] (1) P2.inTransition[1].disPlace = T1.outPlaces[2].disPlace ($RES_SIM_110) (105) [ARRY] (1) P1.inTransition.speedSum = {P1.firingSumOut.conFiringSum} ($RES_BND_159) (106) [SCAL] (1) P2.inTransition[1].decreasingFactor = T1.outPlaces[2].decreasingFactor ($RES_SIM_111) (107) [SCAL] (1) P2.inTransition[1].arcWeightint = T1.outPlaces[2].arcWeightint ($RES_SIM_112) (108) [SCAL] (1) P2.inTransition[1].arcWeight = T1.outPlaces[2].arcWeight ($RES_SIM_113) (109) [SCAL] (1) P2.inTransition[1].active = T1.outPlaces[2].active ($RES_SIM_114) (110) [SCAL] (1) $SEV_104 = P2.t_ < P2.minMarks ($RES_EVT_410) (111) [SCAL] (1) P1.inTransition[1].tint = T1.outPlaces[1].tint ($RES_SIM_115) (112) [ARRY] (1) T1.inPlaces.instSpeed = {T1.instantaneousSpeed} ($RES_BND_240) (113) [SCAL] (1) $SEV_105 = P2.t_ > P2.maxMarks ($RES_EVT_411) (114) [SCAL] (1) P1.inTransition[1].t = T1.outPlaces[1].t ($RES_SIM_116) (115) [SCAL] (1) T1.inPlaces[1].disTransition = false ($RES_BND_241) (116) [SCAL] (1) $SEV_106 = $PRE.P2.disMarksOut.anytrue or $PRE.P2.disMarksIn.anytrue ($RES_EVT_412) (117) [SCAL] (1) P1.inTransition[1].speedSum = T1.outPlaces[1].speedSum ($RES_SIM_117) (118) [ARRY] (1) T1.inPlaces.arcWeightint = {T1.arcWeightIntIn[1]} ($RES_BND_242) (119) [SCAL] (1) $SEV_107 = P2.firingSumIn.fire[1] and not P2.firingSumIn.disTransition[1] ($RES_EVT_413) (120) [SCAL] (1) P1.inTransition[1].prelimSpeed = T1.outPlaces[1].prelimSpeed ($RES_SIM_118) (121) [ARRY] (1) T1.inPlaces.arcWeight = {T1.arcWeightIn[1]} ($RES_BND_243) (122) [SCAL] (1) $SEV_108 = P2.firingSumIn.fire[1] and P2.firingSumIn.disTransition[1] ($RES_EVT_414) (123) [SCAL] (1) P1.inTransition[1].maxTokensint = T1.outPlaces[1].maxTokensint ($RES_SIM_119) (124) [ARRY] (1) T1.inPlaces.fire = {T1.fire} ($RES_BND_244) (125) [FOR-] (2) ($RES_EVT_415) (125) [----] for $i1 in 1:2 loop (125) [----] [SCAL] (1) $SEV_109[$i1] = T1.disPlaceOut[$i1] and T1.arcWeightOut[$i1] - T1.arcWeightIntOut[$i1] <= 0.0 or not T1.disPlaceOut[$i1] ($RES_EVT_416) (125) [----] end for; (126) [ARRY] (1) T1.inPlaces.active = {T1.activation.active} ($RES_BND_245) (127) [ARRY] (1) T1.inPlaces.normalArc = {T1.normalArc[1]} ($RES_BND_246) (128) [FOR-] (2) ($RES_EVT_417) (128) [----] for $i1 in 1:2 loop (128) [----] [SCAL] (1) $SEV_110[$i1] = T1.arcWeightOut[$i1] >= 0.0 ($RES_EVT_418) (128) [----] end for; (129) [ARRY] (1) T1.inPlaces.testValueint = {T1.testValueInt[1]} ($RES_BND_247) (130) [SCAL] (1) P1.tokenscale = P1.pc_t * settings.scale ($RES_SIM_70) (131) [ARRY] (1) T1.inPlaces.testValue = {T1.testValue[1]} ($RES_BND_248) (132) [SCAL] (1) P1.pc_t = noEvent(if $SEV_121 then P1.minMarks else if $SEV_122 then P1.maxMarks else P1.t_) ($RES_SIM_71) (133) [SCAL] (1) $SEV_111[1] = T1.disPlaceIn[1] and T1.arcWeightIn[1] - T1.arcWeightIntIn[1] <= 0.0 or not T1.disPlaceIn[1] ($RES_EVT_419) (134) [ARRY] (1) T1.inPlaces.speedSum = {T1.speedSumIn[1]} ($RES_BND_249) (135) [SCAL] (1) P1.preFireIn[1] = if P1.disTransitionIn[1] then P1.fireIn[1] else $TEV_2 ($RES_SIM_72) (136) [SCAL] (1) P1.preFireOut[1] = if P1.disTransitionOut[1] then P1.fireOut[1] else $TEV_3 ($RES_SIM_73) (137) [SCAL] (1) P1.levelCon = (settings.M * P1.pc_t) / P1.N ($RES_SIM_74) (138) [SCAL] (1) P1.disMarksInOut = $SEV_123 ($RES_SIM_76) (139) [ARRY] (1) P2.inTransition.instSpeed = {P2.instSpeedIn[1]} ($RES_BND_330) (140) [SCAL] (1) P1.disMarkChange = P1.firingSumIn.disFiringSum - P1.firingSumOut.disFiringSum ($RES_SIM_77) (141) [ARRY] (1) P2.inTransition.disTransition = {P2.disTransitionIn[1]} ($RES_BND_331) (142) [SCAL] (1) $DER.P1.t_ = P1.conMarkChange ($RES_SIM_78) (143) [ARRY] (1) P2.inTransition.enabledByInPlaces = {P2.enabledByInPlaces[1]} ($RES_BND_332) (144) [SCAL] (1) P1.conMarkChange = P1.firingSumIn.conFiringSum - P1.firingSumOut.conFiringSum ($RES_SIM_79) (145) [ARRY] (1) P2.inTransition.arcWeight = {P2.arcWeightIn[1]} ($RES_BND_333) (146) [ARRY] (1) P2.inTransition.fire = {P2.fireIn[1]} ($RES_BND_334) (147) [ARRY] (1) P2.inTransition.active = {P2.activeIn[1]} ($RES_BND_335) (148) [ARRY] (1) P1.inTransition.emptied = {P1.emptying.anytrue} ($RES_BND_160) (149) [SCAL] (1) P1.inTransition[1].disPlace = false ($RES_BND_161) (150) [ARRY] (1) P2.enableIn.arcWeight = P2.arcWeightIn ($RES_BND_337) (151) [ARRY] (1) P1.inTransition.decreasingFactor = {P1.decFactorIn[1]} ($RES_BND_162) (152) [ARRY] (1) P2.decFactorIn = $FUN_11 ($RES_$AUX_397) (153) [ARRY] (1) P1.inTransition.enable = {P1.enableIn.TEin_[1]} ($RES_BND_163) (154) [ARRY] (1) P1.decFactorOut = $FUN_6 ($RES_$AUX_396) (155) [SCAL] (1) P1.inTransition[1].maxTokensint = 1 ($RES_BND_164) (156) [ARRY] (1) P1.decFactorIn = $FUN_5 ($RES_$AUX_395) (157) [ARRY] (1) P1.inTransition.maxTokens = {P1.maxMarks} ($RES_BND_165) (158) [SCAL] (1) P1.inTransition[1].tint = 1 ($RES_BND_166) (159) [ARRY] (1) P1.inTransition.t = {P1.t_} ($RES_BND_167) (160) [ARRY] (1) P1.inTransition.maxSpeed = {P1.maxSpeedIn[1]} ($RES_BND_168) (161) [ARRY] (1) P1.inTransition.prelimSpeed = {P1.prelimSpeedIn[1]} ($RES_BND_169) (162) [SCAL] (1) P1.firingSumIn.conFiringSum = sum(P1.firingSumIn.vec1) ($RES_$AUX_390) (163) [SCAL] (1) P1.inTransition[1].maxTokens = T1.outPlaces[1].maxTokens ($RES_SIM_120) (164) [SCAL] (1) P1.inTransition[1].maxSpeed = T1.outPlaces[1].maxSpeed ($RES_SIM_121) (165) [SCAL] (1) P1.inTransition[1].instSpeed = T1.outPlaces[1].instSpeed ($RES_SIM_122) (166) [SCAL] (1) P1.inTransition[1].fire = T1.outPlaces[1].fire ($RES_SIM_123) (167) [SCAL] (1) P1.inTransition[1].enabledByInPlaces = T1.outPlaces[1].enabledByInPlaces ($RES_SIM_124) (168) [SCAL] (1) $SEV_112[1] = T1.arcWeightIn[1] >= 0.0 ($RES_EVT_420) (169) [ARRY] (1) T1.inPlaces.fed = {T1.fed[1]} ($RES_BND_250) (170) [SCAL] (1) P1.inTransition[1].enable = T1.outPlaces[1].enable ($RES_SIM_125) (171) [SCAL] (1) $SEV_113 = T1.fire and settings.animateTransition ($RES_EVT_421) (172) [ARRY] (1) T1.inPlaces.arcType = {T1.arcType[1]} ($RES_BND_251) (173) [SCAL] (1) P1.inTransition[1].emptied = T1.outPlaces[1].emptied ($RES_SIM_126) (174) [SCAL] (1) $SEV_114 = T1.fire_ and T1.activation.active ($RES_EVT_422) (175) [ARRY] (1) T1.inPlaces.disPlace = {T1.disPlaceIn[1]} ($RES_BND_252) (176) [SCAL] (1) P1.inTransition[1].disTransition = T1.outPlaces[1].disTransition ($RES_SIM_127) (177) [ARRY] (1) T1.inPlaces.decreasingFactor = {T1.decreasingFactorIn[1]} ($RES_BND_253) (178) [SCAL] (1) P1.inTransition[1].disPlace = T1.outPlaces[1].disPlace ($RES_SIM_128) (179) [ARRY] (1) T1.inPlaces.enable = {T1.enableIn[1]} ($RES_BND_254) (180) [SCAL] (1) P1.inTransition[1].decreasingFactor = T1.outPlaces[1].decreasingFactor ($RES_SIM_129) (181) [ARRY] (1) T1.inPlaces.minTokensint = {T1.minTokensInt[1]} ($RES_BND_255) (182) [ARRY] (1) T1.inPlaces.minTokens = {T1.minTokens[1]} ($RES_BND_256) (183) [ARRY] (1) T1.inPlaces.tint = {T1.tIntIn[1]} ($RES_BND_257) (184) [SCAL] (1) $SEV_120 = P1.tokenscale < 100.0 ($RES_EVT_428) (185) [ARRY] (1) T1.inPlaces.t = {T1.tIn[1]} ($RES_BND_258) (186) [SCAL] (1) $SEV_121 = P1.t_ < P1.minMarks ($RES_EVT_429) (187) [FOR-] (2) ($RES_BND_259) (187) [----] for $i1 in 1:2 loop (187) [----] [SCAL] (1) T1.outPlaces[$i1].maxSpeed = 1.0 ($RES_BND_260) (187) [----] end for; (188) [-IF-] (1)if $SEV_124 then (188) [----] [SCAL] (1) P1.firingSumOut.vec1[1] = P1.firingSumOut.arcWeight[1] * P1.firingSumOut.instSpeed[1] ($RES_SIM_84) (188) [----] else (188) [----] [SCAL] (1) P1.firingSumOut.vec1[1] = 0.0 ($RES_SIM_85) (188) [----] end if; (189) [-IF-] (1)if $SEV_125 then (189) [----] [SCAL] (1) P1.firingSumOut.vec2[1] = P1.firingSumOut.arcWeight[1] ($RES_SIM_87) (189) [----] else (189) [----] [SCAL] (1) P1.firingSumOut.vec2[1] = 0.0 ($RES_SIM_88) (189) [----] end if; (190) [ARRY] (1) P2.enableIn.TAein = $SEV_131 ($RES_BND_340) (191) [ARRY] (1) P2.enableIn.enablingPrio = P2.enablingPrioIn ($RES_BND_342) (192) [ARRY] (1) P2.enableIn.enablingProb = P2.enablingProbIn ($RES_BND_343) (193) [ARRY] (1) P2.enableIn.disTransition = P2.disTransitionIn ($RES_BND_344) (194) [ARRY] (1) P1.inTransition.instSpeed = {P1.instSpeedIn[1]} ($RES_BND_170) (195) [SCAL] (1) P1.firingSumIn.disFiringSum = sum(P1.firingSumIn.vec2) ($RES_$AUX_389) (196) [ARRY] (1) P2.enableIn.active = P2.activeIn ($RES_BND_346) (197) [ARRY] (1) P1.inTransition.disTransition = {P1.disTransitionIn[1]} ($RES_BND_171) (198) [SCAL] (1) P1.firingSumOut.conFiringSum = sum(P1.firingSumOut.vec1) ($RES_$AUX_388) (199) [ARRY] (1) P1.inTransition.enabledByInPlaces = {P1.enabledByInPlaces[1]} ($RES_BND_172) (200) [SCAL] (1) P1.firingSumOut.disFiringSum = sum(P1.firingSumOut.vec2) ($RES_$AUX_387) (201) [ARRY] (1) P1.inTransition.arcWeight = {P1.arcWeightIn[1]} ($RES_BND_173) (202) [TUPL] (2) ($FUN_5, $FUN_6) = PNlib.Functions.decreasingFactor(1, 1, P1.t_, P1.minMarks, P1.maxMarks, P1.firingSumIn.conFiringSum, P1.firingSumOut.conFiringSum, P1.maxSpeedIn, P1.maxSpeedOut, P1.prelimSpeedIn, P1.prelimSpeedOut, P1.arcWeightIn, P1.arcWeightOut, $SEV_139, $SEV_140) ($RES_$AUX_386) (203) [ARRY] (1) P1.inTransition.fire = {P1.fireIn[1]} ($RES_BND_174) (204) [SCAL] (1) T1.prelimSpeed = PNlib.Functions.preliminarySpeed(1, 2, T1.arcWeightIn, T1.arcWeightOut, T1.speedSumIn, T1.speedSumOut, 1.0, T1.activation.weaklyInputActiveVec, T1.activation.weaklyOutputActiveVec) ($RES_$AUX_385) (205) [ARRY] (1) P1.inTransition.active = {P1.activeIn[1]} ($RES_BND_175) (206) [SCAL] (1) P2.firingSumIn.conFiringSum = sum(P2.firingSumIn.vec1) ($RES_$AUX_384) (207) [SCAL] (1) P1.outTransition[1].normalArc = false ($RES_BND_176) (208) [SCAL] (1) P2.firingSumIn.disFiringSum = sum(P2.firingSumIn.vec2) ($RES_$AUX_383) (209) [SCAL] (1) P1.outTransition[1].testValueint = -1 ($RES_BND_177) (210) [SCAL] (1) P1.outTransition[1].testValue = -1.0 ($RES_BND_178) (211) [TUPL] (1) ($FUN_11, $FUN_12) = PNlib.Functions.decreasingFactor(1, 0, P2.t_, P2.minMarks, P2.maxMarks, P2.firingSumIn.conFiringSum, 0.0, P2.maxSpeedIn, {}, P2.prelimSpeedIn, {}, P2.arcWeightIn, {}, $SEV_141, {}) ($RES_$AUX_381) (212) [SCAL] (1) P1.inTransition[1].arcWeightint = T1.outPlaces[1].arcWeightint ($RES_SIM_130) (213) [ARRY] (1) P1.outTransition.tokenInOut = {$TEV_4} ($RES_BND_179) (214) [ARRY] (1) $FUN_13 = PNlib.Functions.OddsAndEnds.boolAnd(P1.enableIn.TAein, P1.enableIn.disTransition) ($RES_$AUX_380) (215) [SCAL] (1) P1.inTransition[1].arcWeight = T1.outPlaces[1].arcWeight ($RES_SIM_131) (216) [SCAL] (1) P1.inTransition[1].active = T1.outPlaces[1].active ($RES_SIM_132) (217) [SCAL] (1) P1.outTransition[1].tokenInOut = T1.inPlaces[1].tokenInOut ($RES_SIM_133) (218) [SCAL] (1) P1.outTransition[1].tint = T1.inPlaces[1].tint ($RES_SIM_134) (219) [SCAL] (1) $SEV_122 = P1.t_ > P1.maxMarks ($RES_EVT_430) (220) [SCAL] (1) P1.outTransition[1].testValueint = T1.inPlaces[1].testValueint ($RES_SIM_135) (221) [SCAL] (1) $SEV_123 = $PRE.P1.disMarksOut.anytrue or $PRE.P1.disMarksIn.anytrue ($RES_EVT_431) (222) [SCAL] (1) P1.outTransition[1].testValue = T1.inPlaces[1].testValue ($RES_SIM_136) (223) [FOR-] (2) ($RES_BND_261) (223) [----] for $i1 in 1:2 loop (223) [----] [SCAL] (1) T1.outPlaces[$i1].prelimSpeed = T1.prelimSpeed ($RES_BND_262) (223) [----] end for; (224) [SCAL] (1) $SEV_124 = P1.firingSumOut.fire[1] and not P1.firingSumOut.disTransition[1] ($RES_EVT_432) (225) [SCAL] (1) P1.outTransition[1].t = T1.inPlaces[1].t ($RES_SIM_137) (226) [SCAL] (1) $SEV_125 = P1.firingSumOut.fire[1] and P1.firingSumOut.disTransition[1] ($RES_EVT_433) (227) [SCAL] (1) P1.outTransition[1].speedSum = T1.inPlaces[1].speedSum ($RES_SIM_138) (228) [FOR-] (2) ($RES_BND_263) (228) [----] for $i1 in 1:2 loop (228) [----] [SCAL] (1) T1.outPlaces[$i1].instSpeed = T1.instantaneousSpeed ($RES_BND_264) (228) [----] end for; (229) [SCAL] (1) $SEV_126 = P1.firingSumIn.fire[1] and not P1.firingSumIn.disTransition[1] ($RES_EVT_434) (230) [SCAL] (1) P1.outTransition[1].prelimSpeed = T1.inPlaces[1].prelimSpeed ($RES_SIM_139) (231) [SCAL] (1) $SEV_127 = P1.firingSumIn.fire[1] and P1.firingSumIn.disTransition[1] ($RES_EVT_435) (232) [FOR-] (2) ($RES_BND_265) (232) [----] for $i1 in 1:2 loop (232) [----] [SCAL] (1) T1.outPlaces[$i1].disTransition = false ($RES_BND_266) (232) [----] end for; (233) [SCAL] (1) $SEV_128 = P2.preFireIn and not P2.disTransitionIn ($RES_EVT_436) (234) [SCAL] (1) $SEV_129 = P2.fireIn and P2.disTransitionIn ($RES_EVT_437) (235) [FOR-] (2) ($RES_BND_267) (235) [----] for $i1 in 1:2 loop (235) [----] [SCAL] (1) T1.outPlaces[$i1].enabledByInPlaces = true ($RES_BND_268) (235) [----] end for; (236) [SCAL] (1) $SEV_130 = P2.activeIn and P2.disTransitionIn ($RES_EVT_438) (237) [-IF-] (1)if $SEV_126 then (237) [----] [SCAL] (1) P1.firingSumIn.vec1[1] = P1.firingSumIn.arcWeight[1] * P1.firingSumIn.instSpeed[1] ($RES_SIM_92) (237) [----] else (237) [----] [SCAL] (1) P1.firingSumIn.vec1[1] = 0.0 ($RES_SIM_93) (237) [----] end if; (238) [SCAL] (1) $SEV_131 = P2.enabledByInPlaces and P2.activeIn ($RES_EVT_439) (239) [FOR-] (2) ($RES_BND_269) (239) [----] for $i1 in 1:2 loop (239) [----] [SCAL] (1) T1.outPlaces[$i1].arcWeightint = T1.arcWeightIntOut[$i1] ($RES_BND_270) (239) [----] end for; (240) [-IF-] (1)if $SEV_127 then (240) [----] [SCAL] (1) P1.firingSumIn.vec2[1] = P1.firingSumIn.arcWeight[1] ($RES_SIM_95) (240) [----] else (240) [----] [SCAL] (1) P1.firingSumIn.vec2[1] = 0.0 ($RES_SIM_96) (240) [----] end if; (241) [SCAL] (1) P2.inTransition[1].tint = T1.outPlaces[2].tint ($RES_SIM_97) (242) [ARRY] (1) P2.delayPassedIn.vec = $SEV_130 ($RES_BND_351) (243) [SCAL] (1) P2.inTransition[1].t = T1.outPlaces[2].t ($RES_SIM_98) (244) [ARRY] (1) P2.disMarksIn.vec = $SEV_129 ($RES_BND_352) (245) [SCAL] (1) P2.inTransition[1].speedSum = T1.outPlaces[2].speedSum ($RES_SIM_99) (246) [ARRY] (1) P2.feeding.vec = $SEV_128 ($RES_BND_353) (247) [ARRY] (1) P2.firingSumIn.fire = P2.preFireIn ($RES_BND_354) (248) [ARRY] (1) P2.firingSumIn.arcWeight = P2.arcWeightIn ($RES_BND_355) (249) [ARRY] (1) P1.outTransition.speedSum = {P1.firingSumIn.conFiringSum} ($RES_BND_180) (250) [SCAL] (1) $FUN_14 = PNlib.Functions.OddsAndEnds.conditionalSum(P1.enableIn.arcWeight, P1.enableIn.disTAin) ($RES_$AUX_379) (251) [ARRY] (1) P2.firingSumIn.instSpeed = P2.instSpeedIn ($RES_BND_356) (252) [ARRY] (1) P1.outTransition.fed = {P1.feeding.anytrue} ($RES_BND_181) (253) [ARRY] (1) $FUN_15 = PNlib.Functions.OddsAndEnds.boolAnd(P1.enableIn.TAein, not P1.enableIn.disTransition) ($RES_$AUX_378) (254) [ARRY] (1) P2.firingSumIn.disTransition = P2.disTransitionIn ($RES_BND_357) (255) [SCAL] (1) P1.outTransition[1].arcType = PNlib.Types.ArcType.NormalArc ($RES_BND_182) (256) [SCAL] (1) $FUN_16 = Modelica.Math.Vectors.find(i, P1.enableIn.enablingPrio, 0.0) ($RES_$AUX_377) (257) [SCAL] (1) P1.outTransition[1].disPlace = false ($RES_BND_183) (258) [SCAL] (1) $FUN_17 = sum(P1.enableIn.enablingProb[P1.enableIn.remTAin[1:P1.enableIn.nremTAin]]) ($RES_$AUX_376) (259) [ARRY] (1) P1.outTransition.decreasingFactor = {P1.decFactorOut[1]} ($RES_BND_184) (260) [TUPL] (5) ($FUN_18, $FUN_19) = Modelica.Math.Random.Generators.Xorshift128plus.random($TEV_5) ($RES_$AUX_375) (261) [ARRY] (1) P1.outTransition.enable = {P1.enableOut.TEout_[1]} ($RES_BND_185) (262) [ARRY] (1) $FUN_20 = PNlib.Functions.OddsAndEnds.deleteElementInt(P1.enableIn.remTAin, P1.enableIn.k) ($RES_$AUX_374) (263) [SCAL] (1) P1.outTransition[1].minTokensint = 1 ($RES_BND_186) (264) [ARRY] (1) $FUN_21 = PNlib.Functions.OddsAndEnds.boolAnd(P1.enableOut.TAout, P1.enableOut.disTransition) ($RES_$AUX_373) (265) [ARRY] (1) P1.outTransition.minTokens = {P1.minMarks} ($RES_BND_187) (266) [SCAL] (1) $FUN_22 = PNlib.Functions.OddsAndEnds.conditionalSum(P1.enableOut.arcWeight, P1.enableOut.disTAout) ($RES_$AUX_372) (267) [SCAL] (1) P1.outTransition[1].tint = 1 ($RES_BND_188) (268) [ARRY] (1) $FUN_23 = PNlib.Functions.OddsAndEnds.boolAnd(P1.enableOut.TAout, not P1.enableOut.disTransition) ($RES_$AUX_371) (269) [SCAL] (1) P1.outTransition[1].normalArc = T1.inPlaces[1].normalArc ($RES_SIM_140) (270) [ARRY] (1) P1.outTransition.t = {P1.t_} ($RES_BND_189) (271) [SCAL] (1) $FUN_24 = Modelica.Math.Vectors.find(i, P1.enableOut.enablingPrio, 0.0) ($RES_$AUX_370) (272) [SCAL] (1) P1.outTransition[1].minTokensint = T1.inPlaces[1].minTokensint ($RES_SIM_141) (273) [SCAL] (1) P1.outTransition[1].minTokens = T1.inPlaces[1].minTokens ($RES_SIM_142) (274) [SCAL] (1) P1.outTransition[1].maxSpeed = T1.inPlaces[1].maxSpeed ($RES_SIM_143) (275) [SCAL] (1) P1.outTransition[1].instSpeed = T1.inPlaces[1].instSpeed ($RES_SIM_144) (276) [SCAL] (1) $SEV_132 = P1.preFireOut and not P1.disTransitionOut ($RES_EVT_440) (277) [SCAL] (1) P1.outTransition[1].fire = T1.inPlaces[1].fire ($RES_SIM_145) (278) [SCAL] (1) $SEV_133 = P1.preFireIn and not P1.disTransitionIn ($RES_EVT_441) (279) [SCAL] (1) P1.outTransition[1].fed = T1.inPlaces[1].fed ($RES_SIM_146) (280) [FOR-] (2) ($RES_BND_271) (280) [----] for $i1 in 1:2 loop (280) [----] [SCAL] (1) T1.outPlaces[$i1].arcWeight = T1.arcWeightOut[$i1] ($RES_BND_272) (280) [----] end for; (281) [SCAL] (1) $SEV_134 = P1.fireIn and P1.disTransitionIn ($RES_EVT_442) (282) [SCAL] (1) P1.outTransition[1].enable = T1.inPlaces[1].enable ($RES_SIM_147) (283) [SCAL] (1) $SEV_135 = P1.fireOut and P1.disTransitionOut ($RES_EVT_443) (284) [SCAL] (1) P1.outTransition[1].disTransition = T1.inPlaces[1].disTransition ($RES_SIM_148) (285) [FOR-] (2) ($RES_BND_273) (285) [----] for $i1 in 1:2 loop (285) [----] [SCAL] (1) T1.outPlaces[$i1].fire = T1.fire ($RES_BND_274) (285) [----] end for; (286) [SCAL] (1) $SEV_136 = P1.activeIn and P1.disTransitionIn ($RES_EVT_444) (287) [SCAL] (1) P1.outTransition[1].disPlace = T1.inPlaces[1].disPlace ($RES_SIM_149) (288) [SCAL] (1) $SEV_137 = P1.activeOut and P1.disTransitionOut ($RES_EVT_445) (289) [FOR-] (2) ($RES_BND_275) (289) [----] for $i1 in 1:2 loop (289) [----] [SCAL] (1) T1.outPlaces[$i1].active = T1.activation.active ($RES_BND_276) (289) [----] end for; (290) [SCAL] (1) $SEV_138 = P1.enabledByInPlaces and P1.activeIn ($RES_EVT_446) (291) [SCAL] (1) $SEV_139 = P1.fireIn and not P1.disTransitionIn ($RES_EVT_447) (292) [FOR-] (2) ($RES_BND_277) (292) [----] for $i1 in 1:2 loop (292) [----] [SCAL] (1) T1.outPlaces[$i1].speedSum = T1.speedSumOut[$i1] ($RES_BND_278) (292) [----] end for; (293) [SCAL] (1) $SEV_140 = P1.fireOut and not P1.disTransitionOut ($RES_EVT_448) (294) [SCAL] (1) $SEV_141 = P2.fireIn and not P2.disTransitionIn ($RES_EVT_449) (295) [FOR-] (2) ($RES_BND_279) (295) [----] for $i1 in 1:2 loop (295) [----] [SCAL] (1) T1.outPlaces[$i1].emptied = T1.emptied[$i1] ($RES_BND_280) (295) [----] end for; (296) [ARRY] (1) P1.outTransition.maxSpeed = {P1.maxSpeedOut[1]} ($RES_BND_190) (297) [SCAL] (1) $FUN_25 = sum(P1.enableOut.enablingProb[P1.enableOut.remTAout[1:P1.enableOut.nremTAout]]) ($RES_$AUX_369) (298) [ARRY] (1) P1.outTransition.prelimSpeed = {P1.prelimSpeedOut[1]} ($RES_BND_191) (299) [TUPL] (5) ($FUN_26, $FUN_27) = Modelica.Math.Random.Generators.Xorshift128plus.random($TEV_6) ($RES_$AUX_368) (300) [ARRY] (1) P1.outTransition.instSpeed = {P1.instSpeedOut[1]} ($RES_BND_192) (301) [ARRY] (1) $FUN_28 = PNlib.Functions.OddsAndEnds.deleteElementInt(P1.enableOut.remTAout, P1.enableOut.k) ($RES_$AUX_367) (302) [ARRY] (1) P1.outTransition.disTransition = {P1.disTransitionOut[1]} ($RES_BND_193) (303) [ARRY] (1) $FUN_29 = PNlib.Functions.OddsAndEnds.boolAnd(P2.enableIn.TAein, P2.enableIn.disTransition) ($RES_$AUX_366) (304) [ARRY] (1) P1.outTransition.arcWeight = {P1.arcWeightOut[1]} ($RES_BND_194) (305) [SCAL] (1) $FUN_30 = PNlib.Functions.OddsAndEnds.conditionalSum(P2.enableIn.arcWeight, P2.enableIn.disTAin) ($RES_$AUX_365) (306) [ARRY] (1) P1.outTransition.fire = {P1.fireOut[1]} ($RES_BND_195) (307) [ARRY] (1) $FUN_31 = PNlib.Functions.OddsAndEnds.boolAnd(P2.enableIn.TAein, not P2.enableIn.disTransition) ($RES_$AUX_364) (308) [ARRY] (1) P1.outTransition.active = {P1.activeOut[1]} ($RES_BND_196) (309) [SCAL] (1) $FUN_32 = Modelica.Math.Vectors.find(i, P2.enableIn.enablingPrio, 0.0) ($RES_$AUX_363) (310) [SCAL] (1) $FUN_33 = sum(P2.enableIn.enablingProb[P2.enableIn.remTAin[1:P2.enableIn.nremTAin]]) ($RES_$AUX_362) (311) [ARRY] (1) P1.enableIn.arcWeight = P1.arcWeightIn ($RES_BND_198) (312) [TUPL] (5) ($FUN_34, $FUN_35) = Modelica.Math.Random.Generators.Xorshift128plus.random($TEV_7) ($RES_$AUX_361) (313) [SCAL] (1) P1.outTransition[1].decreasingFactor = T1.inPlaces[1].decreasingFactor ($RES_SIM_150) (314) [ARRY] (1) $FUN_36 = PNlib.Functions.OddsAndEnds.deleteElementInt(P2.enableIn.remTAin, P2.enableIn.k) ($RES_$AUX_360) (315) [SCAL] (1) P1.outTransition[1].arcWeightint = T1.inPlaces[1].arcWeightint ($RES_SIM_151) (316) [SCAL] (1) P1.outTransition[1].arcWeight = T1.inPlaces[1].arcWeight ($RES_SIM_152) (317) [SCAL] (1) P1.outTransition[1].arcType = T1.inPlaces[1].arcType ($RES_SIM_153) (318) [SCAL] (1) P1.outTransition[1].active = T1.inPlaces[1].active ($RES_SIM_154) (319) [FOR-] (2) ($RES_BND_281) (319) [----] for $i1 in 1:2 loop (319) [----] [SCAL] (1) T1.outPlaces[$i1].disPlace = T1.disPlaceOut[$i1] ($RES_BND_282) (319) [----] end for; (320) [FOR-] (2) ($RES_BND_283) (320) [----] for $i1 in 1:2 loop (320) [----] [SCAL] (1) T1.outPlaces[$i1].decreasingFactor = T1.decreasingFactorOut[$i1] ($RES_BND_284) (320) [----] end for; (321) [FOR-] (2) ($RES_BND_285) (321) [----] for $i1 in 1:2 loop (321) [----] [SCAL] (1) T1.outPlaces[$i1].maxTokensint = T1.maxTokensInt[$i1] ($RES_BND_286) (321) [----] end for; (322) [FOR-] (2) ($RES_BND_287) (322) [----] for $i1 in 1:2 loop (322) [----] [SCAL] (1) T1.outPlaces[$i1].maxTokens = T1.maxTokens[$i1] ($RES_BND_288) (322) [----] end for; (323) [FOR-] (2) ($RES_BND_289) (323) [----] for $i1 in 1:2 loop (323) [----] [SCAL] (1) T1.outPlaces[$i1].tint = T1.tIntOut[$i1] ($RES_BND_290) (323) [----] end for; (324) [ARRY] (1) $FUN_37 = PNlib.Functions.OddsAndEnds.boolOr(T1.enableIn, not T1.disPlaceIn) ($RES_$AUX_359) (325) [SCAL] (1) T1.fire_ = PNlib.Functions.OddsAndEnds.allTrue($FUN_37) ($RES_$AUX_358) (326) [FOR-] (2) ($RES_BND_291) (326) [----] for $i1 in 1:2 loop (326) [----] [SCAL] (1) T1.outPlaces[$i1].t = T1.tOut[$i1] ($RES_BND_292) (326) [----] end for; (327) [ARRY] (1) T1.activation.tIn = T1.tIn ($RES_BND_293) (328) [ARRY] (2) T1.activation.tOut = T1.tOut ($RES_BND_294) (329) [ARRY] (1) T1.activation.tIntIn = T1.tIntIn ($RES_BND_295) (330) [ARRY] (2) T1.activation.tIntOut = T1.tIntOut ($RES_BND_296) (331) [ARRY] (1) T1.activation.arcType = T1.arcType ($RES_BND_297) (332) [ARRY] (1) T1.activation.arcWeightIn = T1.arcWeightIn ($RES_BND_298) (333) [ARRY] (2) T1.activation.arcWeightOut = T1.arcWeightOut ($RES_BND_299)