Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.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.Fluid.CHPs.BaseClasses.Validation.CoolDown,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|actMod|runSig.y|cooDowOpt.y",fileNamePrefix="Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown") translateModel(Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|actMod|runSig.y|cooDowOpt.y",fileNamePrefix="Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001203/0.001204, allocations: 106.7 kB / 16.41 MB, free: 6.453 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.001175/0.001175, allocations: 189.7 kB / 17.34 MB, free: 5.719 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.375/1.375, allocations: 222.9 MB / 241 MB, free: 15.16 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.28/2.28, allocations: 390.3 MB / 0.6655 GB, free: 0.625 MB / 0.5294 GB Notification: Performance of FrontEnd - loaded program: time 0.001352/0.001352, allocations: 63.91 kB / 0.9515 GB, free: 7.621 MB / 0.7325 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.7717/0.773, allocations: 140.4 MB / 1.089 GB, free: 5.504 MB / 0.8575 GB Notification: Performance of NFInst.instantiate(Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown): time 0.004161/0.7772, allocations: 2.794 MB / 1.091 GB, free: 3.555 MB / 0.8575 GB Notification: Performance of NFInst.instExpressions: time 0.002682/0.7799, allocations: 1.67 MB / 1.093 GB, free: 2.387 MB / 0.8575 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002878/0.7803, allocations: 10.72 kB / 1.093 GB, free: 2.383 MB / 0.8575 GB Notification: Performance of NFTyping.typeComponents: time 0.0009161/0.7812, allocations: 317 kB / 1.093 GB, free: 2.246 MB / 0.8575 GB Notification: Performance of NFTyping.typeBindings: time 0.0005002/0.7817, allocations: 183.3 kB / 1.093 GB, free: 2.148 MB / 0.8575 GB Notification: Performance of NFTyping.typeClassSections: time 0.0009899/0.7827, allocations: 374.6 kB / 1.094 GB, free: 1.949 MB / 0.8575 GB Notification: Performance of NFFlatten.flatten: time 0.0009065/0.7836, allocations: 0.7314 MB / 1.095 GB, free: 1.621 MB / 0.8575 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0007428/0.7844, allocations: 464.5 kB / 1.095 GB, free: 1.438 MB / 0.8575 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0003583/0.7848, allocations: 269.8 kB / 1.095 GB, free: 1.309 MB / 0.8575 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0003715/0.7851, allocations: 288.3 kB / 1.096 GB, free: 1.156 MB / 0.8575 GB Notification: Performance of NFPackage.collectConstants: time 0.000123/0.7853, allocations: 54.59 kB / 1.096 GB, free: 1.156 MB / 0.8575 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0003501/0.7856, allocations: 106.2 kB / 1.096 GB, free: 1.141 MB / 0.8575 GB Notification: Performance of NFScalarize.scalarize: time 0.0002193/0.7859, allocations: 209 kB / 1.096 GB, free: 1.027 MB / 0.8575 GB Notification: Performance of NFVerifyModel.verify: time 0.000294/0.7862, allocations: 324.2 kB / 1.096 GB, free: 0.8008 MB / 0.8575 GB Notification: Performance of NFConvertDAE.convert: time 0.001014/0.7872, allocations: 0.8152 MB / 1.097 GB, free: 440 kB / 0.8575 GB Notification: Performance of FrontEnd - DAE generated: time 4.228e-06/0.7872, allocations: 0.7969 kB / 1.097 GB, free: 440 kB / 0.8575 GB Notification: Performance of FrontEnd: time 1.944e-06/0.7872, allocations: 1.125 kB / 1.097 GB, free: 440 kB / 0.8575 GB Notification: Performance of Transformations before backend: time 1.476e-05/0.7872, allocations: 0 / 1.097 GB, free: 440 kB / 0.8575 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 127 * Number of variables: 127 Notification: Performance of Generate backend data structure: time 0.001685/0.7889, allocations: 1.033 MB / 1.098 GB, free: 15.64 MB / 0.8731 GB Notification: Performance of prepare preOptimizeDAE: time 4.577e-05/0.789, allocations: 8.938 kB / 1.098 GB, free: 15.64 MB / 0.8731 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0001865/0.7892, allocations: 84.05 kB / 1.098 GB, free: 15.6 MB / 0.8731 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007264/0.7899, allocations: 0.4959 MB / 1.099 GB, free: 15.23 MB / 0.8731 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 5.981e-05/0.79, allocations: 44.69 kB / 1.099 GB, free: 15.21 MB / 0.8731 GB Notification: Performance of preOpt expandDerOperator (simulation): time 9.781e-05/0.7901, allocations: 69.69 kB / 1.099 GB, free: 15.18 MB / 0.8731 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.001104/0.7912, allocations: 0.6068 MB / 1.099 GB, free: 14.82 MB / 0.8731 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.896e-05/0.7912, allocations: 5.219 kB / 1.099 GB, free: 14.82 MB / 0.8731 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.319e-05/0.7913, allocations: 23.58 kB / 1.099 GB, free: 14.8 MB / 0.8731 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.757e-05/0.7913, allocations: 17.78 kB / 1.099 GB, free: 14.8 MB / 0.8731 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0007198/0.792, allocations: 381.2 kB / 1.1 GB, free: 14.67 MB / 0.8731 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.002931/0.795, allocations: 2.567 MB / 1.102 GB, free: 12.63 MB / 0.8731 GB Notification: Performance of preOpt comSubExp (simulation): time 0.000736/0.7957, allocations: 384.5 kB / 1.103 GB, free: 12.38 MB / 0.8731 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0002814/0.796, allocations: 175.6 kB / 1.103 GB, free: 12.27 MB / 0.8731 GB Notification: Performance of preOpt evalFunc (simulation): time 3.923e-05/0.7961, allocations: 4.734 kB / 1.103 GB, free: 12.27 MB / 0.8731 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0005046/0.7966, allocations: 289.9 kB / 1.103 GB, free: 12.1 MB / 0.8731 GB Notification: Performance of pre-optimization done (n=44): time 2.925e-06/0.7966, allocations: 3.938 kB / 1.103 GB, free: 12.09 MB / 0.8731 GB Notification: Performance of matching and sorting (n=44): time 0.001125/0.7977, allocations: 0.4978 MB / 1.103 GB, free: 11.9 MB / 0.8731 GB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001231/0.7979, allocations: 228.1 kB / 1.104 GB, free: 11.64 MB / 0.8731 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0009604/0.7988, allocations: 0.6093 MB / 1.104 GB, free: 11.36 MB / 0.8731 GB Notification: Performance of collectPreVariables (initialization): time 6.784e-05/0.7989, allocations: 49.5 kB / 1.104 GB, free: 11.32 MB / 0.8731 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002954/0.7992, allocations: 349.9 kB / 1.105 GB, free: 11.04 MB / 0.8731 GB Notification: Performance of collectInitialBindings (initialization): time 0.0001028/0.7993, allocations: 109.1 kB / 1.105 GB, free: 10.96 MB / 0.8731 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001952/0.7995, allocations: 150.7 kB / 1.105 GB, free: 10.89 MB / 0.8731 GB Notification: Performance of setup shared object (initialization): time 0.0001765/0.7997, allocations: 383 kB / 1.105 GB, free: 10.54 MB / 0.8731 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002664/0.8, allocations: 141.4 kB / 1.105 GB, free: 10.49 MB / 0.8731 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0003905/0.8004, allocations: 345.3 kB / 1.106 GB, free: 10.2 MB / 0.8731 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0005588/0.8009, allocations: 428.4 kB / 1.106 GB, free: 9.855 MB / 0.8731 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 5.671e-06/0.801, allocations: 3.609 kB / 1.106 GB, free: 9.855 MB / 0.8731 GB Notification: Performance of matching and sorting (n=82) (initialization): time 0.0009064/0.8019, allocations: 0.5378 MB / 1.107 GB, free: 9.625 MB / 0.8731 GB Notification: Performance of prepare postOptimizeDAE: time 1.95e-05/0.8019, allocations: 10.69 kB / 1.107 GB, free: 9.621 MB / 0.8731 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.25e-05/0.8019, allocations: 6.859 kB / 1.107 GB, free: 9.621 MB / 0.8731 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.281e-05/0.8019, allocations: 9.438 kB / 1.107 GB, free: 9.621 MB / 0.8731 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002452/0.8022, allocations: 84.27 kB / 1.107 GB, free: 9.598 MB / 0.8731 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.983e-05/0.8022, allocations: 18.19 kB / 1.107 GB, free: 9.59 MB / 0.8731 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0002758/0.8025, allocations: 50.86 kB / 1.107 GB, free: 9.559 MB / 0.8731 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.948e-05/0.8026, allocations: 28.25 kB / 1.107 GB, free: 9.555 MB / 0.8731 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 26 * Number of states: 0 () * Number of discrete variables: 64 ($PRE.transition2.enableFire,$PRE.transition1.enableFire,$PRE.transition4.enableFire,$PRE.transition3.enableFire,$PRE.transition5.enableFire,$PRE.runSig.combiTimeTable.nextTimeEvent,$whenCondition1,transition2.t_start,$PRE.transition2.t_start,transition1.t_start,$PRE.transition1.t_start,transition4.t_start,$PRE.transition4.t_start,transition3.t_start,$PRE.transition3.t_start,transition5.t_start,$PRE.transition5.t_start,transition5.condition,stateGraphRoot.resume,stateGraphRoot.suspend,transition5.enableFire,timer.entryTime,$PRE.timer.entryTime,timer.passed,$PRE.timer.passed,transition3.enableFire,off.oldActive,$PRE.off.oldActive,off.newActive,$PRE.off.newActive,off.localActive,$PRE.off.localActive,off.active,transition4.enableFire,transition1.enableFire,transition2.enableFire,stateGraphRoot.activeSteps,norm.oldActive,$PRE.norm.oldActive,norm.newActive,$PRE.norm.newActive,norm.outPort[2].available,norm.inPort[2].occupied,norm.localActive,$PRE.norm.localActive,norm.active,cooDow.active,cooDow.oldActive,$PRE.cooDow.oldActive,cooDow.newActive,$PRE.cooDow.newActive,cooDow.outPort[2].available,cooDow.inPort[2].occupied,cooDow.localActive,$PRE.cooDow.localActive,and1.y,runSig.combiTimeTable.nextTimeEventScaled,$PRE.runSig.combiTimeTable.nextTimeEventScaled,runSig.combiTimeTable.nextTimeEvent,runSig.y,actMod,$whenCondition4,$whenCondition3,$whenCondition2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (82): * Single equations (assignments): 82 * Array equations: 0 * Algorithm blocks: 0 * 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.0003636/0.8029, allocations: 278.6 kB / 1.107 GB, free: 9.359 MB / 0.8731 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0001019/0.803, allocations: 66.67 kB / 1.107 GB, free: 9.324 MB / 0.8731 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0007401/0.8038, allocations: 414.6 kB / 1.108 GB, free: 9.145 MB / 0.8731 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.766e-06/0.8038, allocations: 6.281 kB / 1.108 GB, free: 9.145 MB / 0.8731 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.116e-05/0.8038, allocations: 6.656 kB / 1.108 GB, free: 9.141 MB / 0.8731 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 9.848e-06/0.8038, allocations: 3.922 kB / 1.108 GB, free: 9.141 MB / 0.8731 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.001594/0.8054, allocations: 1.063 MB / 1.109 GB, free: 8.535 MB / 0.8731 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.99e-05/0.8055, allocations: 3.938 kB / 1.109 GB, free: 8.531 MB / 0.8731 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0001202/0.8056, allocations: 24.91 kB / 1.109 GB, free: 8.527 MB / 0.8731 GB Notification: Performance of postOpt tearingSystem (simulation): time 9.988e-06/0.8056, allocations: 7.531 kB / 1.109 GB, free: 8.523 MB / 0.8731 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 2.998e-05/0.8057, allocations: 15.67 kB / 1.109 GB, free: 8.516 MB / 0.8731 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.069e-06/0.8057, allocations: 3.938 kB / 1.109 GB, free: 8.516 MB / 0.8731 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.585e-06/0.8057, allocations: 2 kB / 1.109 GB, free: 8.516 MB / 0.8731 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0007454/0.8064, allocations: 0.5301 MB / 1.109 GB, free: 8.203 MB / 0.8731 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0001211/0.8066, allocations: 144.1 kB / 1.109 GB, free: 8.062 MB / 0.8731 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.000105/0.8067, allocations: 16.42 kB / 1.109 GB, free: 8.055 MB / 0.8731 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0002262/0.8069, allocations: 14.56 kB / 1.109 GB, free: 8.051 MB / 0.8731 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001298/0.807, allocations: 49.66 kB / 1.109 GB, free: 8.039 MB / 0.8731 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 4.164e-05/0.8071, allocations: 20.66 kB / 1.109 GB, free: 8.035 MB / 0.8731 GB Notification: Performance of sorting global known variables: time 0.0005423/0.8076, allocations: 399.7 kB / 1.11 GB, free: 7.867 MB / 0.8731 GB Notification: Performance of sort global known variables: time 1.8e-07/0.8076, allocations: 0 / 1.11 GB, free: 7.867 MB / 0.8731 GB Notification: Performance of remove unused functions: time 0.0006468/0.8083, allocations: 139.5 kB / 1.11 GB, free: 7.828 MB / 0.8731 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 6 * Number of states: 0 () * Number of discrete variables: 42 (transition5.t_start,transition3.t_start,transition4.t_start,transition1.t_start,transition2.t_start,off.active,norm.active,cooDow.localActive,cooDow.active,$cse1,$cse2,$cse3,$cse4,$cse5,$whenCondition2,$whenCondition3,$whenCondition4,$whenCondition1,actMod,runSig.y,runSig.combiTimeTable.nextTimeEvent,runSig.combiTimeTable.nextTimeEventScaled,and1.y,cooDow.inPort[2].occupied,cooDow.outPort[2].available,cooDow.newActive,cooDow.oldActive,norm.localActive,norm.inPort[2].occupied,norm.outPort[2].available,norm.newActive,norm.oldActive,stateGraphRoot.activeSteps,transition2.enableFire,transition1.enableFire,transition4.enableFire,off.localActive,off.newActive,off.oldActive,transition3.enableFire,timer.passed,timer.entryTime) * Number of discrete states: 11 (runSig.combiTimeTable.nextTimeEvent,cooDow.newActive,timer.entryTime,norm.newActive,off.newActive,runSig.combiTimeTable.nextTimeEventScaled,transition2.t_start,transition1.t_start,transition4.t_start,transition3.t_start,transition5.t_start) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (49): * Single equations (assignments): 37 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 12 * 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.001089/0.8094, allocations: 468 kB / 1.11 GB, free: 7.605 MB / 0.8731 GB Notification: Performance of simCode: created initialization part: time 0.0008241/0.8102, allocations: 411.9 kB / 1.111 GB, free: 7.477 MB / 0.8731 GB Notification: Performance of simCode: created event and clocks part: time 3.677e-06/0.8103, allocations: 0 / 1.111 GB, free: 7.477 MB / 0.8731 GB Notification: Performance of simCode: created simulation system equations: time 0.0003102/0.8106, allocations: 196.8 kB / 1.111 GB, free: 7.41 MB / 0.8731 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006058/0.8112, allocations: 104.3 kB / 1.111 GB, free: 7.363 MB / 0.8731 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002087/0.8133, allocations: 1.181 MB / 1.112 GB, free: 6.699 MB / 0.8731 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0006273/0.8139, allocations: 0.9317 MB / 1.113 GB, free: 5.973 MB / 0.8731 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001578/0.8141, allocations: 45.5 kB / 1.113 GB, free: 5.965 MB / 0.8731 GB Notification: Performance of SimCode: time 1.422e-06/0.8141, allocations: 1.469 kB / 1.113 GB, free: 5.965 MB / 0.8731 GB Notification: Performance of Templates: time 0.01479/0.8289, allocations: 7.884 MB / 1.121 GB, free: 4.707 MB / 0.8731 GB make -j1 -f Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.makefile (rm -f Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.pipe ; mkfifo Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.pipe ; head -c 1048576 < Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.pipe >> ../files/Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.sim & ./Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.pipe 2>&1) diffSimulationResults("Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown_res.mat","/mnt/ReferenceFiles/Buildings/csv/maint_9.1.x/Buildings_Fluid_CHPs_BaseClasses_Validation_CoolDown.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Buildings_9_Buildings.Fluid.CHPs.BaseClasses.Validation.CoolDown.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches