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.0-master/package.mo", uses=false) Using package Buildings with version 11.0.0 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 11.0.0-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.001756/0.001757, allocations: 103.5 kB / 16.35 MB, free: 6.285 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.002133/0.002133, allocations: 193.5 kB / 17.29 MB, free: 5.863 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.483/1.483, 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 11.0.0-master/package.mo): time 2.616/2.616, allocations: 442.6 MB / 0.7165 GB, free: 14.74 MB / 0.5919 GB Notification: Performance of FrontEnd - loaded program: time 0.001333/0.001333, allocations: 71.97 kB / 0.8773 GB, free: 11.02 MB / 0.6544 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.4119/0.4133, allocations: 153 MB / 1.027 GB, free: 2.109 MB / 0.795 GB Notification: Performance of NFInst.instantiate(Buildings.Controls.OBC.CDL.Integers.Validation.Stage): time 0.002443/0.4158, allocations: 0.9465 MB / 1.028 GB, free: 1.164 MB / 0.795 GB Notification: Performance of NFInst.instExpressions: time 0.001514/0.4173, allocations: 1.034 MB / 1.029 GB, free: 120 kB / 0.795 GB Notification: Performance of NFInst.updateImplicitVariability: time 9.466e-05/0.4174, allocations: 0 / 1.029 GB, free: 120 kB / 0.795 GB Notification: Performance of NFTyping.typeComponents: time 0.0001414/0.4176, allocations: 27.73 kB / 1.029 GB, free: 92 kB / 0.795 GB Notification: Performance of NFTyping.typeBindings: time 0.0001513/0.4177, allocations: 35.7 kB / 1.029 GB, free: 56 kB / 0.795 GB Notification: Performance of NFTyping.typeClassSections: time 0.00046/0.4182, allocations: 131.7 kB / 1.029 GB, free: 15.93 MB / 0.8106 GB Notification: Performance of NFFlatten.flatten: time 0.0003612/0.4186, allocations: 351.3 kB / 1.029 GB, free: 15.58 MB / 0.8106 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001466/0.4187, allocations: 29.66 kB / 1.029 GB, free: 15.55 MB / 0.8106 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0002459/0.419, allocations: 175.5 kB / 1.029 GB, free: 15.38 MB / 0.8106 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0002995/0.4193, allocations: 207.4 kB / 1.03 GB, free: 15.18 MB / 0.8106 GB Notification: Performance of NFPackage.collectConstants: time 6.51e-05/0.4194, allocations: 32 kB / 1.03 GB, free: 15.14 MB / 0.8106 GB Notification: Performance of NFFlatten.collectFunctions: time 4.948e-05/0.4194, allocations: 32 kB / 1.03 GB, free: 15.11 MB / 0.8106 GB Notification: Performance of NFScalarize.scalarize: time 0.0001531/0.4196, allocations: 111.7 kB / 1.03 GB, free: 15 MB / 0.8106 GB Notification: Performance of NFVerifyModel.verify: time 0.0001505/0.4197, allocations: 131.4 kB / 1.03 GB, free: 14.88 MB / 0.8106 GB Notification: Performance of NFConvertDAE.convert: time 0.0003695/0.4201, allocations: 338.9 kB / 1.03 GB, free: 14.54 MB / 0.8106 GB Notification: Performance of FrontEnd - DAE generated: time 5.49e-06/0.4201, allocations: 0 / 1.03 GB, free: 14.54 MB / 0.8106 GB Notification: Performance of FrontEnd: time 2.134e-06/0.4201, allocations: 0 / 1.03 GB, free: 14.54 MB / 0.8106 GB Notification: Performance of Transformations before backend: time 7.203e-06/0.4202, allocations: 0 / 1.03 GB, free: 14.54 MB / 0.8106 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.00196/0.4221, allocations: 0.772 MB / 1.031 GB, free: 13.72 MB / 0.8106 GB Notification: Performance of prepare preOptimizeDAE: time 4.609e-05/0.4222, allocations: 12.03 kB / 1.031 GB, free: 13.71 MB / 0.8106 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 8.196e-05/0.4223, allocations: 24.66 kB / 1.031 GB, free: 13.69 MB / 0.8106 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007138/0.423, allocations: 335.8 kB / 1.031 GB, free: 13.32 MB / 0.8106 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 3.698e-05/0.423, allocations: 20.36 kB / 1.031 GB, free: 13.3 MB / 0.8106 GB Notification: Performance of preOpt expandDerOperator (simulation): time 5.517e-05/0.4231, allocations: 24.38 kB / 1.031 GB, free: 13.28 MB / 0.8106 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0007557/0.4239, allocations: 344 kB / 1.032 GB, free: 12.93 MB / 0.8106 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.094e-05/0.4239, allocations: 0 / 1.032 GB, free: 12.93 MB / 0.8106 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 3.103e-05/0.4239, allocations: 4 kB / 1.032 GB, free: 12.93 MB / 0.8106 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 8.686e-06/0.4239, allocations: 4 kB / 1.032 GB, free: 12.92 MB / 0.8106 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0006007/0.4245, allocations: 215.8 kB / 1.032 GB, free: 12.71 MB / 0.8106 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.001561/0.4261, allocations: 0.7111 MB / 1.033 GB, free: 11.95 MB / 0.8106 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0006506/0.4268, allocations: 277 kB / 1.033 GB, free: 11.66 MB / 0.8106 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0004821/0.4273, allocations: 197.6 kB / 1.033 GB, free: 11.46 MB / 0.8106 GB Notification: Performance of preOpt evalFunc (simulation): time 2.869e-05/0.4273, allocations: 0 / 1.033 GB, free: 11.46 MB / 0.8106 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.000707/0.428, allocations: 348.9 kB / 1.033 GB, free: 11.1 MB / 0.8106 GB Notification: Performance of pre-optimization done (n=30): time 1.392e-06/0.428, allocations: 3.938 kB / 1.033 GB, free: 11.09 MB / 0.8106 GB Notification: Performance of matching and sorting (n=30): time 0.001685/0.4297, allocations: 0.6365 MB / 1.034 GB, free: 10.45 MB / 0.8106 GB Notification: Performance of inlineWhenForInitialization (initialization): time 7.961e-05/0.4298, allocations: 89.11 kB / 1.034 GB, free: 10.35 MB / 0.8106 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002263/0.4301, allocations: 206.9 kB / 1.034 GB, free: 10.13 MB / 0.8106 GB Notification: Performance of collectPreVariables (initialization): time 6.25e-05/0.4301, allocations: 61.69 kB / 1.034 GB, free: 10.07 MB / 0.8106 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001035/0.4302, allocations: 121.1 kB / 1.034 GB, free: 9.945 MB / 0.8106 GB Notification: Performance of collectInitialBindings (initialization): time 8.868e-05/0.4303, allocations: 79.08 kB / 1.035 GB, free: 9.867 MB / 0.8106 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001265/0.4305, allocations: 82.12 kB / 1.035 GB, free: 9.777 MB / 0.8106 GB Notification: Performance of setup shared object (initialization): time 0.0001746/0.4306, allocations: 346.7 kB / 1.035 GB, free: 9.43 MB / 0.8106 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.000228/0.4309, allocations: 108.8 kB / 1.035 GB, free: 9.324 MB / 0.8106 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0002763/0.4312, allocations: 173.5 kB / 1.035 GB, free: 9.141 MB / 0.8106 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.0003569/0.4315, allocations: 213.4 kB / 1.035 GB, free: 8.918 MB / 0.8106 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.407e-06/0.4315, allocations: 0 / 1.035 GB, free: 8.918 MB / 0.8106 GB Notification: Performance of matching and sorting (n=54) (initialization): time 0.0005888/0.4321, allocations: 330.8 kB / 1.036 GB, free: 8.59 MB / 0.8106 GB Notification: Performance of prepare postOptimizeDAE: time 2.051e-05/0.4322, allocations: 4 kB / 1.036 GB, free: 8.586 MB / 0.8106 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 8.566e-06/0.4322, allocations: 4 kB / 1.036 GB, free: 8.582 MB / 0.8106 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.071e-05/0.4322, allocations: 4 kB / 1.036 GB, free: 8.578 MB / 0.8106 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0002012/0.4324, allocations: 43.91 kB / 1.036 GB, free: 8.535 MB / 0.8106 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 9.839e-06/0.4324, allocations: 8.125 kB / 1.036 GB, free: 8.527 MB / 0.8106 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0003377/0.4328, allocations: 79.55 kB / 1.036 GB, free: 8.449 MB / 0.8106 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 2.821e-05/0.4328, allocations: 19.94 kB / 1.036 GB, free: 8.43 MB / 0.8106 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.0002083/0.433, allocations: 178.9 kB / 1.036 GB, free: 8.242 MB / 0.8106 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 5.185e-05/0.4331, allocations: 27.7 kB / 1.036 GB, free: 8.215 MB / 0.8106 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 6.156e-05/0.4332, allocations: 25.53 kB / 1.036 GB, free: 8.195 MB / 0.8106 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 7.424e-06/0.4332, allocations: 4 kB / 1.036 GB, free: 8.191 MB / 0.8106 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 7.353e-06/0.4332, allocations: 0 / 1.036 GB, free: 8.191 MB / 0.8106 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.394e-06/0.4332, allocations: 7.922 kB / 1.036 GB, free: 8.184 MB / 0.8106 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0003377/0.4335, allocations: 309.3 kB / 1.036 GB, free: 7.832 MB / 0.8106 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.379e-06/0.4335, allocations: 4 kB / 1.036 GB, free: 7.828 MB / 0.8106 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 7.497e-05/0.4336, allocations: 11.98 kB / 1.036 GB, free: 7.816 MB / 0.8106 GB Notification: Performance of postOpt tearingSystem (simulation): time 2.685e-06/0.4336, allocations: 0 / 1.036 GB, free: 7.816 MB / 0.8106 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.221e-05/0.4337, allocations: 15.97 kB / 1.036 GB, free: 7.801 MB / 0.8106 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 6.973e-06/0.4337, allocations: 11.94 kB / 1.036 GB, free: 7.789 MB / 0.8106 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 1.142e-06/0.4337, allocations: 0 / 1.036 GB, free: 7.789 MB / 0.8106 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.001194/0.4349, allocations: 0.5091 MB / 1.037 GB, free: 7.258 MB / 0.8106 GB Notification: Performance of postOpt removeConstants (simulation): time 7.95e-05/0.435, allocations: 96.86 kB / 1.037 GB, free: 7.145 MB / 0.8106 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.413e-05/0.4351, allocations: 16 kB / 1.037 GB, free: 7.129 MB / 0.8106 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0004389/0.4355, allocations: 71.89 kB / 1.037 GB, free: 7.059 MB / 0.8106 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001751/0.4357, allocations: 75.83 kB / 1.037 GB, free: 6.984 MB / 0.8106 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 5.572e-05/0.4358, allocations: 19.97 kB / 1.037 GB, free: 6.965 MB / 0.8106 GB Notification: Performance of sorting global known variables: time 0.0001171/0.4359, allocations: 144.4 kB / 1.037 GB, free: 6.824 MB / 0.8106 GB Notification: Performance of sort global known variables: time 2.71e-07/0.4359, allocations: 0 / 1.037 GB, free: 6.824 MB / 0.8106 GB Notification: Performance of remove unused functions: time 0.0002974/0.4362, allocations: 71.89 kB / 1.037 GB, free: 6.754 MB / 0.8106 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.0002787/0.4365, allocations: 143.1 kB / 1.038 GB, free: 6.602 MB / 0.8106 GB Notification: Performance of simCode: created initialization part: time 0.0009362/0.4374, allocations: 357.1 kB / 1.038 GB, free: 6.258 MB / 0.8106 GB Notification: Performance of simCode: created event and clocks part: time 3.517e-06/0.4375, allocations: 4.062 kB / 1.038 GB, free: 6.254 MB / 0.8106 GB Notification: Performance of simCode: created simulation system equations: time 0.0005769/0.438, allocations: 211.7 kB / 1.038 GB, free: 6.047 MB / 0.8106 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0004647/0.4385, allocations: 63.92 kB / 1.038 GB, free: 5.984 MB / 0.8106 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.001305/0.4398, allocations: 0.5335 MB / 1.039 GB, free: 5.422 MB / 0.8106 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.000388/0.4402, allocations: 0.7405 MB / 1.039 GB, free: 4.656 MB / 0.8106 GB Notification: Performance of simCode: alias equations: time 0.0001648/0.4404, allocations: 42.95 kB / 1.039 GB, free: 4.613 MB / 0.8106 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001274/0.4405, allocations: 39.41 kB / 1.039 GB, free: 4.574 MB / 0.8106 GB Notification: Performance of SimCode: time 8.32e-07/0.4405, allocations: 4 kB / 1.039 GB, free: 4.57 MB / 0.8106 GB Notification: Performance of Templates: time 0.01038/0.4509, allocations: 5.772 MB / 1.045 GB, free: 14.85 MB / 0.8262 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 -s cvode -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/jenkins1/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