diff --git a/modeling/AVATAR/CoffeeMachine_Avatar.xml b/modeling/AVATAR/CoffeeMachine_Avatar.xml
index 489d7a4c0a2da7fc274317d0074b3877c4adb951..02b72ee873f28f81396e091ffd744e047e090d40 100644
--- a/modeling/AVATAR/CoffeeMachine_Avatar.xml
+++ b/modeling/AVATAR/CoffeeMachine_Avatar.xml
@@ -643,7 +643,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="373" />
-<P1  x="302" y="261" id="417" />
+<P1  x="302" y="261" id="404" />
 <P2  x="361" y="261" id="392" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
@@ -661,7 +661,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="377" />
-<P1  x="305" y="211" id="404" />
+<P1  x="305" y="211" id="417" />
 <P2  x="361" y="211" id="391" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR>
@@ -750,11 +750,11 @@
 </COMPONENT>
 <SUBCOMPONENT type="5304" id="414" >
 <father id="452" num="0" />
-<cdparam x="166" y="191" />
-<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="154" y="241" />
+<sizeparam width="148" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="29" minY="0" maxY="114" />
-<infoparam name="TGComponent" value="WaitingForFirstCoin_exit" />
+<cdrectangleparam minX="0" maxX="20" minY="0" maxY="114" />
+<infoparam name="TGComponent" value="WaitingForFirstCoin_enter" />
 <TGConnectingPoint num="0" id="402" />
 <TGConnectingPoint num="1" id="403" />
 <TGConnectingPoint num="2" id="404" />
@@ -770,11 +770,11 @@
 </SUBCOMPONENT>
 <SUBCOMPONENT type="5304" id="427" >
 <father id="452" num="1" />
-<cdparam x="154" y="241" />
-<sizeparam width="148" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="166" y="191" />
+<sizeparam width="139" height="40" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="20" minY="0" maxY="114" />
-<infoparam name="TGComponent" value="WaitingForFirstCoin_enter" />
+<cdrectangleparam minX="0" maxX="29" minY="0" maxY="114" />
+<infoparam name="TGComponent" value="WaitingForFirstCoin_exit" />
 <TGConnectingPoint num="0" id="415" />
 <TGConnectingPoint num="1" id="416" />
 <TGConnectingPoint num="2" id="417" />
@@ -904,7 +904,7 @@
 <TGConnectingPoint num="0" id="511" />
 <TGConnectingPoint num="1" id="512" />
 <TGConnectingPoint num="2" id="513" />
-<P1  x="581" y="154" id="587" />
+<P1  x="581" y="154" id="600" />
 <P2  x="546" y="305" id="657" />
 <Point x="518" y="154" />
 <Point x="518" y="305" />
@@ -932,7 +932,7 @@
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="516" />
 <TGConnectingPoint num="1" id="517" />
-<P1  x="631" y="164" id="582" />
+<P1  x="631" y="164" id="595" />
 <P2  x="667" y="310" id="644" />
 <Point x="631" y="310" />
 <AutomaticDrawing  data="true" />
@@ -960,7 +960,7 @@
 <infoparam name="connector from TGComponent to TGComponent" value="" />
 <TGConnectingPoint num="0" id="522" />
 <TGConnectingPoint num="1" id="523" />
-<P1  x="721" y="158" id="593" />
+<P1  x="721" y="158" id="580" />
 <P2  x="700" y="204" id="634" />
 <Point x="700" y="158" />
 <AutomaticDrawing  data="true" />
@@ -1115,13 +1115,13 @@
 <TGConnectingPoint num="22" id="627" />
 <TGConnectingPoint num="23" id="628" />
 </COMPONENT>
-<SUBCOMPONENT type="5304" id="591" >
+<SUBCOMPONENT type="5303" id="591" >
 <father id="629" num="0" />
-<cdparam x="581" y="125" />
-<sizeparam width="100" height="39" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="721" y="133" />
+<sizeparam width="100" height="50" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="168" minY="0" maxY="76" />
-<infoparam name="TGComponent" value="Start" />
+<cdrectangleparam minX="0" maxX="168" minY="0" maxY="65" />
+<infoparam name="TGComponent" value="nbOfCoins" />
 <TGConnectingPoint num="0" id="579" />
 <TGConnectingPoint num="1" id="580" />
 <TGConnectingPoint num="2" id="581" />
@@ -1134,14 +1134,17 @@
 <TGConnectingPoint num="9" id="588" />
 <TGConnectingPoint num="10" id="589" />
 <TGConnectingPoint num="11" id="590" />
+<extraparam>
+<Toggle value="" />
+</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5303" id="604" >
+<SUBCOMPONENT type="5304" id="604" >
 <father id="629" num="1" />
-<cdparam x="721" y="133" />
-<sizeparam width="100" height="50" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="581" y="125" />
+<sizeparam width="100" height="39" minWidth="100" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="168" minY="0" maxY="65" />
-<infoparam name="TGComponent" value="nbOfCoins" />
+<cdrectangleparam minX="0" maxX="168" minY="0" maxY="76" />
+<infoparam name="TGComponent" value="Start" />
 <TGConnectingPoint num="0" id="592" />
 <TGConnectingPoint num="1" id="593" />
 <TGConnectingPoint num="2" id="594" />
@@ -1154,9 +1157,6 @@
 <TGConnectingPoint num="9" id="601" />
 <TGConnectingPoint num="10" id="602" />
 <TGConnectingPoint num="11" id="603" />
-<extraparam>
-<Toggle value="" />
-</extraparam>
 </SUBCOMPONENT>
 
 <COMPONENT type="5306" id="641" >
@@ -1287,7 +1287,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="800" maxHeight="1600" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Block1 to Block0" value="" />
 <TGConnectingPoint num="0" id="694" />
-<P1  x="446" y="279" id="773" />
+<P1  x="446" y="279" id="748" />
 <P2  x="447" y="301" id="806" />
 <AutomaticDrawing  data="true" />
 <extraparam>
@@ -1317,7 +1317,7 @@
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="800" maxHeight="1600" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Block1 to Block0" value="" />
 <TGConnectingPoint num="0" id="698" />
-<P1  x="631" y="278" id="748" />
+<P1  x="631" y="278" id="773" />
 <P2  x="631" y="301" id="807" />
 <AutomaticDrawing  data="true" />
 <extraparam>
@@ -1478,11 +1478,11 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 </COMPONENT>
 <SUBCOMPONENT type="5000" id="766" >
 <father id="816" num="0" />
-<cdparam x="556" y="197" />
-<sizeparam width="150" height="81" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="371" y="198" />
+<sizeparam width="151" height="81" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="218" minY="0" maxY="205" />
-<infoparam name="Block1" value="TeaButton" />
+<cdrectangleparam minX="0" maxX="217" minY="0" maxY="205" />
+<infoparam name="Block1" value="CoffeeButton" />
 <TGConnectingPoint num="0" id="742" />
 <TGConnectingPoint num="1" id="743" />
 <TGConnectingPoint num="2" id="744" />
@@ -1516,11 +1516,11 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 </SUBCOMPONENT>
 <SUBCOMPONENT type="5000" id="791" >
 <father id="816" num="1" />
-<cdparam x="371" y="198" />
-<sizeparam width="151" height="81" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="556" y="197" />
+<sizeparam width="150" height="81" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
-<cdrectangleparam minX="0" maxX="217" minY="0" maxY="205" />
-<infoparam name="Block1" value="CoffeeButton" />
+<cdrectangleparam minX="0" maxX="218" minY="0" maxY="205" />
+<infoparam name="Block1" value="TeaButton" />
 <TGConnectingPoint num="0" id="767" />
 <TGConnectingPoint num="1" id="768" />
 <TGConnectingPoint num="2" id="769" />
@@ -1562,8 +1562,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from start state to Send signal" value="null" />
 <TGConnectingPoint num="0" id="822" />
-<P1  x="340" y="233" id="993" />
-<P2  x="353" y="252" id="995" />
+<P1  x="340" y="233" id="1004" />
+<P2  x="353" y="252" id="993" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="821" >
 <father id="823" num="0" />
@@ -1661,7 +1661,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Send signal to state0" value="null" />
 <TGConnectingPoint num="0" id="843" />
-<P1  x="353" y="282" id="996" />
+<P1  x="353" y="282" id="994" />
 <P2  x="399" y="352" id="846" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="842" >
@@ -1946,33 +1946,33 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <extraparam>
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="5100" id="994" >
+<SUBCOMPONENT type="5103" id="1003" >
 <father id="1078" num="0" />
-<cdparam x="333" y="213" />
-<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
-<hidden value="false" />
-<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" />
-<infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="993" />
-</SUBCOMPONENT>
-<SUBCOMPONENT type="5103" id="1005" >
-<father id="1078" num="1" />
 <cdparam x="330" y="257" />
 <sizeparam width="46" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="0" maxX="138" minY="0" maxY="110" />
 <infoparam name="Send signal" value="push()" />
-<TGConnectingPoint num="0" id="995" />
-<TGConnectingPoint num="1" id="996" />
-<TGConnectingPoint num="2" id="997" />
-<TGConnectingPoint num="3" id="998" />
-<TGConnectingPoint num="4" id="999" />
-<TGConnectingPoint num="5" id="1000" />
-<TGConnectingPoint num="6" id="1001" />
-<TGConnectingPoint num="7" id="1002" />
-<TGConnectingPoint num="8" id="1003" />
-<TGConnectingPoint num="9" id="1004" />
+<TGConnectingPoint num="0" id="993" />
+<TGConnectingPoint num="1" id="994" />
+<TGConnectingPoint num="2" id="995" />
+<TGConnectingPoint num="3" id="996" />
+<TGConnectingPoint num="4" id="997" />
+<TGConnectingPoint num="5" id="998" />
+<TGConnectingPoint num="6" id="999" />
+<TGConnectingPoint num="7" id="1000" />
+<TGConnectingPoint num="8" id="1001" />
+<TGConnectingPoint num="9" id="1002" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="5100" id="1005" >
+<father id="1078" num="1" />
+<cdparam x="333" y="213" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="169" minY="0" maxY="115" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="1004" />
 </SUBCOMPONENT>
 
 
@@ -2548,8 +2548,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from start state to state0" value="null" />
 <TGConnectingPoint num="0" id="1320" />
-<P1  x="261" y="421" id="1966" />
-<P2  x="260" y="437" id="1969" />
+<P1  x="261" y="421" id="1955" />
+<P2  x="260" y="437" id="1883" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1319" >
 <father id="1321" num="0" />
@@ -2581,8 +2581,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from state0 to Send signal" value="null" />
 <TGConnectingPoint num="0" id="1327" />
-<P1  x="227" y="477" id="1982" />
-<P2  x="126" y="524" id="1955" />
+<P1  x="227" y="477" id="1896" />
+<P2  x="126" y="524" id="1957" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1326" >
 <father id="1328" num="0" />
@@ -2614,8 +2614,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Send signal to stop state" value="null" />
 <TGConnectingPoint num="0" id="1334" />
-<P1  x="126" y="554" id="1956" />
-<P2  x="126" y="653" id="1872" />
+<P1  x="126" y="554" id="1958" />
+<P2  x="126" y="653" id="1980" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1333" >
 <father id="1335" num="0" />
@@ -2649,8 +2649,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from state0 to Send signal" value="null" />
 <TGConnectingPoint num="0" id="1341" />
-<P1  x="293" y="477" id="1983" />
-<P2  x="298" y="524" id="2041" />
+<P1  x="293" y="477" id="1897" />
+<P2  x="298" y="524" id="1871" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1340" >
 <father id="1342" num="0" />
@@ -2682,7 +2682,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from Send signal to stop state" value="null" />
 <TGConnectingPoint num="0" id="1348" />
-<P1  x="298" y="554" id="2042" />
+<P1  x="298" y="554" id="1872" />
 <P2  x="296" y="650" id="1799" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1347" >
@@ -2717,8 +2717,8 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="1000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector from state0 to Send signal" value="null" />
 <TGConnectingPoint num="0" id="1355" />
-<P1  x="326" y="457" id="1972" />
-<P2  x="442" y="497" id="1944" />
+<P1  x="326" y="457" id="1886" />
+<P2  x="442" y="497" id="1968" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1354" >
 <father id="1356" num="0" />
@@ -2751,7 +2751,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <infoparam name="connector from Send signal to stop state" value="null" />
 <TGConnectingPoint num="0" id="1363" />
 <TGConnectingPoint num="1" id="1364" />
-<P1  x="442" y="527" id="1945" />
+<P1  x="442" y="527" id="1969" />
 <P2  x="323" y="748" id="1661" />
 <Point x="442" y="737" />
 <AutomaticDrawing  data="true" />
@@ -2835,7 +2835,7 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <sizeparam width="0" height="0" minWidth="0" minHeight="0" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <infoparam name="connector" value="null" />
 <TGConnectingPoint num="0" id="1379" />
-<P1  x="126" y="702" id="1877" />
+<P1  x="126" y="702" id="1985" />
 <P2  x="221" y="758" id="1662" />
 <AutomaticDrawing  data="true" />
 </CONNECTOR><SUBCOMPONENT type="-1" id="1378" >
@@ -3539,14 +3539,14 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <extraparam>
 </extraparam>
 </COMPONENT>
-<SUBCOMPONENT type="5106" id="1943" >
+<SUBCOMPONENT type="5104" id="1881" >
 <father id="2124" num="0" />
-<cdparam x="53" y="653" />
-<sizeparam width="146" height="49" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="242" y="529" />
+<sizeparam width="112" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="431" minY="0" maxY="305" />
-<infoparam name="state0" value="CoffeeDelivered" />
+<cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" />
+<infoparam name="Send signal" value="pushTeaButton()" />
 <TGConnectingPoint num="0" id="1871" />
 <TGConnectingPoint num="1" id="1872" />
 <TGConnectingPoint num="2" id="1873" />
@@ -3557,128 +3557,129 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="7" id="1878" />
 <TGConnectingPoint num="8" id="1879" />
 <TGConnectingPoint num="9" id="1880" />
-<TGConnectingPoint num="10" id="1881" />
-<TGConnectingPoint num="11" id="1882" />
-<TGConnectingPoint num="12" id="1883" />
-<TGConnectingPoint num="13" id="1884" />
-<TGConnectingPoint num="14" id="1885" />
-<TGConnectingPoint num="15" id="1886" />
-<TGConnectingPoint num="16" id="1887" />
-<TGConnectingPoint num="17" id="1888" />
-<TGConnectingPoint num="18" id="1889" />
-<TGConnectingPoint num="19" id="1890" />
-<TGConnectingPoint num="20" id="1891" />
-<TGConnectingPoint num="21" id="1892" />
-<TGConnectingPoint num="22" id="1893" />
-<TGConnectingPoint num="23" id="1894" />
-<TGConnectingPoint num="24" id="1895" />
-<TGConnectingPoint num="25" id="1896" />
-<TGConnectingPoint num="26" id="1897" />
-<TGConnectingPoint num="27" id="1898" />
-<TGConnectingPoint num="28" id="1899" />
-<TGConnectingPoint num="29" id="1900" />
-<TGConnectingPoint num="30" id="1901" />
-<TGConnectingPoint num="31" id="1902" />
-<TGConnectingPoint num="32" id="1903" />
-<TGConnectingPoint num="33" id="1904" />
-<TGConnectingPoint num="34" id="1905" />
-<TGConnectingPoint num="35" id="1906" />
-<TGConnectingPoint num="36" id="1907" />
-<TGConnectingPoint num="37" id="1908" />
-<TGConnectingPoint num="38" id="1909" />
-<TGConnectingPoint num="39" id="1910" />
-<TGConnectingPoint num="40" id="1911" />
-<TGConnectingPoint num="41" id="1912" />
-<TGConnectingPoint num="42" id="1913" />
-<TGConnectingPoint num="43" id="1914" />
-<TGConnectingPoint num="44" id="1915" />
-<TGConnectingPoint num="45" id="1916" />
-<TGConnectingPoint num="46" id="1917" />
-<TGConnectingPoint num="47" id="1918" />
-<TGConnectingPoint num="48" id="1919" />
-<TGConnectingPoint num="49" id="1920" />
-<TGConnectingPoint num="50" id="1921" />
-<TGConnectingPoint num="51" id="1922" />
-<TGConnectingPoint num="52" id="1923" />
-<TGConnectingPoint num="53" id="1924" />
-<TGConnectingPoint num="54" id="1925" />
-<TGConnectingPoint num="55" id="1926" />
-<TGConnectingPoint num="56" id="1927" />
-<TGConnectingPoint num="57" id="1928" />
-<TGConnectingPoint num="58" id="1929" />
-<TGConnectingPoint num="59" id="1930" />
-<TGConnectingPoint num="60" id="1931" />
-<TGConnectingPoint num="61" id="1932" />
-<TGConnectingPoint num="62" id="1933" />
-<TGConnectingPoint num="63" id="1934" />
-<TGConnectingPoint num="64" id="1935" />
-<TGConnectingPoint num="65" id="1936" />
-<TGConnectingPoint num="66" id="1937" />
-<TGConnectingPoint num="67" id="1938" />
-<TGConnectingPoint num="68" id="1939" />
-<TGConnectingPoint num="69" id="1940" />
-<TGConnectingPoint num="70" id="1941" />
-<TGConnectingPoint num="71" id="1942" />
-<extraparam>
-</extraparam>
+<accessibility />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5103" id="1954" >
+<SUBCOMPONENT type="5106" id="1954" >
 <father id="2124" num="1" />
-<cdparam x="377" y="502" />
-<sizeparam width="130" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="194" y="437" />
+<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" />
-<infoparam name="Send signal" value="ejectCoin(nbOfCoins)" />
-<TGConnectingPoint num="0" id="1944" />
-<TGConnectingPoint num="1" id="1945" />
-<TGConnectingPoint num="2" id="1946" />
-<TGConnectingPoint num="3" id="1947" />
-<TGConnectingPoint num="4" id="1948" />
-<TGConnectingPoint num="5" id="1949" />
-<TGConnectingPoint num="6" id="1950" />
-<TGConnectingPoint num="7" id="1951" />
-<TGConnectingPoint num="8" id="1952" />
-<TGConnectingPoint num="9" id="1953" />
-<accessibility />
+<cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" />
+<infoparam name="state0" value="WaitingForSelection" />
+<TGConnectingPoint num="0" id="1882" />
+<TGConnectingPoint num="1" id="1883" />
+<TGConnectingPoint num="2" id="1884" />
+<TGConnectingPoint num="3" id="1885" />
+<TGConnectingPoint num="4" id="1886" />
+<TGConnectingPoint num="5" id="1887" />
+<TGConnectingPoint num="6" id="1888" />
+<TGConnectingPoint num="7" id="1889" />
+<TGConnectingPoint num="8" id="1890" />
+<TGConnectingPoint num="9" id="1891" />
+<TGConnectingPoint num="10" id="1892" />
+<TGConnectingPoint num="11" id="1893" />
+<TGConnectingPoint num="12" id="1894" />
+<TGConnectingPoint num="13" id="1895" />
+<TGConnectingPoint num="14" id="1896" />
+<TGConnectingPoint num="15" id="1897" />
+<TGConnectingPoint num="16" id="1898" />
+<TGConnectingPoint num="17" id="1899" />
+<TGConnectingPoint num="18" id="1900" />
+<TGConnectingPoint num="19" id="1901" />
+<TGConnectingPoint num="20" id="1902" />
+<TGConnectingPoint num="21" id="1903" />
+<TGConnectingPoint num="22" id="1904" />
+<TGConnectingPoint num="23" id="1905" />
+<TGConnectingPoint num="24" id="1906" />
+<TGConnectingPoint num="25" id="1907" />
+<TGConnectingPoint num="26" id="1908" />
+<TGConnectingPoint num="27" id="1909" />
+<TGConnectingPoint num="28" id="1910" />
+<TGConnectingPoint num="29" id="1911" />
+<TGConnectingPoint num="30" id="1912" />
+<TGConnectingPoint num="31" id="1913" />
+<TGConnectingPoint num="32" id="1914" />
+<TGConnectingPoint num="33" id="1915" />
+<TGConnectingPoint num="34" id="1916" />
+<TGConnectingPoint num="35" id="1917" />
+<TGConnectingPoint num="36" id="1918" />
+<TGConnectingPoint num="37" id="1919" />
+<TGConnectingPoint num="38" id="1920" />
+<TGConnectingPoint num="39" id="1921" />
+<TGConnectingPoint num="40" id="1922" />
+<TGConnectingPoint num="41" id="1923" />
+<TGConnectingPoint num="42" id="1924" />
+<TGConnectingPoint num="43" id="1925" />
+<TGConnectingPoint num="44" id="1926" />
+<TGConnectingPoint num="45" id="1927" />
+<TGConnectingPoint num="46" id="1928" />
+<TGConnectingPoint num="47" id="1929" />
+<TGConnectingPoint num="48" id="1930" />
+<TGConnectingPoint num="49" id="1931" />
+<TGConnectingPoint num="50" id="1932" />
+<TGConnectingPoint num="51" id="1933" />
+<TGConnectingPoint num="52" id="1934" />
+<TGConnectingPoint num="53" id="1935" />
+<TGConnectingPoint num="54" id="1936" />
+<TGConnectingPoint num="55" id="1937" />
+<TGConnectingPoint num="56" id="1938" />
+<TGConnectingPoint num="57" id="1939" />
+<TGConnectingPoint num="58" id="1940" />
+<TGConnectingPoint num="59" id="1941" />
+<TGConnectingPoint num="60" id="1942" />
+<TGConnectingPoint num="61" id="1943" />
+<TGConnectingPoint num="62" id="1944" />
+<TGConnectingPoint num="63" id="1945" />
+<TGConnectingPoint num="64" id="1946" />
+<TGConnectingPoint num="65" id="1947" />
+<TGConnectingPoint num="66" id="1948" />
+<TGConnectingPoint num="67" id="1949" />
+<TGConnectingPoint num="68" id="1950" />
+<TGConnectingPoint num="69" id="1951" />
+<TGConnectingPoint num="70" id="1952" />
+<TGConnectingPoint num="71" id="1953" />
+<latencyCheck />
+<extraparam>
+</extraparam>
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5104" id="1965" >
+<SUBCOMPONENT type="5100" id="1956" >
 <father id="2124" num="2" />
+<cdparam x="254" y="401" />
+<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<hidden value="false" />
+<cdrectangleparam minX="0" maxX="562" minY="0" maxY="339" />
+<infoparam name="start state" value="null" />
+<TGConnectingPoint num="0" id="1955" />
+</SUBCOMPONENT>
+<SUBCOMPONENT type="5104" id="1967" >
+<father id="2124" num="3" />
 <cdparam x="63" y="529" />
 <sizeparam width="127" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
 <cdrectangleparam minX="0" maxX="450" minY="0" maxY="334" />
 <infoparam name="Send signal" value="pushCoffeeButton()" />
-<TGConnectingPoint num="0" id="1955" />
-<TGConnectingPoint num="1" id="1956" />
-<TGConnectingPoint num="2" id="1957" />
-<TGConnectingPoint num="3" id="1958" />
-<TGConnectingPoint num="4" id="1959" />
-<TGConnectingPoint num="5" id="1960" />
-<TGConnectingPoint num="6" id="1961" />
-<TGConnectingPoint num="7" id="1962" />
-<TGConnectingPoint num="8" id="1963" />
-<TGConnectingPoint num="9" id="1964" />
+<TGConnectingPoint num="0" id="1957" />
+<TGConnectingPoint num="1" id="1958" />
+<TGConnectingPoint num="2" id="1959" />
+<TGConnectingPoint num="3" id="1960" />
+<TGConnectingPoint num="4" id="1961" />
+<TGConnectingPoint num="5" id="1962" />
+<TGConnectingPoint num="6" id="1963" />
+<TGConnectingPoint num="7" id="1964" />
+<TGConnectingPoint num="8" id="1965" />
+<TGConnectingPoint num="9" id="1966" />
 <accessibility />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5100" id="1967" >
-<father id="2124" num="3" />
-<cdparam x="254" y="401" />
-<sizeparam width="15" height="15" minWidth="1" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
-<hidden value="false" />
-<cdrectangleparam minX="0" maxX="562" minY="0" maxY="339" />
-<infoparam name="start state" value="null" />
-<TGConnectingPoint num="0" id="1966" />
-</SUBCOMPONENT>
-<SUBCOMPONENT type="5106" id="2040" >
+<SUBCOMPONENT type="5103" id="1978" >
 <father id="2124" num="4" />
-<cdparam x="194" y="437" />
-<sizeparam width="132" height="40" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="377" y="502" />
+<sizeparam width="130" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="445" minY="0" maxY="314" />
-<infoparam name="state0" value="WaitingForSelection" />
+<cdrectangleparam minX="0" maxX="447" minY="0" maxY="334" />
+<infoparam name="Send signal" value="ejectCoin(nbOfCoins)" />
 <TGConnectingPoint num="0" id="1968" />
 <TGConnectingPoint num="1" id="1969" />
 <TGConnectingPoint num="2" id="1970" />
@@ -3689,91 +3690,90 @@ CoffeeMachine.CoffeeDelivered --&gt; CoffeeMachine.nbOfCoins&lt;2
 <TGConnectingPoint num="7" id="1975" />
 <TGConnectingPoint num="8" id="1976" />
 <TGConnectingPoint num="9" id="1977" />
-<TGConnectingPoint num="10" id="1978" />
-<TGConnectingPoint num="11" id="1979" />
-<TGConnectingPoint num="12" id="1980" />
-<TGConnectingPoint num="13" id="1981" />
-<TGConnectingPoint num="14" id="1982" />
-<TGConnectingPoint num="15" id="1983" />
-<TGConnectingPoint num="16" id="1984" />
-<TGConnectingPoint num="17" id="1985" />
-<TGConnectingPoint num="18" id="1986" />
-<TGConnectingPoint num="19" id="1987" />
-<TGConnectingPoint num="20" id="1988" />
-<TGConnectingPoint num="21" id="1989" />
-<TGConnectingPoint num="22" id="1990" />
-<TGConnectingPoint num="23" id="1991" />
-<TGConnectingPoint num="24" id="1992" />
-<TGConnectingPoint num="25" id="1993" />
-<TGConnectingPoint num="26" id="1994" />
-<TGConnectingPoint num="27" id="1995" />
-<TGConnectingPoint num="28" id="1996" />
-<TGConnectingPoint num="29" id="1997" />
-<TGConnectingPoint num="30" id="1998" />
-<TGConnectingPoint num="31" id="1999" />
-<TGConnectingPoint num="32" id="2000" />
-<TGConnectingPoint num="33" id="2001" />
-<TGConnectingPoint num="34" id="2002" />
-<TGConnectingPoint num="35" id="2003" />
-<TGConnectingPoint num="36" id="2004" />
-<TGConnectingPoint num="37" id="2005" />
-<TGConnectingPoint num="38" id="2006" />
-<TGConnectingPoint num="39" id="2007" />
-<TGConnectingPoint num="40" id="2008" />
-<TGConnectingPoint num="41" id="2009" />
-<TGConnectingPoint num="42" id="2010" />
-<TGConnectingPoint num="43" id="2011" />
-<TGConnectingPoint num="44" id="2012" />
-<TGConnectingPoint num="45" id="2013" />
-<TGConnectingPoint num="46" id="2014" />
-<TGConnectingPoint num="47" id="2015" />
-<TGConnectingPoint num="48" id="2016" />
-<TGConnectingPoint num="49" id="2017" />
-<TGConnectingPoint num="50" id="2018" />
-<TGConnectingPoint num="51" id="2019" />
-<TGConnectingPoint num="52" id="2020" />
-<TGConnectingPoint num="53" id="2021" />
-<TGConnectingPoint num="54" id="2022" />
-<TGConnectingPoint num="55" id="2023" />
-<TGConnectingPoint num="56" id="2024" />
-<TGConnectingPoint num="57" id="2025" />
-<TGConnectingPoint num="58" id="2026" />
-<TGConnectingPoint num="59" id="2027" />
-<TGConnectingPoint num="60" id="2028" />
-<TGConnectingPoint num="61" id="2029" />
-<TGConnectingPoint num="62" id="2030" />
-<TGConnectingPoint num="63" id="2031" />
-<TGConnectingPoint num="64" id="2032" />
-<TGConnectingPoint num="65" id="2033" />
-<TGConnectingPoint num="66" id="2034" />
-<TGConnectingPoint num="67" id="2035" />
-<TGConnectingPoint num="68" id="2036" />
-<TGConnectingPoint num="69" id="2037" />
-<TGConnectingPoint num="70" id="2038" />
-<TGConnectingPoint num="71" id="2039" />
-<latencyCheck />
-<extraparam>
-</extraparam>
+<accessibility />
 </SUBCOMPONENT>
-<SUBCOMPONENT type="5104" id="2051" >
+<SUBCOMPONENT type="5106" id="2051" >
 <father id="2124" num="5" />
-<cdparam x="242" y="529" />
-<sizeparam width="112" height="20" minWidth="30" minHeight="1" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
+<cdparam x="53" y="653" />
+<sizeparam width="146" height="49" minWidth="40" minHeight="30" maxWidth="2000" maxHeight="2000" minDesiredWidth="0" minDesiredHeight="0" />
 <hidden value="false" />
 <enabled value="true" />
-<cdrectangleparam minX="0" maxX="465" minY="0" maxY="334" />
-<infoparam name="Send signal" value="pushTeaButton()" />
-<TGConnectingPoint num="0" id="2041" />
-<TGConnectingPoint num="1" id="2042" />
-<TGConnectingPoint num="2" id="2043" />
-<TGConnectingPoint num="3" id="2044" />
-<TGConnectingPoint num="4" id="2045" />
-<TGConnectingPoint num="5" id="2046" />
-<TGConnectingPoint num="6" id="2047" />
-<TGConnectingPoint num="7" id="2048" />
-<TGConnectingPoint num="8" id="2049" />
-<TGConnectingPoint num="9" id="2050" />
-<accessibility />
+<cdrectangleparam minX="0" maxX="431" minY="0" maxY="305" />
+<infoparam name="state0" value="CoffeeDelivered" />
+<TGConnectingPoint num="0" id="1979" />
+<TGConnectingPoint num="1" id="1980" />
+<TGConnectingPoint num="2" id="1981" />
+<TGConnectingPoint num="3" id="1982" />
+<TGConnectingPoint num="4" id="1983" />
+<TGConnectingPoint num="5" id="1984" />
+<TGConnectingPoint num="6" id="1985" />
+<TGConnectingPoint num="7" id="1986" />
+<TGConnectingPoint num="8" id="1987" />
+<TGConnectingPoint num="9" id="1988" />
+<TGConnectingPoint num="10" id="1989" />
+<TGConnectingPoint num="11" id="1990" />
+<TGConnectingPoint num="12" id="1991" />
+<TGConnectingPoint num="13" id="1992" />
+<TGConnectingPoint num="14" id="1993" />
+<TGConnectingPoint num="15" id="1994" />
+<TGConnectingPoint num="16" id="1995" />
+<TGConnectingPoint num="17" id="1996" />
+<TGConnectingPoint num="18" id="1997" />
+<TGConnectingPoint num="19" id="1998" />
+<TGConnectingPoint num="20" id="1999" />
+<TGConnectingPoint num="21" id="2000" />
+<TGConnectingPoint num="22" id="2001" />
+<TGConnectingPoint num="23" id="2002" />
+<TGConnectingPoint num="24" id="2003" />
+<TGConnectingPoint num="25" id="2004" />
+<TGConnectingPoint num="26" id="2005" />
+<TGConnectingPoint num="27" id="2006" />
+<TGConnectingPoint num="28" id="2007" />
+<TGConnectingPoint num="29" id="2008" />
+<TGConnectingPoint num="30" id="2009" />
+<TGConnectingPoint num="31" id="2010" />
+<TGConnectingPoint num="32" id="2011" />
+<TGConnectingPoint num="33" id="2012" />
+<TGConnectingPoint num="34" id="2013" />
+<TGConnectingPoint num="35" id="2014" />
+<TGConnectingPoint num="36" id="2015" />
+<TGConnectingPoint num="37" id="2016" />
+<TGConnectingPoint num="38" id="2017" />
+<TGConnectingPoint num="39" id="2018" />
+<TGConnectingPoint num="40" id="2019" />
+<TGConnectingPoint num="41" id="2020" />
+<TGConnectingPoint num="42" id="2021" />
+<TGConnectingPoint num="43" id="2022" />
+<TGConnectingPoint num="44" id="2023" />
+<TGConnectingPoint num="45" id="2024" />
+<TGConnectingPoint num="46" id="2025" />
+<TGConnectingPoint num="47" id="2026" />
+<TGConnectingPoint num="48" id="2027" />
+<TGConnectingPoint num="49" id="2028" />
+<TGConnectingPoint num="50" id="2029" />
+<TGConnectingPoint num="51" id="2030" />
+<TGConnectingPoint num="52" id="2031" />
+<TGConnectingPoint num="53" id="2032" />
+<TGConnectingPoint num="54" id="2033" />
+<TGConnectingPoint num="55" id="2034" />
+<TGConnectingPoint num="56" id="2035" />
+<TGConnectingPoint num="57" id="2036" />
+<TGConnectingPoint num="58" id="2037" />
+<TGConnectingPoint num="59" id="2038" />
+<TGConnectingPoint num="60" id="2039" />
+<TGConnectingPoint num="61" id="2040" />
+<TGConnectingPoint num="62" id="2041" />
+<TGConnectingPoint num="63" id="2042" />
+<TGConnectingPoint num="64" id="2043" />
+<TGConnectingPoint num="65" id="2044" />
+<TGConnectingPoint num="66" id="2045" />
+<TGConnectingPoint num="67" id="2046" />
+<TGConnectingPoint num="68" id="2047" />
+<TGConnectingPoint num="69" id="2048" />
+<TGConnectingPoint num="70" id="2049" />
+<TGConnectingPoint num="71" id="2050" />
+<extraparam>
+</extraparam>
 </SUBCOMPONENT>
 
 
diff --git a/src/main/java/avatartranslator/directsimulation/AvatarSimulationRunner.java b/src/main/java/avatartranslator/directsimulation/AvatarSimulationRunner.java
index 8ec844f452a1520600557866fd94105d716998e0..434c8bc93c9d1660768443af0edc00aba0c3ebdd 100644
--- a/src/main/java/avatartranslator/directsimulation/AvatarSimulationRunner.java
+++ b/src/main/java/avatartranslator/directsimulation/AvatarSimulationRunner.java
@@ -44,10 +44,7 @@ import avatartranslator.AvatarSpecification;
 import avatartranslator.AvatarStateMachineElement;
 import myutil.TraceManager;
 
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.LinkedList;
-import java.util.Vector;
+import java.util.*;
 
 /**
  * Class AvatarSimulationRunner
@@ -140,5 +137,21 @@ public class AvatarSimulationRunner {
         }
     }
 
+    public List<AvatarBlock> getBlocksOfTransactions() {
+        return as.getListOfBlocks();
+    }
+
+    public double[] getTimesOfLastTransactionOfBlock(AvatarBlock ab) {
+        double [] timeLastTransaction = new double[listOfSimulations.size()];
+
+        int i = 0;
+        for(AvatarSpecificationSimulation ass: listOfSimulations) {
+            timeLastTransaction[i] = (double)( ass.getTimeOfLastTransactionOfBlock(ab) );
+            i++;
+        }
+
+        return timeLastTransaction;
+    }
+
 
 }
diff --git a/src/main/java/avatartranslator/directsimulation/AvatarSpecificationSimulation.java b/src/main/java/avatartranslator/directsimulation/AvatarSpecificationSimulation.java
index ea34e94d50c3e066300e69dd829aef9fef7607a2..75379516a2cb7aef0ce5a4a94b2293f76b9c4bfa 100644
--- a/src/main/java/avatartranslator/directsimulation/AvatarSpecificationSimulation.java
+++ b/src/main/java/avatartranslator/directsimulation/AvatarSpecificationSimulation.java
@@ -44,6 +44,7 @@ import myutil.IntExpressionEvaluator;
 import myutil.TraceManager;
 
 import java.awt.*;
+import java.util.HashSet;
 import java.util.Vector;
 
 
@@ -1666,6 +1667,19 @@ public class AvatarSpecificationSimulation {
         }
     }
 
+    public long getTimeOfLastTransactionOfBlock(AvatarBlock ab) {
+        long lastTime = 0;
+
+        for(AvatarSimulationTransaction ast: allTransactions) {
+            if (ast.block == ab) {
+                lastTime = ast.clockValueWhenFinished;
+            }
+        }
+
+        return lastTime;
+    }
+
+
 
 
 }
diff --git a/src/main/java/myutil/ButtonTabComponent.java b/src/main/java/myutil/ButtonTabComponent.java
new file mode 100644
index 0000000000000000000000000000000000000000..e4b8580c4bded3637738de1f5157bfe8048c871d
--- /dev/null
+++ b/src/main/java/myutil/ButtonTabComponent.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ *   - Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *
+ *   - Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ *   - Neither the name of Oracle or the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+
+package myutil;
+
+import javax.swing.*;
+import javax.swing.plaf.basic.BasicButtonUI;
+import java.awt.*;
+import java.awt.event.*;
+
+/**
+ * Component to be used as tabComponent;
+ * Contains a JLabel to show the text and
+ * a JButton to close the tab it belongs to
+ */
+
+public class ButtonTabComponent extends JPanel {
+    private final static MouseListener buttonMouseListener = new MouseAdapter() {
+        public void mouseEntered(MouseEvent e) {
+            Component component = e.getComponent();
+            if (component instanceof AbstractButton) {
+                AbstractButton button = (AbstractButton) component;
+                button.setBorderPainted(true);
+            }
+        }
+
+        public void mouseExited(MouseEvent e) {
+            Component component = e.getComponent();
+            if (component instanceof AbstractButton) {
+                AbstractButton button = (AbstractButton) component;
+                button.setBorderPainted(false);
+            }
+        }
+    };
+    private final JTabbedPane pane;
+
+    public ButtonTabComponent(final JTabbedPane pane) {
+        //unset default FlowLayout' gaps
+        super(new FlowLayout(FlowLayout.LEFT, 0, 0));
+        if (pane == null) {
+            throw new NullPointerException("TabbedPane is null");
+        }
+        this.pane = pane;
+        setOpaque(false);
+
+        //make JLabel read titles from JTabbedPane
+        JLabel label = new JLabel() {
+            public String getText() {
+                int i = pane.indexOfTabComponent(ButtonTabComponent.this);
+                if (i != -1) {
+                    return pane.getTitleAt(i);
+                }
+                return null;
+            }
+        };
+
+        add(label);
+        //add more space between the label and the button
+        label.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 5));
+        //tab button
+        JButton button = new TabButton();
+        add(button);
+        //add more space to the top of the component
+        setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0));
+    }
+
+    private class TabButton extends JButton implements ActionListener {
+        public TabButton() {
+            int size = 17;
+            setPreferredSize(new Dimension(size, size));
+            setToolTipText("close this tab");
+            //Make the button looks the same for all Laf's
+            setUI(new BasicButtonUI());
+            //Make it transparent
+            setContentAreaFilled(false);
+            //No need to be focusable
+            setFocusable(false);
+            setBorder(BorderFactory.createEtchedBorder());
+            setBorderPainted(false);
+            //Making nice rollover effect
+            //we use the same listener for all buttons
+            addMouseListener(buttonMouseListener);
+            setRolloverEnabled(true);
+            //Close the proper tab by clicking the button
+            addActionListener(this);
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            int i = pane.indexOfTabComponent(ButtonTabComponent.this);
+            if (i != -1) {
+                pane.remove(i);
+            }
+        }
+
+        //we don't want to update UI for this button
+        public void updateUI() {
+        }
+
+        //paint the cross
+        protected void paintComponent(Graphics g) {
+            super.paintComponent(g);
+            Graphics2D g2 = (Graphics2D) g.create();
+            //shift the image for pressed buttons
+            if (getModel().isPressed()) {
+                g2.translate(1, 1);
+            }
+            g2.setStroke(new BasicStroke(2));
+            g2.setColor(Color.BLACK);
+            if (getModel().isRollover()) {
+                g2.setColor(Color.MAGENTA);
+            }
+            int delta = 6;
+            g2.drawLine(delta, delta, getWidth() - delta - 1, getHeight() - delta - 1);
+            g2.drawLine(getWidth() - delta - 1, delta, delta, getHeight() - delta - 1);
+            g2.dispose();
+        }
+    }
+}
+
+
+
diff --git a/src/main/java/myutil/DataElement.java b/src/main/java/myutil/DataElement.java
new file mode 100644
index 0000000000000000000000000000000000000000..376e43c555fe86916161cd66f83e4f403a10c444
--- /dev/null
+++ b/src/main/java/myutil/DataElement.java
@@ -0,0 +1,120 @@
+/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+ *
+ * ludovic.apvrille AT enst.fr
+ *
+ * This software is a computer program whose purpose is to allow the
+ * edition of TURTLE analysis, design and deployment diagrams, to
+ * allow the generation of RT-LOTOS or Java code from this diagram,
+ * and at last to allow the analysis of formal validation traces
+ * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
+ * from INRIA Rhone-Alpes.
+ *
+ * This software is governed by the CeCILL  license under French law and
+ * abiding by the rules of distribution of free software.  You can  use,
+ * modify and/ or redistribute the software under the terms of the CeCILL
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and  rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty  and the software's author,  the holder of the
+ * economic rights,  and the successive licensors  have only  limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading,  using,  modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean  that it is complicated to manipulate,  and  that  also
+ * therefore means  that it is reserved for developers  and  experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and,  more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL license and that you accept its terms.
+ */
+
+
+package myutil;
+
+import avatartranslator.*;
+import avatartranslator.directsimulation.*;
+import common.ConfigurationTTool;
+import myutil.*;
+import myutilsvg.SVGGeneration;
+import ui.*;
+import ui.avatarbd.AvatarBDPortConnector;
+import ui.interactivesimulation.LatencyTableModel;
+import ui.interactivesimulation.SimulationLatency;
+import ui.util.IconManager;
+
+import javax.swing.*;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.util.*;
+import java.util.List;
+
+/**
+ * Class DataElement
+ * To be used with JFrameStatistics
+ * Creation: 11/01/2021
+ * version 1.0 11/01/2021
+ *
+ * @author Ludovic APVRILLE
+ */
+
+public class DataElement implements GenericTree {
+    public ArrayList<DataElement> childs;
+
+    public String title;
+    public double data[];
+    public long times[];
+
+
+    public DataElement(String _title) {
+        title = _title;
+        childs = new ArrayList<>();
+    }
+
+    public void addChild(DataElement de) {
+        childs.add(de);
+    }
+
+    public int getChildCount() {
+        return childs.size();
+    }
+
+
+    public Object getChild(int index) {
+        if (index < getChildCount()) {
+            return childs.get(index);
+        }
+        return null;
+    }
+
+    public int getIndexOfChild(Object child) {
+        if (child == null) {
+            return -1;
+        }
+        return childs.indexOf(child);
+    }
+
+    public boolean isLeaf() {
+        return (getChildCount() == 0);
+    }
+
+    public String toString() {
+        return title;
+    }
+
+
+
+} // Class
diff --git a/src/main/java/myutil/GenericTree.java b/src/main/java/myutil/GenericTree.java
index e1764a8211da1d2e95c14f0c4ba1f8bc92f261ef..85cbb5b2ed777a1efc7c1e39ade3053fd0312131 100644
--- a/src/main/java/myutil/GenericTree.java
+++ b/src/main/java/myutil/GenericTree.java
@@ -55,3 +55,4 @@ public interface GenericTree {
     Object getChild(int index);
     int getIndexOfChild(Object child);
 }
+
diff --git a/src/main/java/myutil/JFrameStatistics.java b/src/main/java/myutil/JFrameStatistics.java
new file mode 100644
index 0000000000000000000000000000000000000000..63562393ff61d2ff3d67ff2cd7fe0f9842b44999
--- /dev/null
+++ b/src/main/java/myutil/JFrameStatistics.java
@@ -0,0 +1,217 @@
+/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+ *
+ * ludovic.apvrille AT enst.fr
+ *
+ * This software is a computer program whose purpose is to allow the
+ * edition of TURTLE analysis, design and deployment diagrams, to
+ * allow the generation of RT-LOTOS or Java code from this diagram,
+ * and at last to allow the analysis of formal validation traces
+ * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
+ * from INRIA Rhone-Alpes.
+ *
+ * This software is governed by the CeCILL  license under French law and
+ * abiding by the rules of distribution of free software.  You can  use,
+ * modify and/ or redistribute the software under the terms of the CeCILL
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and  rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty  and the software's author,  the holder of the
+ * economic rights,  and the successive licensors  have only  limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading,  using,  modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean  that it is complicated to manipulate,  and  that  also
+ * therefore means  that it is reserved for developers  and  experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and,  more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL license and that you accept its terms.
+ */
+
+
+package myutil;
+
+import avatartranslator.*;
+import avatartranslator.directsimulation.*;
+import common.ConfigurationTTool;
+import myutil.*;
+import myutilsvg.SVGGeneration;
+import org.jfree.chart.ChartFactory;
+import org.jfree.chart.ChartPanel;
+import org.jfree.chart.JFreeChart;
+import org.jfree.data.statistics.HistogramDataset;
+import ui.*;
+import ui.avatarbd.AvatarBDPortConnector;
+import ui.interactivesimulation.LatencyTableModel;
+import ui.interactivesimulation.SimulationLatency;
+import ui.util.IconManager;
+
+import javax.swing.*;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import java.awt.*;
+import java.awt.event.*;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.util.*;
+import java.util.List;
+
+/**
+ * Class JFrameStatistics
+ * Creation: 11/01/2021
+ * version 1.0 11/01/2021
+ *
+ * @author Ludovic APVRILLE
+ */
+public class JFrameStatistics extends JFrame implements ActionListener, GenericTree {
+    protected JButton buttonClose;
+    protected JScrollPane jsp;
+    protected JTabbedPane mainPane;
+
+    protected Thread t;
+    protected int threadMode = 0;
+    protected boolean go;
+
+    private String title;
+
+    ArrayList<DataElement> elements;
+
+
+
+    public JFrameStatistics(String _title, ArrayList<DataElement> _elements) {
+        super(_title);
+
+        elements = _elements;
+        title = _title;
+
+        makePanelsAndComponents();
+
+    }
+
+    private void makePanelsAndComponents() {
+        setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+        setIconImage(IconManager.img5100);
+        setBackground(Color.WHITE);
+
+        try {
+            setBackground(new Color(50, 40, 40, 200));
+        } catch (Exception e) {
+            setBackground(new Color(50, 40, 40));
+        }
+
+        JPanel mainPanel = new JPanel(new BorderLayout());
+
+        // Tree panel
+        JPanel leftTreePanel = new JPanel();
+        JTreeStats statTree = new JTreeStats(this);
+        JScrollPane scrollPane = new JScrollPane(statTree);
+        scrollPane.setPreferredSize(new Dimension(200, 600));
+        scrollPane.setMinimumSize(new Dimension(25, 200));
+        leftTreePanel.add(scrollPane);
+
+        // Stat panel
+        JPanel showStat = new JPanel();
+        mainPane = new JTabbedPane();
+        showStat.add(mainPane);
+
+        JSplitPane split =new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, leftTreePanel, showStat);
+        split.setDividerLocation(0.80);
+        mainPanel.add(split, BorderLayout.CENTER);
+
+        JPanel topPanel = new JPanel();
+        buttonClose = new JButton("Close", IconManager.imgic27);
+        buttonClose.addActionListener(this);
+        topPanel.add(buttonClose);
+        mainPanel.add(topPanel, BorderLayout.SOUTH);
+
+
+        this.add(mainPanel);
+
+    }
+
+
+
+    public void actionPerformed(ActionEvent ae) {
+        if (ae.getSource() == buttonClose) {
+            quit();
+        }
+    }
+
+    public void quit() {
+        dispose();
+    }
+
+
+    // Showing stats
+    public void showStats(DataElement de) {
+        if ((de.data == null) || (de.data.length == 0)) {
+            return;
+        }
+
+        // Tab already exist?
+
+        String title = "Histogram of " + de.toString()  + ": value";
+        if (mainPane.indexOfTab(title) > -1) {
+            mainPane.setSelectedIndex(mainPane.indexOfTab(title));
+            return;
+        }
+
+        HistogramDataset dataset = new HistogramDataset();
+        dataset.addSeries(title, de.data, 20);
+
+        JFreeChart histogram = ChartFactory.createHistogram("Histogram: " + de.toString(),
+                de.toString(), "Frequency", dataset);
+
+        // Adding histogram to tabbed pane
+        ChartPanel myChart = new ChartPanel(histogram);
+        myChart.setMouseWheelEnabled(true);
+        mainPane.addTab(title, myChart);
+        ButtonTabComponent ctb = new ButtonTabComponent(mainPane);
+        mainPane.setTabComponentAt(mainPane.getTabCount()-1, ctb);
+        mainPane.setSelectedIndex(mainPane.getTabCount()-1);
+
+        mainPane.validate();
+    }
+
+
+
+    // tree
+    public int getChildCount() {
+        return elements.size();
+    }
+
+
+    public Object getChild(int index) {
+        if (index < getChildCount()) {
+            return elements.get(index);
+        }
+        return null;
+    }
+
+    public int getIndexOfChild(Object child) {
+        if (child == null) {
+            return -1;
+        }
+        return elements.indexOf(child);
+    }
+
+    public String toString() {
+        return title;
+    }
+
+
+
+
+
+
+} // Class
diff --git a/src/main/java/myutil/JTreeStats.java b/src/main/java/myutil/JTreeStats.java
new file mode 100644
index 0000000000000000000000000000000000000000..04bafff94880f4afdfd2ff035c52e873ddc4d9f2
--- /dev/null
+++ b/src/main/java/myutil/JTreeStats.java
@@ -0,0 +1,322 @@
+/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+ *
+ * ludovic.apvrille AT enst.fr
+ *
+ * This software is a computer program whose purpose is to allow the
+ * edition of TURTLE analysis, design and deployment diagrams, to
+ * allow the generation of RT-LOTOS or Java code from this diagram,
+ * and at last to allow the analysis of formal validation traces
+ * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
+ * from INRIA Rhone-Alpes.
+ *
+ * This software is governed by the CeCILL  license under French law and
+ * abiding by the rules of distribution of free software.  You can  use,
+ * modify and/ or redistribute the software under the terms of the CeCILL
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and  rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty  and the software's author,  the holder of the
+ * economic rights,  and the successive licensors  have only  limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading,  using,  modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean  that it is complicated to manipulate,  and  that  also
+ * therefore means  that it is reserved for developers  and  experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and,  more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL license and that you accept its terms.
+ */
+
+
+package myutil;
+
+//import java.awt.*;
+
+import javax.swing.*;
+import javax.swing.event.TreeExpansionEvent;
+import javax.swing.event.TreeExpansionListener;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import javax.swing.tree.TreePath;
+import javax.swing.tree.TreeSelectionModel;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseEvent;
+import java.awt.event.MouseListener;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+//import translator.*;
+
+
+/**
+ * Class JTreeStats
+ * Tree for managing stats
+ * Creation: 14/12/2003
+ *
+ * @author Ludovic APVRILLE
+ * @version 1.0 11/01/2021
+ */
+public class JTreeStats extends javax.swing.JTree implements ActionListener, MouseListener, TreeExpansionListener, TreeSelectionListener, Runnable {
+    private boolean toUpdate = false;
+    private JFrameStatistics jFStats;
+    private TreeModelStats dtm;
+
+    //for update
+    private Set<TreePath> m_expandedTreePaths = new HashSet<>();
+    private TreePath[] m_selectedTreePaths = new TreePath[0];
+    //private boolean m_nodeWasSelected = false;
+
+    protected JMenuItem jmiAnalyze;
+    protected JPopupMenu popupTree;
+    protected JPopupMenu popupTreeST;
+
+
+    /*
+     * Creates new form
+     */
+    public JTreeStats(JFrameStatistics _jFStats) {
+        super(new TreeModelStats(_jFStats));
+
+        //TraceManager.addDev("TREE CREATED");
+
+        jFStats = _jFStats;
+        getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
+        setEditable(false);
+        addMouseListener(this);
+        addTreeExpansionListener(this);
+        addTreeSelectionListener(this);
+    }
+
+    public void reinit() {
+        m_expandedTreePaths.clear();
+        m_selectedTreePaths = new TreePath[0];
+    }
+
+    public void toBeUpdated() {
+        toUpdate = true;
+    }
+
+    public void updateNow() {
+        if (toUpdate) {
+            forceUpdate();
+        }
+    }
+
+    public void forceUpdate() {
+        toUpdate = false;
+        dtm = new TreeModelStats(jFStats);
+        setModel(dtm);
+        update();
+    }
+
+    public void mousePressed(MouseEvent e) {
+        //TraceManager.addDev("Mouse event");
+        if (SwingUtilities.isRightMouseButton(e)) {
+            //TraceManager.addDev("right mouse event. popup trigger? " + e.isPopupTrigger());
+            if (e.isPopupTrigger()) myPopupEvent(e);
+        }
+    }
+
+    public void mouseReleased(MouseEvent e) {
+        //TraceManager.addDev("Mouse event");
+        if (SwingUtilities.isRightMouseButton(e)) {
+            //TraceManager.addDev("right mouse event. popup trigger? " + e.isPopupTrigger());
+            if (e.isPopupTrigger()) myPopupEvent(e);
+        }
+    }
+
+    public void mouseEntered(MouseEvent e) {
+        updateNow();
+    }
+
+    public void mouseExited(MouseEvent e) {
+        setSelectionPath(null);
+        m_selectedTreePaths = new TreePath[0];
+    }
+
+    public void mouseClicked(MouseEvent e) {
+
+    }
+
+
+    private void myPopupEvent(MouseEvent e) {
+
+        //TraceManager.addDev("myPopupEvent");
+
+        int x = e.getX();
+        int y = e.getY();
+        JTree tree = (JTree) e.getSource();
+        TreePath path = tree.getPathForLocation(x, y);
+
+        //TraceManager.addDev("Path=" + path);
+
+        if (path == null) {
+            //TraceManager.addDev("Null path");
+            return;
+        }
+
+        tree.setSelectionPath(path);
+
+        Object obj = path.getLastPathComponent();
+
+        //TraceManager.addDev("Adding popup menu to " + obj.getClass() + "/" + obj);
+
+        if (obj instanceof DataElement) {
+            if (popupTree == null) {
+                popupTree = new JPopupMenu();
+                jmiAnalyze = new JMenuItem("Add graph from file (.aut)");
+                jmiAnalyze.addActionListener(this);
+                popupTree.add(jmiAnalyze);
+            }
+            popupTree.show(tree, x, y);
+        }
+
+    }
+
+    public synchronized void run() {
+        checkPaths();
+        Iterator<TreePath> l_keys = m_expandedTreePaths.iterator();
+        TreePath l_path = null;
+        while (l_keys.hasNext()) {
+            try {
+                l_path = l_keys.next();
+                TreePath parent = l_path.getParentPath();
+                //
+                //
+                if ((l_path.getPathCount() == 2) || (m_expandedTreePaths.contains(parent))) {
+                    //TraceManager.addDev("Path=" + l_path);
+                    expandPath(l_path);
+                }
+            } catch (Exception e) {
+                //
+                if (l_path != null) {
+                    //
+                    m_expandedTreePaths.remove(l_path);
+                }
+            }
+        }
+        getSelectionModel().setSelectionPaths(m_selectedTreePaths);
+    }
+
+    private void checkPaths() {
+        TreePath l_path = null;
+        Iterator<TreePath> l_keys = m_expandedTreePaths.iterator();
+        while (l_keys.hasNext()) {
+            l_path = l_keys.next();
+            if (!isAPathOf(l_path)) {
+                m_expandedTreePaths.remove(l_path);
+            }
+        }
+
+    }
+
+    private boolean isAPathOf(TreePath tp) {
+        if ((dtm == null) || (tp == null)) {
+            return false;
+        }
+
+        Object[] objs = tp.getPath();
+
+        if (objs.length == 0) {
+            return false;
+        }
+
+        if (objs[0] != dtm.getRoot()) {
+            return false;
+        }
+
+        int index;
+
+        for (int i = 0; i < objs.length - 2; i++) {
+            index = dtm.getIndexOfChild(objs[i], objs[i + 1]);
+            if (index == -1) {
+                return false;
+            }
+        }
+
+        return true;
+
+    }
+
+    public synchronized void update() {
+        SwingUtilities.invokeLater(this);
+    }
+
+    public void treeExpanded(TreeExpansionEvent treeExpansionEvent) {
+        TreePath tp = treeExpansionEvent.getPath();
+        m_expandedTreePaths.add(tp);
+        for (TreePath m_expandedTreePath : m_expandedTreePaths) {
+            TreePath l_path = null;
+            try {
+                l_path = m_expandedTreePath;
+                TreePath parent = l_path.getParentPath();
+                if ((l_path.getPathCount() == 1) || (m_expandedTreePaths.contains(parent))) {
+                    expandPath(l_path);
+                }
+            } catch (Exception e) {
+                if (l_path != null) {
+                    //
+                    m_expandedTreePaths.remove(l_path);
+                }
+            }
+        }
+
+    }
+
+    public void expandMyPath(TreePath tp) {
+        //TraceManager.addDev("Path=" + tp);
+        expandPath(tp);
+    }
+
+    public void treeCollapsed(TreeExpansionEvent treeExpansionEvent) {
+        m_expandedTreePaths.remove(treeExpansionEvent.getPath());
+    }
+
+    public void valueChanged(TreeSelectionEvent treeSelectionEvent) {
+        //TraceManager.addDev("Value changed");
+
+        if (getSelectionPaths() != null && getSelectionPaths().length > 0) {
+            m_selectedTreePaths = getSelectionModel().getSelectionPaths();
+        }
+
+        TreePath tp = treeSelectionEvent.getNewLeadSelectionPath();
+
+        //TraceManager.addDev("Expanded path=" + tp);
+
+        if (tp == null) {
+            return;
+        }
+
+
+        Object nodeInfo = tp.getLastPathComponent();
+        //TraceManager.addDev("NodeInfo:" + nodeInfo);
+        Object o;
+
+        if (nodeInfo instanceof DataElement) {
+            if ( ((DataElement)(nodeInfo)).isLeaf()) {
+                jFStats.showStats((DataElement) nodeInfo);
+            }
+        }
+    }
+
+
+    public void actionPerformed(ActionEvent ae) {
+
+        if (ae.getSource() == jmiAnalyze) {
+
+        }
+    }
+
+
+}
diff --git a/src/main/java/myutil/TreeModelStats.java b/src/main/java/myutil/TreeModelStats.java
new file mode 100644
index 0000000000000000000000000000000000000000..6d14a7c8ee11fc390345cda67be59699ebaa89b5
--- /dev/null
+++ b/src/main/java/myutil/TreeModelStats.java
@@ -0,0 +1,144 @@
+/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+ *
+ * ludovic.apvrille AT enst.fr
+ *
+ * This software is a computer program whose purpose is to allow the
+ * edition of TURTLE analysis, design and deployment diagrams, to
+ * allow the generation of RT-LOTOS or Java code from this diagram,
+ * and at last to allow the analysis of formal validation traces
+ * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
+ * from INRIA Rhone-Alpes.
+ *
+ * This software is governed by the CeCILL  license under French law and
+ * abiding by the rules of distribution of free software.  You can  use,
+ * modify and/ or redistribute the software under the terms of the CeCILL
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ *
+ * As a counterpart to the access to the source code and  rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty  and the software's author,  the holder of the
+ * economic rights,  and the successive licensors  have only  limited
+ * liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading,  using,  modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean  that it is complicated to manipulate,  and  that  also
+ * therefore means  that it is reserved for developers  and  experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and,  more generally, to use and operate it in the
+ * same conditions as regards security.
+ *
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL license and that you accept its terms.
+ */
+
+
+package myutil;
+
+import ui.GTURTLEModeling;
+
+import javax.swing.event.TreeModelListener;
+import javax.swing.tree.TreeModel;
+import javax.swing.tree.TreePath;
+import java.util.Vector;
+
+/**
+ * Class TreeModelStats
+ * Model for the tree to know its data
+ * Creation: 14/12/2003
+ *
+ * @author Ludovic APVRILLE
+ * @version 1.0 14/12/2003
+ */
+public class TreeModelStats implements TreeModel {
+    private JFrameStatistics jFStats;
+    private Vector<TreeModelListener> treeModelListeners = new Vector<>();
+
+
+    public TreeModelStats(JFrameStatistics _jFStats) {
+        //super(_mgui.gtm);
+        jFStats = _jFStats;
+    }
+
+
+    /**
+     * Adds a listener for the TreeModelEvent posted after the tree changes.
+     */
+    public void addTreeModelListener(TreeModelListener l) {
+        treeModelListeners.addElement(l);
+    }
+
+    /**
+     * Returns the child of parent at index index in the parent's child array.
+     */
+    public Object getChild(Object parent, int index) {
+        //
+        if (parent instanceof GenericTree) {
+            return ((GenericTree) parent).getChild(index);
+        } else if (parent instanceof GTURTLEModeling) {
+            return jFStats.getChild(index);
+        }
+        return null;
+    }
+
+    /**
+     * Returns the number of children of parent.
+     */
+    public int getChildCount(Object parent) {
+        //
+        if (parent instanceof GenericTree) {
+            return ((GenericTree) parent).getChildCount();
+        }
+
+        return 0;
+    }
+
+    /**
+     * Returns the index of child in parent.
+     */
+    public int getIndexOfChild(Object parent, Object child) {
+        if (parent instanceof GenericTree) {
+            return ((GenericTree) parent).getIndexOfChild(child);
+        }
+
+        return -1;
+    }
+
+    /**
+     * Returns the root of the tree.
+     */
+    public Object getRoot() {
+        return jFStats;
+    }
+
+    /**
+     * Returns true if node is a leaf.
+     */
+    public boolean isLeaf(Object node) {
+        if (node instanceof GenericTree) {
+            return (((GenericTree)node).getChildCount() == 0);
+        }
+
+        return true;
+
+    }
+
+    /**
+     * Removes a listener previously added with addTreeModelListener().
+     */
+    public void removeTreeModelListener(TreeModelListener l) {
+        treeModelListeners.removeElement(l);
+    }
+
+    /**
+     * Messaged when the user has altered the value for the item
+     * identified by path to newValue.  Not used by this model.
+     */
+    public void valueForPathChanged(TreePath path, Object newValue) {
+        //
+    }
+}
diff --git a/src/main/java/myutil/TreeRendererStats.java b/src/main/java/myutil/TreeRendererStats.java
new file mode 100644
index 0000000000000000000000000000000000000000..d5f65bed64b9196fb67a7f0e88732655f54c1f64
--- /dev/null
+++ b/src/main/java/myutil/TreeRendererStats.java
@@ -0,0 +1,123 @@
+/* Copyright or (C) or Copr. GET / ENST, Telecom-Paris, Ludovic Apvrille
+ * 
+ * ludovic.apvrille AT enst.fr
+ * 
+ * This software is a computer program whose purpose is to allow the
+ * edition of TURTLE analysis, design and deployment diagrams, to
+ * allow the generation of RT-LOTOS or Java code from this diagram,
+ * and at last to allow the analysis of formal validation traces
+ * obtained from external tools, e.g. RTL from LAAS-CNRS and CADP
+ * from INRIA Rhone-Alpes.
+ * 
+ * This software is governed by the CeCILL  license under French law and
+ * abiding by the rules of distribution of free software.  You can  use,
+ * modify and/ or redistribute the software under the terms of the CeCILL
+ * license as circulated by CEA, CNRS and INRIA at the following URL
+ * "http://www.cecill.info".
+ * 
+ * As a counterpart to the access to the source code and  rights to copy,
+ * modify and redistribute granted by the license, users are provided only
+ * with a limited warranty  and the software's author,  the holder of the
+ * economic rights,  and the successive licensors  have only  limited
+ * liability.
+ * 
+ * In this respect, the user's attention is drawn to the risks associated
+ * with loading,  using,  modifying and/or developing or reproducing the
+ * software by the user in light of its specific status of free software,
+ * that may mean  that it is complicated to manipulate,  and  that  also
+ * therefore means  that it is reserved for developers  and  experienced
+ * professionals having in-depth computer knowledge. Users are therefore
+ * encouraged to load and test the software's suitability as regards their
+ * requirements in conditions enabling the security of their systems and/or
+ * data to be ensured and,  more generally, to use and operate it in the
+ * same conditions as regards security.
+ * 
+ * The fact that you are presently reading this means that you have had
+ * knowledge of the CeCILL license and that you accept its terms.
+ */
+
+
+
+
+package myutil;
+
+import help.HelpEntry;
+import translator.CheckingError;
+import translator.GroupOfGates;
+import ui.*;
+import ui.ad.TActivityDiagramPanel;
+import ui.atd.AttackTreeDiagramPanel;
+import ui.ftd.FaultTreeDiagramPanel;
+import ui.avatarad.AvatarADPanel;
+import ui.avatarbd.AvatarBDPanel;
+import ui.avatarcd.AvatarCDPanel;
+import ui.avatardd.ADDDiagramPanel;
+import ui.avatarmad.AvatarMADPanel;
+import ui.avatarmethodology.AvatarMethodologyDiagramPanel;
+import ui.avatarpd.AvatarPDPanel;
+import ui.avatarrd.AvatarRDPanel;
+import ui.avatarsmd.AvatarSMDPanel;
+import ui.cd.TClassDiagramPanel;
+import ui.dd.TDeploymentDiagramPanel;
+import ui.diplodocusmethodology.DiplodocusMethodologyDiagramPanel;
+import ui.ebrdd.EBRDDPanel;
+import graph.RG;
+import ui.iod.InteractionOverviewDiagramPanel;
+import ui.ncdd.NCDiagramPanel;
+import ui.osad.TURTLEOSActivityDiagramPanel;
+import ui.oscd.TURTLEOSClassDiagramPanel;
+import ui.req.RequirementDiagramPanel;
+import ui.sd.SequenceDiagramPanel;
+import ui.sysmlsecmethodology.SysmlsecMethodologyDiagramPanel;
+import ui.tmlad.TMLActivityDiagramPanel;
+import ui.tmlcd.TMLTaskDiagramPanel;
+import ui.tmlcompd.TMLComponentTaskDiagramPanel;
+import ui.tmlcp.TMLCPPanel;
+import ui.tmldd.TMLArchiDiagramPanel;
+import ui.tmlsd.TMLSDPanel;
+import ui.ucd.UseCaseDiagramPanel;
+import ui.util.IconManager;
+
+import javax.swing.*;
+import javax.swing.tree.DefaultTreeCellRenderer;
+import java.awt.*;
+
+
+
+/**
+   * Class TreeRendererStats
+   * Icons and tooltiptext for the main tree
+   * Creation: 11/01/2021
+   * @version 1.0 11/01/2021
+   * @author Ludovic APVRILLE
+ */
+public class TreeRendererStats extends DefaultTreeCellRenderer  {
+
+    public TreeRendererStats() {
+
+    }
+
+    public Component getTreeCellRendererComponent(
+                                                  JTree tree,
+                                                  Object value,
+                                                  boolean sel,
+                                                  boolean expanded,
+                                                  boolean leaf,
+                                                  int row,
+                                                  boolean hasFocus) {
+
+        super.getTreeCellRendererComponent(
+                                           tree, value, sel,
+                                           expanded, leaf, row,
+                                           hasFocus);
+
+        if (value instanceof DataElement) {
+            //setIcon(IconManager.imgic80);
+            setToolTipText(value.toString());
+        } else {
+            setToolTipText(null);
+        }
+
+        return this;
+    }
+}
diff --git a/src/main/java/ui/avatarinteractivesimulation/AvatarSimulationStatisticsPanel.java b/src/main/java/ui/avatarinteractivesimulation/AvatarSimulationStatisticsPanel.java
index 7b2d6df93957827f00feb2e8d5b9d6bae7fa6c19..5a8671fa56fc1a29452341e05251cb53681ad2b3 100644
--- a/src/main/java/ui/avatarinteractivesimulation/AvatarSimulationStatisticsPanel.java
+++ b/src/main/java/ui/avatarinteractivesimulation/AvatarSimulationStatisticsPanel.java
@@ -44,7 +44,9 @@ package ui.avatarinteractivesimulation;
 
 import avatartranslator.*;
 import avatartranslator.directsimulation.*;
+import myutil.DataElement;
 import myutil.GraphicLib;
+import myutil.JFrameStatistics;
 import myutil.TraceManager;
 import org.jfree.chart.ChartFactory;
 import org.jfree.chart.ChartPanel;
@@ -65,6 +67,7 @@ import java.awt.event.MouseMotionListener;
 import java.awt.image.BufferedImage;
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Vector;
 
 /**
@@ -92,7 +95,7 @@ public class AvatarSimulationStatisticsPanel extends JPanel implements ActionLis
     private JLabel averageSimulationTime;
     private JLabel maxSimulationTime;
 
-    private JButton showSimulationTimeHistogram;
+    private JButton showSimulationTimeHistogram, showStats;
 
 
     // Simulation data structures
@@ -162,6 +165,11 @@ public class AvatarSimulationStatisticsPanel extends JPanel implements ActionLis
         showSimulationTimeHistogram.setEnabled(false);
         showSimulationTimeHistogram.addActionListener(this);
 
+        showStats = new JButton("Show statistics");
+        add(showStats, c2);
+        showStats.setEnabled(false);
+        showStats.addActionListener(this);
+
 
     }
 
@@ -170,11 +178,44 @@ public class AvatarSimulationStatisticsPanel extends JPanel implements ActionLis
             runSimulations();
         } else if (ae.getSource() == showSimulationTimeHistogram) {
             showTimeHistogram();
+        } else if (ae.getSource() == showStats) {
+            showStats();
         } else if (ae.getSource() == stopSimulationsButton) {
             stopSimulation();
         }
     }
 
+    private void showStats() {
+        // Extracting and filling data
+        Thread stats = new Thread(() -> {
+            // Simulation time
+            ArrayList<DataElement> elts = new ArrayList<DataElement>();
+
+            DataElement simulationTime = new DataElement("Simulation time");
+            simulationTime.data = sr.getSimulationTimes();
+            elts.add(simulationTime);
+
+            // Block
+            for(AvatarBlock ab: sr.getBlocksOfTransactions()) {
+                DataElement deBlock = new DataElement("Block " + ab.getName());
+                elts.add(deBlock);
+
+                // Time of last transaction
+                DataElement de = new DataElement("Time of last transaction of Block " + ab.getName());
+                deBlock.addChild(de);
+                de.data = sr.getTimesOfLastTransactionOfBlock(ab);
+            }
+
+
+
+            // Opening stat window
+            JFrameStatistics stats1 = new JFrameStatistics("Simulation stats", elts);
+            stats1.setSize(800,600);
+            stats1.setVisible(true);
+        });
+        stats.start();
+    }
+
     private void showTimeHistogram() {
         TraceManager.addDev("Show time histogram");
         JPanel panel = new JPanel(new BorderLayout());
@@ -204,7 +245,7 @@ public class AvatarSimulationStatisticsPanel extends JPanel implements ActionLis
 
         HistogramDataset dataset = new HistogramDataset();
         double []values = sr.getSimulationTimes();
-        dataset.addSeries("key", values, 20);
+        dataset.addSeries("Time value", values, 20);
 
         JFreeChart histogram = ChartFactory.createHistogram("Histogram: Simulation times",
                 "Simulation times", "Frequency", dataset);
@@ -242,8 +283,6 @@ public class AvatarSimulationStatisticsPanel extends JPanel implements ActionLis
             return;
         }
 
-
-
         int nbOfsimulations;
 
         try {
@@ -285,6 +324,7 @@ public class AvatarSimulationStatisticsPanel extends JPanel implements ActionLis
         maxSimulationTime.setText(""+maxSimTime);
 
         showSimulationTimeHistogram.setEnabled(true);
+        showStats.setEnabled(true);
     }
 
     public void reinitStats() {
@@ -292,6 +332,7 @@ public class AvatarSimulationStatisticsPanel extends JPanel implements ActionLis
         averageSimulationTime.setText("-");
         maxSimulationTime.setText("-");
         showSimulationTimeHistogram.setEnabled(false);
+        showStats.setEnabled(false);
     }