Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr PNlib_PNlib.Examples.Models.BicoloredPlaces.Aquarium.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.1.0+maint.om/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.1.0+maint.om/package.mo): time 0.001266/0.001266, allocations: 73.17 kB / 9.984 MB, free: 0.6992 MB / 10.45 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.001963/0.003228, allocations: 455.9 kB / 10.43 MB, free: 260 kB / 10.45 MB " [Timeout remaining time 180] loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.1.0+maint.om/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.1.0+maint.om/package.mo): time 0.001072/0.001072, allocations: 165.2 kB / 11.34 MB, free: 2.832 MB / 13.93 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.001645/0.002717, allocations: 475.6 kB / 11.8 MB, free: 2.363 MB / 13.93 MB " [Timeout remaining time 180] loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0+maint.om/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0+maint.om/package.mo): time 1.056/1.056, allocations: 177.2 MB / 189.7 MB, free: 5.254 MB / 186.7 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.1012/1.157, allocations: 53.66 MB / 243.4 MB, free: 15.52 MB / 250.7 MB " [Timeout remaining time 179] loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/PNlib 3.0.0-master/package.mo", uses=false) [Timeout 180] "Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PNlib 3.0.0-master/package.mo): time 0.0496/0.0496, allocations: 12.67 MB / 256.8 MB, free: 2.266 MB / 250.7 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.01124/0.06083, allocations: 4.683 MB / 261.5 MB, free: 13.57 MB / 266.7 MB " [Timeout remaining time 180] 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.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.1.0+maint.om/package.mo) Using package Complex with version 4.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.1.0+maint.om/package.mo) Using package ModelicaServices with version 4.1.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.1.0+maint.om/package.mo) Running command: translateModel(PNlib.Examples.Models.BicoloredPlaces.Aquarium,tolerance=1e-06,outputFormat="mat",numberOfIntervals=2500,variableFilter="P1.color.[0-9,]+.|P1.t|P2.color.[0-9,]+.|P2.t|ratio|t1.fire|t1.instantaneousSpeed|t1.maximumSpeed|t2.fire|t2.instantaneousSpeed|t2.maximumSpeed|time",fileNamePrefix="PNlib_PNlib.Examples.Models.BicoloredPlaces.Aquarium") translateModel(PNlib.Examples.Models.BicoloredPlaces.Aquarium,tolerance=1e-06,outputFormat="mat",numberOfIntervals=2500,variableFilter="P1.color.[0-9,]+.|P1.t|P2.color.[0-9,]+.|P2.t|ratio|t1.fire|t1.instantaneousSpeed|t1.maximumSpeed|t2.fire|t2.instantaneousSpeed|t2.maximumSpeed|time",fileNamePrefix="PNlib_PNlib.Examples.Models.BicoloredPlaces.Aquarium") [Timeout 660] "Notification: Performance of FrontEnd - loaded program: time 2.064e-06/2.064e-06, allocations: 0 / 262.8 MB, free: 12.27 MB / 266.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.47e-05/2.676e-05, allocations: 2.312 kB / 262.8 MB, free: 12.27 MB / 266.7 MB Notification: Performance of NFInst.instantiate(PNlib.Examples.Models.BicoloredPlaces.Aquarium): time 0.006676/0.006703, allocations: 4.655 MB / 267.5 MB, free: 7.59 MB / 266.7 MB Notification: Performance of NFInst.instExpressions: time 0.007286/0.01399, allocations: 4.386 MB / 271.8 MB, free: 3.195 MB / 266.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.001395/0.01538, allocations: 39.75 kB / 271.9 MB, free: 3.156 MB / 266.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0009678/0.01635, allocations: 0.5896 MB / 272.5 MB, free: 2.562 MB / 266.7 MB Notification: Performance of NFTyping.typeBindings: time 0.001331/0.01768, allocations: 0.621 MB / 273.1 MB, free: 1.938 MB / 266.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.1518/0.1695, allocations: 2.178 MB / 275.3 MB, free: 3.645 MB / 266.7 MB Notification: Performance of NFFlatten.flatten: time 0.007657/0.1772, allocations: 6.177 MB / 281.4 MB, free: 2.664 MB / 266.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001226/0.1784, allocations: 0.8069 MB / 282.3 MB, free: 2.215 MB / 266.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.005757/0.1841, allocations: 3.825 MB / 286.1 MB, free: 272 kB / 266.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.004681/0.1888, allocations: 2.122 MB / 288.2 MB, free: 15.98 MB / 282.7 MB Notification: Performance of NFPackage.collectConstants: time 0.002412/0.1912, allocations: 0.5986 MB / 288.8 MB, free: 15.98 MB / 282.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.00254/0.1938, allocations: 1.16 MB / 290 MB, free: 15.86 MB / 282.7 MB Notification: Performance of NFScalarize.scalarize: time 0.001156/0.1949, allocations: 0.8603 MB / 290.8 MB, free: 15.64 MB / 282.7 MB Notification: Performance of NFVerifyModel.verify: time 0.002345/0.1973, allocations: 1.244 MB / 292.1 MB, free: 15.49 MB / 282.7 MB Notification: Performance of NFConvertDAE.convert: time 0.005239/0.2025, allocations: 4.282 MB / 296.3 MB, free: 11.84 MB / 282.7 MB Notification: Performance of FrontEnd - DAE generated: time 2.085e-05/0.2025, allocations: 0 / 296.3 MB, free: 11.84 MB / 282.7 MB Notification: Performance of FrontEnd: time 1.994e-06/0.2025, allocations: 0 / 296.3 MB, free: 11.84 MB / 282.7 MB Notification: Performance of Transformations before backend: time 0.000149/0.2027, allocations: 0 / 296.3 MB, free: 11.84 MB / 282.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 1091 * Number of variables: 1091 Notification: Performance of Generate backend data structure: time 0.006108/0.2088, allocations: 5.779 MB / 302.1 MB, free: 5.77 MB / 282.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.946e-05/0.2088, allocations: 13.25 kB / 302.1 MB, free: 5.758 MB / 282.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.002066/0.2109, allocations: 1.217 MB / 303.4 MB, free: 4.539 MB / 282.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001525/0.2124, allocations: 1.016 MB / 304.4 MB, free: 3.594 MB / 282.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.000688/0.2131, allocations: 1.282 MB / 305.7 MB, free: 2.09 MB / 282.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0004916/0.2136, allocations: 464.7 kB / 306.1 MB, free: 1.637 MB / 282.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.005561/0.2192, allocations: 6.07 MB / 312.2 MB, free: 11.11 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 5.614e-05/0.2192, allocations: 8.688 kB / 312.2 MB, free: 11.11 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0002884/0.2195, allocations: 207.9 kB / 312.4 MB, free: 10.91 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0003402/0.2199, allocations: 373.5 kB / 312.8 MB, free: 10.54 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.003873/0.2237, allocations: 3.77 MB / 316.5 MB, free: 6.566 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.01112/0.2349, allocations: 9.826 MB / 326.3 MB, free: 12.73 MB / 314.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001736/0.2366, allocations: 2.232 MB / 328.6 MB, free: 10.26 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001319/0.2379, allocations: 1.931 MB / 330.5 MB, free: 8.117 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.001363/0.2393, allocations: 0.9543 MB / 331.5 MB, free: 7.164 MB / 314.7 MB Error: An independent subset of the model has imbalanced number of equations (263) and variables (185). variables: t2.transition_.fire_ t2.transition_.activation.NoTokens t2.transition_.activation.weaklyOutputActiveVec[2] t2.transition_.activation.weaklyOutputActiveVec[1] t2.transition_.activation.weaklyInputActiveVec[2] t2.transition_.activation.weaklyInputActiveVec[1] t2.transition_.activation.active t2.transition_.activation.emptied[2] t2.transition_.activation.emptied[1] t2.transition_.activation.fed[2] t2.transition_.activation.fed[1] t2.transition_.activation.maxTokens[2] t2.transition_.activation.maxTokens[1] t2.transition_.activation.minTokens[2] t2.transition_.activation.minTokens[1] t2.transition_.activation.arcWeightIn[2] t2.transition_.activation.arcWeightIn[1] t2.transition_.activation.tOut[2] t2.transition_.activation.tOut[1] t2.transition_.activation.tIn[2] t2.transition_.activation.tIn[1] t2.transition_.color[3] t2.outPlaces[1,2].prelimSpeed t2.outPlaces[1,2].decreasingFactor t2.outPlaces[1,1].decreasingFactor t2.inPlaces[1,2].speedSum t2.inPlaces[1,2].decreasingFactor t2.inPlaces[1,1].decreasingFactor t2.actualSpeed t2.instantaneousSpeed t1.transition_.activation.NoTokens t1.transition_.activation.weaklyOutputActiveVec[2] t1.transition_.activation.weaklyOutputActiveVec[1] t1.transition_.activation.active t1.transition_.activation.emptied[2] t1.transition_.activation.emptied[1] t1.transition_.activation.maxTokens[2] t1.transition_.activation.maxTokens[1] t1.transition_.activation.tOut[2] t1.transition_.activation.tOut[1] t1.transition_.color[3] t1.outPlaces[1,2].prelimSpeed t1.outPlaces[1,2].speedSum t1.outPlaces[1,2].decreasingFactor t1.outPlaces[1,1].speedSum t1.outPlaces[1,1].decreasingFactor t1.actualSpeed t1.instantaneousSpeed P2.place2.emptying.numtrue P2.place2.emptying.anytrue P2.place2.feeding.numtrue P2.place2.feeding.anytrue P2.place2.feeding.vec[1] P2.place2.disMarksIn.numtrue P2.place2.disMarksIn.anytrue P2.place2.disMarksOut.numtrue P2.place2.disMarksOut.anytrue P2.place2.delayPassedIn.numtrue P2.place2.delayPassedIn.anytrue P2.place2.enableIn.Index P2.place2.enableIn.arcWeightSum P2.place2.enableIn.disTAin[1] P2.place2.enableIn.TEin[1] P2.place2.enableIn.TEin_[1] P2.place2.enableIn.active[1] P2.place2.enableIn.arcWeight[1] P2.place2.fireIn[1] P2.place2.disMarksInOut P2.place2.t_ P2.place2.tokenscale P2.place2.conMarkChange P2.place2.color[3] P2.place2.levelCon P2.place1.emptying.numtrue P2.place1.emptying.anytrue P2.place1.feeding.numtrue P2.place1.feeding.anytrue P2.place1.feeding.vec[1] P2.place1.disMarksIn.numtrue P2.place1.disMarksIn.anytrue P2.place1.disMarksOut.numtrue P2.place1.disMarksOut.anytrue P2.place1.delayPassedIn.numtrue P2.place1.delayPassedIn.anytrue P2.place1.enableIn.Index P2.place1.enableIn.arcWeightSum P2.place1.enableIn.disTAin[1] P2.place1.enableIn.TEin[1] P2.place1.enableIn.TEin_[1] P2.place1.enableIn.active[1] P2.place1.enableIn.arcWeight[1] P2.place1.fireIn[1] P2.place1.disMarksInOut P2.place1.t_ P2.place1.tokenscale P2.place1.conMarkChange P2.place1.color[3] P2.place1.levelCon P2.t P2.color[2] P2.color[1] P1.place2.emptying.numtrue P1.place2.emptying.anytrue P1.place2.emptying.vec[1] P1.place2.feeding.numtrue P1.place2.feeding.anytrue P1.place2.feeding.vec[1] P1.place2.disMarksIn.numtrue P1.place2.disMarksIn.anytrue P1.place2.disMarksOut.numtrue P1.place2.disMarksOut.anytrue P1.place2.delayPassedIn.numtrue P1.place2.delayPassedIn.anytrue P1.place2.delayPassedOut.numtrue P1.place2.delayPassedOut.anytrue P1.place2.enableOut.Index P1.place2.enableOut.arcWeightSum P1.place2.enableOut.disTAout[1] P1.place2.enableOut.TEout[1] P1.place2.enableOut.TEout_[1] P1.place2.enableOut.TAout[1] P1.place2.enableOut.arcWeight[1] P1.place2.enableIn.Index P1.place2.enableIn.arcWeightSum P1.place2.enableIn.disTAin[1] P1.place2.enableIn.TEin[1] P1.place2.enableIn.TEin_[1] P1.place2.enableIn.active[1] P1.place2.fireOut[1] P1.place2.fireIn[1] P1.place2.disMarksInOut P1.place2.t_ P1.place2.tokenscale P1.place2.conMarkChange P1.place2.color[3] P1.place2.levelCon P1.place1.emptying.numtrue P1.place1.emptying.anytrue P1.place1.emptying.vec[1] P1.place1.feeding.numtrue P1.place1.feeding.anytrue P1.place1.feeding.vec[1] P1.place1.disMarksIn.numtrue P1.place1.disMarksIn.anytrue P1.place1.disMarksOut.numtrue P1.place1.disMarksOut.anytrue P1.place1.delayPassedIn.numtrue P1.place1.delayPassedIn.anytrue P1.place1.delayPassedOut.numtrue P1.place1.delayPassedOut.anytrue P1.place1.enableOut.Index P1.place1.enableOut.arcWeightSum P1.place1.enableOut.disTAout[1] P1.place1.enableOut.TEout[1] P1.place1.enableOut.TEout_[1] P1.place1.enableOut.TAout[1] P1.place1.enableOut.arcWeight[1] P1.place1.enableIn.Index P1.place1.enableIn.arcWeightSum P1.place1.enableIn.disTAin[1] P1.place1.enableIn.TEin[1] P1.place1.enableIn.TEin_[1] P1.place1.enableIn.active[1] P1.place1.fireOut[1] P1.place1.fireIn[1] P1.place1.disMarksInOut P1.place1.t_ P1.place1.tokenscale P1.place1.color[3] P1.place1.levelCon P1.outTransition[1,2].tokenInOut P1.outTransition[1,1].tokenInOut P1.t P1.color[2] P1.color[1] $whenCondition8 $whenCondition7 $whenCondition6 $whenCondition5 $whenCondition4 $whenCondition3 $whenCondition9 $whenCondition10 $whenCondition11 $whenCondition12 equations: 1 : algorithm P1.place1.enableIn.TEin := {false}; $whenCondition3 := P1.place1.delayPassedIn.anytrue; when $whenCondition3 then P1.place1.enableIn.disTAin := PNlib.Functions.OddsAndEnds.boolAnd({P1.place2.enableIn.active[1]}, {false}); P1.place1.enableIn.arcWeightSum := PNlib.Functions.OddsAndEnds.conditionalSum(P1.place1.enableIn.arcWeight, P1.place1.enableIn.disTAin); if P1.place1.t_ + P1.place1.enableIn.arcWeightSum - P1.place1.maxMarks <= 1e-9 or noEvent(abs(P1.place1.enableIn.arcWeightSum) <= 1e-8) then P1.place1.enableIn.TEin := {P1.place2.enableIn.active[1]}; else P1.place1.enableIn.TEin := PNlib.Functions.OddsAndEnds.boolAnd({P1.place2.enableIn.active[1]}, not {false}); P1.place1.enableIn.arcWeightSum := 0.0; for i in 1:1 loop P1.place1.enableIn.Index := Modelica.Math.Vectors.find(/*Real*/(i), {1.0}, 0.0); if P1.place1.enableIn.Index > 0 and P1.place1.enableIn.disTAin[P1.place1.enableIn.Index] and (P1.place1.t_ + P1.place1.enableIn.arcWeightSum + P1.place1.enableIn.arcWeight[P1.place1.enableIn.Index] - P1.place1.maxMarks <= 1e-9 or noEvent(abs(P1.place1.enableIn.arcWeight[P1.place1.enableIn.Index]) <= 1e-8)) then P1.place1.enableIn.TEin[P1.place1.enableIn.Index] := true; P1.place1.enableIn.arcWeightSum := P1.place1.enableIn.arcWeightSum + P1.place1.enableIn.arcWeight[P1.place1.enableIn.Index]; end if; end for; end if; end when; for i in 1:1 loop P1.place1.enableIn.TEin_[i] := P1.place1.enableIn.TEin[i] and P1.place1.enableIn.active[i]; end for; 2 : algorithm P1.place1.enableOut.TEout := {false}; $whenCondition4 := P1.place1.delayPassedOut.anytrue; when $whenCondition4 then P1.place1.enableOut.disTAout := PNlib.Functions.OddsAndEnds.boolAnd(P1.place1.enableOut.TAout, {false}); P1.place1.enableOut.arcWeightSum := PNlib.Functions.OddsAndEnds.conditionalSum(P1.place1.enableOut.arcWeight, P1.place1.enableOut.disTAout); if P1.place1.t_ - P1.place1.enableOut.arcWeightSum - P1.place1.minMarks >= -1e-9 or noEvent(abs(P1.place1.enableOut.arcWeightSum) <= 1e-8) then P1.place1.enableOut.TEout := P1.place1.enableOut.TAout; else P1.place1.enableOut.TEout := PNlib.Functions.OddsAndEnds.boolAnd(P1.place1.enableOut.TAout, not {false}); P1.place1.enableOut.arcWeightSum := 0.0; for i in 1:1 loop P1.place1.enableOut.Index := Modelica.Math.Vectors.find(/*Real*/(i), {1.0}, 0.0); if P1.place1.enableOut.Index > 0 and P1.place1.enableOut.disTAout[P1.place1.enableOut.Index] and (P1.place1.t_ - P1.place1.enableOut.arcWeightSum - P1.place1.enableOut.arcWeight[P1.place1.enableOut.Index] - P1.place1.minMarks >= -1e-9 or noEvent(abs(P1.place1.enableOut.arcWeight[P1.place1.enableOut.Index]) <= 1e-8)) then P1.place1.enableOut.TEout[P1.place1.enableOut.Index] := true; P1.place1.enableOut.arcWeightSum := P1.place1.enableOut.arcWeightSum + P1.place1.enableOut.arcWeight[P1.place1.enableOut.Index]; end if; end for; end if; end when; for i in 1:1 loop P1.place1.enableOut.TEout_[i] := P1.place1.enableOut.TEout[i] and P1.place1.enableOut.TAout[i]; end for; 3 : algorithm P1.place1.delayPassedOut.anytrue := false; P1.place1.delayPassedOut.numtrue := 0; for i in 1:1 loop P1.place1.delayPassedOut.anytrue := P1.place1.delayPassedOut.anytrue or P1.place1.delayPassedOut.vec[i]; if P1.place1.delayPassedOut.vec[i] then P1.place1.delayPassedOut.numtrue := P1.place1.delayPassedOut.numtrue + 1; end if; end for; 4 : algorithm P1.place1.delayPassedIn.anytrue := false; P1.place1.delayPassedIn.numtrue := 0; for i in 1:1 loop P1.place1.delayPassedIn.anytrue := P1.place1.delayPassedIn.anytrue or P1.place1.delayPassedIn.vec[i]; if P1.place1.delayPassedIn.vec[i] then P1.place1.delayPassedIn.numtrue := P1.place1.delayPassedIn.numtrue + 1; end if; end for; 5 : algorithm P1.place1.disMarksOut.anytrue := false; P1.place1.disMarksOut.numtrue := 0; for i in 1:1 loop P1.place1.disMarksOut.anytrue := P1.place1.disMarksOut.anytrue or P1.place1.disMarksOut.vec[i]; if P1.place1.disMarksOut.vec[i] then P1.place1.disMarksOut.numtrue := P1.place1.disMarksOut.numtrue + 1; end if; end for; 6 : algorithm P1.place1.disMarksIn.anytrue := false; P1.place1.disMarksIn.numtrue := 0; for i in 1:1 loop P1.place1.disMarksIn.anytrue := P1.place1.disMarksIn.anytrue or P1.place1.disMarksIn.vec[i]; if P1.place1.disMarksIn.vec[i] then P1.place1.disMarksIn.numtrue := P1.place1.disMarksIn.numtrue + 1; end if; end for; 7 : algorithm P1.place1.feeding.anytrue := false; P1.place1.feeding.numtrue := 0; for i in 1:1 loop P1.place1.feeding.anytrue := P1.place1.feeding.anytrue or P1.place1.feeding.vec[i]; if P1.place1.feeding.vec[i] then P1.place1.feeding.numtrue := P1.place1.feeding.numtrue + 1; end if; end for; 8 : algorithm P1.place1.emptying.anytrue := false; P1.place1.emptying.numtrue := 0; for i in 1:1 loop P1.place1.emptying.anytrue := P1.place1.emptying.anytrue or P1.place1.emptying.vec[i]; if P1.place1.emptying.vec[i] then P1.place1.emptying.numtrue := P1.place1.emptying.numtrue + 1; end if; end for; 9 : algorithm P1.place2.enableIn.TEin := {false}; $whenCondition5 := P1.place2.delayPassedIn.anytrue; when $whenCondition5 then P1.place2.enableIn.disTAin := PNlib.Functions.OddsAndEnds.boolAnd({P1.place2.enableIn.active[1]}, {false}); P1.place2.enableIn.arcWeightSum := PNlib.Functions.OddsAndEnds.conditionalSum(P1.place2.enableIn.arcWeight, P1.place2.enableIn.disTAin); if P1.place2.t_ + P1.place2.enableIn.arcWeightSum - P1.place2.maxMarks <= 1e-9 or noEvent(abs(P1.place2.enableIn.arcWeightSum) <= 1e-8) then P1.place2.enableIn.TEin := {P1.place2.enableIn.active[1]}; else P1.place2.enableIn.TEin := PNlib.Functions.OddsAndEnds.boolAnd({P1.place2.enableIn.active[1]}, not {false}); P1.place2.enableIn.arcWeightSum := 0.0; for i in 1:1 loop P1.place2.enableIn.Index := Modelica.Math.Vectors.find(/*Real*/(i), {1.0}, 0.0); if P1.place2.enableIn.Index > 0 and P1.place2.enableIn.disTAin[P1.place2.enableIn.Index] and (P1.place2.t_ + P1.place2.enableIn.arcWeightSum + P1.place2.enableIn.arcWeight[P1.place2.enableIn.Index] - P1.place2.maxMarks <= 1e-9 or noEvent(abs(P1.place2.enableIn.arcWeight[P1.place2.enableIn.Index]) <= 1e-8)) then P1.place2.enableIn.TEin[P1.place2.enableIn.Index] := true; P1.place2.enableIn.arcWeightSum := P1.place2.enableIn.arcWeightSum + P1.place2.enableIn.arcWeight[P1.place2.enableIn.Index]; end if; end for; end if; end when; for i in 1:1 loop P1.place2.enableIn.TEin_[i] := P1.place2.enableIn.TEin[i] and P1.place2.enableIn.active[i]; end for; 10 : algorithm P1.place2.enableOut.TEout := {false}; $whenCondition6 := P1.place2.delayPassedOut.anytrue; when $whenCondition6 then P1.place2.enableOut.disTAout := PNlib.Functions.OddsAndEnds.boolAnd(P1.place2.enableOut.TAout, {false}); P1.place2.enableOut.arcWeightSum := PNlib.Functions.OddsAndEnds.conditionalSum(P1.place2.enableOut.arcWeight, P1.place2.enableOut.disTAout); if P1.place2.t_ - P1.place2.enableOut.arcWeightSum - P1.place2.minMarks >= -1e-9 or noEvent(abs(P1.place2.enableOut.arcWeightSum) <= 1e-8) then P1.place2.enableOut.TEout := P1.place2.enableOut.TAout; else P1.place2.enableOut.TEout := PNlib.Functions.OddsAndEnds.boolAnd(P1.place2.enableOut.TAout, not {false}); P1.place2.enableOut.arcWeightSum := 0.0; for i in 1:1 loop P1.place2.enableOut.Index := Modelica.Math.Vectors.find(/*Real*/(i), {1.0}, 0.0); if P1.place2.enableOut.Index > 0 and P1.place2.enableOut.disTAout[P1.place2.enableOut.Index] and (P1.place2.t_ - P1.place2.enableOut.arcWeightSum - P1.place2.enableOut.arcWeight[P1.place2.enableOut.Index] - P1.place2.minMarks >= -1e-9 or noEvent(abs(P1.place2.enableOut.arcWeight[P1.place2.enableOut.Index]) <= 1e-8)) then P1.place2.enableOut.TEout[P1.place2.enableOut.Index] := true; P1.place2.enableOut.arcWeightSum := P1.place2.enableOut.arcWeightSum + P1.place2.enableOut.arcWeight[P1.place2.enableOut.Index]; end if; end for; end if; end when; for i in 1:1 loop P1.place2.enableOut.TEout_[i] := P1.place2.enableOut.TEout[i] and P1.place2.enableOut.TAout[i]; end for; 11 : algorithm P1.place2.delayPassedOut.anytrue := false; P1.place2.delayPassedOut.numtrue := 0; for i in 1:1 loop P1.place2.delayPassedOut.anytrue := P1.place2.delayPassedOut.anytrue or P1.place2.delayPassedOut.vec[i]; if P1.place2.delayPassedOut.vec[i] then P1.place2.delayPassedOut.numtrue := P1.place2.delayPassedOut.numtrue + 1; end if; end for; 12 : algorithm P1.place2.delayPassedIn.anytrue := false; P1.place2.delayPassedIn.numtrue := 0; for i in 1:1 loop P1.place2.delayPassedIn.anytrue := P1.place2.delayPassedIn.anytrue or P1.place2.delayPassedIn.vec[i]; if P1.place2.delayPassedIn.vec[i] then P1.place2.delayPassedIn.numtrue := P1.place2.delayPassedIn.numtrue + 1; end if; end for; 13 : algorithm P1.place2.disMarksOut.anytrue := false; P1.place2.disMarksOut.numtrue := 0; for i in 1:1 loop P1.place2.disMarksOut.anytrue := P1.place2.disMarksOut.anytrue or P1.place2.disMarksOut.vec[i]; if P1.place2.disMarksOut.vec[i] then P1.place2.disMarksOut.numtrue := P1.place2.disMarksOut.numtrue + 1; end if; end for; 14 : algorithm P1.place2.disMarksIn.anytrue := false; P1.place2.disMarksIn.numtrue := 0; for i in 1:1 loop P1.place2.disMarksIn.anytrue := P1.place2.disMarksIn.anytrue or P1.place2.disMarksIn.vec[i]; if P1.place2.disMarksIn.vec[i] then P1.place2.disMarksIn.numtrue := P1.place2.disMarksIn.numtrue + 1; end if; end for; 15 : algorithm P1.place2.feeding.anytrue := false; P1.place2.feeding.numtrue := 0; for i in 1:1 loop P1.place2.feeding.anytrue := P1.place2.feeding.anytrue or P1.place2.feeding.vec[i]; if P1.place2.feeding.vec[i] then P1.place2.feeding.numtrue := P1.place2.feeding.numtrue + 1; end if; end for; 16 : algorithm P1.place2.emptying.anytrue := false; P1.place2.emptying.numtrue := 0; for i in 1:1 loop P1.place2.emptying.anytrue := P1.place2.emptying.anytrue or P1.place2.emptying.vec[i]; if P1.place2.emptying.vec[i] then P1.place2.emptying.numtrue := P1.place2.emptying.numtrue + 1; end if; end for; 17 : algorithm P2.place1.enableIn.TEin := {false}; $whenCondition7 := P2.place1.delayPassedIn.anytrue; when $whenCondition7 then P2.place1.enableIn.disTAin := PNlib.Functions.OddsAndEnds.boolAnd({P2.place2.enableIn.active[1]}, {false}); P2.place1.enableIn.arcWeightSum := PNlib.Functions.OddsAndEnds.conditionalSum(P2.place1.enableIn.arcWeight, P2.place1.enableIn.disTAin); if P2.place1.t_ + P2.place1.enableIn.arcWeightSum - P2.place1.maxMarks <= 1e-9 or noEvent(abs(P2.place1.enableIn.arcWeightSum) <= 1e-8) then P2.place1.enableIn.TEin := {P2.place2.enableIn.active[1]}; else P2.place1.enableIn.TEin := PNlib.Functions.OddsAndEnds.boolAnd({P2.place2.enableIn.active[1]}, not {false}); P2.place1.enableIn.arcWeightSum := 0.0; for i in 1:1 loop P2.place1.enableIn.Index := Modelica.Math.Vectors.find(/*Real*/(i), {1.0}, 0.0); if P2.place1.enableIn.Index > 0 and P2.place1.enableIn.disTAin[P2.place1.enableIn.Index] and (P2.place1.t_ + P2.place1.enableIn.arcWeightSum + P2.place1.enableIn.arcWeight[P2.place1.enableIn.Index] - P2.place1.maxMarks <= 1e-9 or noEvent(abs(P2.place1.enableIn.arcWeight[P2.place1.enableIn.Index]) <= 1e-8)) then P2.place1.enableIn.TEin[P2.place1.enableIn.Index] := true; P2.place1.enableIn.arcWeightSum := P2.place1.enableIn.arcWeightSum + P2.place1.enableIn.arcWeight[P2.place1.enableIn.Index]; end if; end for; end if; end when; for i in 1:1 loop P2.place1.enableIn.TEin_[i] := P2.place1.enableIn.TEin[i] and P2.place1.enableIn.active[i]; end for; 18 : algorithm P2.place1.delayPassedIn.anytrue := false; P2.place1.delayPassedIn.numtrue := 0; for i in 1:1 loop P2.place1.delayPassedIn.anytrue := P2.place1.delayPassedIn.anytrue or P2.place1.delayPassedIn.vec[i]; if P2.place1.delayPassedIn.vec[i] then P2.place1.delayPassedIn.numtrue := P2.place1.delayPassedIn.numtrue + 1; end if; end for; 19 : algorithm P2.place1.disMarksOut.anytrue := false; P2.place1.disMarksOut.numtrue := 0; 20 : algorithm P2.place1.disMarksIn.anytrue := false; P2.place1.disMarksIn.numtrue := 0; for i in 1:1 loop P2.place1.disMarksIn.anytrue := P2.place1.disMarksIn.anytrue or P2.place1.disMarksIn.vec[i]; if P2.place1.disMarksIn.vec[i] then P2.place1.disMarksIn.numtrue := P2.place1.disMarksIn.numtrue + 1; end if; end for; 21 : algorithm P2.place1.feeding.anytrue := false; P2.place1.feeding.numtrue := 0; for i in 1:1 loop P2.place1.feeding.anytrue := P2.place1.feeding.anytrue or P2.place1.feeding.vec[i]; if P2.place1.feeding.vec[i] then P2.place1.feeding.numtrue := P2.place1.feeding.numtrue + 1; end if; end for; 22 : algorithm P2.place1.emptying.anytrue := false; P2.place1.emptying.numtrue := 0; 23 : algorithm P2.place2.enableIn.TEin := {false}; $whenCondition8 := P2.place2.delayPassedIn.anytrue; when $whenCondition8 then P2.place2.enableIn.disTAin := PNlib.Functions.OddsAndEnds.boolAnd({P2.place2.enableIn.active[1]}, {false}); P2.place2.enableIn.arcWeightSum := PNlib.Functions.OddsAndEnds.conditionalSum(P2.place2.enableIn.arcWeight, P2.place2.enableIn.disTAin); if P2.place2.t_ + P2.place2.enableIn.arcWeightSum - P2.place2.maxMarks <= 1e-9 or noEvent(abs(P2.place2.enableIn.arcWeightSum) <= 1e-8) then P2.place2.enableIn.TEin := {P2.place2.enableIn.active[1]}; else P2.place2.enableIn.TEin := PNlib.Functions.OddsAndEnds.boolAnd({P2.place2.enableIn.active[1]}, not {false}); P2.place2.enableIn.arcWeightSum := 0.0; for i in 1:1 loop P2.place2.enableIn.Index := Modelica.Math.Vectors.find(/*Real*/(i), {1.0}, 0.0); if P2.place2.enableIn.Index > 0 and P2.place2.enableIn.disTAin[P2.place2.enableIn.Index] and (P2.place2.t_ + P2.place2.enableIn.arcWeightSum + P2.place2.enableIn.arcWeight[P2.place2.enableIn.Index] - P2.place2.maxMarks <= 1e-9 or noEvent(abs(P2.place2.enableIn.arcWeight[P2.place2.enableIn.Index]) <= 1e-8)) then P2.place2.enableIn.TEin[P2.place2.enableIn.Index] := true; P2.place2.enableIn.arcWeightSum := P2.place2.enableIn.arcWeightSum + P2.place2.enableIn.arcWeight[P2.place2.enableIn.Index]; end if; end for; end if; end when; for i in 1:1 loop P2.place2.enableIn.TEin_[i] := P2.place2.enableIn.TEin[i] and P2.place2.enableIn.active[i]; end for; 24 : algorithm P2.place2.delayPassedIn.anytrue := false; P2.place2.delayPassedIn.numtrue := 0; for i in 1:1 loop P2.place2.delayPassedIn.anytrue := P2.place2.delayPassedIn.anytrue or P2.place2.delayPassedIn.vec[i]; if P2.place2.delayPassedIn.vec[i] then P2.place2.delayPassedIn.numtrue := P2.place2.delayPassedIn.numtrue + 1; end if; end for; 25 : algorithm P2.place2.disMarksOut.anytrue := false; P2.place2.disMarksOut.numtrue := 0; 26 : algorithm P2.place2.disMarksIn.anytrue := false; P2.place2.disMarksIn.numtrue := 0; for i in 1:1 loop P2.place2.disMarksIn.anytrue := P2.place2.disMarksIn.anytrue or P2.place2.disMarksIn.vec[i]; if P2.place2.disMarksIn.vec[i] then P2.place2.disMarksIn.numtrue := P2.place2.disMarksIn.numtrue + 1; end if; end for; 27 : algorithm P2.place2.feeding.anytrue := false; P2.place2.feeding.numtrue := 0; for i in 1:1 loop P2.place2.feeding.anytrue := P2.place2.feeding.anytrue or P2.place2.feeding.vec[i]; if P2.place2.feeding.vec[i] then P2.place2.feeding.numtrue := P2.place2.feeding.numtrue + 1; end if; end for; 28 : algorithm P2.place2.emptying.anytrue := false; P2.place2.emptying.numtrue := 0; 29 : algorithm t1.transition_.activation.NoTokens := false; t1.transition_.activation.active := true; t1.transition_.activation.weaklyOutputActiveVec := {false, false}; for i in 1:2 loop if t1.transition_.activation.disPlaceOut[i] then if t1.transition_.activation.tIntOut[i] + t1.transition_.activation.arcWeightIntOut[i] > t1.transition_.activation.maxTokensInt[i] then t1.transition_.activation.active := false; end if; else if t1.transition_.activation.tOut[i] >= t1.transition_.activation.maxTokens[i] then if t1.transition_.activation.emptied[i] then t1.transition_.activation.weaklyOutputActiveVec[i] := true; else t1.transition_.activation.active := false; end if; end if; end if; end for; t1.transition_.activation.active := t1.transition_.activation.active; for i in 1:2 loop t1.transition_.activation.weaklyOutputActiveVec[i] := t1.transition_.activation.weaklyOutputActiveVec[i]; end for; 30 : algorithm t2.transition_.activation.NoTokens := false; t2.transition_.activation.active := true; t2.transition_.activation.weaklyInputActiveVec := {false, false}; t2.transition_.activation.weaklyOutputActiveVec := {false, false}; for i in 1:2 loop if t2.transition_.activation.disPlaceIn[i] then if t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.NormalArc and t2.transition_.activation.tIntIn[i] - t2.transition_.activation.arcWeightIntIn[i] < t2.transition_.activation.minTokensInt[i] then t2.transition_.activation.active := false; elseif t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.RealTestArc and t2.transition_.activation.tIntIn[i] <= t2.transition_.activation.testValueInt[i] then t2.transition_.activation.active := false; elseif t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.TestArc and t2.transition_.activation.tIntIn[i] < t2.transition_.activation.testValueInt[i] then t2.transition_.activation.active := false; elseif t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.RealInhibitorArc and t2.transition_.activation.tIntIn[i] >= t2.transition_.activation.testValueInt[i] then t2.transition_.activation.active := false; elseif t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.InhibitorArc and t2.transition_.activation.tIntIn[i] > t2.transition_.activation.testValueInt[i] then t2.transition_.activation.active := false; end if; else if t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.NormalArc or not t2.transition_.activation.normalArc[i] then t2.transition_.activation.NoTokens := not t2.transition_.activation.tIn[i] - t2.transition_.activation.minTokens[i] >= -1e-9; if t2.transition_.activation.arcWeightIn[i] <= 0.0 then elseif t2.transition_.activation.NoTokens and not t2.transition_.activation.fed[i] then t2.transition_.activation.active := false; elseif t2.transition_.activation.NoTokens and t2.transition_.activation.fed[i] then t2.transition_.activation.weaklyInputActiveVec[i] := true; end if; end if; if t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.RealTestArc then if t2.transition_.activation.tIn[i] <= t2.transition_.activation.testValue[i] + 1e-9 then t2.transition_.activation.active := false; end if; if t2.transition_.activation.tIn[i] > t2.transition_.activation.testValue[i] + 1e-9 and t2.transition_.activation.fed[i] and not t2.transition_.activation.normalArc[i] then t2.transition_.activation.weaklyInputActiveVec[i] := true; end if; elseif t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.TestArc then if t2.transition_.activation.tIn[i] < t2.transition_.activation.testValue[i] - 1e-9 then t2.transition_.activation.active := false; end if; if t2.transition_.activation.tIn[i] >= t2.transition_.activation.testValue[i] - 1e-9 and t2.transition_.activation.fed[i] and not t2.transition_.activation.normalArc[i] then t2.transition_.activation.weaklyInputActiveVec[i] := true; end if; elseif t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.RealInhibitorArc and t2.transition_.activation.tIn[i] >= t2.transition_.activation.testValue[i] - 1e-9 then t2.transition_.activation.active := false; elseif t2.transition_.activation.arcType[i] == PNlib.Types.ArcType.InhibitorArc and t2.transition_.activation.tIn[i] > t2.transition_.activation.testValue[i] + 1e-9 then t2.transition_.activation.active := false; end if; end if; end for; for i in 1:2 loop if t2.transition_.activation.disPlaceOut[i] then if t2.transition_.activation.tIntOut[i] + t2.transition_.activation.arcWeightIntOut[i] > t2.transition_.activation.maxTokensInt[i] then t2.transition_.activation.active := false; end if; else if t2.transition_.activation.tOut[i] >= t2.transition_.activation.maxTokens[i] then if t2.transition_.activation.emptied[i] then t2.transition_.activation.weaklyOutputActiveVec[i] := true; else t2.transition_.activation.active := false; end if; end if; end if; end for; t2.transition_.activation.active := t2.transition_.activation.active; for i in 1:2 loop t2.transition_.activation.weaklyOutputActiveVec[i] := t2.transition_.activation.weaklyOutputActiveVec[i]; end for; for i in 1:2 loop t2.transition_.activation.weaklyInputActiveVec[i] := t2.transition_.activation.weaklyInputActiveVec[i]; end for; 31 : t1.outPlaces[1,1].speedSum = if P1.place1.emptying.vec[1] then P2.place1.enableIn.arcWeight[1] * t2.instantaneousSpeed else 0.0 32 : ({t1.outPlaces[1,1].decreasingFactor}, {t2.inPlaces[1,1].decreasingFactor}) = PNlib.Functions.decreasingFactor(1, 1, P1.place1.t_, P1.place1.minMarks, P1.place1.maxMarks, 0.0, t1.outPlaces[1,1].speedSum, {1.0}, {1.0}, {t1.outPlaces[1,2].prelimSpeed}, {t2.outPlaces[1,2].prelimSpeed}, {0.0}, {P2.place1.enableIn.arcWeight[1]}, P1.place1.fireIn and not {false}, P1.place1.fireOut and not {false}) 33 : der(P1.place1.t_) = -t1.outPlaces[1,1].speedSum 34 : P1.place1.disMarksInOut = pre(P1.place1.disMarksOut.anytrue) or pre(P1.place1.disMarksIn.anytrue) 35 : P1.place1.levelCon = P1.color[1] * settings.M / /*Real*/(P1.place1.N) 36 : P1.place1.emptying.vec[1] = pre(P1.place1.fireOut[1]) 37 : P1.place1.feeding.vec[1] = pre(P1.place1.fireIn[1]) 38 : P1.color[1] = if noEvent(P1.place1.t_ < P1.place1.minMarks) then P1.place1.minMarks else if noEvent(P1.place1.t_ > P1.place1.maxMarks) then P1.place1.maxMarks else P1.place1.t_ 39 : P1.place1.tokenscale = P1.color[1] * settings.scale 40 : P1.place1.color[3] = if settings.animatePlace then if P1.place1.tokenscale < 100.0 then 255.0 - 2.55 * P1.place1.tokenscale else 0.0 else 255.0 41 : t2.inPlaces[1,2].speedSum = if P1.place2.feeding.vec[1] then t1.instantaneousSpeed else 0.0 42 : t1.outPlaces[1,2].speedSum = if P1.place2.emptying.vec[1] then P1.place2.enableOut.arcWeight[1] * t2.instantaneousSpeed else 0.0 43 : ({t1.outPlaces[1,2].decreasingFactor}, {t2.inPlaces[1,2].decreasingFactor}) = PNlib.Functions.decreasingFactor(1, 1, P1.place2.t_, P1.place2.minMarks, P1.place2.maxMarks, t2.inPlaces[1,2].speedSum, t1.outPlaces[1,2].speedSum, {1.0}, {1.0}, {t1.outPlaces[1,2].prelimSpeed}, {t2.outPlaces[1,2].prelimSpeed}, {1.0}, {P1.place2.enableOut.arcWeight[1]}, P1.place2.fireIn and not {false}, P1.place2.fireOut and not {false}) 44 : P1.place2.conMarkChange = t2.inPlaces[1,2].speedSum - t1.outPlaces[1,2].speedSum 45 : der(P1.place2.t_) = P1.place2.conMarkChange 46 : P1.place2.disMarksInOut = pre(P1.place2.disMarksOut.anytrue) or pre(P1.place2.disMarksIn.anytrue) 47 : P1.place2.levelCon = P1.color[2] * settings.M / /*Real*/(P1.place2.N) 48 : P1.place2.emptying.vec[1] = pre(P1.place2.fireOut[1]) 49 : P1.place2.feeding.vec[1] = pre(P1.place2.fireIn[1]) 50 : P1.color[2] = if noEvent(P1.place2.t_ < P1.place2.minMarks) then P1.place2.minMarks else if noEvent(P1.place2.t_ > P1.place2.maxMarks) then P1.place2.maxMarks else P1.place2.t_ 51 : P1.place2.tokenscale = P1.color[2] * settings.scale 52 : P1.place2.color[3] = if settings.animatePlace then if P1.place2.tokenscale < 100.0 then 255.0 - 2.55 * P1.place2.tokenscale else 0.0 else 255.0 53 : P2.place1.conMarkChange = if P2.place1.feeding.vec[1] then P2.place1.enableIn.arcWeight[1] * t2.instantaneousSpeed else 0.0 54 : ({t2.outPlaces[1,1].decreasingFactor}, _) = PNlib.Functions.decreasingFactor(1, 0, P2.place1.t_, P2.place1.minMarks, P2.place1.maxMarks, P2.place1.conMarkChange, 0.0, {1.0}, {}, {t2.outPlaces[1,2].prelimSpeed}, {}, {P2.place1.enableIn.arcWeight[1]}, {}, P2.place1.fireIn and not {false}, {} and not {}) 55 : der(P2.place1.t_) = P2.place1.conMarkChange 56 : P2.place1.disMarksInOut = pre(P2.place1.disMarksOut.anytrue) or pre(P2.place1.disMarksIn.anytrue) 57 : P2.place1.levelCon = P2.color[1] * settings.M / /*Real*/(P2.place1.N) 58 : P2.place1.feeding.vec[1] = pre(P2.place1.fireIn[1]) 59 : P2.color[1] = if noEvent(P2.place1.t_ < P2.place1.minMarks) then P2.place1.minMarks else if noEvent(P2.place1.t_ > P2.place1.maxMarks) then P2.place1.maxMarks else P2.place1.t_ 60 : P2.place1.tokenscale = P2.color[1] * settings.scale 61 : P2.place1.color[3] = if settings.animatePlace then if P2.place1.tokenscale < 100.0 then 255.0 - 2.55 * P2.place1.tokenscale else 0.0 else 255.0 62 : P2.place2.conMarkChange = if P2.place2.feeding.vec[1] then P1.place2.enableOut.arcWeight[1] * t2.instantaneousSpeed else 0.0 63 : ({t2.outPlaces[1,2].decreasingFactor}, _) = PNlib.Functions.decreasingFactor(1, 0, P2.place2.t_, P2.place2.minMarks, P2.place2.maxMarks, P2.place2.conMarkChange, 0.0, {1.0}, {}, {t2.outPlaces[1,2].prelimSpeed}, {}, {P1.place2.enableOut.arcWeight[1]}, {}, P2.place2.fireIn and not {false}, {} and not {}) 64 : der(P2.place2.t_) = P2.place2.conMarkChange 65 : P2.place2.disMarksInOut = pre(P2.place2.disMarksOut.anytrue) or pre(P2.place2.disMarksIn.anytrue) 66 : P2.place2.levelCon = P2.color[2] * settings.M / /*Real*/(P2.place2.N) 67 : P2.place2.feeding.vec[1] = pre(P2.place2.fireIn[1]) 68 : P2.color[2] = if noEvent(P2.place2.t_ < P2.place2.minMarks) then P2.place2.minMarks else if noEvent(P2.place2.t_ > P2.place2.maxMarks) then P2.place2.maxMarks else P2.place2.t_ 69 : P2.place2.tokenscale = P2.color[2] * settings.scale 70 : P2.place2.color[3] = if settings.animatePlace then if P2.place2.tokenscale < 100.0 then 255.0 - 2.55 * P2.place2.tokenscale else 0.0 else 255.0 71 : t1.outPlaces[1,2].prelimSpeed = PNlib.Functions.preliminarySpeed(0, 2, {}, {0.0, 1.0}, {}, {t1.outPlaces[1,1].speedSum, t1.outPlaces[1,2].speedSum}, 1.0, {}, t1.transition_.activation.weaklyOutputActiveVec) 72 : P1.place2.fireIn[1] = t1.transition_.fire_ and t1.transition_.activation.active 73 : t1.instantaneousSpeed = min(min(8.777798510069901e304, min(t1.outPlaces[1,1].decreasingFactor, t1.outPlaces[1,2].decreasingFactor)), t1.outPlaces[1,2].prelimSpeed) 74 : t1.transition_.color[3] = if P1.place2.fireIn[1] and settings.animateTransition then 0.0 else 255.0 75 : P2.place1.enableIn.arcWeight[1] = P1.color[1] / P1.t 76 : P1.place2.enableOut.arcWeight[1] = P1.color[2] / P1.t 77 : t2.outPlaces[1,2].prelimSpeed = PNlib.Functions.preliminarySpeed(2, 2, {P2.place1.enableIn.arcWeight[1], P1.place2.enableOut.arcWeight[1]}, {P2.place1.enableIn.arcWeight[1], P1.place2.enableOut.arcWeight[1]}, {0.0, t2.inPlaces[1,2].speedSum}, {0.0, 0.0}, 1.0, t2.transition_.activation.weaklyInputActiveVec, t2.transition_.activation.weaklyOutputActiveVec) 78 : P2.place2.fireIn[1] = t2.transition_.fire_ and t2.transition_.activation.active 79 : t2.instantaneousSpeed = min(min(min(t2.inPlaces[1,1].decreasingFactor, t2.inPlaces[1,2].decreasingFactor), min(t2.outPlaces[1,1].decreasingFactor, t2.outPlaces[1,2].decreasingFactor)), t2.outPlaces[1,2].prelimSpeed) 80 : t2.transition_.color[3] = if P2.place2.fireIn[1] and settings.animateTransition then 0.0 else 255.0 81 : P1.t = P1.color[1] + P1.color[2] 82 : P1.outTransition[1,1].tokenInOut = pre(P1.place1.disMarksInOut) 83 : P1.outTransition[1,2].tokenInOut = pre(P1.place2.disMarksInOut) 84 : P2.t = P2.color[1] + P2.color[2] 85 : t1.actualSpeed = if P1.place2.fireIn[1] then t1.instantaneousSpeed else 0.0 86 : t2.actualSpeed = if P2.place2.fireIn[1] then t2.instantaneousSpeed else 0.0 87 : t2.transition_.fire_ = PNlib.Functions.OddsAndEnds.allTrue(PNlib.Functions.OddsAndEnds.boolOr({P1.place1.enableOut.TEout_[1], P1.place2.enableOut.TEout_[1]}, not {false, false})) 88 : P1.place2.enableIn.active[1] = t1.transition_.activation.active 89 : P1.place1.enableIn.active[1] = t1.transition_.activation.active 90 : P2.place2.enableIn.active[1] = t2.transition_.activation.active 91 : P2.place1.enableIn.active[1] = t2.transition_.activation.active 92 : P1.place2.enableOut.TAout[1] = t2.transition_.activation.active 93 : P1.place1.enableOut.TAout[1] = t2.transition_.activation.active 94 : P2.place2.enableIn.arcWeight[1] = t2.transition_.activation.arcWeightIn[2] 95 : P2.place2.enableIn.arcWeight[1] = P1.place2.enableOut.arcWeight[1] 96 : P2.place1.fireIn[1] = P2.place2.fireIn[1] 97 : P1.place2.fireOut[1] = P2.place2.fireIn[1] 98 : P1.place1.fireOut[1] = P2.place2.fireIn[1] 99 : t2.transition_.activation.emptied[2] = P2.place2.emptying.anytrue 100 : t2.transition_.activation.maxTokens[2] = P2.place2.maxMarks 101 : t2.transition_.activation.tOut[2] = P2.place2.t_ 102 : t2.transition_.activation.arcWeightIn[1] = P1.place1.enableOut.arcWeight[1] 103 : t2.transition_.activation.arcWeightIn[1] = P2.place1.enableIn.arcWeight[1] 104 : t2.transition_.activation.emptied[1] = P2.place1.emptying.anytrue 105 : t2.transition_.activation.maxTokens[1] = P2.place1.maxMarks 106 : t2.transition_.activation.tOut[1] = P2.place1.t_ 107 : t2.transition_.activation.fed[2] = P1.place2.feeding.anytrue 108 : t2.transition_.activation.minTokens[2] = P1.place2.minMarks 109 : t2.transition_.activation.tIn[2] = P1.place2.t_ 110 : t1.transition_.activation.tOut[2] = P1.place2.t_ 111 : t2.transition_.activation.fed[1] = P1.place1.feeding.anytrue 112 : t2.transition_.activation.minTokens[1] = P1.place1.minMarks 113 : t2.transition_.activation.tIn[1] = P1.place1.t_ 114 : t1.transition_.activation.tOut[1] = P1.place1.t_ 115 : P1.place1.fireIn[1] = P1.place2.fireIn[1] 116 : t1.transition_.activation.emptied[2] = P1.place2.emptying.anytrue 117 : t1.transition_.activation.maxTokens[2] = P1.place2.maxMarks 118 : t1.transition_.activation.emptied[1] = P1.place1.emptying.anytrue 119 : t1.transition_.activation.maxTokens[1] = P1.place1.maxMarks 120 : $whenCondition9 = P1.place1.disMarksInOut 121 : $whenCondition10 = P1.place2.disMarksInOut 122 : $whenCondition11 = P2.place1.disMarksInOut 123 : $whenCondition12 = P2.place2.disMarksInOut Notification: Performance of preOpt encapsulateWhenConditions (simulation) : time 0.003465/0.2427, allocations: 5.143 MB / 336.6 MB, free: 1.789 MB / 314.7 MB Error: pre-optimization module encapsulateWhenConditions (simulation) failed. " [Timeout remaining time 660] [Calling sys.exit(0), Time elapsed: 1.8723182547837496]