Running: ./testmodel.py --libraries=/home/hudson/saved_omc/libraries/.openmodelica/libraries --ompython_omhome=/usr Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.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 10.1.1-maint.10.0.x/package.mo", uses=false) Using package Buildings with version 10.1.1 (/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.1.1-maint.10.0.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.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|load.v.1.|load.v.2.|E.terminal.v.1.|E.terminal.v.2.",fileNamePrefix="Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid") translateModel(Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid,tolerance=1e-06,outputFormat="mat",numberOfIntervals=5000,variableFilter="time|load.v.1.|load.v.2.|E.terminal.v.1.|E.terminal.v.2.",fileNamePrefix="Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid") Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/ModelicaServices 4.0.0+maint.om/package.mo): time 0.001731/0.001731, allocations: 102.5 kB / 16.27 MB, free: 5.996 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.001904/0.001904, allocations: 186.5 kB / 17.2 MB, free: 5.605 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.449/1.449, allocations: 222.9 MB / 240.9 MB, free: 15.27 MB / 206.1 MB Notification: Performance of loadFile(/home/hudson/saved_omc/libraries/.openmodelica/libraries/Buildings 10.1.1-maint.10.0.x/package.mo): time 2.619/2.619, allocations: 437.1 MB / 0.7111 GB, free: 4.41 MB / 0.5762 GB Notification: Performance of FrontEnd - loaded program: time 0.001974/0.001974, allocations: 74.95 kB / 0.8699 GB, free: 2.121 MB / 0.6387 GB Notification: Performance of FrontEnd - Absyn->SCode: time 0.3371/0.3391, allocations: 151.6 MB / 1.018 GB, free: 10.57 MB / 0.795 GB Notification: Performance of NFInst.instantiate(Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid): time 0.006752/0.3459, allocations: 4.398 MB / 1.022 GB, free: 6.152 MB / 0.795 GB Notification: Performance of NFInst.instExpressions: time 0.006057/0.352, allocations: 3.261 MB / 1.025 GB, free: 2.879 MB / 0.795 GB Notification: Performance of NFInst.updateImplicitVariability: time 0.0003865/0.3524, allocations: 11.94 kB / 1.025 GB, free: 2.867 MB / 0.795 GB Notification: Performance of NFTyping.typeComponents: time 0.001696/0.3542, allocations: 0.5096 MB / 1.026 GB, free: 2.355 MB / 0.795 GB Notification: Performance of NFTyping.typeBindings: time 0.001067/0.3553, allocations: 398.4 kB / 1.026 GB, free: 1.965 MB / 0.795 GB Notification: Performance of NFTyping.typeClassSections: time 0.000705/0.356, allocations: 251.9 kB / 1.027 GB, free: 1.719 MB / 0.795 GB Notification: Performance of NFFlatten.flatten: time 0.0007876/0.3568, allocations: 0.5956 MB / 1.027 GB, free: 1.121 MB / 0.795 GB Notification: Performance of NFFlatten.resolveConnections: time 0.0007445/0.3576, allocations: 0.5212 MB / 1.028 GB, free: 0.6016 MB / 0.795 GB Notification: Performance of NFEvalConstants.evaluate: time 0.0004678/0.3581, allocations: 279.1 kB / 1.028 GB, free: 336 kB / 0.795 GB Notification: Performance of NFSimplifyModel.simplify: time 0.0004273/0.3585, allocations: 275 kB / 1.028 GB, free: 60 kB / 0.795 GB Notification: Performance of NFPackage.collectConstants: time 7.515e-05/0.3586, allocations: 40 kB / 1.028 GB, free: 20 kB / 0.795 GB Notification: Performance of NFFlatten.collectFunctions: time 0.0005943/0.3592, allocations: 303.5 kB / 1.029 GB, free: 15.72 MB / 0.8106 GB Notification: Performance of NFScalarize.scalarize: time 0.0001893/0.3594, allocations: 163.5 kB / 1.029 GB, free: 15.56 MB / 0.8106 GB Notification: Performance of NFVerifyModel.verify: time 0.0002752/0.3597, allocations: 222.9 kB / 1.029 GB, free: 15.34 MB / 0.8106 GB Notification: Performance of NFConvertDAE.convert: time 0.0009699/0.3607, allocations: 0.7829 MB / 1.03 GB, free: 14.56 MB / 0.8106 GB Notification: Performance of FrontEnd - DAE generated: time 5.391e-06/0.3607, allocations: 0 / 1.03 GB, free: 14.56 MB / 0.8106 GB Notification: Performance of FrontEnd: time 1.663e-06/0.3607, allocations: 0 / 1.03 GB, free: 14.56 MB / 0.8106 GB Notification: Performance of Transformations before backend: time 8.205e-06/0.3607, allocations: 0 / 1.03 GB, free: 14.56 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: 81 * Number of variables: 81 Notification: Performance of Generate backend data structure: time 0.001426/0.3621, allocations: 0.7697 MB / 1.03 GB, free: 13.74 MB / 0.8106 GB Notification: Performance of prepare preOptimizeDAE: time 4.065e-05/0.3622, allocations: 8.031 kB / 1.03 GB, free: 13.73 MB / 0.8106 GB Notification: Performance of preOpt normalInlineFunction (simulation): time 0.003004/0.3652, allocations: 0.6828 MB / 1.031 GB, free: 13.05 MB / 0.8106 GB Notification: Performance of preOpt evaluateParameters (simulation): time 0.0007587/0.366, allocations: 447.7 kB / 1.032 GB, free: 12.57 MB / 0.8106 GB Notification: Performance of preOpt simplifyIfEquations (simulation): time 2.629e-05/0.366, allocations: 21.03 kB / 1.032 GB, free: 12.55 MB / 0.8106 GB Notification: Performance of preOpt expandDerOperator (simulation): time 8.25e-05/0.3661, allocations: 32.12 kB / 1.032 GB, free: 12.52 MB / 0.8106 GB Notification: Performance of preOpt clockPartitioning (simulation): time 0.00171/0.3678, allocations: 0.7864 MB / 1.032 GB, free: 11.71 MB / 0.8106 GB Notification: Performance of preOpt findStateOrder (simulation): time 1.947e-05/0.3678, allocations: 4 kB / 1.032 GB, free: 11.7 MB / 0.8106 GB Notification: Performance of preOpt replaceEdgeChange (simulation): time 5.277e-05/0.3679, allocations: 12 kB / 1.032 GB, free: 11.69 MB / 0.8106 GB Notification: Performance of preOpt inlineArrayEqn (simulation): time 0.0001192/0.368, allocations: 40.61 kB / 1.032 GB, free: 11.65 MB / 0.8106 GB Notification: Performance of preOpt removeEqualRHS (simulation): time 0.002149/0.3702, allocations: 0.8726 MB / 1.033 GB, free: 10.77 MB / 0.8106 GB Notification: Performance of preOpt removeSimpleEquations (simulation): time 0.004346/0.3745, allocations: 2.816 MB / 1.036 GB, free: 7.734 MB / 0.8106 GB Notification: Performance of preOpt comSubExp (simulation): time 0.001794/0.3764, allocations: 0.5175 MB / 1.037 GB, free: 7.207 MB / 0.8106 GB Notification: Performance of preOpt resolveLoops (simulation): time 0.0007566/0.3771, allocations: 252.6 kB / 1.037 GB, free: 6.957 MB / 0.8106 GB Notification: Performance of preOpt evalFunc (simulation): time 0.0001311/0.3773, allocations: 93.09 kB / 1.037 GB, free: 6.848 MB / 0.8106 GB Notification: Performance of preOpt encapsulateWhenConditions (simulation): time 3.959e-05/0.3773, allocations: 38.48 kB / 1.037 GB, free: 6.801 MB / 0.8106 GB Notification: Performance of pre-optimization done (n=16): time 1.954e-06/0.3773, allocations: 0 / 1.037 GB, free: 6.801 MB / 0.8106 GB Notification: Performance of matching and sorting (n=24): time 0.01278/0.3901, allocations: 3.058 MB / 1.04 GB, free: 3.711 MB / 0.8106 GB Notification: Performance of inlineWhenForInitialization (initialization): time 5.537e-05/0.3902, allocations: 55.41 kB / 1.04 GB, free: 3.645 MB / 0.8106 GB Notification: Performance of selectInitializationVariablesDAE (initialization): time 0.0005593/0.3908, allocations: 397.6 kB / 1.04 GB, free: 3.25 MB / 0.8106 GB Notification: Performance of collectPreVariables (initialization): time 7.598e-05/0.3909, allocations: 33.7 kB / 1.04 GB, free: 3.211 MB / 0.8106 GB Notification: Performance of collectInitialEqns (initialization): time 0.0002068/0.3911, allocations: 243.7 kB / 1.041 GB, free: 2.969 MB / 0.8106 GB Notification: Performance of collectInitialBindings (initialization): time 9.792e-05/0.3912, allocations: 82.84 kB / 1.041 GB, free: 2.887 MB / 0.8106 GB Notification: Performance of simplifyInitialFunctions (initialization): time 0.0001748/0.3914, allocations: 73.58 kB / 1.041 GB, free: 2.809 MB / 0.8106 GB Notification: Performance of setup shared object (initialization): time 0.0001799/0.3916, allocations: 342.8 kB / 1.041 GB, free: 2.465 MB / 0.8106 GB Notification: Performance of preBalanceInitialSystem (initialization): time 0.001055/0.3926, allocations: 364.4 kB / 1.041 GB, free: 2.105 MB / 0.8106 GB Notification: Performance of partitionIndependentBlocks (initialization): time 0.001087/0.3937, allocations: 438.1 kB / 1.042 GB, free: 1.645 MB / 0.8106 GB Notification: Performance of analyzeInitialSystem (initialization): time 0.002096/0.3958, allocations: 0.7551 MB / 1.043 GB, free: 0.8633 MB / 0.8106 GB Notification: Performance of solveInitialSystemEqSystem (initialization): time 3.056e-06/0.3958, allocations: 0 / 1.043 GB, free: 0.8633 MB / 0.8106 GB Notification: Performance of matching and sorting (n=35) (initialization): time 0.005382/0.4012, allocations: 1.492 MB / 1.044 GB, free: 15.36 MB / 0.8262 GB Notification: Performance of prepare postOptimizeDAE: time 2.834e-05/0.4013, allocations: 12.19 kB / 1.044 GB, free: 15.35 MB / 0.8262 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 1.145e-05/0.4013, allocations: 4 kB / 1.044 GB, free: 15.34 MB / 0.8262 GB Notification: Performance of postOpt tearingSystem (initialization): time 0.003632/0.405, allocations: 0.7778 MB / 1.045 GB, free: 14.56 MB / 0.8262 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0006991/0.4057, allocations: 123.8 kB / 1.045 GB, free: 14.44 MB / 0.8262 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.007356/0.413, allocations: 4.851 MB / 1.05 GB, free: 9.301 MB / 0.8262 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0008533/0.4139, allocations: 111.8 kB / 1.05 GB, free: 9.191 MB / 0.8262 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.419e-05/0.414, allocations: 11.98 kB / 1.05 GB, free: 9.18 MB / 0.8262 GB Notification: Performance of preBalanceInitialSystem (initialization_lambda0): time 0.001238/0.4152, allocations: 0.531 MB / 1.05 GB, free: 8.645 MB / 0.8262 GB Notification: Performance of partitionIndependentBlocks (initialization_lambda0): time 0.001047/0.4163, allocations: 424 kB / 1.051 GB, free: 8.199 MB / 0.8262 GB Notification: Performance of analyzeInitialSystem (initialization_lambda0): time 0.001965/0.4183, allocations: 0.7298 MB / 1.051 GB, free: 7.441 MB / 0.8262 GB Notification: Performance of solveInitialSystemEqSystem (initialization_lambda0): time 4.068e-06/0.4183, allocations: 4 kB / 1.051 GB, free: 7.438 MB / 0.8262 GB Notification: Performance of matching and sorting (n=35) (initialization_lambda0): time 0.004406/0.4227, allocations: 1.258 MB / 1.053 GB, free: 6.168 MB / 0.8262 GB Notification: Performance of prepare postOptimizeDAE: time 1.539e-05/0.4227, allocations: 8.188 kB / 1.053 GB, free: 6.16 MB / 0.8262 GB Notification: Performance of postOpt simplifyComplexFunction (initialization): time 6.131e-06/0.4227, allocations: 4 kB / 1.053 GB, free: 6.156 MB / 0.8262 GB Notification: Performance of postOpt tearingSystem (initialization): time 0.002322/0.4251, allocations: 0.4961 MB / 1.053 GB, free: 5.656 MB / 0.8262 GB Notification: Performance of postOpt solveSimpleEquations (initialization): time 0.0007095/0.4258, allocations: 139.8 kB / 1.053 GB, free: 5.52 MB / 0.8262 GB Notification: Performance of postOpt calculateStrongComponentJacobians (initialization): time 0.003832/0.4296, allocations: 2.609 MB / 1.056 GB, free: 2.77 MB / 0.8262 GB Notification: Performance of postOpt simplifyAllExpressions (initialization): time 0.0007959/0.4304, allocations: 103.9 kB / 1.056 GB, free: 2.668 MB / 0.8262 GB Notification: Performance of postOpt collapseArrayExpressions (initialization): time 4.341e-05/0.4305, allocations: 19.98 kB / 1.056 GB, free: 2.648 MB / 0.8262 GB Notification: Model statistics after passing the back-end for initialization: * Number of independent subsystems: 9 * 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 (29): * Single equations (assignments): 27 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 2 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 1 system {(2,2,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(2,2)} Notification: Performance of prepare postOptimizeDAE: time 0.0002147/0.4307, allocations: 202.8 kB / 1.056 GB, free: 2.445 MB / 0.8262 GB Notification: Performance of postOpt lateInlineFunction (simulation): time 9.762e-05/0.4308, allocations: 39.53 kB / 1.056 GB, free: 2.406 MB / 0.8262 GB Notification: Performance of postOpt wrapFunctionCalls (simulation): time 0.004719/0.4355, allocations: 1.348 MB / 1.057 GB, free: 1.043 MB / 0.8262 GB Notification: Performance of postOpt inlineArrayEqn (simulation): time 6.683e-06/0.4356, allocations: 4 kB / 1.057 GB, free: 1.039 MB / 0.8262 GB Notification: Performance of postOpt constantLinearSystem (simulation): time 3.416e-06/0.4356, allocations: 0 / 1.057 GB, free: 1.039 MB / 0.8262 GB Notification: Performance of postOpt simplifysemiLinear (simulation): time 6.853e-06/0.4356, allocations: 3.984 kB / 1.057 GB, free: 1.035 MB / 0.8262 GB Notification: Performance of postOpt removeSimpleEquations (simulation): time 0.005446/0.441, allocations: 1.993 MB / 1.059 GB, free: 14.96 MB / 0.8419 GB Notification: Performance of postOpt simplifyComplexFunction (simulation): time 4.188e-06/0.4411, allocations: 0 / 1.059 GB, free: 14.96 MB / 0.8419 GB Notification: Performance of postOpt solveSimpleEquations (simulation): time 0.0003958/0.4415, allocations: 83.83 kB / 1.059 GB, free: 14.88 MB / 0.8419 GB Notification: Performance of postOpt tearingSystem (simulation): time 0.003128/0.4446, allocations: 0.7156 MB / 1.06 GB, free: 14.16 MB / 0.8419 GB Notification: Performance of postOpt inputDerivativesUsed (simulation): time 4.089e-05/0.4447, allocations: 15.92 kB / 1.06 GB, free: 14.14 MB / 0.8419 GB Notification: Performance of postOpt calculateStrongComponentJacobians (simulation): time 0.006436/0.4511, allocations: 4.663 MB / 1.065 GB, free: 9.199 MB / 0.8419 GB Notification: Performance of postOpt calculateStateSetsJacobians (simulation): time 2.004e-06/0.4511, allocations: 0 / 1.065 GB, free: 9.199 MB / 0.8419 GB Notification: Performance of postOpt symbolicJacobian (simulation): time 0.004454/0.4556, allocations: 1.366 MB / 1.066 GB, free: 7.805 MB / 0.8419 GB Notification: Performance of postOpt removeConstants (simulation): time 0.0002593/0.4559, allocations: 160.7 kB / 1.066 GB, free: 7.629 MB / 0.8419 GB Notification: Performance of postOpt simplifyTimeIndepFuncCalls (simulation): time 7.297e-05/0.456, allocations: 11.92 kB / 1.066 GB, free: 7.617 MB / 0.8419 GB Notification: Performance of postOpt simplifyAllExpressions (simulation): time 0.0006164/0.4566, allocations: 87.86 kB / 1.066 GB, free: 7.531 MB / 0.8419 GB Notification: Performance of postOpt findZeroCrossings (simulation): time 0.0001147/0.4567, allocations: 19.97 kB / 1.066 GB, free: 7.512 MB / 0.8419 GB Notification: Performance of postOpt collapseArrayExpressions (simulation): time 3.387e-05/0.4567, allocations: 19.98 kB / 1.066 GB, free: 7.492 MB / 0.8419 GB Notification: Performance of sorting global known variables: time 0.0004213/0.4572, allocations: 303.1 kB / 1.067 GB, free: 7.203 MB / 0.8419 GB Notification: Performance of sort global known variables: time 1.91e-07/0.4572, allocations: 0 / 1.067 GB, free: 7.203 MB / 0.8419 GB Notification: Performance of remove unused functions: time 0.000818/0.458, allocations: 200 kB / 1.067 GB, free: 7.008 MB / 0.8419 GB Notification: Model statistics after passing the back-end for simulation: * Number of independent subsystems: 4 * 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 (19): * Single equations (assignments): 17 * Array equations: 0 * Algorithm blocks: 0 * Record equations: 0 * When equations: 0 * If-equations: 0 * Equation systems (not torn): 0 * Torn equation systems: 2 * Mixed (continuous/discrete) equation systems: 0 Notification: Torn system details for strict tearing set: * Linear torn systems (#iteration vars, #inner vars, density): 1 system {(2,2,100.0%)} * Non-linear torn systems (#iteration vars, #inner vars): 1 system {(2,2)} Notification: Performance of Backend phase and start with SimCode phase: time 0.0001809/0.4582, allocations: 111.2 kB / 1.067 GB, free: 6.891 MB / 0.8419 GB Notification: Performance of simCode: created initialization part: time 0.004/0.4622, allocations: 1.589 MB / 1.069 GB, free: 5.262 MB / 0.8419 GB Notification: Performance of simCode: created event and clocks part: time 4.178e-06/0.4622, allocations: 0 / 1.069 GB, free: 5.262 MB / 0.8419 GB Notification: Performance of simCode: created simulation system equations: time 0.001295/0.4635, allocations: 0.63 MB / 1.069 GB, free: 4.605 MB / 0.8419 GB Notification: Performance of simCode: created of all other equations (e.g. parameter, nominal, assert, etc): time 0.0007049/0.4642, allocations: 126 kB / 1.069 GB, free: 4.484 MB / 0.8419 GB Notification: Performance of simCode: created linear, non-linear and system jacobian parts: time 0.002055/0.4663, allocations: 1.096 MB / 1.07 GB, free: 3.344 MB / 0.8419 GB Notification: Performance of simCode: some other stuff during SimCode phase: time 0.0005872/0.4669, allocations: 0.8976 MB / 1.071 GB, free: 2.422 MB / 0.8419 GB Notification: Performance of simCode: all other stuff during SimCode phase: time 0.0001537/0.4671, allocations: 39.41 kB / 1.071 GB, free: 2.383 MB / 0.8419 GB Notification: Performance of SimCode: time 6.72e-07/0.4671, allocations: 0 / 1.071 GB, free: 2.383 MB / 0.8419 GB Notification: Performance of Templates: time 0.4573/0.9243, allocations: 12.5 MB / 1.083 GB, free: 60.2 MB / 0.8419 GB make -j1 -f Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.makefile (rm -f Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.pipe ; mkfifo Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.pipe ; head -c 1048576 < Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.pipe >> ../files/Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.sim & ./Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid -abortSlowSimulation -alarm=400 -emit_protected -lv LOG_STATS > Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.pipe 2>&1) diffSimulationResults("Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid_res.mat","/mnt/ReferenceFiles/Buildings/csv/maint_10.0.x/Buildings_Electrical_AC_OnePhase_Lines_Examples_ACSimpleGrid.csv","/var/lib/jenkins1/ws/OpenModelicaLibraryTestingWork/OpenModelicaLibraryTesting/files/Buildings_10_Buildings.Electrical.AC.OnePhase.Lines.Examples.ACSimpleGrid.diff",relTol=0.003,relTolDiffMinMax=0.003,rangeDelta=0.001) Reference file matches