Running: ./testmodel.py --libraries=/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/ --ompython_omhome=/usr IndustrialControlSystems_IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe.conf.json loadFile("/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo", uses=false) loadFile("/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false) loadFile("/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) Using package ModelicaServices with version 4.0.0 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Using package Modelica with version 4.0.0 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo) Using package IndustrialControlSystems with version 1.1.0 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo) Using package Complex with version 4.0.0 (/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Running command: translateModel(IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="IndustrialControlSystems_IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe") translateModel(IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="IndustrialControlSystems_IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe") Notification: Performance of loadFile(/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001024/0.001024, allocations: 180.9 kB / 15.43 MB, free: 6.207 MB / 13.93 MB Notification: Performance of loadFile(/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/IndustrialControlSystems 1.1.0-master/package.mo): time 0.05465/0.05465, allocations: 10.98 MB / 27.16 MB, free: 1.715 MB / 18.57 MB Notification: Performance of loadFile(/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.217/1.217, allocations: 225.7 MB / 256 MB, free: 3.211 MB / 202.7 MB Notification: Performance of loadFile(/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/converted-libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0006891/0.0006891, allocations: 91.08 kB / 309.7 MB, free: 1.176 MB / 234.7 MB Notification: Performance of FrontEnd - loaded program: time 0.0002868/0.0002868, allocations: 8 kB / 373.2 MB, free: 1.512 MB / 298.7 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1995/0.1998, allocations: 52.84 MB / 426.1 MB, free: 35.99 MB / 314.7 MB Notification: Performance of NFInst.instantiate(IndustrialControlSystems.Controllers.Digital.Examples.TestPID_TDOe): time 0.001769/0.2016, allocations: 1.929 MB / 428 MB, free: 34.05 MB / 314.7 MB Notification: Performance of NFInst.instExpressions: time 0.0008324/0.2024, allocations: 0.7294 MB / 428.7 MB, free: 33.29 MB / 314.7 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.0001232/0.2026, allocations: 11.88 kB / 428.7 MB, free: 33.28 MB / 314.7 MB Notification: Performance of NFTyping.typeComponents: time 0.0001794/0.2028, allocations: 47.52 kB / 428.8 MB, free: 33.23 MB / 314.7 MB Notification: Performance of NFTyping.typeBindings: time 9.077e-05/0.2029, allocations: 23.81 kB / 428.8 MB, free: 33.21 MB / 314.7 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003955/0.2033, allocations: 215.7 kB / 429 MB, free: 33 MB / 314.7 MB Notification: Performance of NFFlatten.flatten: time 0.0003943/0.2037, allocations: 0.621 MB / 429.6 MB, free: 32.37 MB / 314.7 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001385/0.2038, allocations: 81.27 kB / 429.7 MB, free: 32.29 MB / 314.7 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001573/0.204, allocations: 211.2 kB / 429.9 MB, free: 32.08 MB / 314.7 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001916/0.2042, allocations: 234.9 kB / 430.2 MB, free: 31.85 MB / 314.7 MB Notification: Performance of NFPackage.collectConstants: time 5.258e-05/0.2042, allocations: 20 kB / 430.2 MB, free: 31.83 MB / 314.7 MB Notification: Performance of NFFlatten.collectFunctions: time 4.403e-05/0.2043, allocations: 24 kB / 430.2 MB, free: 31.8 MB / 314.7 MB Notification: Performance of NFScalarize.scalarize: time 9.588e-05/0.2044, allocations: 111.5 kB / 430.3 MB, free: 31.7 MB / 314.7 MB Notification: Performance of NFVerifyModel.verify: time 0.0001642/0.2046, allocations: 276.3 kB / 430.6 MB, free: 31.42 MB / 314.7 MB Notification: Performance of NFConvertDAE.convert: time 0.0002733/0.2048, allocations: 472.2 kB / 431 MB, free: 30.96 MB / 314.7 MB Notification: Performance of FrontEnd - DAE generated: time 3.306e-06/0.2049, allocations: 0 / 431 MB, free: 30.96 MB / 314.7 MB Notification: Performance of FrontEnd: time 1.222e-06/0.2049, allocations: 0 / 431 MB, free: 30.96 MB / 314.7 MB Notification: Performance of Transformations before backend: time 5.09e-06/0.2049, allocations: 4 kB / 431 MB, free: 30.95 MB / 314.7 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 114 * Number of variables: 114 Notification: Performance of Generate backend data structure: time 0.0008345/0.2057, allocations: 0.7791 MB / 431.8 MB, free: 30.11 MB / 314.7 MB Notification: Performance of prepare preOptimizeDAE: time 3.057e-05/0.2058, allocations: 8.031 kB / 431.8 MB, free: 30.1 MB / 314.7 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.318e-05/0.2058, allocations: 76.17 kB / 431.9 MB, free: 30.03 MB / 314.7 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0003497/0.2062, allocations: 400.1 kB / 432.3 MB, free: 29.6 MB / 314.7 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.553e-05/0.2062, allocations: 29.38 kB / 432.3 MB, free: 29.57 MB / 314.7 MB Notification: Performance of preOpt expandDerOperator (simulation): time 6.682e-05/0.2063, allocations: 56.28 kB / 432.4 MB, free: 29.52 MB / 314.7 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0006891/0.207, allocations: 0.5106 MB / 432.9 MB, free: 29 MB / 314.7 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.937e-05/0.207, allocations: 4.188 kB / 432.9 MB, free: 29 MB / 314.7 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 4.04e-05/0.2071, allocations: 27.88 kB / 432.9 MB, free: 28.97 MB / 314.7 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 7.694e-06/0.2071, allocations: 11.98 kB / 432.9 MB, free: 28.96 MB / 314.7 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0005398/0.2076, allocations: 391.8 kB / 433.3 MB, free: 28.58 MB / 314.7 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.00166/0.2093, allocations: 1.351 MB / 434.7 MB, free: 27.16 MB / 314.7 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0005521/0.2099, allocations: 0.5927 MB / 435.3 MB, free: 26.55 MB / 314.7 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003718/0.2103, allocations: 0.5368 MB / 435.8 MB, free: 26.02 MB / 314.7 MB Notification: Performance of preOpt evalFunc (simulation): time 1.521e-05/0.2103, allocations: 0 / 435.8 MB, free: 26.02 MB / 314.7 MB Error: An independent subset of the model has imbalanced number of equations (46) and variables (45). variables: Process.w Process.U[2] Process.Y[3] Process.Y[1] Process.u Controller.dcs Controller.cs Controller.dd Controller.d Controller.di Controller.dp Controller.dpv Controller.pv Controller.dsp Controller.sp Controller.satLOW Controller.satHI Controller.CS disturb.y ProcessTDOe.w ProcessTDOe.U[2] ProcessTDOe.Y[3] ProcessTDOe.Y[1] ProcessTDOe.u ControllerTDOe.nextEventTime ControllerTDOe.cso ControllerTDOe.dold ControllerTDOe.pvo ControllerTDOe.spo ControllerTDOe.dcs ControllerTDOe.dd ControllerTDOe.d ControllerTDOe.di ControllerTDOe.dp ControllerTDOe.dpv ControllerTDOe.pv ControllerTDOe.dsp ControllerTDOe.sp ControllerTDOe.cs ControllerTDOe.satLOW ControllerTDOe.satHI ControllerTDOe.CS $whenCondition3 $whenCondition2 $whenCondition1 equations: 1 : algorithm $whenCondition1 := sample(1, 0.0, 0.2); when $whenCondition1 then ControllerTDOe.cs := pre(ControllerTDOe.cs) + ControllerTDOe.dcs; ControllerTDOe.dcs := ControllerTDOe.dp + ControllerTDOe.di + ControllerTDOe.dd + ControllerTDOe.bias - pre(ControllerTDOe.bias); ControllerTDOe.dd := ControllerTDOe.d - ControllerTDOe.dold; ControllerTDOe.d := (ControllerTDOe.Td * pre(ControllerTDOe.d) + ControllerTDOe.Kp * ControllerTDOe.N * ControllerTDOe.Td * (ControllerTDOe.c * ControllerTDOe.dsp - ControllerTDOe.dpv)) / (if ControllerTDOe.Td > 0.0 then ControllerTDOe.Td + ControllerTDOe.N * 0.2 else 1.0); ControllerTDOe.di := ControllerTDOe.Kp * 0.2 / ControllerTDOe.Ti * (ControllerTDOe.sp - ControllerTDOe.pv); ControllerTDOe.dp := ControllerTDOe.Kp * (ControllerTDOe.b * ControllerTDOe.dsp - ControllerTDOe.dpv); if ControllerTDOe.cs > 2.0 then ControllerTDOe.cs := 2.0; ControllerTDOe.satHI := true; ControllerTDOe.satLOW := false; else ControllerTDOe.satHI := false; end if; if ControllerTDOe.cs < 0.0 then ControllerTDOe.cs := 0.0; ControllerTDOe.satLOW := true; ControllerTDOe.satHI := false; else ControllerTDOe.satLOW := false; end if; ControllerTDOe.spo := ControllerTDOe.sp; ControllerTDOe.pvo := ControllerTDOe.pv; ControllerTDOe.cso := ControllerTDOe.cs; ControllerTDOe.dold := ControllerTDOe.d; if ControllerTDOe.cs <= 0.0 then ControllerTDOe.CS := 0.0; ControllerTDOe.nextEventTime := time + 0.2; elseif ControllerTDOe.cs >= 2.0 then ControllerTDOe.CS := 2.0; ControllerTDOe.nextEventTime := time + 0.2; else ControllerTDOe.CS := 2.0; ControllerTDOe.nextEventTime := time + ControllerTDOe.cs / 2.0 * 0.2; end if; end when; $whenCondition2 := time >= ControllerTDOe.nextEventTime; when $whenCondition2 then if ControllerTDOe.cs > 0.0 and ControllerTDOe.cs < 2.0 then ControllerTDOe.CS := 0.0; end if; end when; 2 : algorithm $whenCondition3 := sample(1, 0.0, 0.2); when $whenCondition3 then Controller.cs := pre(Controller.cs) + Controller.dcs; Controller.dcs := Controller.dp + Controller.di + Controller.dd + Controller.bias - pre(Controller.bias); Controller.dd := Controller.d - pre(Controller.d); Controller.d := (Controller.Td * pre(Controller.d) + Controller.Kp * Controller.N * Controller.Td * (Controller.c * Controller.dsp - Controller.dpv)) / (if Controller.Td > 0.0 then Controller.Td + Controller.N * 0.2 else 1.0); Controller.di := Controller.Kp * 0.2 / Controller.Ti * (Controller.sp - Controller.pv); Controller.dp := Controller.Kp * (Controller.b * Controller.dsp - Controller.dpv); if Controller.cs > 2.0 then Controller.cs := 2.0; Controller.satHI := true; Controller.satLOW := false; else Controller.satHI := false; end if; if Controller.cs < 0.0 then Controller.cs := 0.0; Controller.satLOW := true; Controller.satHI := false; else Controller.satLOW := false; end if; Controller.CS := Controller.cs; end when; 3 : ProcessTDOe.Y[1] = der(ProcessTDOe.w) 4 : der(ProcessTDOe.Y[3]) = ProcessTDOe.w 5 : der(ProcessTDOe.U[2]) = ProcessTDOe.u 6 : ProcessTDOe.b[1] * ProcessTDOe.Y[1] + ProcessTDOe.b[2] * ProcessTDOe.w + ProcessTDOe.b[3] * ProcessTDOe.Y[3] = ProcessTDOe.num[1] * ProcessTDOe.u + ProcessTDOe.num[2] * ProcessTDOe.U[2] 7 : ProcessTDOe.u = ControllerTDOe.CS - disturb.y 8 : disturb.y = disturb.offset + (if time < disturb.startTime then 0.0 else disturb.height) 9 : Process.Y[1] = der(Process.w) 10 : der(Process.Y[3]) = Process.w 11 : der(Process.U[2]) = Process.u 12 : Process.b[1] * Process.Y[1] + Process.b[2] * Process.w + Process.b[3] * Process.Y[3] = Process.num[1] * Process.u + Process.num[2] * Process.U[2] 13 : Process.u = Controller.CS - disturb.y Notification: Performance of preOpt encapsulateWhenConditions (simulation) : time 0.0006374/0.2109, allocations: 0.6626 MB / 436.5 MB, free: 25.32 MB / 314.7 MB Error: pre-optimization module encapsulateWhenConditions (simulation) failed.