Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Modelica_4.0.0_Modelica.Blocks.Examples.SinCosEncoder.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: translateModel(Modelica.Blocks.Examples.SinCosEncoder,tolerance=1e-05,outputFormat="mat",numberOfIntervals=40000,variableFilter="time|integrator.y|der1.y|cosB.phi|cosBminus.phi|sinA.phi|sinAminus.phi",fileNamePrefix="Modelica_4.0.0_Modelica.Blocks.Examples.SinCosEncoder") translateModel(Modelica.Blocks.Examples.SinCosEncoder,tolerance=1e-05,outputFormat="mat",numberOfIntervals=40000,variableFilter="time|integrator.y|der1.y|cosB.phi|cosBminus.phi|sinA.phi|sinAminus.phi",fileNamePrefix="Modelica_4.0.0_Modelica.Blocks.Examples.SinCosEncoder") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001231/0.001231, allocations: 106.2 kB / 17.69 MB, free: 5.516 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001354/0.001354, allocations: 192 kB / 18.63 MB, free: 4.586 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.262/1.262, allocations: 222.9 MB / 242.3 MB, free: 15.18 MB / 206.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 2.891e-05/2.903e-05, allocations: 9.031 kB / 302 MB, free: 5.207 MB / 238.1 MB Notification: Performance of NFInst.instantiate(Modelica.Blocks.Examples.SinCosEncoder): time 0.003346/0.003389, allocations: 2.182 MB / 304.2 MB, free: 3.023 MB / 238.1 MB Notification: Performance of NFInst.instExpressions: time 0.001007/0.00441, allocations: 0.7081 MB / 304.9 MB, free: 2.316 MB / 238.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 9.41e-05/0.004516, allocations: 0 / 304.9 MB, free: 2.316 MB / 238.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0001302/0.004655, allocations: 51.47 kB / 304.9 MB, free: 2.266 MB / 238.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001187/0.004784, allocations: 43.64 kB / 305 MB, free: 2.223 MB / 238.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0002327/0.00505, allocations: 103.8 kB / 305.1 MB, free: 2.121 MB / 238.1 MB Notification: Performance of NFFlatten.flatten: time 0.0002626/0.005321, allocations: 271.6 kB / 305.4 MB, free: 1.855 MB / 238.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0002068/0.005537, allocations: 120.1 kB / 305.5 MB, free: 1.738 MB / 238.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0001172/0.00566, allocations: 91.58 kB / 305.6 MB, free: 1.648 MB / 238.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001105/0.005779, allocations: 103.5 kB / 305.7 MB, free: 1.547 MB / 238.1 MB Notification: Performance of NFPackage.collectConstants: time 2.745e-05/0.005813, allocations: 16 kB / 305.7 MB, free: 1.531 MB / 238.1 MB Notification: Performance of NFFlatten.collectFunctions: time 6.711e-05/0.005887, allocations: 24 kB / 305.7 MB, free: 1.508 MB / 238.1 MB Notification: Performance of combineBinaries: time 0.0002154/0.006111, allocations: 375.4 kB / 306.1 MB, free: 1.137 MB / 238.1 MB Notification: Performance of replaceArrayConstructors: time 0.0001203/0.006237, allocations: 244.3 kB / 306.3 MB, free: 0.8945 MB / 238.1 MB Notification: Performance of NFVerifyModel.verify: time 3.683e-05/0.00628, allocations: 39.81 kB / 306.3 MB, free: 0.8555 MB / 238.1 MB Notification: Performance of FrontEnd: time 3.316e-05/0.006319, allocations: 11.88 kB / 306.4 MB, free: 0.8438 MB / 238.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 53 (49) * Number of variables: 53 (46) Notification: Performance of Bindings: time 0.0008587/0.007182, allocations: 1.061 MB / 307.4 MB, free: 15.67 MB / 254.1 MB Notification: Performance of FunctionAlias: time 0.0001228/0.007311, allocations: 103.8 kB / 307.5 MB, free: 15.57 MB / 254.1 MB Notification: Performance of Early Inline: time 0.0004312/0.00775, allocations: 0.4995 MB / 308 MB, free: 15.04 MB / 254.1 MB Notification: Performance of simplify1: time 3.898e-05/0.007796, allocations: 43.94 kB / 308.1 MB, free: 15 MB / 254.1 MB Notification: Performance of Alias: time 0.0009684/0.00877, allocations: 0.9403 MB / 309 MB, free: 13.93 MB / 254.1 MB Notification: Performance of simplify2: time 3.228e-05/0.008812, allocations: 39.89 kB / 309 MB, free: 13.89 MB / 254.1 MB Notification: Performance of Events: time 7.872e-05/0.008897, allocations: 62.19 kB / 309.1 MB, free: 13.83 MB / 254.1 MB Notification: Performance of Detect States: time 0.0001839/0.009088, allocations: 154.3 kB / 309.3 MB, free: 13.66 MB / 254.1 MB Notification: Performance of Partitioning: time 0.0001729/0.009269, allocations: 163.7 kB / 309.4 MB, free: 13.5 MB / 254.1 MB Error: Internal error NBSlice.fillDependencyArray failed because number of flattened indices 1 for dependency $FUN_9 could not be devided by the body size 4 without rest. Error: Internal error NBAdjacency.Matrix.createPseudo failed for: [ARRY] (4) rotator.RotationMatrix = {{$FUN_8, -$FUN_9}, {$FUN_9, $FUN_8}} ($RES_BND_49) Error: Internal error NBAdjacency.Matrix.create failed to create adjacency matrix for system: System Variables (31/38) ************************** (1) [ALGB] (1) Real w = 6.283185307179586 * (0.15915494309189535 * w) (2) [ALGB] (1) Real $FUN_4 (3) [ALGB] (1) Real cosBminus.y (4) [ALGB] (1) Real $FUN_3 (5) [ALGB] (1) Real wrapAngle.y (6) [ALGB] (1) Real $FUN_2 (7) [ALGB] (2) Real[2] toPolar.u (8) [ALGB] (1) Real $FUN_1 (9) [DISC] (1) Boolean $SEV_0 (10) [ALGB] (1) Real feedbackSin.y (11) [DER-] (1) Real $DER.sinA.phi (12) [DER-] (1) Real $DER.rotator.angle (13) [ALGB] (1) Real feedbackCos.y (14) [ALGB] (2) Real[2] rotator.y (15) [ALGB] (1) Real integrator.u (16) [DER-] (1) Real $DER.sinAminus.phi (17) [ALGB] (2) Real[2] rotator.u (18) [ALGB] (4) protected Real[2, 2] rotator.RotationMatrix = {{cos(-rotator.angle), -sin(-rotator.angle)}, {sin(-rotator.angle), cos(-rotator.angle)}} (19) [DER-] (1) Real $DER.cosBminus.phi (20) [ALGB] (1) Real cosB.y (21) [ALGB] (1) Real der1.y (22) [DISC] (1) Boolean $TEV_1 (23) [DISC] (1) Boolean $TEV_0 (24) [DER-] (1) Real $DER.cosB.phi (25) [ALGB] (1) Real $FUN_9 (26) [ALGB] (1) Real $FUN_8 (27) [ALGB] (1) Real $FUN_7 (28) [ALGB] (1) Real sinA.y (29) [ALGB] (1) Real $FUN_6 (30) [ALGB] (2) Real[2] toPolar.y (31) [ALGB] (1) Real sinAminus.y System Equations (34/38) ************************** (1) [SCAL] (1) $FUN_7 = atan2(toPolar.u[2], toPolar.u[1]) ($RES_$AUX_52) (2) [SCAL] (1) feedbackCos.y = cosB.y - cosBminus.y ($RES_SIM_10) (3) [SCAL] (1) $FUN_6 = sqrt(toPolar.u[1] ^ 2.0 + toPolar.u[2] ^ 2.0) ($RES_$AUX_53) (4) [SCAL] (1) sinAminus.y = sinAminus.offset + sinAminus.amplitude_constant.k * $FUN_4 ($RES_SIM_11) (5) [SCAL] (1) wrapAngle.y = Modelica.Math.wrapAngle(rotator.angle, wrapAngle.positiveRange) ($RES_$AUX_54) (6) [SCAL] (1) $DER.sinAminus.phi = 6.283185307179586 * (0.15915494309189535 * w) ($RES_SIM_12) (7) [SCAL] (1) $FUN_4 = sin(sinAminus.phi) ($RES_$AUX_55) (8) [SCAL] (1) $FUN_3 = sin(sinA.phi) ($RES_$AUX_56) (9) [SCAL] (1) sinA.y = sinA.offset + sinA.amplitude_constant.k * $FUN_3 ($RES_SIM_14) (10) [SCAL] (1) $FUN_2 = cos(cosBminus.phi) ($RES_$AUX_57) (11) [SCAL] (1) feedbackCos.y = rotator.u[1] ($RES_SIM_30) (12) [SCAL] (1) $DER.sinA.phi = 6.283185307179586 * (0.15915494309189535 * w) ($RES_SIM_15) (13) [SCAL] (1) $FUN_1 = cos(cosB.phi) ($RES_$AUX_58) (14) [SCAL] (1) feedbackCos.y = toPolar.u[1] ($RES_SIM_31) (15) [SCAL] (1) cosBminus.y = cosBminus.offset + cosBminus.amplitude_constant.k * $FUN_2 ($RES_SIM_17) (16) [SCAL] (1) $DER.cosBminus.phi = 6.283185307179586 * (0.15915494309189535 * w) ($RES_SIM_18) (17) [ARRY] (4) rotator.RotationMatrix = {{$FUN_8, -$FUN_9}, {$FUN_9, $FUN_8}} ($RES_BND_49) (18) [SCAL] (1) cosB.y = cosB.offset + cosB.amplitude_constant.k * $FUN_1 ($RES_SIM_20) (19) [SCAL] (1) $TEV_0 = time < ramp.startTime ($RES_EVT_68) (20) [SCAL] (1) $DER.cosB.phi = 6.283185307179586 * (0.15915494309189535 * w) ($RES_SIM_21) (21) [SCAL] (1) $TEV_1 = time < (ramp.startTime + ramp.duration) ($RES_EVT_69) (22) [SCAL] (1) 0.15915494309189535 * w = ramp.offset + (if $TEV_0 then 0.0 else if $TEV_1 then (ramp.height * (time - ramp.startTime)) / ramp.duration else ramp.height) ($RES_SIM_23) (23) [SCAL] (1) rotator.y[2] = integrator.u ($RES_SIM_27) (24) [SCAL] (1) feedbackSin.y = rotator.u[2] ($RES_SIM_28) (25) [SCAL] (1) feedbackSin.y = toPolar.u[2] ($RES_SIM_29) (26) [SCAL] (1) feedbackSin.y = sinA.y - sinAminus.y ($RES_SIM_9) (27) [ARRY] (2) rotator.y = rotator.RotationMatrix * rotator.u ($RES_SIM_8) (28) [SCAL] (1) $DER.rotator.angle = integrator.k * integrator.u ($RES_SIM_5) (29) [SCAL] (1) der1.y = $DER.rotator.angle ($RES_SIM_4) (30) [SCAL] (1) toPolar.y[1] = $FUN_6 ($RES_SIM_2) (31) [SCAL] (1) toPolar.y[2] = if noEvent($SEV_0) then 0.0 else $FUN_7 ($RES_SIM_1) (32) [SCAL] (1) $SEV_0 = toPolar.y[1] <= 1e-60 ($RES_EVT_70) (33) [SCAL] (1) $FUN_9 = sin(-rotator.angle) ($RES_$AUX_50) (34) [SCAL] (1) $FUN_8 = cos(-rotator.angle) ($RES_$AUX_51)