Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.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/Buildings 9.1.3-maint.9.1.x/package.mo", uses=false) Using package Buildings with version 9.1.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.3-maint.9.1.x/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(Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|preHeatCoil.TAirSup|preHeatCoil.TSupSetHea|preHeatCoil.TMix|preHeatCoil.yPum|preHeatCoil.yVal",fileNamePrefix="Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil") translateModel(Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|preHeatCoil.TAirSup|preHeatCoil.TSupSetHea|preHeatCoil.TMix|preHeatCoil.yPum|preHeatCoil.yVal",fileNamePrefix="Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001187/0.001188, allocations: 104.3 kB / 16.41 MB, free: 6.504 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.001464/0.001464, allocations: 185.6 kB / 17.34 MB, free: 5.766 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.373/1.373, allocations: 222.9 MB / 241 MB, free: 15.17 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 9.1.3-maint.9.1.x/package.mo): time 2.226/2.226, allocations: 390.2 MB / 0.6655 GB, free: 0.6641 MB / 0.5294 GB Notification: Performance of FrontEnd - loaded program: time 0.001468/0.001468, allocations: 59.91 kB / 0.9515 GB, free: 7.672 MB / 0.7325 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.8568/0.8583, allocations: 140.4 MB / 1.089 GB, free: 5.52 MB / 0.8575 GB Notification: Performance of NFInst.instantiate(Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil): time 0.004446/0.8628, allocations: 2.942 MB / 1.091 GB, free: 3.453 MB / 0.8575 GB Notification: Performance of NFInst.instExpressions: time 0.002341/0.8651, allocations: 1.096 MB / 1.093 GB, free: 2.668 MB / 0.8575 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003747/0.8655, allocations: 14.59 kB / 1.093 GB, free: 2.664 MB / 0.8575 GB Notification: Performance of NFTyping.typeComponents: time 0.0002877/0.8659, allocations: 81.72 kB / 1.093 GB, free: 2.602 MB / 0.8575 GB Notification: Performance of NFTyping.typeBindings: time 0.0002043/0.8661, allocations: 78.89 kB / 1.093 GB, free: 2.539 MB / 0.8575 GB Notification: Performance of NFTyping.typeClassSections: time 0.0009524/0.867, allocations: 341.4 kB / 1.093 GB, free: 2.336 MB / 0.8575 GB Notification: Performance of NFFlatten.flatten: time 0.0008782/0.8679, allocations: 0.7101 MB / 1.094 GB, free: 1.977 MB / 0.8575 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0007498/0.8687, allocations: 0.4943 MB / 1.094 GB, free: 1.727 MB / 0.8575 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0003179/0.869, allocations: 247.6 kB / 1.094 GB, free: 1.59 MB / 0.8575 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003206/0.8694, allocations: 250.6 kB / 1.095 GB, free: 1.445 MB / 0.8575 GB Notification: Performance of NFPackage.collectConstants: time 0.0001265/0.8695, allocations: 69.19 kB / 1.095 GB, free: 1.445 MB / 0.8575 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0001935/0.8697, allocations: 79.5 kB / 1.095 GB, free: 1.441 MB / 0.8575 GB Notification: Performance of NFScalarize.scalarize: time 0.0001397/0.8698, allocations: 139.9 kB / 1.095 GB, free: 1.344 MB / 0.8575 GB Notification: Performance of NFVerifyModel.verify: time 0.0002431/0.8701, allocations: 278.3 kB / 1.095 GB, free: 1.141 MB / 0.8575 GB Notification: Performance of NFConvertDAE.convert: time 0.001036/0.8711, allocations: 0.7524 MB / 1.096 GB, free: 0.8086 MB / 0.8575 GB Notification: Performance of FrontEnd - DAE generated: time 8.095e-06/0.8711, allocations: 4.656 kB / 1.096 GB, free: 0.8047 MB / 0.8575 GB Notification: Performance of FrontEnd: time 1.754e-06/0.8712, allocations: 4 kB / 1.096 GB, free: 0.8008 MB / 0.8575 GB Notification: Performance of Transformations before backend: time 1.16e-05/0.8712, allocations: 0.7812 kB / 1.096 GB, free: 0.8008 MB / 0.8575 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 113 * Number of variables: 113 Notification: Performance of Generate backend data structure: time 0.00184/0.873, allocations: 0.8817 MB / 1.097 GB, free: 140 kB / 0.8575 GB Notification: Performance of prepare preOptimizeDAE: time 4.932e-05/0.8731, allocations: 9.5 kB / 1.097 GB, free: 140 kB / 0.8575 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001444/0.8732, allocations: 59.59 kB / 1.097 GB, free: 112 kB / 0.8575 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0008648/0.8741, allocations: 452.2 kB / 1.097 GB, free: 15.76 MB / 0.8731 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 6.35e-05/0.8742, allocations: 38.95 kB / 1.097 GB, free: 15.75 MB / 0.8731 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001005/0.8743, allocations: 49.94 kB / 1.097 GB, free: 15.73 MB / 0.8731 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001226/0.8755, allocations: 0.5334 MB / 1.098 GB, free: 15.45 MB / 0.8731 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.487e-05/0.8755, allocations: 0.6875 kB / 1.098 GB, free: 15.45 MB / 0.8731 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.057e-05/0.8756, allocations: 17.66 kB / 1.098 GB, free: 15.44 MB / 0.8731 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 2.242e-05/0.8756, allocations: 11.66 kB / 1.098 GB, free: 15.44 MB / 0.8731 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.001075/0.8767, allocations: 405.4 kB / 1.098 GB, free: 15.3 MB / 0.8731 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002644/0.8794, allocations: 1.84 MB / 1.1 GB, free: 13.97 MB / 0.8731 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001035/0.8804, allocations: 359.5 kB / 1.1 GB, free: 13.81 MB / 0.8731 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004384/0.8809, allocations: 178.9 kB / 1.101 GB, free: 13.74 MB / 0.8731 GB Notification: Performance of preOpt evalFunc (simulation): time 3.201e-05/0.8809, allocations: 4.281 kB / 1.101 GB, free: 13.74 MB / 0.8731 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0006459/0.8816, allocations: 247.3 kB / 1.101 GB, free: 13.61 MB / 0.8731 GB Notification: Performance of pre-optimization done (n=35): time 2.735e-06/0.8816, allocations: 0 / 1.101 GB, free: 13.61 MB / 0.8731 GB Notification: Performance of matching and sorting (n=35): time 0.00149/0.8831, allocations: 481.9 kB / 1.101 GB, free: 13.44 MB / 0.8731 GB Notification: Performance of inlineWhenForInitialization (initialization): time 6.286e-05/0.8831, allocations: 88.2 kB / 1.101 GB, free: 13.34 MB / 0.8731 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0005986/0.8838, allocations: 400.5 kB / 1.102 GB, free: 13.13 MB / 0.8731 GB Notification: Performance of collectPreVariables (initialization): time 6.063e-05/0.8838, allocations: 41.31 kB / 1.102 GB, free: 13.09 MB / 0.8731 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002208/0.884, allocations: 253 kB / 1.102 GB, free: 12.89 MB / 0.8731 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001048/0.8842, allocations: 94.36 kB / 1.102 GB, free: 12.82 MB / 0.8731 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001822/0.8843, allocations: 110.9 kB / 1.102 GB, free: 12.76 MB / 0.8731 GB Notification: Performance of setup shared object (initialization): time 0.0001692/0.8845, allocations: 353.9 kB / 1.103 GB, free: 12.43 MB / 0.8731 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0004565/0.885, allocations: 157.8 kB / 1.103 GB, free: 12.38 MB / 0.8731 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0005533/0.8856, allocations: 262.1 kB / 1.103 GB, free: 12.2 MB / 0.8731 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.000905/0.8865, allocations: 420.6 kB / 1.103 GB, free: 11.92 MB / 0.8731 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.439e-06/0.8865, allocations: 5.062 kB / 1.103 GB, free: 11.91 MB / 0.8731 GB Notification: Performance of matching and sorting (n=60) (initialization): time 0.001403/0.8879, allocations: 0.5144 MB / 1.104 GB, free: 11.68 MB / 0.8731 GB Notification: Performance of prepare postOptimizeDAE: time 5.596e-05/0.888, allocations: 34.34 kB / 1.104 GB, free: 11.65 MB / 0.8731 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.443e-05/0.888, allocations: 3.75 kB / 1.104 GB, free: 11.65 MB / 0.8731 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.771e-05/0.888, allocations: 5.375 kB / 1.104 GB, free: 11.65 MB / 0.8731 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.000375/0.8884, allocations: 76.78 kB / 1.104 GB, free: 11.64 MB / 0.8731 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.529e-05/0.8884, allocations: 9.531 kB / 1.104 GB, free: 11.64 MB / 0.8731 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0004307/0.8889, allocations: 78.81 kB / 1.104 GB, free: 11.6 MB / 0.8731 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 5.311e-05/0.8889, allocations: 19.5 kB / 1.104 GB, free: 11.59 MB / 0.8731 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 14 * Number of states: 0 () * Number of discrete variables: 35 ($PRE.preHeatCoil.toOn.enableFire,$PRE.preHeatCoil.toOff.enableFire,preHeatCoil.toOn.t_start,$PRE.preHeatCoil.toOn.t_start,preHeatCoil.stateGraphRoot.resume,preHeatCoil.stateGraphRoot.suspend,preHeatCoil.toOff.t_start,$PRE.preHeatCoil.toOff.t_start,preHeatCoil.toOff.fire,preHeatCoil.toOff.enableFire,preHeatCoil.pumOn.active,preHeatCoil.pumOn.oldActive,$PRE.preHeatCoil.pumOn.oldActive,preHeatCoil.pumOn.newActive,$PRE.preHeatCoil.pumOn.newActive,preHeatCoil.pumOn.localActive,$PRE.preHeatCoil.pumOn.localActive,preHeatCoil.stateGraphRoot.activeSteps,preHeatCoil.toOn.enableFire,preHeatCoil.pumOff.oldActive,$PRE.preHeatCoil.pumOff.oldActive,preHeatCoil.pumOff.newActive,$PRE.preHeatCoil.pumOff.newActive,preHeatCoil.pumOff.localActive,$PRE.preHeatCoil.pumOff.localActive,preHeatCoil.pumOff.active,preHeatCoil.preHeaOn.y,$PRE.preHeatCoil.preHeaOn.y,TMix.count,$PRE.TMix.count,TMix.T_start,$PRE.TMix.T_start,$whenCondition1,$whenCondition2,preHeatCoil.preHeaCoiCon.I.trigger_internal) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (59): * Single equations (assignments): 58 * Array equations: 0 * Algorithm blocks: 1 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of prepare postOptimizeDAE: time 0.0003177/0.8892, allocations: 207.9 kB / 1.104 GB, free: 11.43 MB / 0.8731 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 8.037e-05/0.8893, allocations: 50.78 kB / 1.104 GB, free: 11.39 MB / 0.8731 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.001036/0.8904, allocations: 388.6 kB / 1.105 GB, free: 11.24 MB / 0.8731 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.417e-05/0.8904, allocations: 8.062 kB / 1.105 GB, free: 11.23 MB / 0.8731 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.64e-06/0.8904, allocations: 0 / 1.105 GB, free: 11.23 MB / 0.8731 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 8.566e-06/0.8904, allocations: 3.797 kB / 1.105 GB, free: 11.23 MB / 0.8731 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001814/0.8922, allocations: 0.9566 MB / 1.106 GB, free: 10.66 MB / 0.8731 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 5.421e-06/0.8923, allocations: 1.969 kB / 1.106 GB, free: 10.66 MB / 0.8731 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0002735/0.8925, allocations: 46.98 kB / 1.106 GB, free: 10.66 MB / 0.8731 GB Notification: Performance of postOpt tearingSystem (simulation): time 6.151e-06/0.8926, allocations: 6.031 kB / 1.106 GB, free: 10.66 MB / 0.8731 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.227e-05/0.8926, allocations: 9.344 kB / 1.106 GB, free: 10.65 MB / 0.8731 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.002e-06/0.8926, allocations: 2.156 kB / 1.106 GB, free: 10.65 MB / 0.8731 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.743e-06/0.8926, allocations: 1.406 kB / 1.106 GB, free: 10.65 MB / 0.8731 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001442/0.8941, allocations: 0.6482 MB / 1.106 GB, free: 10.31 MB / 0.8731 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001997/0.8943, allocations: 153.9 kB / 1.107 GB, free: 10.17 MB / 0.8731 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.575e-05/0.8944, allocations: 9.172 kB / 1.107 GB, free: 10.16 MB / 0.8731 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003315/0.8947, allocations: 37.12 kB / 1.107 GB, free: 10.16 MB / 0.8731 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001581/0.8949, allocations: 50.17 kB / 1.107 GB, free: 10.14 MB / 0.8731 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.074e-05/0.8949, allocations: 12.45 kB / 1.107 GB, free: 10.14 MB / 0.8731 GB Notification: Performance of sorting global known variables: time 0.0003655/0.8953, allocations: 265.2 kB / 1.107 GB, free: 9.992 MB / 0.8731 GB Notification: Performance of sort global known variables: time 1.2e-07/0.8953, allocations: 0 / 1.107 GB, free: 9.992 MB / 0.8731 GB Notification: Performance of remove unused functions: time 0.00053/0.8958, allocations: 95.97 kB / 1.107 GB, free: 9.969 MB / 0.8731 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 3 * Number of states: 1 (preHeatCoil.preHeaCoiCon.I.y) * Number of discrete variables: 21 (preHeatCoil.toOn.t_start,preHeatCoil.toOff.enableFire,preHeatCoil.pumOn.active,preHeatCoil.pumOff.active,$cse1,$cse2,$whenCondition2,$whenCondition1,TMix.T_start,TMix.count,preHeatCoil.preHeaOn.y,preHeatCoil.pumOff.localActive,preHeatCoil.pumOff.newActive,preHeatCoil.pumOff.oldActive,preHeatCoil.toOn.enableFire,preHeatCoil.stateGraphRoot.activeSteps,preHeatCoil.pumOn.localActive,preHeatCoil.pumOn.newActive,preHeatCoil.pumOn.oldActive,preHeatCoil.toOff.fire,preHeatCoil.toOff.t_start) * Number of discrete states: 5 (TMix.count,preHeatCoil.pumOff.newActive,preHeatCoil.pumOn.newActive,preHeatCoil.preHeaOn.y,preHeatCoil.toOn.t_start) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (37): * Single equations (assignments): 31 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 6 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 0 * Mixed (continuous/discrete) equation systems: 0 Notification: Performance of Backend phase and start with SimCode phase: time 0.0002207/0.896, allocations: 126.4 kB / 1.107 GB, free: 9.867 MB / 0.8731 GB Notification: Performance of simCode: created initialization part: time 0.00114/0.8972, allocations: 443.5 kB / 1.108 GB, free: 9.684 MB / 0.8731 GB Notification: Performance of simCode: created event and clocks part: time 4.448e-06/0.8972, allocations: 0.8125 kB / 1.108 GB, free: 9.684 MB / 0.8731 GB Notification: Performance of simCode: created simulation system equations: time 0.0004992/0.8977, allocations: 184 kB / 1.108 GB, free: 9.625 MB / 0.8731 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006208/0.8983, allocations: 90.17 kB / 1.108 GB, free: 9.586 MB / 0.8731 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001596/0.8999, allocations: 0.7756 MB / 1.109 GB, free: 9.102 MB / 0.8731 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0004566/0.9004, allocations: 0.8214 MB / 1.109 GB, free: 8.398 MB / 0.8731 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001599/0.9006, allocations: 46.5 kB / 1.109 GB, free: 8.383 MB / 0.8731 GB Notification: Performance of SimCode: time 6.31e-07/0.9006, allocations: 0 / 1.109 GB, free: 8.383 MB / 0.8731 GB Notification: Performance of Templates: time 0.01324/0.9138, allocations: 6.011 MB / 1.115 GB, free: 7.637 MB / 0.8731 GB make -j1 -f Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.makefile (rm -f Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.pipe ; mkfifo Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.pipe ; head -c 1048576 < Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.pipe >> ../files/Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.sim & ./Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.pipe 2>&1) diffSimulationResults("Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil_res.mat","/mnt/ReferenceFiles/Buildings/csv/maint_9.1.x/Buildings_Examples_DualFanDualDuct_Controls_Examples_PreHeatCoil.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Buildings_9_Buildings.Examples.DualFanDualDuct.Controls.Examples.PreHeatCoil.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches