﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2610	ExpressionSimplify can not handle y - x + x.	carlj@…	somebody	"I have recently had issues with ExpressionSimplify '''not''' simplifying expressions on the form ''y - x + x'' to ''y''.

To be explicit, the expressions were on the form:
{{{
  DAE.BINARY(
     DAE.BINARY(y,DAE.SUB(type),x),
     DAE.ADD(type),
     x
  )
}}}

I have fixed this by adding the following case to ExpressionSimplify.simplifyBinaryCommutativeWork:

{{{
    case(DAE.ADD(ty = tp),DAE.BINARY(e1,DAE.SUB(_),e2),e3)
      equation
        true = Expression.expEqual(e2,e3);
      then e1;
}}}

However, since the module is largely undocumented, I leave it to you to decide if this is the proper way to do it.
"	defect	closed	high	1.9.1	Frontend	trunk	invalid		Vitalij Ruge
