Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries/ --ompython_omhome=/usr BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor.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/NcDataReader2 2.5.1-master/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo", uses=false) Using package BuildingSystems with version 2.0.0-beta (/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo) Using package NcDataReader2 with version 2.5.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.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: translateModel(BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor") translateModel(BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor,tolerance=1e-06,outputFormat="empty",numberOfIntervals=5000,variableFilter="",fileNamePrefix="BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.0008186/0.0008186, allocations: 99.78 kB / 15.05 MB, free: 1.105 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.0009454/0.0009454, allocations: 177.3 kB / 15.95 MB, free: 216 kB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 4.0.0+maint.om/package.mo): time 1.151/1.151, allocations: 223.2 MB / 239.9 MB, free: 5.352 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/NcDataReader2 2.5.1-master/package.mo): time 0.001597/0.001597, allocations: 270.8 kB / 291.2 MB, free: 1.906 MB / 238.1 MB [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:5:3-5:34:writable] Warning: Got element f_alp that was not referenced in the package.order file. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:6:3-6:35:writable] Warning: Elements in the package.mo-file need to be in the same relative order as the package.order file. Got element named f_lay but it was already added because it was not the next element in the list at that time. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:6:3-6:35:writable] Warning: Got element f_lay that was not referenced in the package.order file. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:7:3-7:37:writable] Warning: Elements in the package.mo-file need to be in the same relative order as the package.order file. Got element named f_loss but it was already added because it was not the next element in the list at that time. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:7:3-7:37:writable] Warning: Got element f_loss that was not referenced in the package.order file. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:8:3-8:33:writable] Warning: Elements in the package.mo-file need to be in the same relative order as the package.order file. Got element named f_pv but it was already added because it was not the next element in the list at that time. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:8:3-8:33:writable] Warning: Got element f_pv that was not referenced in the package.order file. [/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/Buildings/Airvolumes/Parameter/package.mo:2:1-34:14:writable] Warning: f_pv was referenced in the package.order file, but was not found in package.mo, f_pv/package.mo or f_pv.mo. Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/BuildingSystems 2.0.0-master/package.mo): time 0.7105/0.7105, allocations: 144.6 MB / 487 MB, free: 7.164 MB / 350.1 MB Notification: Performance of FrontEnd - loaded program: time 0.0003684/0.0003685, allocations: 16.81 kB / 0.5683 GB, free: 38.24 MB / 430.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.1165/0.1169, allocations: 83.08 MB / 0.6494 GB, free: 3.566 MB / 446.1 MB Notification: Performance of NFInst.instantiate(BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor): time 0.001715/0.1186, allocations: 1.599 MB / 0.651 GB, free: 1.957 MB / 446.1 MB Notification: Performance of NFInst.instExpressions: time 0.0008522/0.1195, allocations: 0.6575 MB / 0.6516 GB, free: 1.297 MB / 446.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 7.999e-05/0.1196, allocations: 0 / 0.6516 GB, free: 1.297 MB / 446.1 MB Notification: Performance of NFTyping.typeComponents: time 0.0001225/0.1197, allocations: 69 kB / 0.6517 GB, free: 1.23 MB / 446.1 MB Notification: Performance of NFTyping.typeBindings: time 0.0001235/0.1198, allocations: 90.09 kB / 0.6518 GB, free: 1.145 MB / 446.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0003967/0.1202, allocations: 128.2 kB / 0.6519 GB, free: 1.023 MB / 446.1 MB Notification: Performance of NFFlatten.flatten: time 0.0001871/0.1204, allocations: 152.8 kB / 0.6521 GB, free: 0.875 MB / 446.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001147/0.1206, allocations: 53.55 kB / 0.6521 GB, free: 0.8242 MB / 446.1 MB Notification: Performance of NFEvalConstants.evaluate: time 9.077e-05/0.1207, allocations: 95.66 kB / 0.6522 GB, free: 0.7305 MB / 446.1 MB Notification: Performance of NFSimplifyModel.simplify: time 0.0001377/0.1208, allocations: 104.3 kB / 0.6523 GB, free: 0.6289 MB / 446.1 MB Notification: Performance of NFPackage.collectConstants: time 2.219e-05/0.1208, allocations: 4 kB / 0.6523 GB, free: 0.625 MB / 446.1 MB Notification: Performance of NFFlatten.collectFunctions: time 0.0001041/0.1209, allocations: 68.53 kB / 0.6524 GB, free: 0.5586 MB / 446.1 MB Notification: Performance of NFScalarize.scalarize: time 4.704e-05/0.121, allocations: 41.34 kB / 0.6524 GB, free: 0.5195 MB / 446.1 MB Notification: Performance of NFVerifyModel.verify: time 4.675e-05/0.1211, allocations: 65.56 kB / 0.6525 GB, free: 460 kB / 446.1 MB Notification: Performance of NFConvertDAE.convert: time 0.0001887/0.1212, allocations: 219.8 kB / 0.6527 GB, free: 240 kB / 446.1 MB Notification: Performance of FrontEnd - DAE generated: time 1.593e-06/0.1213, allocations: 3.938 kB / 0.6527 GB, free: 236 kB / 446.1 MB Notification: Performance of FrontEnd: time 1.252e-06/0.1213, allocations: 0.6562 kB / 0.6527 GB, free: 236 kB / 446.1 MB Notification: Performance of Transformations before backend: time 3.557e-06/0.1213, allocations: 0 / 0.6527 GB, free: 236 kB / 446.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 34 * Number of variables: 34 Notification: Performance of Generate backend data structure: time 0.000642/0.1219, allocations: 0.543 MB / 0.6532 GB, free: 15.64 MB / 462.1 MB Notification: Performance of prepare preOptimizeDAE: time 2.623e-05/0.122, allocations: 11.97 kB / 0.6532 GB, free: 15.62 MB / 462.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.957e-05/0.122, allocations: 32.5 kB / 0.6533 GB, free: 15.59 MB / 462.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.000382/0.1224, allocations: 304.8 kB / 0.6535 GB, free: 15.26 MB / 462.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.322e-05/0.1224, allocations: 8 kB / 0.6536 GB, free: 15.25 MB / 462.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 3.405e-05/0.1225, allocations: 19.98 kB / 0.6536 GB, free: 15.23 MB / 462.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0003163/0.1228, allocations: 221.8 kB / 0.6538 GB, free: 15 MB / 462.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 9.437e-06/0.1228, allocations: 11.92 kB / 0.6538 GB, free: 14.98 MB / 462.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.834e-05/0.1228, allocations: 4.688 kB / 0.6538 GB, free: 14.98 MB / 462.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.491e-06/0.1228, allocations: 7.938 kB / 0.6538 GB, free: 14.97 MB / 462.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0002094/0.1231, allocations: 126 kB / 0.6539 GB, free: 14.85 MB / 462.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0007018/0.1238, allocations: 0.697 MB / 0.6546 GB, free: 14.1 MB / 462.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0003223/0.1241, allocations: 174.6 kB / 0.6548 GB, free: 13.93 MB / 462.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.203e-05/0.1241, allocations: 0 / 0.6548 GB, free: 13.93 MB / 462.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0002547/0.1244, allocations: 179.4 kB / 0.6549 GB, free: 13.73 MB / 462.1 MB Notification: Performance of pre-optimization done (n=15): time 1.192e-06/0.1244, allocations: 0 / 0.6549 GB, free: 13.73 MB / 462.1 MB Notification: Performance of matching and sorting (n=15): time 0.0006161/0.125, allocations: 465.7 kB / 0.6554 GB, free: 13.25 MB / 462.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 5.774e-05/0.1251, allocations: 140.4 kB / 0.6555 GB, free: 13.08 MB / 462.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002187/0.1253, allocations: 278.6 kB / 0.6558 GB, free: 12.81 MB / 462.1 MB Notification: Performance of collectPreVariables (initialization): time 2.162e-05/0.1253, allocations: 29.7 kB / 0.6558 GB, free: 12.77 MB / 462.1 MB Notification: Performance of collectInitialEqns (initialization): time 9.136e-05/0.1254, allocations: 160.3 kB / 0.656 GB, free: 12.61 MB / 462.1 MB Notification: Performance of collectInitialBindings (initialization): time 3.248e-05/0.1255, allocations: 39.36 kB / 0.656 GB, free: 12.57 MB / 462.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 1.065e-05/0.1255, allocations: 8 kB / 0.656 GB, free: 12.56 MB / 462.1 MB Notification: Performance of setup shared object (initialization): time 9.256e-05/0.1256, allocations: 334.8 kB / 0.6563 GB, free: 12.23 MB / 462.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0001482/0.1257, allocations: 92.14 kB / 0.6564 GB, free: 12.14 MB / 462.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0001625/0.1259, allocations: 133.5 kB / 0.6565 GB, free: 11.99 MB / 462.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001521/0.1261, allocations: 113.7 kB / 0.6567 GB, free: 11.87 MB / 462.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.943e-06/0.1261, allocations: 0 / 0.6567 GB, free: 11.87 MB / 462.1 MB Notification: Performance of matching and sorting (n=22) (initialization): time 0.0004424/0.1265, allocations: 347.9 kB / 0.657 GB, free: 11.52 MB / 462.1 MB Notification: Performance of prepare postOptimizeDAE: time 3.068e-05/0.1266, allocations: 37.69 kB / 0.657 GB, free: 11.48 MB / 462.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 4.058e-06/0.1266, allocations: 0 / 0.657 GB, free: 11.48 MB / 462.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.079e-05/0.1266, allocations: 3.984 kB / 0.657 GB, free: 11.47 MB / 462.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0001146/0.1267, allocations: 32.08 kB / 0.6571 GB, free: 11.44 MB / 462.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 6.362e-06/0.1267, allocations: 4 kB / 0.6571 GB, free: 11.44 MB / 462.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0001119/0.1269, allocations: 23.83 kB / 0.6571 GB, free: 11.41 MB / 462.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 1.814e-05/0.1269, allocations: 15.94 kB / 0.6571 GB, free: 11.4 MB / 462.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 4 * Number of states: 0 () * Number of discrete variables: 12 ($whenCondition1,$PRE.mot.uppHys.y,mot.uppHys.y,$PRE.mot.lowHys.y,mot.lowHys.y,ySet.a,ySet.b,ySet.last,$PRE.ySet.nextEvent,ySet.nextEvent,ySet.nextEventScaled,mot.int.local_reset) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (17): * Single equations (assignments): 16 * Array equations: 0 * Algorithm blocks: 1 * 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.0001399/0.127, allocations: 189.5 kB / 0.6573 GB, free: 11.2 MB / 462.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 3.29e-05/0.1271, allocations: 31.67 kB / 0.6573 GB, free: 11.17 MB / 462.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 4.294e-05/0.1271, allocations: 25.84 kB / 0.6573 GB, free: 11.14 MB / 462.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 2.805e-06/0.1271, allocations: 4.078 kB / 0.6573 GB, free: 11.14 MB / 462.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.446e-06/0.1271, allocations: 3.938 kB / 0.6573 GB, free: 11.14 MB / 462.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.575e-06/0.1271, allocations: 4 kB / 0.6573 GB, free: 11.13 MB / 462.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0002057/0.1273, allocations: 293.3 kB / 0.6576 GB, free: 10.8 MB / 462.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.062e-06/0.1274, allocations: 0 / 0.6576 GB, free: 10.8 MB / 462.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 9.285e-05/0.1275, allocations: 16 kB / 0.6576 GB, free: 10.78 MB / 462.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.824e-06/0.1275, allocations: 0 / 0.6576 GB, free: 10.78 MB / 462.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 1.937e-05/0.1275, allocations: 11.94 kB / 0.6577 GB, free: 10.77 MB / 462.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.292e-06/0.1275, allocations: 3.938 kB / 0.6577 GB, free: 10.77 MB / 462.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 7.12e-07/0.1275, allocations: 4 kB / 0.6577 GB, free: 10.76 MB / 462.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0005997/0.1281, allocations: 468.4 kB / 0.6581 GB, free: 10.28 MB / 462.1 MB Notification: Performance of postOpt removeConstants (simulation): time 5.221e-05/0.1282, allocations: 108.8 kB / 0.6582 GB, free: 10.16 MB / 462.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 3.689e-05/0.1282, allocations: 8 kB / 0.6582 GB, free: 10.15 MB / 462.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001077/0.1283, allocations: 19.94 kB / 0.6582 GB, free: 10.13 MB / 462.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 6.399e-05/0.1284, allocations: 27.95 kB / 0.6583 GB, free: 10.1 MB / 462.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 1.8e-05/0.1284, allocations: 8 kB / 0.6583 GB, free: 10.09 MB / 462.1 MB Notification: Performance of sorting global known variables: time 0.0001569/0.1286, allocations: 205.9 kB / 0.6585 GB, free: 9.891 MB / 462.1 MB Notification: Performance of sort global known variables: time 1.1e-07/0.1286, allocations: 0 / 0.6585 GB, free: 9.891 MB / 462.1 MB Notification: Performance of remove unused functions: time 0.0002426/0.1288, allocations: 55.91 kB / 0.6585 GB, free: 9.836 MB / 462.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 1 * Number of states: 1 (mot.int.y) * Number of discrete variables: 8 ($whenCondition1,mot.uppHys.y,mot.lowHys.y,ySet.a,ySet.b,ySet.last,ySet.nextEvent,ySet.nextEventScaled) * Number of discrete states: 8 (mot.lowHys.y,mot.uppHys.y,ySet.nextEvent,ySet.last,ySet.nextEventScaled,ySet.b,ySet.a,$whenCondition1) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (10): * Single equations (assignments): 9 * Array equations: 0 * Algorithm blocks: 1 * 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 Backend phase and start with SimCode phase: time 0.0001492/0.129, allocations: 135.3 kB / 0.6587 GB, free: 9.695 MB / 462.1 MB Notification: Performance of simCode: created initialization part: time 0.0004071/0.1294, allocations: 295.2 kB / 0.6589 GB, free: 9.395 MB / 462.1 MB Notification: Performance of simCode: created event and clocks part: time 2.795e-06/0.1294, allocations: 8.188 kB / 0.6589 GB, free: 9.387 MB / 462.1 MB Notification: Performance of simCode: created simulation system equations: time 0.0001987/0.1296, allocations: 191.3 kB / 0.6591 GB, free: 9.188 MB / 462.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.000194/0.1298, allocations: 24.55 kB / 0.6591 GB, free: 9.164 MB / 462.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0008092/0.1306, allocations: 0.5144 MB / 0.6596 GB, free: 8.621 MB / 462.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002441/0.1309, allocations: 0.761 MB / 0.6604 GB, free: 7.836 MB / 462.1 MB Notification: Performance of simCode: alias equations: time 7e-05/0.131, allocations: 17.55 kB / 0.6604 GB, free: 7.82 MB / 462.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 3.675e-05/0.131, allocations: 19.42 kB / 0.6604 GB, free: 7.805 MB / 462.1 MB Notification: Performance of SimCode: time 2.1e-07/0.131, allocations: 4 kB / 0.6604 GB, free: 7.801 MB / 462.1 MB Notification: Performance of Templates: time 0.004637/0.1357, allocations: 2.443 MB / 0.6628 GB, free: 5.375 MB / 462.1 MB make -j1 -f BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor.makefile Environment - environmentSimulation: (rm -f BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor.pipe ; mkfifo BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor.pipe ; head -c 1048576 < BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor.pipe >> ../files/BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor.sim & ./BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor -abortSlowSimulation -alarm=480 -lv LOG_STATS > BuildingSystems_BuildingSystems.Fluid.Actuators.Motors.Examples.IdealMotor.pipe 2>&1) Environment - environmentSimulation: