﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2647	Expression.simplify is way too slow	Willi Braun	probably noone	"For the following models the compile time increases heavy, if one increase the size. 
{{{
  model BaseModelEquations
    parameter Integer n=100; // see Backend time for 100, 200, 400
    input Real[n] u1;
    input Real[n] u2;
    output Real[n] y1;
    output Real y2;
  equation
    y1=array(if u1[i] > 0 then u1[i] else u2[i] for i in 1:n);
    y2=sum(y1);
  end BaseModelEquations;
}}}

{{{
For n=100 : timeBackend = 0.266189871
For n=200 : timeBackend = 1.490894306
For n=400 : timeBackend = 10.56719995
For n=800 : timeBackend = 82.89054140
}}}
All the time is lost by trying to simplify expressions. 
Also we try to do it 3 time, once by creating the BackendDAE structure, 
once directly after that and once at the end of the Backend process.

We should do it only once and perhaps we should improve Expression.simplify further anyway."	enhancement	new	high	Future	Backend	trunk			
