﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2553	encapsulateWhenConditions creates wrong independent blocks	Willi Braun	Willi Braun	"The post-optimize module encapsulateWhenConditions creates independent blocks with equation are not independent. 
For example:
{{{
model a
  Real x,y;
equation
  x = sin(time);
  when x > 0.5 then
    y = sin(time);
  end when;
  when y > 0.5 then
   terminate(\""simulation finished!\"");
  end when;
end a;
}}}
This results into 2 independent blocks:
{{{
block1:
Variables (3)
========================================
1: y:DISCRETE() .a, .Real type: Real 
2: x:VARIABLE() .a, .Real type: Real 
3: $whenCondition1:DISCRETE(fixed = true )  type: Boolean 

Equations (3, 3)
========================================
1/1 (1): x = sin(time)
2/2 (1): when $whenCondition1 then
  y := sin(time)
end when
3/3 (1): $whenCondition1 = x > 0.5

Block2:
Variables (1)
========================================
1: $whenCondition2:DISCRETE(fixed = true )  type: Boolean 

Equations (1, 1)
========================================
1/1 (1): $whenCondition2 = y > 0.5
}}}
But it should be only 1."	defect	closed	high	1.9.3	Backend	trunk	fixed		Lennart Ochel Niklas Worschech
