Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.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 11.0.1-master/package.mo", uses=false) Using package Buildings with version 11.0.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 11.0.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(Buildings.Controls.OBC.CDL.Integers.Validation.Stage,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|sta.u|sta.y|zerHolTim.y|sta1.u|sta1.y|lesHolTim.y",fileNamePrefix="Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage") translateModel(Buildings.Controls.OBC.CDL.Integers.Validation.Stage,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|sta.u|sta.y|zerHolTim.y|sta1.u|sta1.y|lesHolTim.y",fileNamePrefix="Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.00649/0.00649, allocations: 101.9 kB / 15.73 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.001168/0.001168, allocations: 194.6 kB / 16.67 MB, free: 6.355 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.581/1.581, allocations: 222.9 MB / 240.4 MB, free: 4.285 MB / 190.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 11.0.1-master/package.mo): time 2.943/2.943, allocations: 461.9 MB / 0.7347 GB, free: 14.56 MB / 0.5919 GB Notification: Performance of FrontEnd - loaded program: time 0.002051/0.002051, allocations: 59.91 kB / 1.054 GB, free: 7.102 MB / 0.8106 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4172/0.4193, allocations: 157.4 MB / 1.208 GB, free: 9.594 MB / 0.9669 GB Notification: Performance of NFInst.instantiate(Buildings.Controls.OBC.CDL.Integers.Validation.Stage): time 0.002356/0.4217, allocations: 0.9232 MB / 1.209 GB, free: 8.668 MB / 0.9669 GB Notification: Performance of NFInst.instExpressions: time 0.001436/0.4232, allocations: 1.034 MB / 1.21 GB, free: 7.621 MB / 0.9669 GB Notification: Performance of NFInst.updateImplicitVariability: time 8.201e-05/0.4233, allocations: 0 / 1.21 GB, free: 7.621 MB / 0.9669 GB Notification: Performance of NFTyping.typeComponents: time 0.0001427/0.4234, allocations: 23.73 kB / 1.21 GB, free: 7.598 MB / 0.9669 GB Notification: Performance of NFTyping.typeBindings: time 0.0001456/0.4236, allocations: 39.7 kB / 1.21 GB, free: 7.559 MB / 0.9669 GB Notification: Performance of NFTyping.typeClassSections: time 0.0003897/0.424, allocations: 131.7 kB / 1.21 GB, free: 7.43 MB / 0.9669 GB Notification: Performance of NFFlatten.flatten: time 0.0003522/0.4244, allocations: 347.3 kB / 1.21 GB, free: 7.09 MB / 0.9669 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001524/0.4245, allocations: 37.64 kB / 1.21 GB, free: 7.051 MB / 0.9669 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002314/0.4248, allocations: 167.6 kB / 1.21 GB, free: 6.887 MB / 0.9669 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002872/0.4251, allocations: 211.4 kB / 1.211 GB, free: 6.68 MB / 0.9669 GB Notification: Performance of NFPackage.collectConstants: time 5.699e-05/0.4251, allocations: 32 kB / 1.211 GB, free: 6.648 MB / 0.9669 GB Notification: Performance of NFFlatten.collectFunctions: time 6.34e-05/0.4252, allocations: 32 kB / 1.211 GB, free: 6.617 MB / 0.9669 GB Notification: Performance of NFScalarize.scalarize: time 0.0001444/0.4253, allocations: 103.8 kB / 1.211 GB, free: 6.516 MB / 0.9669 GB Notification: Performance of NFVerifyModel.verify: time 0.0001548/0.4255, allocations: 139.4 kB / 1.211 GB, free: 6.379 MB / 0.9669 GB Notification: Performance of NFConvertDAE.convert: time 0.0003782/0.4259, allocations: 342.9 kB / 1.211 GB, free: 6.043 MB / 0.9669 GB Notification: Performance of FrontEnd - DAE generated: time 5.03e-06/0.4259, allocations: 0 / 1.211 GB, free: 6.043 MB / 0.9669 GB Notification: Performance of FrontEnd: time 1.773e-06/0.4259, allocations: 0 / 1.211 GB, free: 6.043 MB / 0.9669 GB Notification: Performance of Transformations before backend: time 1.034e-05/0.4259, allocations: 0 / 1.211 GB, free: 6.043 MB / 0.9669 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 30 * Number of variables: 30 Notification: Performance of Generate backend data structure: time 0.001948/0.4279, allocations: 0.772 MB / 1.212 GB, free: 5.223 MB / 0.9669 GB Notification: Performance of prepare preOptimizeDAE: time 4.142e-05/0.4279, allocations: 8.031 kB / 1.212 GB, free: 5.215 MB / 0.9669 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.854e-05/0.428, allocations: 32.66 kB / 1.212 GB, free: 5.184 MB / 0.9669 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0006889/0.4287, allocations: 343.7 kB / 1.212 GB, free: 4.809 MB / 0.9669 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.739e-05/0.4288, allocations: 16.38 kB / 1.212 GB, free: 4.793 MB / 0.9669 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.484e-05/0.4288, allocations: 28.11 kB / 1.212 GB, free: 4.766 MB / 0.9669 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007506/0.4296, allocations: 332.8 kB / 1.213 GB, free: 4.43 MB / 0.9669 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.157e-05/0.4296, allocations: 3.938 kB / 1.213 GB, free: 4.426 MB / 0.9669 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.665e-05/0.4296, allocations: 11.98 kB / 1.213 GB, free: 4.414 MB / 0.9669 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 1.391e-05/0.4297, allocations: 4 kB / 1.213 GB, free: 4.41 MB / 0.9669 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0006368/0.4303, allocations: 214.5 kB / 1.213 GB, free: 4.203 MB / 0.9669 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001589/0.4319, allocations: 0.7033 MB / 1.214 GB, free: 3.445 MB / 0.9669 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0006435/0.4326, allocations: 281 kB / 1.214 GB, free: 3.152 MB / 0.9669 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004798/0.433, allocations: 194.1 kB / 1.214 GB, free: 2.957 MB / 0.9669 GB Notification: Performance of preOpt evalFunc (simulation): time 3.137e-05/0.4331, allocations: 8 kB / 1.214 GB, free: 2.949 MB / 0.9669 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0007067/0.4338, allocations: 356.8 kB / 1.214 GB, free: 2.582 MB / 0.9669 GB Notification: Performance of pre-optimization done (n=30): time 2.024e-06/0.4338, allocations: 0 / 1.214 GB, free: 2.582 MB / 0.9669 GB Notification: Performance of matching and sorting (n=30): time 0.001712/0.4355, allocations: 0.626 MB / 1.215 GB, free: 1.949 MB / 0.9669 GB Notification: Performance of inlineWhenForInitialization (initialization): time 7.266e-05/0.4356, allocations: 93.09 kB / 1.215 GB, free: 1.84 MB / 0.9669 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0001937/0.4358, allocations: 214.6 kB / 1.215 GB, free: 1.621 MB / 0.9669 GB Notification: Performance of collectPreVariables (initialization): time 5.642e-05/0.4359, allocations: 57.69 kB / 1.215 GB, free: 1.559 MB / 0.9669 GB Notification: Performance of collectInitialEqns (initialization): time 8.484e-05/0.436, allocations: 129 kB / 1.215 GB, free: 1.43 MB / 0.9669 GB Notification: Performance of collectInitialBindings (initialization): time 8.489e-05/0.4361, allocations: 83.11 kB / 1.216 GB, free: 1.348 MB / 0.9669 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001143/0.4362, allocations: 74.12 kB / 1.216 GB, free: 1.27 MB / 0.9669 GB Notification: Performance of setup shared object (initialization): time 0.0001333/0.4363, allocations: 342.8 kB / 1.216 GB, free: 0.9258 MB / 0.9669 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0002288/0.4366, allocations: 112.8 kB / 1.216 GB, free: 0.8164 MB / 0.9669 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002703/0.4368, allocations: 177.4 kB / 1.216 GB, free: 0.625 MB / 0.9669 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003365/0.4372, allocations: 203.5 kB / 1.216 GB, free: 420 kB / 0.9669 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.115e-06/0.4372, allocations: 0 / 1.216 GB, free: 420 kB / 0.9669 GB Notification: Performance of matching and sorting (n=54) (initialization): time 0.0005644/0.4378, allocations: 335.8 kB / 1.217 GB, free: 80 kB / 0.9669 GB Notification: Performance of prepare postOptimizeDAE: time 2.007e-05/0.4378, allocations: 4 kB / 1.217 GB, free: 76 kB / 0.9669 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 7.514e-06/0.4378, allocations: 0 / 1.217 GB, free: 76 kB / 0.9669 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.039e-05/0.4378, allocations: 4 kB / 1.217 GB, free: 72 kB / 0.9669 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002179/0.4381, allocations: 47.91 kB / 1.217 GB, free: 24 kB / 0.9669 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.177e-05/0.4381, allocations: 12.06 kB / 1.217 GB, free: 12 kB / 0.9669 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003415/0.4384, allocations: 75.55 kB / 1.217 GB, free: 15.94 MB / 0.9825 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.999e-05/0.4385, allocations: 16 kB / 1.217 GB, free: 15.92 MB / 0.9825 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 6 * Number of states: 0 () * Number of discrete variables: 52 (zerHolTim.y,$PRE.zerHolTim.y,sta.y,$PRE.sta.y,zerHolTim.checkLower,$PRE.zerHolTim.checkLower,zerHolTim.checkUpper,$PRE.zerHolTim.checkUpper,zerHolTim.lowerThreshold,$PRE.zerHolTim.lowerThreshold,zerHolTim.upperThreshold,$PRE.zerHolTim.upperThreshold,zerHolTim.tNext,$PRE.zerHolTim.tNext,sta.checkLower,$PRE.sta.checkLower,sta.checkUpper,$PRE.sta.checkUpper,sta.lowerThreshold,$PRE.sta.lowerThreshold,sta.upperThreshold,$PRE.sta.upperThreshold,sta.tNext,$PRE.sta.tNext,$whenCondition3,$whenCondition4,lesHolTim.y,$PRE.lesHolTim.y,sta1.y,$PRE.sta1.y,lesHolTim.checkLower,$PRE.lesHolTim.checkLower,lesHolTim.checkUpper,$PRE.lesHolTim.checkUpper,lesHolTim.lowerThreshold,$PRE.lesHolTim.lowerThreshold,lesHolTim.upperThreshold,$PRE.lesHolTim.upperThreshold,lesHolTim.tNext,$PRE.lesHolTim.tNext,sta1.checkLower,$PRE.sta1.checkLower,sta1.checkUpper,$PRE.sta1.checkUpper,sta1.lowerThreshold,$PRE.sta1.lowerThreshold,sta1.upperThreshold,$PRE.sta1.upperThreshold,sta1.tNext,$PRE.sta1.tNext,$whenCondition1,$whenCondition2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (54): * Single equations (assignments): 54 * 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.0001957/0.4387, allocations: 167 kB / 1.217 GB, free: 15.75 MB / 0.9825 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 4.942e-05/0.4387, allocations: 23.72 kB / 1.217 GB, free: 15.72 MB / 0.9825 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 6.855e-05/0.4388, allocations: 37.52 kB / 1.217 GB, free: 15.68 MB / 0.9825 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.023e-06/0.4388, allocations: 4 kB / 1.217 GB, free: 15.68 MB / 0.9825 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 8.556e-06/0.4388, allocations: 0 / 1.217 GB, free: 15.68 MB / 0.9825 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.685e-06/0.4388, allocations: 3.938 kB / 1.217 GB, free: 15.68 MB / 0.9825 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003209/0.4392, allocations: 313.2 kB / 1.217 GB, free: 15.32 MB / 0.9825 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.633e-06/0.4392, allocations: 0 / 1.217 GB, free: 15.32 MB / 0.9825 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 7.389e-05/0.4392, allocations: 15.92 kB / 1.217 GB, free: 15.3 MB / 0.9825 GB Notification: Performance of postOpt tearingSystem (simulation): time 3.326e-06/0.4393, allocations: 0 / 1.217 GB, free: 15.3 MB / 0.9825 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.057e-05/0.4393, allocations: 15.98 kB / 1.217 GB, free: 15.29 MB / 0.9825 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.934e-06/0.4393, allocations: 4 kB / 1.217 GB, free: 15.29 MB / 0.9825 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.91e-07/0.4393, allocations: 0 / 1.217 GB, free: 15.29 MB / 0.9825 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001172/0.4405, allocations: 0.5193 MB / 1.218 GB, free: 14.75 MB / 0.9825 GB Notification: Performance of postOpt removeConstants (simulation): time 6.493e-05/0.4406, allocations: 96.77 kB / 1.218 GB, free: 14.63 MB / 0.9825 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 6.596e-05/0.4406, allocations: 19.98 kB / 1.218 GB, free: 14.61 MB / 0.9825 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0003973/0.441, allocations: 71.89 kB / 1.218 GB, free: 14.54 MB / 0.9825 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001728/0.4412, allocations: 83.77 kB / 1.218 GB, free: 14.46 MB / 0.9825 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.431e-05/0.4413, allocations: 15.92 kB / 1.218 GB, free: 14.45 MB / 0.9825 GB Notification: Performance of sorting global known variables: time 0.0001207/0.4414, allocations: 148.6 kB / 1.218 GB, free: 14.3 MB / 0.9825 GB Notification: Performance of sort global known variables: time 1.21e-07/0.4414, allocations: 0 / 1.218 GB, free: 14.3 MB / 0.9825 GB Notification: Performance of remove unused functions: time 0.0002859/0.4417, allocations: 60 kB / 1.218 GB, free: 14.24 MB / 0.9825 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 0 () * Number of discrete variables: 28 ($whenCondition4,$whenCondition3,sta.y,sta.tNext,sta.upperThreshold,sta.lowerThreshold,sta.checkUpper,sta.checkLower,zerHolTim.y,zerHolTim.tNext,zerHolTim.upperThreshold,zerHolTim.lowerThreshold,zerHolTim.checkUpper,zerHolTim.checkLower,$whenCondition2,$whenCondition1,sta1.y,sta1.tNext,sta1.upperThreshold,sta1.lowerThreshold,sta1.checkUpper,sta1.checkLower,lesHolTim.y,lesHolTim.tNext,lesHolTim.upperThreshold,lesHolTim.lowerThreshold,lesHolTim.checkUpper,lesHolTim.checkLower) * Number of discrete states: 20 (sta1.lowerThreshold,lesHolTim.lowerThreshold,lesHolTim.checkLower,lesHolTim.checkUpper,lesHolTim.upperThreshold,sta1.checkLower,sta1.checkUpper,sta1.upperThreshold,sta1.tNext,lesHolTim.tNext,sta.lowerThreshold,zerHolTim.lowerThreshold,zerHolTim.checkLower,zerHolTim.checkUpper,zerHolTim.upperThreshold,sta.checkLower,sta.checkUpper,sta.upperThreshold,sta.tNext,zerHolTim.tNext) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (30): * Single equations (assignments): 14 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 16 * 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.0002044/0.4419, allocations: 135.2 kB / 1.219 GB, free: 14.1 MB / 0.9825 GB Notification: Performance of simCode: created initialization part: time 0.0008219/0.4427, allocations: 361.5 kB / 1.219 GB, free: 13.75 MB / 0.9825 GB Notification: Performance of simCode: created event and clocks part: time 2.795e-06/0.4427, allocations: 4.25 kB / 1.219 GB, free: 13.75 MB / 0.9825 GB Notification: Performance of simCode: created simulation system equations: time 0.0005343/0.4433, allocations: 203.8 kB / 1.219 GB, free: 13.55 MB / 0.9825 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004868/0.4438, allocations: 71.92 kB / 1.219 GB, free: 13.48 MB / 0.9825 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001365/0.4452, allocations: 0.5281 MB / 1.22 GB, free: 12.92 MB / 0.9825 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0003702/0.4455, allocations: 0.7482 MB / 1.22 GB, free: 12.14 MB / 0.9825 GB Notification: Performance of simCode: alias equations: time 0.0001366/0.4457, allocations: 38.97 kB / 1.22 GB, free: 12.11 MB / 0.9825 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001287/0.4458, allocations: 47.39 kB / 1.22 GB, free: 12.06 MB / 0.9825 GB Notification: Performance of SimCode: time 2.4e-07/0.4458, allocations: 4 kB / 1.22 GB, free: 12.06 MB / 0.9825 GB Notification: Performance of Templates: time 0.01123/0.4571, allocations: 5.795 MB / 1.226 GB, free: 6.32 MB / 0.9825 GB make -j1 -f Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.makefile (rm -f Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.pipe ; mkfifo Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.pipe ; head -c 1048576 < Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.pipe >> ../files/Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.sim & ./Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.pipe 2>&1) diffSimulationResults("Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage_res.mat","/mnt/ReferenceFiles/Buildings/csv/master/Buildings_Controls_OBC_CDL_Integers_Validation_Stage.csv","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Buildings_latest_Buildings.Controls.OBC.CDL.Integers.Validation.Stage.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches