Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.conf.json loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/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/ModelicaServices 4.0.0+maint.om/package.mo", uses=false) Using package ModelicaServices with version 4.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/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 Buildings with version 9.1.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/package.mo) Running command: "" <> buildModelFMU(Buildings.Electrical.DC.Storage.Examples.Battery,fileNamePrefix="Buildings_9_Buildings_Electrical_DC_Storage_Examples_Battery",fmuType="me",version="2.0",platforms={"static"}) "" <> buildModelFMU(Buildings.Electrical.DC.Storage.Examples.Battery,fileNamePrefix="Buildings_9_Buildings_Electrical_DC_Storage_Examples_Battery",fmuType="me",version="2.0",platforms={"static"}) Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/package.mo): time 2.135/2.135, allocations: 387.1 MB / 399.7 MB, free: 9.461 MB / 314.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Complex 4.0.0+maint.om/package.mo): time 0.001063/0.001063, allocations: 184.9 kB / 492.3 MB, free: 0.625 MB / 394.7 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.358/1.358, allocations: 221.3 MB / 0.7872 GB, free: 12.94 MB / 0.5573 GB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0009007/0.0009008, allocations: 98.42 kB / 0.9267 GB, free: 14.02 MB / 0.698 GB Notification: Performance of FrontEnd - loaded program: time 2.482e-05/2.484e-05, allocations: 4 kB / 1.073 GB, free: 180.3 MB / 0.7605 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2141/0.2141, allocations: 142.3 MB / 1.212 GB, free: 38.44 MB / 0.7605 GB Notification: Performance of FrontEnd - scodeFlatten: time 0.7723/0.9865, allocations: 175.7 MB / 1.384 GB, free: 18.87 MB / 0.823 GB Notification: Performance of FrontEnd - mkProgramGraph: time 0.0002131/0.9867, allocations: 83.92 kB / 1.384 GB, free: 18.86 MB / 0.823 GB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/Electrical/Interfaces/Source.mo:28:9-28:50:writable] Warning: Ignoring overconstrained operator applied to array components having size zero: Connections.potentialRoot(terminal.theta);. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.1-maint.9.1.x/Electrical/DC/Sensors/GeneralizedSensor.mo:39:3-39:57:writable] Warning: Ignoring overconstrained operator applied to array components having size zero: Connections.branch(terminal_p.theta, terminal_n.theta);. Notification: Performance of FrontEnd - DAE generated: time 0.05121/1.038, allocations: 24.16 MB / 1.408 GB, free: 19.94 MB / 0.8386 GB Notification: Performance of FrontEnd: time 2.064e-06/1.038, allocations: 4 kB / 1.408 GB, free: 19.94 MB / 0.8386 GB Notification: Performance of Transformations before backend: time 4.37e-05/1.038, allocations: 19.94 kB / 1.408 GB, free: 19.92 MB / 0.8386 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 191 * Number of variables: 191 Notification: Performance of Generate backend data structure: time 0.001327/1.039, allocations: 0.802 MB / 1.409 GB, free: 19.11 MB / 0.8386 GB Notification: Performance of prepare preOptimizeDAE: time 3.93e-05/1.039, allocations: 12.03 kB / 1.409 GB, free: 19.1 MB / 0.8386 GB Notification: Performance of preOpt introduceOutputAliases (simulation): time 0.0001698/1.04, allocations: 125.4 kB / 1.409 GB, free: 19.01 MB / 0.8386 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0006675/1.04, allocations: 127 kB / 1.409 GB, free: 18.89 MB / 0.8386 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006231/1.041, allocations: 421.3 kB / 1.409 GB, free: 18.49 MB / 0.8386 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 5.032e-05/1.041, allocations: 62.62 kB / 1.409 GB, free: 18.46 MB / 0.8386 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001067/1.041, allocations: 79.12 kB / 1.409 GB, free: 18.41 MB / 0.8386 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.00115/1.042, allocations: 0.8561 MB / 1.41 GB, free: 17.72 MB / 0.8386 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.983e-05/1.042, allocations: 7.922 kB / 1.41 GB, free: 17.71 MB / 0.8386 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 6.33e-05/1.042, allocations: 33.17 kB / 1.41 GB, free: 17.7 MB / 0.8386 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.344e-05/1.042, allocations: 45.42 kB / 1.41 GB, free: 17.66 MB / 0.8386 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0008287/1.043, allocations: 0.5469 MB / 1.411 GB, free: 17.3 MB / 0.8386 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.003705/1.047, allocations: 3.721 MB / 1.414 GB, free: 13.86 MB / 0.8386 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0006028/1.048, allocations: 374.5 kB / 1.415 GB, free: 13.54 MB / 0.8386 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0003752/1.048, allocations: 215.1 kB / 1.415 GB, free: 13.38 MB / 0.8386 GB Notification: Performance of preOpt evalFunc (simulation): time 4.206e-05/1.048, allocations: 8.062 kB / 1.415 GB, free: 13.37 MB / 0.8386 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0004018/1.048, allocations: 283.4 kB / 1.415 GB, free: 13.13 MB / 0.8386 GB Notification: Performance of pre-optimization done (n=50): time 4.549e-06/1.048, allocations: 3.984 kB / 1.415 GB, free: 13.12 MB / 0.8386 GB Notification: Performance of matching and sorting (n=50): time 0.0006662/1.049, allocations: 365.3 kB / 1.416 GB, free: 12.83 MB / 0.8386 GB Notification: Performance of inlineWhenForInitialization (initialization): time 9.124e-05/1.049, allocations: 173.5 kB / 1.416 GB, free: 12.63 MB / 0.8386 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.000404/1.05, allocations: 384 kB / 1.416 GB, free: 12.33 MB / 0.8386 GB Notification: Performance of collectPreVariables (initialization): time 6.293e-05/1.05, allocations: 46.08 kB / 1.416 GB, free: 12.29 MB / 0.8386 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002301/1.05, allocations: 336.2 kB / 1.417 GB, free: 12.02 MB / 0.8386 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001244/1.05, allocations: 132.7 kB / 1.417 GB, free: 11.91 MB / 0.8386 GB Notification: Performance of simplifyInitialFunctions (initialization): time 2.714e-05/1.05, allocations: 16.44 kB / 1.417 GB, free: 11.91 MB / 0.8386 GB Notification: Performance of setup shared object (initialization): time 0.000155/1.05, allocations: 363.6 kB / 1.417 GB, free: 11.57 MB / 0.8386 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0003142/1.051, allocations: 156.5 kB / 1.417 GB, free: 11.47 MB / 0.8386 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0004842/1.051, allocations: 388.2 kB / 1.418 GB, free: 11.06 MB / 0.8386 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003764/1.051, allocations: 188.6 kB / 1.418 GB, free: 10.93 MB / 0.8386 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 6.933e-06/1.051, allocations: 4 kB / 1.418 GB, free: 10.92 MB / 0.8386 GB Notification: Performance of matching and sorting (n=97) (initialization): time 0.001121/1.053, allocations: 0.5996 MB / 1.418 GB, free: 10.44 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 0.001261/1.054, allocations: 2.706 MB / 1.421 GB, free: 7.574 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.461e-05/1.054, allocations: 8 kB / 1.421 GB, free: 7.566 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.59e-05/1.054, allocations: 12 kB / 1.421 GB, free: 7.555 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0004055/1.054, allocations: 109.6 kB / 1.421 GB, free: 7.453 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 2.094e-05/1.054, allocations: 15.92 kB / 1.421 GB, free: 7.438 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003876/1.055, allocations: 69.52 kB / 1.421 GB, free: 7.379 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.723e-05/1.055, allocations: 30.25 kB / 1.421 GB, free: 7.355 MB / 0.8386 GB Notification: Performance of prepare postOptimizeDAE: time 9.698e-06/1.055, allocations: 8 kB / 1.421 GB, free: 7.348 MB / 0.8386 GB Notification: Performance of postOpt replaceHomotopyWithSimplified (initialization): time 0.0007786/1.056, allocations: 0.5303 MB / 1.422 GB, free: 6.949 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.955e-06/1.056, allocations: 8 kB / 1.422 GB, free: 6.941 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.382e-05/1.056, allocations: 12 kB / 1.422 GB, free: 6.93 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0003174/1.056, allocations: 110.8 kB / 1.422 GB, free: 6.828 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.857e-05/1.056, allocations: 8 kB / 1.422 GB, free: 6.82 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002824/1.056, allocations: 62.09 kB / 1.422 GB, free: 6.773 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.358e-05/1.056, allocations: 35.38 kB / 1.422 GB, free: 6.742 MB / 0.8386 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 31 * Number of states: 0 () * Number of discrete variables: 56 ($PRE.toOn.enableFire,$PRE.toHold.enableFire,$PRE.toDischarge.enableFire,$PRE.toOff.enableFire,$PRE.toOn.t_start,toOn.t_start,$PRE.toHold.t_start,toHold.t_start,$PRE.toDischarge.t_start,toDischarge.t_start,$PRE.toOff.t_start,toOff.t_start,stateGraphRoot.resume,stateGraphRoot.suspend,$whenCondition1,$PRE.bat.cha.underCharged,bat.cha.underCharged,$PRE.bat.cha.overCharged,bat.cha.overCharged,startCharge.y,greaterEqualThreshold.y,startDischarge.y,lessEqualThreshold.y,$PRE.off.localActive,off.localActive,$PRE.off.newActive,off.newActive,$PRE.off.oldActive,off.oldActive,off.active,toOn.enableFire,$PRE.charge.localActive,charge.localActive,$PRE.charge.newActive,charge.newActive,$PRE.charge.oldActive,charge.oldActive,charge.active,toHold.enableFire,$PRE.hold.localActive,hold.localActive,$PRE.hold.newActive,hold.newActive,$PRE.hold.oldActive,hold.oldActive,hold.active,toDischarge.enableFire,$PRE.discharge.localActive,discharge.localActive,$PRE.discharge.newActive,discharge.newActive,$PRE.discharge.oldActive,discharge.oldActive,discharge.active,toOff.enableFire,stateGraphRoot.activeSteps) * Number of discrete states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (97): * Single equations (assignments): 97 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.000191/1.057, allocations: 171.3 kB / 1.422 GB, free: 6.59 MB / 0.8386 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 7.752e-05/1.057, allocations: 47.44 kB / 1.422 GB, free: 6.543 MB / 0.8386 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0006449/1.057, allocations: 390.9 kB / 1.423 GB, free: 6.266 MB / 0.8386 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.143e-06/1.057, allocations: 4 kB / 1.423 GB, free: 6.262 MB / 0.8386 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.492e-06/1.057, allocations: 8 kB / 1.423 GB, free: 6.254 MB / 0.8386 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.677e-06/1.057, allocations: 3.984 kB / 1.423 GB, free: 6.25 MB / 0.8386 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001518/1.059, allocations: 1.115 MB / 1.424 GB, free: 5.297 MB / 0.8386 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.655e-06/1.059, allocations: 0 / 1.424 GB, free: 5.297 MB / 0.8386 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002045/1.059, allocations: 47.05 kB / 1.424 GB, free: 5.254 MB / 0.8386 GB Notification: Performance of postOpt tearingSystem (simulation): time 9.468e-06/1.059, allocations: 7.953 kB / 1.424 GB, free: 5.246 MB / 0.8386 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.006e-05/1.059, allocations: 13.92 kB / 1.424 GB, free: 5.238 MB / 0.8386 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.361e-06/1.059, allocations: 7.938 kB / 1.424 GB, free: 5.23 MB / 0.8386 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.346e-06/1.059, allocations: 4 kB / 1.424 GB, free: 5.227 MB / 0.8386 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0009055/1.06, allocations: 0.7339 MB / 1.424 GB, free: 4.586 MB / 0.8386 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001634/1.06, allocations: 150 kB / 1.425 GB, free: 4.434 MB / 0.8386 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.578e-05/1.06, allocations: 19.12 kB / 1.425 GB, free: 4.422 MB / 0.8386 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0002014/1.061, allocations: 23.11 kB / 1.425 GB, free: 4.406 MB / 0.8386 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001141/1.061, allocations: 51.56 kB / 1.425 GB, free: 4.367 MB / 0.8386 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.225e-05/1.061, allocations: 15.98 kB / 1.425 GB, free: 4.352 MB / 0.8386 GB Notification: Performance of sorting global known variables: time 0.000246/1.061, allocations: 259 kB / 1.425 GB, free: 4.152 MB / 0.8386 GB Notification: Performance of sort global known variables: time 3.938e-06/1.061, allocations: 0 / 1.425 GB, free: 4.152 MB / 0.8386 GB Notification: Performance of remove unused functions: time 0.0007505/1.062, allocations: 250.8 kB / 1.425 GB, free: 3.938 MB / 0.8386 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 7 * Number of states: 1 (bat.cha.SOC) * Number of discrete variables: 36 (toOff.t_start,toDischarge.t_start,toHold.t_start,toOn.t_start,off.localActive,charge.localActive,hold.localActive,discharge.localActive,$cse1,$cse2,$cse3,$cse4,$whenCondition1,bat.cha.underCharged,bat.cha.overCharged,startCharge.y,greaterEqualThreshold.y,startDischarge.y,lessEqualThreshold.y,off.newActive,off.oldActive,off.active,toOn.enableFire,charge.newActive,charge.oldActive,charge.active,toHold.enableFire,hold.newActive,hold.oldActive,hold.active,toDischarge.enableFire,discharge.newActive,discharge.oldActive,discharge.active,toOff.enableFire,stateGraphRoot.activeSteps) * Number of discrete states: 10 (discharge.newActive,hold.newActive,charge.newActive,off.newActive,bat.cha.underCharged,bat.cha.overCharged,toOn.t_start,toHold.t_start,toDischarge.t_start,toOff.t_start) * Top-level inputs: 0 Notification: Strong component statistics for simulation (55): * Single equations (assignments): 47 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 8 * If-equations: 0 * Equation systems (linear and non-linear blocks): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.001343/1.063, allocations: 1.731 MB / 1.427 GB, free: 2.309 MB / 0.8386 GB Notification: Performance of simCode: created initialization part: time 0.001078/1.064, allocations: 0.7378 MB / 1.428 GB, free: 1.758 MB / 0.8386 GB Notification: Performance of simCode: created event and clocks part: time 5.36e-06/1.064, allocations: 4 kB / 1.428 GB, free: 1.754 MB / 0.8386 GB Notification: Performance of simCode: created simulation system equations: time 0.0003112/1.065, allocations: 196.3 kB / 1.428 GB, free: 1.609 MB / 0.8386 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000505/1.065, allocations: 97.66 kB / 1.428 GB, free: 1.543 MB / 0.8386 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001687/1.067, allocations: 0.9009 MB / 1.429 GB, free: 0.7148 MB / 0.8386 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005212/1.067, allocations: 0.9208 MB / 1.43 GB, free: 15.78 MB / 0.8542 GB Notification: Performance of simCode: alias equations: time 0.0004647/1.068, allocations: 140.7 kB / 1.43 GB, free: 15.64 MB / 0.8542 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0002547/1.068, allocations: 218.5 kB / 1.43 GB, free: 15.57 MB / 0.8542 GB Notification: Performance of SimCode: time 3.7e-07/1.068, allocations: 0 / 1.43 GB, free: 15.57 MB / 0.8542 GB Notification: Performance of buildModelFMU: Generate the FMI files: time 0.02511/1.093, allocations: 10.75 MB / 1.44 GB, free: 5 MB / 0.8542 GB Notification: Performance of buildModelFMU: configured platform static using cached values: time 0.0001652/1.093, allocations: 155 kB / 1.441 GB, free: 4.773 MB / 0.8542 GB Notification: Performance of buildModelFMU: Generate platform static: time 2.429/3.522, allocations: 0 / 1.441 GB, free: 4.773 MB / 0.8542 GB (rm -f Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; mkfifo Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe ; head -c 1048576 < Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe >> ../files/Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.sim & /home/hudson/saved_omc/OMSimulator/install/linux/bin/OMSimulator -r=Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery_res.mat --tempDir=temp_Buildings_9_Buildings_Electrical_DC_Storage_Examples_Battery_fmu --startTime=0 --stopTime=432000 --timeout=50 --tolerance=1e-06 Buildings_9_Buildings_Electrical_DC_Storage_Examples_Battery.fmu > Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery.pipe 2>&1) TODO: How the !@#!# did the simulation report success but simulation result Buildings_9_Buildings.Electrical.DC.Storage.Examples.Battery_res.mat does not exist to compare? outputFormat=mat