Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.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.Chillers.Examples.ElectricReformulatedEIR,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|chi.TSet|chi.TEvaEnt|chi.TEvaLvg|chi.TConEnt|chi.TConLvg|chi.PLR1|chi.PLR2|chi.CR|chi.COP",fileNamePrefix="Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR") translateModel(Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|chi.TSet|chi.TEvaEnt|chi.TEvaLvg|chi.TConEnt|chi.TConLvg|chi.PLR1|chi.PLR2|chi.CR|chi.COP",fileNamePrefix="Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001412/0.001412, allocations: 103.4 kB / 15.33 MB, free: 0.5078 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.001484/0.001484, allocations: 192.1 kB / 16.25 MB, free: 6.621 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.42/1.42, allocations: 222.9 MB / 239.9 MB, free: 4.543 MB / 190.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.382/2.382, allocations: 390.2 MB / 0.6643 GB, free: 0.5703 MB / 0.5137 GB Notification: Performance of FrontEnd - loaded program: time 0.001561/0.001562, allocations: 67.88 kB / 0.812 GB, free: 14.79 MB / 0.67 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.8442/0.8458, allocations: 140.4 MB / 0.9491 GB, free: 9.445 MB / 0.7169 GB Notification: Performance of NFInst.instantiate(Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR): time 0.06234/0.9082, allocations: 59.96 MB / 1.008 GB, free: 6.105 MB / 0.7637 GB Notification: Performance of NFInst.instExpressions: time 0.02135/0.9296, allocations: 13.12 MB / 1.02 GB, free: 8.957 MB / 0.7794 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.004187/0.9338, allocations: 63.56 kB / 1.021 GB, free: 8.895 MB / 0.7794 GB Notification: Performance of NFTyping.typeComponents: time 0.003268/0.9371, allocations: 0.8453 MB / 1.021 GB, free: 8.047 MB / 0.7794 GB Notification: Performance of NFTyping.typeBindings: time 0.007195/0.9444, allocations: 2.15 MB / 1.023 GB, free: 5.891 MB / 0.7794 GB Notification: Performance of NFTyping.typeClassSections: time 0.004583/0.949, allocations: 1.426 MB / 1.025 GB, free: 4.477 MB / 0.7794 GB Notification: Performance of NFFlatten.flatten: time 0.00589/0.9549, allocations: 4.31 MB / 1.029 GB, free: 156 kB / 0.7794 GB Notification: Performance of NFFlatten.resolveConnections: time 0.00204/0.9569, allocations: 1.31 MB / 1.03 GB, free: 14.81 MB / 0.795 GB Notification: Performance of NFEvalConstants.evaluate: time 0.004369/0.9613, allocations: 1.597 MB / 1.032 GB, free: 13.21 MB / 0.795 GB Notification: Performance of NFSimplifyModel.simplify: time 0.002065/0.9634, allocations: 1.233 MB / 1.033 GB, free: 11.98 MB / 0.795 GB Notification: Performance of NFPackage.collectConstants: time 0.0004149/0.9638, allocations: 139.9 kB / 1.033 GB, free: 11.84 MB / 0.795 GB Notification: Performance of NFFlatten.collectFunctions: time 0.003463/0.9673, allocations: 1.489 MB / 1.035 GB, free: 10.35 MB / 0.795 GB Notification: Performance of NFScalarize.scalarize: time 0.0005015/0.9678, allocations: 430.5 kB / 1.035 GB, free: 9.926 MB / 0.795 GB Notification: Performance of NFVerifyModel.verify: time 0.00121/0.969, allocations: 0.9173 MB / 1.036 GB, free: 9.004 MB / 0.795 GB Notification: Performance of NFConvertDAE.convert: time 0.004431/0.9735, allocations: 2.773 MB / 1.039 GB, free: 6.223 MB / 0.795 GB Notification: Performance of FrontEnd - DAE generated: time 4.939e-06/0.9735, allocations: 0 / 1.039 GB, free: 6.223 MB / 0.795 GB Notification: Performance of FrontEnd: time 1.322e-06/0.9735, allocations: 4 kB / 1.039 GB, free: 6.219 MB / 0.795 GB Notification: Performance of Transformations before backend: time 2.368e-05/0.9735, allocations: 0 / 1.039 GB, free: 6.219 MB / 0.795 GB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 230 * Number of variables: 230 Notification: Performance of Generate backend data structure: time 0.004135/0.9777, allocations: 2.201 MB / 1.041 GB, free: 3.949 MB / 0.795 GB Notification: Performance of prepare preOptimizeDAE: time 3.963e-05/0.9777, allocations: 15.97 kB / 1.041 GB, free: 3.934 MB / 0.795 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.003616/0.9813, allocations: 0.6034 MB / 1.041 GB, free: 3.328 MB / 0.795 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.00262/0.984, allocations: 1.404 MB / 1.043 GB, free: 1.875 MB / 0.795 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 0.0001719/0.9842, allocations: 141.4 kB / 1.043 GB, free: 1.727 MB / 0.795 GB Notification: Performance of preOpt expandDerOperator (simulation): time 0.0001783/0.9844, allocations: 103.9 kB / 1.043 GB, free: 1.625 MB / 0.795 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.003064/0.9874, allocations: 1.319 MB / 1.044 GB, free: 276 kB / 0.795 GB Notification: Performance of preOpt findStateOrder (simulation): time 2.71e-05/0.9875, allocations: 0 / 1.044 GB, free: 276 kB / 0.795 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 0.0001069/0.9876, allocations: 36 kB / 1.044 GB, free: 240 kB / 0.795 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 4.812e-05/0.9876, allocations: 27.94 kB / 1.044 GB, free: 212 kB / 0.795 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.003582/0.9912, allocations: 1.327 MB / 1.046 GB, free: 14.88 MB / 0.8106 GB Warning: The model contains alias variables with redundant start and/or conflicting nominal values. It is recommended to resolve the conflicts, because otherwise the system could be hard to solve. To print the conflicting alias sets and the chosen candidates please use -d=aliasConflicts. Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.007995/0.9992, allocations: 5.371 MB / 1.051 GB, free: 9.152 MB / 0.8106 GB Notification: Performance of preOpt comSubExp (simulation): time 0.002656/1.002, allocations: 1.051 MB / 1.052 GB, free: 8.059 MB / 0.8106 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.001559/1.003, allocations: 0.6079 MB / 1.053 GB, free: 7.445 MB / 0.8106 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0009976/1.005, allocations: 1.232 MB / 1.054 GB, free: 5.938 MB / 0.8106 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 0.001856/1.006, allocations: 0.6589 MB / 1.054 GB, free: 5.266 MB / 0.8106 GB Notification: Performance of pre-optimization done (n=69): time 3.487e-06/1.006, allocations: 0 / 1.054 GB, free: 5.266 MB / 0.8106 GB Notification: Performance of matching and sorting (n=69): time 0.00542/1.012, allocations: 1.699 MB / 1.056 GB, free: 3.559 MB / 0.8106 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.377e-05/1.012, allocations: 67.89 kB / 1.056 GB, free: 3.48 MB / 0.8106 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.001867/1.014, allocations: 1.316 MB / 1.057 GB, free: 2.156 MB / 0.8106 GB Notification: Performance of collectPreVariables (initialization): time 0.0001905/1.014, allocations: 45.7 kB / 1.057 GB, free: 2.105 MB / 0.8106 GB Notification: Performance of collectInitialEqns (initialization): time 0.0006019/1.015, allocations: 0.6699 MB / 1.058 GB, free: 1.426 MB / 0.8106 GB Notification: Performance of collectInitialBindings (initialization): time 0.0002518/1.015, allocations: 236.6 kB / 1.058 GB, free: 1.191 MB / 0.8106 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0002985/1.015, allocations: 174.5 kB / 1.058 GB, free: 1.016 MB / 0.8106 GB Notification: Performance of setup shared object (initialization): time 0.0001358/1.015, allocations: 334 kB / 1.059 GB, free: 0.6836 MB / 0.8106 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001571/1.017, allocations: 0.5317 MB / 1.059 GB, free: 152 kB / 0.8106 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001788/1.019, allocations: 0.7508 MB / 1.06 GB, free: 15.32 MB / 0.8262 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.003055/1.022, allocations: 1.143 MB / 1.061 GB, free: 14.13 MB / 0.8262 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 4.238e-06/1.022, allocations: 0 / 1.061 GB, free: 14.13 MB / 0.8262 GB Notification: Performance of matching and sorting (n=96) (initialization): time 0.003823/1.026, allocations: 1.415 MB / 1.063 GB, free: 12.7 MB / 0.8262 GB Notification: Performance of prepare postOptimizeDAE: time 5.859e-05/1.026, allocations: 31.73 kB / 1.063 GB, free: 12.67 MB / 0.8262 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.417e-05/1.026, allocations: 11.94 kB / 1.063 GB, free: 12.66 MB / 0.8262 GB Notification: Performance of postOpt tearingSystem (initialization): time 2.424e-05/1.026, allocations: 11.94 kB / 1.063 GB, free: 12.64 MB / 0.8262 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001237/1.027, allocations: 256 kB / 1.063 GB, free: 12.39 MB / 0.8262 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.556e-05/1.027, allocations: 11.94 kB / 1.063 GB, free: 12.38 MB / 0.8262 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001635/1.029, allocations: 222.9 kB / 1.063 GB, free: 12.16 MB / 0.8262 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 8.963e-05/1.029, allocations: 39.97 kB / 1.063 GB, free: 12.12 MB / 0.8262 GB Notification: Performance of preBalanceInitialSystem (initialization_lambda0): time 0.001936/1.031, allocations: 0.7907 MB / 1.064 GB, free: 11.33 MB / 0.8262 GB Notification: Performance of partitionIndependentBlocks (initialization_lambda0): time 0.001682/1.032, allocations: 0.7469 MB / 1.065 GB, free: 10.5 MB / 0.8262 GB Notification: Performance of analyzeInitialSystem (initialization_lambda0): time 0.002939/1.035, allocations: 1.128 MB / 1.066 GB, free: 9.332 MB / 0.8262 GB Notification: Performance of solveInitialSystemEqSystem (initialization_lambda0): time 3.457e-06/1.035, allocations: 0 / 1.066 GB, free: 9.332 MB / 0.8262 GB Notification: Performance of matching and sorting (n=96) (initialization_lambda0): time 0.003736/1.039, allocations: 1.403 MB / 1.067 GB, free: 7.91 MB / 0.8262 GB Notification: Performance of prepare postOptimizeDAE: time 4.348e-05/1.039, allocations: 33.7 kB / 1.067 GB, free: 7.871 MB / 0.8262 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.993e-06/1.039, allocations: 4 kB / 1.067 GB, free: 7.867 MB / 0.8262 GB Notification: Performance of postOpt tearingSystem (initialization): time 1.171e-05/1.039, allocations: 8.312 kB / 1.067 GB, free: 7.859 MB / 0.8262 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.001219/1.04, allocations: 251.6 kB / 1.067 GB, free: 7.613 MB / 0.8262 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.491e-05/1.04, allocations: 15.92 kB / 1.067 GB, free: 7.598 MB / 0.8262 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.001624/1.042, allocations: 211.3 kB / 1.068 GB, free: 7.391 MB / 0.8262 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 8.743e-05/1.042, allocations: 39.97 kB / 1.068 GB, free: 7.352 MB / 0.8262 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 13 * Number of states: 0 () * Number of discrete variables: 6 (chi.on,pulse.count,$PRE.pulse.count,pulse.T_start,$PRE.pulse.T_start,$whenCondition1) * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (95): * Single equations (assignments): 94 * 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.0003045/1.042, allocations: 228.1 kB / 1.068 GB, free: 7.121 MB / 0.8262 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 0.0002495/1.043, allocations: 150.1 kB / 1.068 GB, free: 6.973 MB / 0.8262 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.0039/1.047, allocations: 1.466 MB / 1.069 GB, free: 5.484 MB / 0.8262 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.884e-05/1.047, allocations: 11.98 kB / 1.069 GB, free: 5.473 MB / 0.8262 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 5.962e-06/1.047, allocations: 0 / 1.069 GB, free: 5.473 MB / 0.8262 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 0.003106/1.05, allocations: 1.238 MB / 1.071 GB, free: 4.203 MB / 0.8262 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.006472/1.056, allocations: 3.207 MB / 1.074 GB, free: 0.8398 MB / 0.8262 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 9.779e-06/1.056, allocations: 4 kB / 1.074 GB, free: 0.8359 MB / 0.8262 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.001171/1.057, allocations: 216.2 kB / 1.074 GB, free: 0.625 MB / 0.8262 GB Notification: Performance of postOpt tearingSystem (simulation): time 1.266e-05/1.057, allocations: 15.94 kB / 1.074 GB, free: 0.6094 MB / 0.8262 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 7.786e-05/1.058, allocations: 27.98 kB / 1.074 GB, free: 0.582 MB / 0.8262 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 2.433e-05/1.058, allocations: 19.86 kB / 1.074 GB, free: 0.5625 MB / 0.8262 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 4.969e-06/1.058, allocations: 4 kB / 1.074 GB, free: 0.5586 MB / 0.8262 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.005446/1.063, allocations: 2.232 MB / 1.076 GB, free: 14.25 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.000726/1.064, allocations: 350.8 kB / 1.077 GB, free: 13.89 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 0.0002426/1.064, allocations: 27.92 kB / 1.077 GB, free: 13.86 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.001462/1.066, allocations: 163.8 kB / 1.077 GB, free: 13.7 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.000157/1.066, allocations: 68.36 kB / 1.077 GB, free: 13.63 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 0.0001012/1.066, allocations: 39.97 kB / 1.077 GB, free: 13.59 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.001316/1.067, allocations: 0.949 MB / 1.078 GB, free: 12.65 MB / 0.8419 GB Notification: Performance of sort global known variables: time 2.1e-07/1.067, allocations: 0 / 1.078 GB, free: 12.65 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.001993/1.069, allocations: 0.7876 MB / 1.079 GB, free: 11.86 MB / 0.8419 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 19 * Number of states: 2 (chi.vol1.dynBal.U,chi.vol2.dynBal.U) * Number of discrete variables: 4 ($whenCondition1,pulse.T_start,pulse.count,chi.on) * Number of discrete states: 1 (pulse.count) * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (73): * Single equations (assignments): 65 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 6 * When equations: 2 * 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.00103/1.07, allocations: 0.5137 MB / 1.079 GB, free: 11.35 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.005579/1.076, allocations: 2.054 MB / 1.081 GB, free: 9.273 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 5.661e-06/1.076, allocations: 0 / 1.081 GB, free: 9.273 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.001852/1.078, allocations: 0.6874 MB / 1.082 GB, free: 8.59 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.003496/1.081, allocations: 0.7627 MB / 1.082 GB, free: 7.848 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.004972/1.086, allocations: 3.27 MB / 1.086 GB, free: 4.484 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0008167/1.087, allocations: 1.253 MB / 1.087 GB, free: 3.203 MB / 0.8419 GB Notification: Performance of simCode: alias equations: time 0.001702/1.089, allocations: 371.5 kB / 1.087 GB, free: 2.836 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0003822/1.089, allocations: 123.4 kB / 1.087 GB, free: 2.715 MB / 0.8419 GB Notification: Performance of SimCode: time 7.02e-07/1.089, allocations: 0 / 1.087 GB, free: 2.715 MB / 0.8419 GB Notification: Performance of Templates: time 0.05253/1.142, allocations: 31.21 MB / 1.118 GB, free: 3.922 MB / 0.8731 GB make -j1 -f Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.makefile (rm -f Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.pipe ; mkfifo Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.pipe ; head -c 1048576 < Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.pipe >> ../files/Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.sim & ./Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.pipe 2>&1) diffSimulationResults("Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR_res.mat","/mnt/ReferenceFiles/Buildings/csv/maint_9.1.x/Buildings_Fluid_Chillers_Examples_ElectricReformulatedEIR.csv","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Buildings_9_Buildings.Fluid.Chillers.Examples.ElectricReformulatedEIR.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches