Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.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.Logical.Sources.Validation.Pulse,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|booPul_a1.y|booPul_a2.y|booPul_a3.y|booPul_a4.y|booPul_a5.y|booPul_b1.y|booPul_b2.y|booPul_b3.y|booPul_b4.y|booPul_b5.y|booPul_c1.y|booPul_c2.y|booPul_c3.y|booPul_c4.y|booPul_c5.y",fileNamePrefix="Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse") translateModel(Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|booPul_a1.y|booPul_a2.y|booPul_a3.y|booPul_a4.y|booPul_a5.y|booPul_b1.y|booPul_b2.y|booPul_b3.y|booPul_b4.y|booPul_b5.y|booPul_c1.y|booPul_c2.y|booPul_c3.y|booPul_c4.y|booPul_c5.y",fileNamePrefix="Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001326/0.001326, allocations: 113.3 kB / 16.41 MB, free: 6.457 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.001372/0.001372, allocations: 185.5 kB / 17.34 MB, free: 5.723 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.303/1.303, allocations: 222.9 MB / 241 MB, free: 15.09 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 11.0.1-master/package.mo): time 2.432/2.432, allocations: 461.9 MB / 0.7355 GB, free: 11.14 MB / 0.6075 GB Notification: Performance of FrontEnd - loaded program: time 0.001376/0.001376, allocations: 59.91 kB / 1.055 GB, free: 7.719 MB / 0.8262 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.7431/0.7445, allocations: 157.4 MB / 1.208 GB, free: 13.66 MB / 0.9356 GB Notification: Performance of NFInst.instantiate(Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse): time 0.002732/0.7473, allocations: 1.164 MB / 1.21 GB, free: 12.5 MB / 0.9356 GB Notification: Performance of NFInst.instExpressions: time 0.002798/0.7501, allocations: 2.176 MB / 1.212 GB, free: 10.31 MB / 0.9356 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0002377/0.7504, allocations: 0 / 1.212 GB, free: 10.31 MB / 0.9356 GB Notification: Performance of NFTyping.typeComponents: time 8.8e-05/0.7505, allocations: 23.67 kB / 1.212 GB, free: 10.29 MB / 0.9356 GB Notification: Performance of NFTyping.typeBindings: time 0.0003281/0.7508, allocations: 83.27 kB / 1.212 GB, free: 10.2 MB / 0.9356 GB Notification: Performance of NFTyping.typeClassSections: time 0.003275/0.7541, allocations: 1.404 MB / 1.213 GB, free: 8.844 MB / 0.9356 GB Notification: Performance of NFFlatten.flatten: time 0.001703/0.7558, allocations: 1.295 MB / 1.214 GB, free: 7.547 MB / 0.9356 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0001071/0.756, allocations: 24.73 kB / 1.214 GB, free: 7.52 MB / 0.9356 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0008333/0.7568, allocations: 471.3 kB / 1.215 GB, free: 7.059 MB / 0.9356 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0007953/0.7576, allocations: 442.8 kB / 1.215 GB, free: 6.625 MB / 0.9356 GB Notification: Performance of NFPackage.collectConstants: time 0.0003585/0.758, allocations: 104 kB / 1.215 GB, free: 6.523 MB / 0.9356 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0003499/0.7583, allocations: 119.9 kB / 1.216 GB, free: 6.406 MB / 0.9356 GB Notification: Performance of NFScalarize.scalarize: time 0.000101/0.7584, allocations: 63.75 kB / 1.216 GB, free: 6.344 MB / 0.9356 GB Notification: Performance of NFVerifyModel.verify: time 0.0005377/0.759, allocations: 399 kB / 1.216 GB, free: 5.953 MB / 0.9356 GB Notification: Performance of NFConvertDAE.convert: time 0.001101/0.7601, allocations: 0.9601 MB / 1.217 GB, free: 4.996 MB / 0.9356 GB Notification: Performance of FrontEnd - DAE generated: time 4.177e-06/0.7601, allocations: 0 / 1.217 GB, free: 4.996 MB / 0.9356 GB Notification: Performance of FrontEnd: time 1.643e-06/0.7601, allocations: 0 / 1.217 GB, free: 4.996 MB / 0.9356 GB Notification: Performance of Transformations before backend: time 1.655e-05/0.7601, allocations: 0 / 1.217 GB, free: 4.996 MB / 0.9356 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 15 * Number of variables: 15 Notification: Performance of Generate backend data structure: time 0.001569/0.7617, allocations: 1.176 MB / 1.218 GB, free: 3.676 MB / 0.9356 GB Notification: Performance of prepare preOptimizeDAE: time 3.617e-05/0.7618, allocations: 8.031 kB / 1.218 GB, free: 3.668 MB / 0.9356 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.0002252/0.762, allocations: 64.64 kB / 1.218 GB, free: 3.605 MB / 0.9356 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001831/0.7622, allocations: 220.3 kB / 1.218 GB, free: 3.352 MB / 0.9356 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 5.38e-05/0.7622, allocations: 40.36 kB / 1.218 GB, free: 3.312 MB / 0.9356 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001759/0.7624, allocations: 68.36 kB / 1.218 GB, free: 3.246 MB / 0.9356 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.000272/0.7627, allocations: 214.9 kB / 1.219 GB, free: 2.984 MB / 0.9356 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.056e-05/0.7627, allocations: 4.125 kB / 1.219 GB, free: 2.98 MB / 0.9356 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 2.602e-05/0.7627, allocations: 11.92 kB / 1.219 GB, free: 2.969 MB / 0.9356 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 5.27e-06/0.7627, allocations: 0 / 1.219 GB, free: 2.969 MB / 0.9356 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.0001152/0.7629, allocations: 71.78 kB / 1.219 GB, free: 2.898 MB / 0.9356 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0008916/0.7638, allocations: 0.8406 MB / 1.22 GB, free: 1.965 MB / 0.9356 GB Notification: Performance of preOpt comSubExp (simulation): time 0.0002922/0.7641, allocations: 327.2 kB / 1.22 GB, free: 1.508 MB / 0.9356 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0001511/0.7642, allocations: 140.9 kB / 1.22 GB, free: 1.324 MB / 0.9356 GB Notification: Performance of preOpt evalFunc (simulation): time 1.442e-05/0.7642, allocations: 4 kB / 1.22 GB, free: 1.32 MB / 0.9356 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.0005429/0.7648, allocations: 466.9 kB / 1.22 GB, free: 0.793 MB / 0.9356 GB Notification: Performance of pre-optimization done (n=45): time 2.304e-06/0.7648, allocations: 0 / 1.22 GB, free: 0.793 MB / 0.9356 GB Notification: Performance of matching and sorting (n=45): time 0.0009969/0.7658, allocations: 0.5576 MB / 1.221 GB, free: 236 kB / 0.9356 GB Notification: Performance of inlineWhenForInitialization (initialization): time 0.0001951/0.766, allocations: 439.2 kB / 1.221 GB, free: 15.7 MB / 0.9512 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0002766/0.7663, allocations: 308.2 kB / 1.222 GB, free: 15.39 MB / 0.9512 GB Notification: Performance of collectPreVariables (initialization): time 0.0001449/0.7665, allocations: 61.7 kB / 1.222 GB, free: 15.33 MB / 0.9512 GB Notification: Performance of collectInitialEqns (initialization): time 0.0001723/0.7666, allocations: 161.3 kB / 1.222 GB, free: 15.16 MB / 0.9512 GB Notification: Performance of collectInitialBindings (initialization): time 8.481e-05/0.7667, allocations: 94.84 kB / 1.222 GB, free: 15.07 MB / 0.9512 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0004439/0.7672, allocations: 274.1 kB / 1.222 GB, free: 14.8 MB / 0.9512 GB Notification: Performance of setup shared object (initialization): time 0.0001264/0.7673, allocations: 350.8 kB / 1.223 GB, free: 14.45 MB / 0.9512 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.0007993/0.7681, allocations: 433.2 kB / 1.223 GB, free: 14.02 MB / 0.9512 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.0009546/0.7691, allocations: 0.7106 MB / 1.224 GB, free: 13.17 MB / 0.9512 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.001229/0.7703, allocations: 1.191 MB / 1.225 GB, free: 11.75 MB / 0.9512 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.455e-05/0.7703, allocations: 4 kB / 1.225 GB, free: 11.75 MB / 0.9512 GB Notification: Performance of matching and sorting (n=90) (initialization): time 0.002529/0.7729, allocations: 1.717 MB / 1.227 GB, free: 9.93 MB / 0.9512 GB Notification: Performance of prepare postOptimizeDAE: time 0.0002827/0.7732, allocations: 489.4 kB / 1.227 GB, free: 9.359 MB / 0.9512 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 2.486e-05/0.7732, allocations: 8 kB / 1.227 GB, free: 9.352 MB / 0.9512 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.975e-05/0.7732, allocations: 16 kB / 1.227 GB, free: 9.336 MB / 0.9512 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 7.339e-05/0.7733, allocations: 35.8 kB / 1.227 GB, free: 9.301 MB / 0.9512 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.782e-05/0.7733, allocations: 19.92 kB / 1.227 GB, free: 9.281 MB / 0.9512 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.002128/0.7755, allocations: 407.3 kB / 1.228 GB, free: 8.883 MB / 0.9512 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 0.000184/0.7757, allocations: 95.92 kB / 1.228 GB, free: 8.789 MB / 0.9512 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 45 * Number of states: 0 () * Number of discrete variables: 60 (booPul_c5.y,$PRE.booPul_c5.y,$whenCondition29,$whenCondition30,booPul_b5.y,$PRE.booPul_b5.y,$whenCondition27,$whenCondition28,booPul_a5.y,$PRE.booPul_a5.y,$whenCondition25,$whenCondition26,booPul_c4.y,$PRE.booPul_c4.y,$whenCondition23,$whenCondition24,booPul_b4.y,$PRE.booPul_b4.y,$whenCondition21,$whenCondition22,booPul_a4.y,$PRE.booPul_a4.y,$whenCondition19,$whenCondition20,booPul_c3.y,$PRE.booPul_c3.y,$whenCondition17,$whenCondition18,booPul_b3.y,$PRE.booPul_b3.y,$whenCondition15,$whenCondition16,booPul_a3.y,$PRE.booPul_a3.y,$whenCondition13,$whenCondition14,booPul_c2.y,$PRE.booPul_c2.y,$whenCondition11,$whenCondition12,booPul_b2.y,$PRE.booPul_b2.y,$whenCondition9,$whenCondition10,booPul_a2.y,$PRE.booPul_a2.y,$whenCondition7,$whenCondition8,booPul_c1.y,$PRE.booPul_c1.y,$whenCondition5,$whenCondition6,booPul_b1.y,$PRE.booPul_b1.y,$whenCondition3,$whenCondition4,booPul_a1.y,$PRE.booPul_a1.y,$whenCondition1,$whenCondition2) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (60): * Single equations (assignments): 45 * Array equations: 0 * Algorithm blocks: 15 * 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.0003174/0.776, allocations: 209.6 kB / 1.228 GB, free: 8.578 MB / 0.9512 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.59e-05/0.7761, allocations: 51.45 kB / 1.228 GB, free: 8.527 MB / 0.9512 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 7.335e-05/0.7762, allocations: 38.14 kB / 1.228 GB, free: 8.488 MB / 0.9512 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 8.245e-06/0.7762, allocations: 8 kB / 1.228 GB, free: 8.48 MB / 0.9512 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 1.272e-05/0.7762, allocations: 8 kB / 1.228 GB, free: 8.473 MB / 0.9512 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 7.304e-06/0.7762, allocations: 4 kB / 1.228 GB, free: 8.469 MB / 0.9512 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0004226/0.7766, allocations: 321.4 kB / 1.228 GB, free: 8.105 MB / 0.9512 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 1.227e-05/0.7767, allocations: 7.984 kB / 1.228 GB, free: 8.098 MB / 0.9512 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 4.279e-05/0.7767, allocations: 23.88 kB / 1.228 GB, free: 8.074 MB / 0.9512 GB Notification: Performance of postOpt tearingSystem (simulation): time 7.364e-06/0.7767, allocations: 7.938 kB / 1.228 GB, free: 8.066 MB / 0.9512 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 3.366e-05/0.7768, allocations: 23.97 kB / 1.228 GB, free: 8.043 MB / 0.9512 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 5.7e-06/0.7768, allocations: 4 kB / 1.228 GB, free: 8.039 MB / 0.9512 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 3.957e-06/0.7768, allocations: 4 kB / 1.228 GB, free: 8.035 MB / 0.9512 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0006724/0.7775, allocations: 0.5235 MB / 1.229 GB, free: 7.453 MB / 0.9512 GB Notification: Performance of postOpt removeConstants (simulation): time 9.942e-05/0.7776, allocations: 124.5 kB / 1.229 GB, free: 7.312 MB / 0.9512 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 5.104e-05/0.7776, allocations: 19.92 kB / 1.229 GB, free: 7.293 MB / 0.9512 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0001228/0.7778, allocations: 16 kB / 1.229 GB, free: 7.277 MB / 0.9512 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 8.918e-05/0.7778, allocations: 59.88 kB / 1.229 GB, free: 7.219 MB / 0.9512 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 2.913e-05/0.7779, allocations: 27.98 kB / 1.229 GB, free: 7.191 MB / 0.9512 GB Notification: Performance of sorting global known variables: time 0.0001579/0.778, allocations: 191.1 kB / 1.229 GB, free: 7.004 MB / 0.9512 GB Notification: Performance of sort global known variables: time 1.01e-07/0.7781, allocations: 0 / 1.229 GB, free: 7.004 MB / 0.9512 GB Notification: Performance of remove unused functions: time 0.0006528/0.7787, allocations: 196 kB / 1.229 GB, free: 6.812 MB / 0.9512 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 15 * Number of states: 0 () * Number of discrete variables: 45 ($whenCondition29,$whenCondition30,booPul_c5.y,$whenCondition27,$whenCondition28,booPul_b5.y,$whenCondition25,$whenCondition26,booPul_a5.y,$whenCondition23,$whenCondition24,booPul_c4.y,$whenCondition21,$whenCondition22,booPul_b4.y,$whenCondition19,$whenCondition20,booPul_a4.y,$whenCondition17,$whenCondition18,booPul_c3.y,$whenCondition15,$whenCondition16,booPul_b3.y,$whenCondition13,$whenCondition14,booPul_a3.y,$whenCondition11,$whenCondition12,booPul_c2.y,$whenCondition9,$whenCondition10,booPul_b2.y,$whenCondition7,$whenCondition8,booPul_a2.y,$whenCondition5,$whenCondition6,booPul_c1.y,$whenCondition3,$whenCondition4,booPul_b1.y,$whenCondition1,$whenCondition2,booPul_a1.y) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (45): * Single equations (assignments): 30 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 15 * 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.0001941/0.7789, allocations: 147 kB / 1.23 GB, free: 6.66 MB / 0.9512 GB Notification: Performance of simCode: created initialization part: time 0.00184/0.7808, allocations: 1.75 MB / 1.231 GB, free: 4.727 MB / 0.9512 GB Notification: Performance of simCode: created event and clocks part: time 2.866e-06/0.7808, allocations: 0 / 1.231 GB, free: 4.727 MB / 0.9512 GB Notification: Performance of simCode: created simulation system equations: time 0.0005574/0.7813, allocations: 360.5 kB / 1.232 GB, free: 4.375 MB / 0.9512 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0006681/0.782, allocations: 123.6 kB / 1.232 GB, free: 4.258 MB / 0.9512 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0009531/0.783, allocations: 0.6563 MB / 1.232 GB, free: 3.523 MB / 0.9512 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002848/0.7833, allocations: 0.7761 MB / 1.233 GB, free: 2.723 MB / 0.9512 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 6.638e-05/0.7833, allocations: 43.42 kB / 1.233 GB, free: 2.68 MB / 0.9512 GB Notification: Performance of SimCode: time 3.1e-07/0.7834, allocations: 0 / 1.233 GB, free: 2.68 MB / 0.9512 GB Notification: Performance of Templates: time 0.01108/0.7944, allocations: 7.592 MB / 1.241 GB, free: 11.18 MB / 0.9669 GB make -j1 -f Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.makefile (rm -f Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.pipe ; mkfifo Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.pipe ; head -c 1048576 < Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.pipe >> ../files/Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.sim & ./Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.pipe 2>&1) diffSimulationResults("Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse_res.mat","/mnt/ReferenceFiles/Buildings/csv/master/Buildings_Controls_OBC_CDL_Logical_Sources_Validation_Pulse.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Buildings_latest_Buildings.Controls.OBC.CDL.Logical.Sources.Validation.Pulse.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches