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.001343/0.001343, allocations: 76.16 kB / 9.861 MB, free: 0.8281 MB / 10.45 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.002195/0.003538, allocations: 443.8 kB / 10.29 MB, free: 404 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.001577/0.001577, allocations: 141.2 kB / 11.17 MB, free: 3 MB / 13.93 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.002207/0.003784, allocations: 475.6 kB / 11.64 MB, free: 2.531 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.409/1.409, allocations: 177.2 MB / 189.5 MB, free: 5.312 MB / 186.7 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.1466/1.556, allocations: 53.65 MB / 243.2 MB, free: 15.59 MB / 250.7 MB " [Timeout remaining time 178] 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.07233/0.07233, allocations: 12.67 MB / 256.6 MB, free: 2.359 MB / 250.7 MB Notification: Performance of NFInstanceAPI.mkTop(): time 0.01472/0.08706, allocations: 4.687 MB / 261.3 MB, free: 13.66 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: setCommandLineOptions("--fmiFlags=s:cvode") Running command: "" <> buildModelFMU(PNlib.Examples.Models.BicoloredPlaces.Aquarium,fileNamePrefix="PNlib_PNlib_Examples_Models_BicoloredPlaces_Aquarium",fmuType="me_cs",version="2.0+3.0",platforms={"static"}) "" <> buildModelFMU(PNlib.Examples.Models.BicoloredPlaces.Aquarium,fileNamePrefix="PNlib_PNlib_Examples_Models_BicoloredPlaces_Aquarium",fmuType="me_cs",version="2.0+3.0",platforms={"static"}) [Timeout 660] "Notification: Performance of FrontEnd - loaded program: time 2.976e-06/2.976e-06, allocations: 0 / 262.5 MB, free: 12.45 MB / 266.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 4.964e-05/5.262e-05, allocations: 2.312 kB / 262.5 MB, free: 12.45 MB / 266.7 MB Notification: Performance of NFInst.instantiate(PNlib.Examples.Models.BicoloredPlaces.Aquarium): time 0.008385/0.008437, allocations: 4.652 MB / 267.1 MB, free: 7.77 MB / 266.7 MB Notification: Performance of NFInst.instExpressions: time 0.01025/0.01869, allocations: 4.355 MB / 271.5 MB, free: 3.402 MB / 266.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.002855/0.02154, allocations: 39.75 kB / 271.5 MB, free: 3.363 MB / 266.7 MB Notification: Performance of NFTyping.typeComponents: time 0.002059/0.0236, allocations: 0.5895 MB / 272.1 MB, free: 2.77 MB / 266.7 MB Notification: Performance of NFTyping.typeBindings: time 0.003133/0.02673, allocations: 0.6133 MB / 272.7 MB, free: 2.152 MB / 266.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.1991/0.2259, allocations: 2.175 MB / 274.9 MB, free: 3.699 MB / 266.7 MB Notification: Performance of NFFlatten.flatten: time 0.008314/0.2342, allocations: 6.03 MB / 280.9 MB, free: 2.941 MB / 266.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.001332/0.2355, allocations: 0.8033 MB / 281.7 MB, free: 2.492 MB / 266.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.006063/0.2416, allocations: 3.798 MB / 285.5 MB, free: 0.5781 MB / 266.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.003519/0.2451, allocations: 2.006 MB / 287.5 MB, free: 0 / 266.7 MB Notification: Performance of NFPackage.collectConstants: time 0.001489/0.2466, allocations: 0.5985 MB / 288.1 MB, free: 0 / 266.7 MB Notification: Performance of NFFlatten.collectFunctions: time 0.001902/0.2485, allocations: 1.159 MB / 289.3 MB, free: 0 / 266.7 MB Notification: Performance of NFScalarize.scalarize: time 0.0007453/0.2492, allocations: 0.8655 MB / 290.2 MB, free: 15.79 MB / 282.7 MB Notification: Performance of NFVerifyModel.verify: time 0.00165/0.2509, allocations: 1.24 MB / 291.4 MB, free: 15.65 MB / 282.7 MB Notification: Performance of NFConvertDAE.convert: time 0.004325/0.2552, allocations: 4.28 MB / 295.7 MB, free: 12.43 MB / 282.7 MB Notification: Performance of FrontEnd - DAE generated: time 1.828e-05/0.2552, allocations: 3.5 kB / 295.7 MB, free: 12.43 MB / 282.7 MB Notification: Performance of FrontEnd: time 2.114e-06/0.2552, allocations: 0 / 295.7 MB, free: 12.43 MB / 282.7 MB Notification: Performance of Transformations before backend: time 0.0001228/0.2554, allocations: 0 / 295.7 MB, free: 12.43 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.006189/0.2616, allocations: 5.785 MB / 301.5 MB, free: 6.344 MB / 282.7 MB Notification: Performance of prepare preOptimizeDAE: time 4.217e-05/0.2616, allocations: 10.66 kB / 301.5 MB, free: 6.336 MB / 282.7 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0006526/0.2622, allocations: 0.6301 MB / 302.1 MB, free: 5.695 MB / 282.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.001936/0.2642, allocations: 1.221 MB / 303.3 MB, free: 4.469 MB / 282.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001471/0.2657, allocations: 1.011 MB / 304.3 MB, free: 3.531 MB / 282.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0005551/0.2662, allocations: 1.285 MB / 305.6 MB, free: 2.023 MB / 282.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0004764/0.2667, allocations: 464.9 kB / 306.1 MB, free: 1.57 MB / 282.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.006028/0.2727, allocations: 6.267 MB / 312.4 MB, free: 10.85 MB / 298.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 6.073e-05/0.2728, allocations: 6.625 kB / 312.4 MB, free: 10.84 MB / 298.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0002947/0.2731, allocations: 218.7 kB / 312.6 MB, free: 10.63 MB / 298.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0003303/0.2734, allocations: 378.8 kB / 312.9 MB, free: 10.26 MB / 298.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.003596/0.277, allocations: 3.766 MB / 316.7 MB, free: 6.289 MB / 298.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.01119/0.2882, allocations: 10.38 MB / 327.1 MB, free: 11.88 MB / 314.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.001626/0.2898, allocations: 2.223 MB / 329.3 MB, free: 9.43 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.001361/0.2912, allocations: 1.918 MB / 331.2 MB, free: 7.289 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 0.001315/0.2925, allocations: 0.9635 MB / 332.2 MB, free: 6.332 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.003421/0.2959, allocations: 5.139 MB / 337.3 MB, free: 0.9727 MB / 314.7 MB Error: pre-optimization module encapsulateWhenConditions (simulation) failed. " [Timeout remaining time 660] [Calling sys.exit(0), Time elapsed: 2.315252752043307]