Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.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 3.2.3+maint.om/package.mo", uses=false) loadFile("/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerGrids 1.0.3/package.mo", uses=false) Using package PowerGrids with version 1.0.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerGrids 1.0.3/package.mo) Using package Modelica with version 3.2.3 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+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(PowerGrids.Controls.Test.TestDiscontinuousDeadBand,tolerance=1e-06,outputFormat="mat",numberOfIntervals=160,variableFilter="discontinuousDeadBand.smoothed|discontinuousDeadBand.u|discontinuousDeadBand.uMax|discontinuousDeadBand.uMin|discontinuousDeadBand.y|discontinuousDeadBandAnalyticSolution.y|inputSignal.y|time",fileNamePrefix="PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand") translateModel(PowerGrids.Controls.Test.TestDiscontinuousDeadBand,tolerance=1e-06,outputFormat="mat",numberOfIntervals=160,variableFilter="discontinuousDeadBand.smoothed|discontinuousDeadBand.u|discontinuousDeadBand.uMax|discontinuousDeadBand.uMin|discontinuousDeadBand.y|discontinuousDeadBandAnalyticSolution.y|inputSignal.y|time",fileNamePrefix="PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.005597/0.005597, allocations: 100.1 kB / 15.73 MB, free: 6.008 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.001298/0.001298, allocations: 195.9 kB / 16.68 MB, free: 5.93 MB / 14.72 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Modelica 3.2.3+maint.om/package.mo): time 1.284/1.284, allocations: 205.1 MB / 222.6 MB, free: 4.527 MB / 174.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/PowerGrids 1.0.3/package.mo): time 0.05845/0.05845, allocations: 14.16 MB / 284.1 MB, free: 6.988 MB / 238.1 MB Notification: Modelica requested package Complex of version 3.2.3. Complex 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: Modelica requested package ModelicaServices of version 3.2.3. ModelicaServices 4.0.0 is used instead which states that it is fully compatible without conversion script needed. Notification: Performance of FrontEnd - loaded program: time 0.001374/0.001374, allocations: 67.91 kB / 396.5 MB, free: 4 kB / 286.1 MB Notification: Performance of FrontEnd - Absyn->SCode: time 0.2322/0.2336, allocations: 50.13 MB / 446.6 MB, free: 2.105 MB / 318.1 MB Notification: Performance of NFInst.instantiate(PowerGrids.Controls.Test.TestDiscontinuousDeadBand): time 0.001872/0.2355, allocations: 0.6719 MB / 447.3 MB, free: 1.605 MB / 318.1 MB Notification: Performance of NFInst.instExpressions: time 0.0002342/0.2358, allocations: 55.08 kB / 447.3 MB, free: 1.562 MB / 318.1 MB Notification: Performance of NFInst.updateImplicitVariability: time 3.936e-05/0.2358, allocations: 4.938 kB / 447.3 MB, free: 1.559 MB / 318.1 MB Notification: Performance of NFTyping.typeComponents: time 4.063e-05/0.2359, allocations: 3.938 kB / 447.3 MB, free: 1.555 MB / 318.1 MB Notification: Performance of NFTyping.typeBindings: time 8.665e-05/0.236, allocations: 1.062 kB / 447.3 MB, free: 1.555 MB / 318.1 MB Notification: Performance of NFTyping.typeClassSections: time 0.0001743/0.2362, allocations: 19.53 kB / 447.4 MB, free: 1.539 MB / 318.1 MB Notification: Performance of NFFlatten.flatten: time 0.0001227/0.2363, allocations: 24.98 kB / 447.4 MB, free: 1.523 MB / 318.1 MB Notification: Performance of NFFlatten.resolveConnections: time 0.0001105/0.2364, allocations: 7.5 kB / 447.4 MB, free: 1.52 MB / 318.1 MB Notification: Performance of NFEvalConstants.evaluate: time 3.379e-05/0.2364, allocations: 11.14 kB / 447.4 MB, free: 1.512 MB / 318.1 MB Notification: Performance of NFSimplifyModel.simplify: time 5.56e-05/0.2365, allocations: 10.75 kB / 447.4 MB, free: 1.504 MB / 318.1 MB Notification: Performance of NFPackage.collectConstants: time 2.262e-05/0.2365, allocations: 2.719 kB / 447.4 MB, free: 1.504 MB / 318.1 MB Notification: Performance of NFFlatten.collectFunctions: time 9.077e-06/0.2365, allocations: 2.125 kB / 447.4 MB, free: 1.504 MB / 318.1 MB Notification: Performance of NFScalarize.scalarize: time 2.009e-05/0.2366, allocations: 13.55 kB / 447.4 MB, free: 1.492 MB / 318.1 MB Notification: Performance of NFVerifyModel.verify: time 2.684e-05/0.2366, allocations: 9.047 kB / 447.4 MB, free: 1.484 MB / 318.1 MB Notification: Performance of NFConvertDAE.convert: time 9.028e-05/0.2367, allocations: 16.02 kB / 447.5 MB, free: 1.473 MB / 318.1 MB Notification: Performance of FrontEnd - DAE generated: time 5.36e-06/0.2367, allocations: 4 kB / 447.5 MB, free: 1.469 MB / 318.1 MB Notification: Performance of FrontEnd: time 2.484e-06/0.2367, allocations: 4.969 kB / 447.5 MB, free: 1.465 MB / 318.1 MB Notification: Performance of Transformations before backend: time 6.712e-06/0.2367, allocations: 0 / 447.5 MB, free: 1.465 MB / 318.1 MB Notification: Model statistics after passing the front-end and creating the data structures used by the back-end: * Number of equations: 4 * Number of variables: 4 Notification: Performance of Generate backend data structure: time 0.0003722/0.2371, allocations: 335.2 kB / 447.8 MB, free: 1.102 MB / 318.1 MB Notification: Performance of prepare preOptimizeDAE: time 4.088e-05/0.2372, allocations: 9.438 kB / 447.8 MB, free: 1.102 MB / 318.1 MB Notification: Performance of preOpt normalInlineFunction (simulation): time 4.09e-05/0.2372, allocations: 7.375 kB / 447.8 MB, free: 1.098 MB / 318.1 MB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0001249/0.2373, allocations: 171.1 kB / 448 MB, free: 0.8945 MB / 318.1 MB Notification: Performance of preOpt simplifyIfEquations (simulation): time 1.193e-05/0.2373, allocations: 384 / 448 MB, free: 0.8945 MB / 318.1 MB Notification: Performance of preOpt expandDerOperator (simulation): time 9.187e-06/0.2374, allocations: 2.156 kB / 448 MB, free: 0.8945 MB / 318.1 MB Notification: Performance of preOpt clockPartitioning (simulation): time 0.0001709/0.2375, allocations: 83.61 kB / 448.1 MB, free: 0.8164 MB / 318.1 MB Notification: Performance of preOpt findStateOrder (simulation): time 8.646e-06/0.2376, allocations: 192 / 448.1 MB, free: 0.8164 MB / 318.1 MB Notification: Performance of preOpt replaceEdgeChange (simulation): time 1.143e-05/0.2376, allocations: 3.938 kB / 448.1 MB, free: 0.8125 MB / 318.1 MB Notification: Performance of preOpt inlineArrayEqn (simulation): time 6.031e-06/0.2376, allocations: 1.781 kB / 448.1 MB, free: 0.8125 MB / 318.1 MB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.000141/0.2377, allocations: 35.77 kB / 448.1 MB, free: 0.7969 MB / 318.1 MB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.0002669/0.238, allocations: 273 kB / 448.4 MB, free: 0.4922 MB / 318.1 MB Notification: Performance of preOpt comSubExp (simulation): time 0.0001376/0.2381, allocations: 70.47 kB / 448.4 MB, free: 436 kB / 318.1 MB Notification: Performance of preOpt resolveLoops (simulation): time 7.744e-05/0.2382, allocations: 29.45 kB / 448.5 MB, free: 412 kB / 318.1 MB Notification: Performance of preOpt evalFunc (simulation): time 1.979e-05/0.2383, allocations: 9.984 kB / 448.5 MB, free: 404 kB / 318.1 MB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 1.625e-05/0.2383, allocations: 38.48 kB / 448.5 MB, free: 356 kB / 318.1 MB Notification: Performance of pre-optimization done (n=3): time 1.282e-06/0.2383, allocations: 0.6562 kB / 448.5 MB, free: 356 kB / 318.1 MB Notification: Performance of matching and sorting (n=3): time 0.0002907/0.2386, allocations: 84.97 kB / 448.6 MB, free: 304 kB / 318.1 MB Notification: Performance of inlineWhenForInitialization (initialization): time 3.237e-05/0.2386, allocations: 115 kB / 448.7 MB, free: 164 kB / 318.1 MB Notification: Performance of selectInitializationVariablesDAE (initialization): time 4.623e-05/0.2387, allocations: 93.42 kB / 448.8 MB, free: 64 kB / 318.1 MB Notification: Performance of collectPreVariables (initialization): time 8.496e-06/0.2387, allocations: 29.7 kB / 448.8 MB, free: 28 kB / 318.1 MB Notification: Performance of collectInitialEqns (initialization): time 5.566e-05/0.2388, allocations: 87.61 kB / 448.9 MB, free: 15.94 MB / 334.1 MB Notification: Performance of collectInitialBindings (initialization): time 1.527e-05/0.2388, allocations: 7.812 kB / 448.9 MB, free: 15.93 MB / 334.1 MB Notification: Performance of simplifyInitialFunctions (initialization): time 3.371e-05/0.2388, allocations: 21.2 kB / 448.9 MB, free: 15.91 MB / 334.1 MB Notification: Performance of setup shared object (initialization): time 0.000101/0.2389, allocations: 310.8 kB / 449.3 MB, free: 15.6 MB / 334.1 MB Notification: Performance of preBalanceInitialSystem (initialization): time 7.997e-05/0.239, allocations: 27.75 kB / 449.3 MB, free: 15.58 MB / 334.1 MB Notification: Performance of partitionIndependentBlocks (initialization): time 7.786e-05/0.2391, allocations: 36.8 kB / 449.3 MB, free: 15.55 MB / 334.1 MB Notification: Performance of analyzeInitialSystem (initialization): time 0.0001459/0.2392, allocations: 47.59 kB / 449.4 MB, free: 15.51 MB / 334.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization): time 1.743e-06/0.2393, allocations: 5.188 kB / 449.4 MB, free: 15.51 MB / 334.1 MB Notification: Performance of matching and sorting (n=3) (initialization): time 0.0001789/0.2394, allocations: 67.86 kB / 449.4 MB, free: 15.46 MB / 334.1 MB Notification: Performance of prepare postOptimizeDAE: time 1.566e-05/0.2395, allocations: 9.734 kB / 449.4 MB, free: 15.46 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 4.598e-06/0.2395, allocations: 0 / 449.4 MB, free: 15.46 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 1.075e-05/0.2395, allocations: 1.281 kB / 449.4 MB, free: 15.46 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 7.876e-05/0.2396, allocations: 8.469 kB / 449.5 MB, free: 15.46 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 8.216e-06/0.2396, allocations: 0 / 449.5 MB, free: 15.46 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 4.888e-05/0.2396, allocations: 19.45 kB / 449.5 MB, free: 15.45 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 6.583e-06/0.2397, allocations: 1.25 kB / 449.5 MB, free: 15.45 MB / 334.1 MB Notification: Performance of preBalanceInitialSystem (initialization_lambda0): time 7.646e-05/0.2397, allocations: 92.91 kB / 449.6 MB, free: 15.36 MB / 334.1 MB Notification: Performance of partitionIndependentBlocks (initialization_lambda0): time 4.245e-05/0.2398, allocations: 20.39 kB / 449.6 MB, free: 15.33 MB / 334.1 MB Notification: Performance of analyzeInitialSystem (initialization_lambda0): time 7.036e-05/0.2399, allocations: 32.92 kB / 449.6 MB, free: 15.3 MB / 334.1 MB Notification: Performance of solveInitialSystemEqSystem (initialization_lambda0): time 9.82e-07/0.2399, allocations: 3.938 kB / 449.6 MB, free: 15.3 MB / 334.1 MB Notification: Performance of matching and sorting (n=3) (initialization_lambda0): time 0.0001229/0.24, allocations: 57.09 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Performance of prepare postOptimizeDAE: time 8.306e-06/0.24, allocations: 5.625 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.963e-06/0.24, allocations: 1.062 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (initialization): time 2.414e-06/0.24, allocations: 1.062 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (initialization): time 3.509e-05/0.2401, allocations: 8.484 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 1.874e-06/0.2401, allocations: 1.125 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 3.54e-05/0.2401, allocations: 7.469 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 3.095e-06/0.2401, allocations: 1.281 kB / 449.7 MB, free: 15.25 MB / 334.1 MB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 2 * Number of states: 0 () * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for initialization (3): * Single equations (assignments): 3 * 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 9.799e-05/0.2402, allocations: 186.5 kB / 449.9 MB, free: 15.06 MB / 334.1 MB Notification: Performance of postOpt lateInlineFunction (simulation): time 2.537e-05/0.2403, allocations: 6.125 kB / 449.9 MB, free: 15.05 MB / 334.1 MB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 2.211e-05/0.2403, allocations: 7.109 kB / 449.9 MB, free: 15.05 MB / 334.1 MB Notification: Performance of postOpt inlineArrayEqn (simulation): time 1.953e-06/0.2403, allocations: 1.219 kB / 449.9 MB, free: 15.05 MB / 334.1 MB Notification: Performance of postOpt constantLinearSystem (simulation): time 6.322e-06/0.2403, allocations: 1.094 kB / 449.9 MB, free: 15.05 MB / 334.1 MB Notification: Performance of postOpt simplifysemiLinear (simulation): time 2.896e-06/0.2403, allocations: 5.031 kB / 449.9 MB, free: 15.04 MB / 334.1 MB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.0001639/0.2405, allocations: 167.3 kB / 450.1 MB, free: 14.84 MB / 334.1 MB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 2.634e-06/0.2405, allocations: 11.94 kB / 450.1 MB, free: 14.82 MB / 334.1 MB Notification: Performance of postOpt solveSimpleEquations (simulation): time 5.396e-05/0.2405, allocations: 12.36 kB / 450.1 MB, free: 14.82 MB / 334.1 MB Notification: Performance of postOpt tearingSystem (simulation): time 1.744e-06/0.2406, allocations: 0 / 450.1 MB, free: 14.82 MB / 334.1 MB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 8.406e-06/0.2406, allocations: 1.375 kB / 450.1 MB, free: 14.82 MB / 334.1 MB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 1.373e-06/0.2406, allocations: 0 / 450.1 MB, free: 14.82 MB / 334.1 MB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 9.92e-07/0.2406, allocations: 1.312 kB / 450.1 MB, free: 14.82 MB / 334.1 MB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.0002429/0.2408, allocations: 175.4 kB / 450.3 MB, free: 14.66 MB / 334.1 MB Notification: Performance of postOpt removeConstants (simulation): time 3.452e-05/0.2409, allocations: 78.45 kB / 450.3 MB, free: 14.56 MB / 334.1 MB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 1.33e-05/0.2409, allocations: 1.094 kB / 450.3 MB, free: 14.56 MB / 334.1 MB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 7.257e-05/0.241, allocations: 8.797 kB / 450.3 MB, free: 14.56 MB / 334.1 MB Notification: Performance of postOpt findZeroCrossings (simulation): time 3.962e-05/0.241, allocations: 10.33 kB / 450.4 MB, free: 14.55 MB / 334.1 MB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.897e-06/0.241, allocations: 1.188 kB / 450.4 MB, free: 14.55 MB / 334.1 MB Notification: Performance of sorting global known variables: time 4.442e-05/0.2411, allocations: 81.92 kB / 450.4 MB, free: 14.47 MB / 334.1 MB Notification: Performance of sort global known variables: time 1.3e-07/0.2411, allocations: 1.031 kB / 450.4 MB, free: 14.47 MB / 334.1 MB Notification: Performance of remove unused functions: time 0.0002646/0.2413, allocations: 10.38 kB / 450.5 MB, free: 14.47 MB / 334.1 MB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 2 * Number of states: 0 () * Number of discrete variables: 0 () * Number of discrete states: 0 () * Number of clocked states: 0 () * Top-level inputs: 0 Notification: Strong component statistics for simulation (3): * Single equations (assignments): 3 * 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 Backend phase and start with SimCode phase: time 9.526e-05/0.2414, allocations: 101 kB / 450.5 MB, free: 14.37 MB / 334.1 MB Notification: Performance of simCode: created initialization part: time 0.0002405/0.2417, allocations: 60 kB / 450.6 MB, free: 14.34 MB / 334.1 MB Notification: Performance of simCode: created event and clocks part: time 1.883e-06/0.2417, allocations: 2.031 kB / 450.6 MB, free: 14.34 MB / 334.1 MB Notification: Performance of simCode: created simulation system equations: time 7.988e-05/0.2418, allocations: 25.61 kB / 450.6 MB, free: 14.33 MB / 334.1 MB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0002075/0.242, allocations: 9.797 kB / 450.6 MB, free: 14.32 MB / 334.1 MB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.0002993/0.2423, allocations: 120.5 kB / 450.8 MB, free: 14.2 MB / 334.1 MB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0002236/0.2425, allocations: 0.6766 MB / 451.4 MB, free: 13.5 MB / 334.1 MB Notification: Performance of simCode: alias equations: time 3.827e-05/0.2426, allocations: 9.578 kB / 451.4 MB, free: 13.49 MB / 334.1 MB Notification: Performance of simCode: all other stuff during SimCode phase: time 2.712e-05/0.2426, allocations: 10.38 kB / 451.5 MB, free: 13.48 MB / 334.1 MB Notification: Performance of SimCode: time 3.8e-07/0.2426, allocations: 3.938 kB / 451.5 MB, free: 13.48 MB / 334.1 MB Notification: Performance of Templates: time 0.002528/0.2452, allocations: 0.6134 MB / 452.1 MB, free: 13.17 MB / 334.1 MB make -j1 -f PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.makefile (rm -f PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.pipe ; mkfifo PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.pipe ; head -c 1048576 < PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.pipe >> ../files/PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.sim & ./PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand -abortSlowSimulation -alarm=480 -emit_protected -lv LOG_STATS > PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.pipe 2>&1) diffSimulationResults("PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand_res.mat","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/ReferenceFiles/PowerGrids/PowerGrids.Controls.Test.TestDiscontinuousDeadBand_res.mat","/var/lib/jenkins/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/PowerGrids_PowerGrids.Controls.Test.TestDiscontinuousDeadBand.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches