Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr PowerSysPro_PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSysPro 2.3.1-master/package.mo", uses=false) Using package PowerSysPro with version 2.3.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSysPro 2.3.1-master/package.mo) Using package Modelica with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo) Using package Complex with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo) Running command: "" <> buildModelFMU(PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad,fileNamePrefix="PowerSysPro_PowerSysPro_Examples_MixingOneSourceOneBatteryOneDieselOneLoad",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad,fileNamePrefix="PowerSysPro_PowerSysPro_Examples_MixingOneSourceOneBatteryOneDieselOneLoad",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001017/0.001017, allocations: 99.84 kB / 16.45 MB, free: 6.438 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.0009698/0.0009698, allocations: 188.9 kB / 17.38 MB, free: 5.691 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.237/1.237, allocations: 222.9 MB / 241.1 MB, free: 15.09 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSysPro 2.3.1-master/package.mo): time 0.04285/0.04285, allocations: 8.108 MB / 299.3 MB, free: 6.641 MB / 238.1 MB Notification: Performance of FrontEnd - loaded program: time 0.001188/0.001188, allocations: 63.91 kB / 414 MB, free: 22.24 MB / 302.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.08271/0.08391, allocations: 51.52 MB / 465.5 MB, free: 2.68 MB / 334.1 MB Notification: Performance of NFInst.instantiate(PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad): time 0.005293/0.08923, allocations: 4.6 MB / 470.1 MB, free: 14.05 MB / 350.1 MB Notification: Performance of NFInst.instExpressions: time 0.002616/0.09188, allocations: 1.763 MB / 471.9 MB, free: 12.28 MB / 350.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 0.000287/0.09219, allocations: 12 kB / 471.9 MB, free: 12.27 MB / 350.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0008561/0.09309, allocations: 498.2 kB / 472.4 MB, free: 11.78 MB / 350.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0006995/0.0938, allocations: 398 kB / 472.8 MB, free: 11.39 MB / 350.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerSysPro 2.3.1-master/package.mo:34:7-34:67:writable] Warning: In relation diesel.rampTime == 0.0, == on Real numbers is only allowed inside functions. Notification: Performance of NFTyping.typeClassSections: time 0.001758/0.09557, allocations: 1.089 MB / 473.8 MB, free: 10.3 MB / 350.1 MB Notification: Performance of NFFlatten.flatten: time 0.0007683/0.09635, allocations: 0.8295 MB / 474.7 MB, free: 9.469 MB / 350.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0004003/0.09676, allocations: 325.5 kB / 475 MB, free: 9.141 MB / 350.1 MB Notification: Performance of NFEvalConstants.evaluate: time 0.0003081/0.09707, allocations: 386.7 kB / 475.4 MB, free: 8.762 MB / 350.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0006317/0.09771, allocations: 0.5724 MB / 475.9 MB, free: 8.188 MB / 350.1 MB Notification: Performance of NFPackage.collectConstants: time 9.943e-05/0.09782, allocations: 80 kB / 476 MB, free: 8.109 MB / 350.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0004928/0.09832, allocations: 307.8 kB / 476.3 MB, free: 7.809 MB / 350.1 MB Notification: Performance of NFScalarize.scalarize: time 0.0003077/0.09864, allocations: 434.7 kB / 476.8 MB, free: 7.383 MB / 350.1 MB Notification: Performance of NFVerifyModel.verify: time 0.00048/0.09913, allocations: 0.5943 MB / 477.3 MB, free: 6.785 MB / 350.1 MB Notification: Performance of NFConvertDAE.convert: time 0.001686/0.1008, allocations: 1.658 MB / 479 MB, free: 5.121 MB / 350.1 MB Notification: Performance of FrontEnd - DAE generated: time 6.141e-06/0.1008, allocations: 7.922 kB / 479 MB, free: 5.113 MB / 350.1 MB Notification: Performance of FrontEnd: time 1.823e-06/0.1008, allocations: 0 / 479 MB, free: 5.113 MB / 350.1 MB Notification: Performance of Transformations before backend: time 1.462e-05/0.1009, allocations: 0 / 479 MB, free: 5.113 MB / 350.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 153 * Number of variables: 153 Notification: Performance of Generate backend data structure: time 0.004187/0.1051, allocations: 1.955 MB / 481 MB, free: 3.105 MB / 350.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.498e-05/0.1051, allocations: 11.89 kB / 481 MB, free: 3.094 MB / 350.1 MB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001283/0.1053, allocations: 114.7 kB / 481.1 MB, free: 2.973 MB / 350.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002238/0.1055, allocations: 152 kB / 481.2 MB, free: 2.824 MB / 350.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.001283/0.1068, allocations: 0.971 MB / 482.2 MB, free: 1.801 MB / 350.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001506/0.1069, allocations: 224 kB / 482.4 MB, free: 1.543 MB / 350.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 8.992e-05/0.107, allocations: 60.38 kB / 482.5 MB, free: 1.484 MB / 350.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001256/0.1083, allocations: 0.8356 MB / 483.3 MB, free: 0.6172 MB / 350.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 1.547e-05/0.1083, allocations: 0 / 483.3 MB, free: 0.6172 MB / 350.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 6.329e-05/0.1084, allocations: 27.98 kB / 483.3 MB, free: 0.5898 MB / 350.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.308e-05/0.1084, allocations: 16 kB / 483.4 MB, free: 0.5742 MB / 350.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001066/0.1095, allocations: 0.6767 MB / 484 MB, free: 15.89 MB / 366.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004545/0.114, allocations: 3.55 MB / 487.6 MB, free: 12.16 MB / 366.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.002001/0.1161, allocations: 1.425 MB / 489 MB, free: 10.64 MB / 366.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 0.000778/0.1168, allocations: 0.5119 MB / 489.5 MB, free: 10.12 MB / 366.1 MB Notification: Performance of preOpt evalFunc (simulation): time 0.000152/0.117, allocations: 102.1 kB / 489.6 MB, free: 10 MB / 366.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0009175/0.1179, allocations: 0.5437 MB / 490.2 MB, free: 9.441 MB / 366.1 MB Notification: Performance of pre-optimization done (n=89): time 2.254e-06/0.118, allocations: 0 / 490.2 MB, free: 9.441 MB / 366.1 MB Notification: Performance of matching and sorting (n=89): time 0.007448/0.1254, allocations: 2.531 MB / 492.7 MB, free: 6.883 MB / 366.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001297/0.1256, allocations: 274 kB / 493 MB, free: 6.551 MB / 366.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001931/0.1275, allocations: 1.787 MB / 494.8 MB, free: 4.746 MB / 366.1 MB Notification: Performance of collectPreVariables (initialization): time 6.588e-05/0.1276, allocations: 41.7 kB / 494.8 MB, free: 4.699 MB / 366.1 MB Notification: Performance of collectInitialEqns (initialization): time 0.0003722/0.1279, allocations: 498.1 kB / 495.3 MB, free: 4.207 MB / 366.1 MB Notification: Performance of collectInitialBindings (initialization): time 0.0002063/0.1282, allocations: 305.3 kB / 495.6 MB, free: 3.906 MB / 366.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002164/0.1284, allocations: 150.6 kB / 495.7 MB, free: 3.754 MB / 366.1 MB Notification: Performance of setup shared object (initialization): time 0.0001056/0.1285, allocations: 341.8 kB / 496.1 MB, free: 3.414 MB / 366.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0006081/0.1291, allocations: 361.8 kB / 496.4 MB, free: 3.062 MB / 366.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0007048/0.1298, allocations: 0.491 MB / 496.9 MB, free: 2.527 MB / 366.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.005585/0.1354, allocations: 1.952 MB / 498.9 MB, free: 0.5586 MB / 366.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.296e-06/0.1354, allocations: 3.938 kB / 498.9 MB, free: 0.5547 MB / 366.1 MB Notification: Performance of matching and sorting (n=101) (initialization): time 0.00303/0.1385, allocations: 1.415 MB / 0.4886 GB, free: 15.13 MB / 382.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.736e-05/0.1385, allocations: 4 kB / 0.4886 GB, free: 15.12 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 9.057e-06/0.1385, allocations: 4 kB / 0.4886 GB, free: 15.12 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 0.00166/0.1402, allocations: 0.5449 MB / 0.4891 GB, free: 14.57 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003962/0.1406, allocations: 111.8 kB / 0.4892 GB, free: 14.46 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.001492/0.1421, allocations: 1.193 MB / 0.4904 GB, free: 13.24 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0005633/0.1427, allocations: 83.48 kB / 0.4904 GB, free: 13.16 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.236e-05/0.1427, allocations: 28 kB / 0.4905 GB, free: 13.13 MB / 382.1 MB Warning: Assuming fixed start value for the following 1 variables: bat.battery.integrator.q:VARIABLE(flow=false start = bat.battery.SOC_start fixed = true ) "Charge as current integration" type: Real Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 7 * Number of states: 0 () * Number of discrete variables: 10 (delay.firstTrigger,$PRE.delay.firstTrigger,$whenCondition2,delay.sampleTrigger,$whenCondition1,$PRE.delay.y,delay.y,o.y,n1.y,n2.y) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (68): * Single equations (assignments): 67 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(12,22)} Notification: Performance of prepare postOptimizeDAE: time 0.0005787/0.1433, allocations: 449.6 kB / 0.4909 GB, free: 12.68 MB / 382.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001614/0.1435, allocations: 123.2 kB / 0.491 GB, free: 12.56 MB / 382.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.003061/0.1466, allocations: 1.494 MB / 0.4925 GB, free: 11.05 MB / 382.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 9.528e-06/0.1466, allocations: 8 kB / 0.4925 GB, free: 11.04 MB / 382.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.26e-06/0.1466, allocations: 4 kB / 0.4925 GB, free: 11.04 MB / 382.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 1.021e-05/0.1466, allocations: 7.969 kB / 0.4925 GB, free: 11.03 MB / 382.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.005038/0.1517, allocations: 3.142 MB / 0.4956 GB, free: 7.828 MB / 382.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.047e-06/0.1517, allocations: 0 / 0.4956 GB, free: 7.828 MB / 382.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003679/0.152, allocations: 103.8 kB / 0.4957 GB, free: 7.727 MB / 382.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 0.001607/0.1537, allocations: 0.5277 MB / 0.4962 GB, free: 7.195 MB / 382.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.934e-05/0.1537, allocations: 16 kB / 0.4962 GB, free: 7.18 MB / 382.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.001426/0.1552, allocations: 1.158 MB / 0.4973 GB, free: 5.996 MB / 382.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.238e-06/0.1552, allocations: 4 kB / 0.4973 GB, free: 5.992 MB / 382.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.00371/0.1589, allocations: 2.006 MB / 0.4993 GB, free: 3.965 MB / 382.1 MB Notification: Performance of postOpt removeConstants (simulation): time 0.0004458/0.1594, allocations: 280 kB / 0.4996 GB, free: 3.672 MB / 382.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0001347/0.1595, allocations: 16 kB / 0.4996 GB, free: 3.656 MB / 382.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0005166/0.16, allocations: 60.02 kB / 0.4996 GB, free: 3.598 MB / 382.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001424/0.1602, allocations: 76.95 kB / 0.4997 GB, free: 3.523 MB / 382.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.326e-05/0.1602, allocations: 24 kB / 0.4997 GB, free: 3.5 MB / 382.1 MB Notification: Performance of sorting global known variables: time 0.001436/0.1617, allocations: 1.289 MB / 0.501 GB, free: 2.203 MB / 382.1 MB Notification: Performance of sort global known variables: time 1.5e-07/0.1617, allocations: 0 / 0.501 GB, free: 2.203 MB / 382.1 MB Notification: Performance of remove unused functions: time 0.0006407/0.1623, allocations: 235.8 kB / 0.5012 GB, free: 1.973 MB / 382.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 1 (bat.battery.integrator.q) * Number of discrete variables: 8 (delay.sampleTrigger,$whenCondition2,$whenCondition1,n2.y,n1.y,o.y,delay.firstTrigger,delay.y) * Number of discrete states: 1 (delay.u) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (64): * Single equations (assignments): 61 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 2 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 1 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 0 systems * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(12,21)} Notification: Performance of Backend phase and start with SimCode phase: time 0.1808/0.3431, allocations: 2.741 MB / 0.5039 GB, free: 46.59 MB / 382.1 MB Notification: Performance of simCode: created initialization part: time 0.002849/0.346, allocations: 1.097 MB / 0.505 GB, free: 46.59 MB / 382.1 MB Notification: Performance of simCode: created event and clocks part: time 7.443e-06/0.346, allocations: 5.312 kB / 0.505 GB, free: 46.59 MB / 382.1 MB Notification: Performance of simCode: created simulation system equations: time 0.001808/0.3479, allocations: 0.6835 MB / 0.5056 GB, free: 46.57 MB / 382.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0008705/0.3487, allocations: 113.3 kB / 0.5057 GB, free: 46.54 MB / 382.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.02077/0.3695, allocations: 12.97 MB / 0.5184 GB, free: 41.37 MB / 382.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0008374/0.3704, allocations: 1.173 MB / 0.5195 GB, free: 40.59 MB / 382.1 MB Notification: Performance of simCode: alias equations: time 0.0005668/0.371, allocations: 169.6 kB / 0.5197 GB, free: 40.58 MB / 382.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0005219/0.3715, allocations: 429.3 kB / 0.5201 GB, free: 40.25 MB / 382.1 MB Notification: Performance of SimCode: time 1.293e-06/0.3715, allocations: 1.094 kB / 0.5201 GB, free: 40.25 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.04638/0.4179, allocations: 27.11 MB / 0.5466 GB, free: 16.29 MB / 382.1 MB Notification: Performance of buildModelFMU: Generate platform static: time 12.07/12.49, allocations: 7.75 kB / 0.5466 GB, free: 16.29 MB / 382.1 MB (rm -f PowerSysPro_PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad.pipe ; mkfifo PowerSysPro_PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad.pipe ; head -c 1048576 < PowerSysPro_PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad.pipe >> ../files/PowerSysPro_PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad.sim & python3 -m fmpy simulate --output-file PowerSysPro_PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad_res.csv --start-time 0 --stop-time 3600 --timeout 50 --relative-tolerance 1e-06 --interface-type ModelExchange --solver CVode --output-interval 1.44 PowerSysPro_PowerSysPro_Examples_MixingOneSourceOneBatteryOneDieselOneLoad.fmu > PowerSysPro_PowerSysPro.Examples.MixingOneSourceOneBatteryOneDieselOneLoad.pipe 2>&1)