Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesArticle.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesArticle.xml	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesArticle.xml	(revision 1500)
@@ -0,0 +1,594 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<environment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+	xsi:noNamespaceSchemaLocation="../../../simulator/schemas/resources/DCwormsResSchema.xsd">
+
+   <timeEstimationPlugin>
+      <name>example.timeestimation.coolemall.PhaseBasedTimeEstimationPlugin</name>
+   </timeEstimationPlugin>
+	<resources  mode="CoolEmAll">
+		<computingResource class="Room" name="room">
+		
+		         <profile>
+            <powerProfile>
+               <energyEstimationPlugin>
+                  <name>experiments.simpat2014.models.article.DataCenterEnergyEstimationPlugin</name>
+               </energyEstimationPlugin>
+            </powerProfile>
+            <thermalProfile></thermalProfile>
+         </profile>
+			 <device name="FlowPump1" class="Inlet">
+	            <parameter name="product">
+	               <value>60x60cm</value>
+	            </parameter>
+	            <parameter name="maxRPM">
+	               <value>0</value>
+	            </parameter>
+	            <parameter name="efficiency">
+	               <value>100</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/FlowPump1</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.article.FlowPumpInletEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	               <airThroughputProfile/>
+	            </profile>
+	         </device>
+	         <device name="FlowPump2" class="Outlet">
+	            <parameter name="product">
+	               <value>60x60cm</value>
+	            </parameter>
+	            <parameter name="maxRPM">
+	               <value>0</value>
+	            </parameter>
+	            <parameter name="efficiency">
+	               <value>100</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/FlowPump2</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.article.FlowPumpOutletEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	               <airThroughputProfile/>
+	            </profile>
+	         </device>
+	         <device name="CoolingDevice1" class="CoolingDevice">
+	            <parameter name="class">
+	               <value>Refrigeration</value>
+	            </parameter>
+	            <parameter name="CRAHFanEfficiency">
+	               <value>0.60</value>
+	            </parameter>
+	            <parameter name="coolingCoilEfficiency">
+	               <value>0.95</value>
+	            </parameter>
+	            <parameter name="deltaThEx">
+	               <value>10</value>
+	            </parameter>
+	            <parameter name="CWT">
+	               <value>30</value>
+	            </parameter>
+	            <parameter name="deltaThDryCooler">
+	               <value>10</value>
+	            </parameter>
+	            <parameter name="coolingCapacityRated">
+	               <value>14000</value>
+	            </parameter>
+	            <parameter name="EERRated">
+	               <value>5</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/CoolingDevice1</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.article.CoolingDeviceEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	            </profile>
+	         </device>
+			<computingResource class="Rack" count="1">
+			            <profile>
+               <powerProfile>
+                  <energyEstimationPlugin>
+                     <name>experiments.simpat2014.models.article.RackEnergyEstimationPlugin</name>
+                  </energyEstimationPlugin>
+               </powerProfile>
+               <thermalProfile></thermalProfile>
+            </profile>
+            	<computingResource class="NodeGroup" count="40">
+            			<device class="Fan" count="4">
+						<profile>
+							<powerProfile>
+								<energyEstimationPlugin>
+									<name>experiments.simpat2014.models.article.FanEnergyEstimationPlugin</name>
+								</energyEstimationPlugin>
+								<powerStates>
+									<powerState>
+										<name>ON</name>
+										<powerUsage>6.6</powerUsage>
+									</powerState>
+									<powerState>
+										<name>OFF</name>
+										<powerUsage>0</powerUsage>
+									</powerState>
+								</powerStates>		
+								<parameter name="fanEfficiency">
+									<value>0.6</value>
+								</parameter>
+							</powerProfile>
+		  					<airThroughputProfile>
+		                        <airThroughputStates>
+		                           <airThroughputState>
+		                              <name>OFF</name>
+		                              <value>0.0000112</value>
+		                              <powerUsage>0</powerUsage>
+		                           </airThroughputState>
+		                            <airThroughputState>
+		                              <name>ON_10</name>
+		                              <value>0.00112</value>
+		                              <powerUsage>0.0066</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_20</name>
+		                              <value>0.00224</value>
+		                              <powerUsage>0.0528</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_30</name>
+		                              <value>0.00336</value>
+		                              <powerUsage>0.1782</powerUsage>
+		                           </airThroughputState>	                           
+		                            <airThroughputState>
+		                              <name>ON_40</name>
+		                              <value>0.00448</value>
+		                              <powerUsage>0.4224</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_50</name>
+		                              <value>0.0056</value>
+		                              <powerUsage>0.825</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_60</name>
+		                              <value>0.00672</value>
+		                              <powerUsage>1.4256</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_70</name>
+		                              <value>0.00784</value>
+		                              <powerUsage>2.2638</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_80</name>
+		                              <value>0.00896</value>
+		                              <powerUsage>3.3792</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_90</name>
+		                              <value>0.01008</value>
+		                              <powerUsage>4.8114</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_100</name>
+		                              <value>0.0112</value>
+		                              <powerUsage>6.6</powerUsage>
+		                           </airThroughputState>
+		                        </airThroughputStates>
+		                     </airThroughputProfile>
+							<thermalProfile></thermalProfile>
+						</profile>
+					</device>
+            	               <profile>
+                  <powerProfile>
+                     <energyEstimationPlugin>
+                        <name>experiments.simpat2014.models.article.NodeGroupEnergyEstimationPluginPowerCapping</name>
+                     </energyEstimationPlugin>
+                  </powerProfile>
+               </profile>
+				<computingResource class="Node" count="4">
+					<profile>
+						<powerProfile>
+							<energyEstimationPlugin>
+								<name>experiments.simpat2014.models.article.NodeEnergyEstimationPlugin</name>
+							</energyEstimationPlugin>
+							<powerStates>
+								<powerState>
+									<name>IDLE</name>
+									<powerUsage>10</powerUsage>
+								</powerState>
+								<powerState>
+									<name>FULL</name>
+									<powerUsage>70</powerUsage>
+								</powerState>
+							</powerStates>				
+						</powerProfile>
+						<thermalProfile></thermalProfile>
+					</profile>
+					<computingResource class="Processor" count="1">
+						<device class="PowerLeakage" count="1">
+						<profile>
+						<powerProfile>
+							<energyEstimationPlugin>
+								<name>experiments.simpat2014.models.article.PowerLeakageEnergyEstimationPlugin</name>
+							</energyEstimationPlugin>	
+						</powerProfile>
+						<thermalProfile></thermalProfile>
+					</profile>
+						</device>
+					    <parameter name="product">
+                        	<value>Core i7 - 3615QE</value>
+                     	</parameter>
+						<profile>
+							<powerProfile>
+								<energyEstimationPlugin>
+									<name>experiments.simpat2014.models.article.CpuEnergyEstimationPlugin</name>
+								</energyEstimationPlugin>
+									<powerStates>
+		                              <powerState>
+		                                 <name>IDLE</name>
+		                                 <powerUsage>4</powerUsage>
+		                              </powerState>
+		                              <powerState>
+		                                 <name>FULL</name>
+		                                 <powerUsage>50</powerUsage>
+		                              </powerState>
+		                           </powerStates>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>1</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1200</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>11.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>14.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>18.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>10</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>2</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1300</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>20</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>3</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1400</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>21.25</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>4</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1500</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>10.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>15</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>12.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>21.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>5</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1600</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>12.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>16</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>14.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>22.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>6</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1700</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>15.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>13.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>23.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>7</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1800</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>10.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>20.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>10.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>23.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>8</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1900</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>16.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>21.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>15.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>24.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>9</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2000</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>17.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>21.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>26.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>10</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2100</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>17.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>27.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>11</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2200</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>18.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>13.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>28.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>12</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2300</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>25.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>30</value>
+		                              </property>
+		                           </parameter>
+		                       
+								<parameter name="k">
+									<value>114</value>
+								</parameter>
+								<parameter name="a">
+									<value>0.8</value>
+								</parameter>
+								<parameter name="thermalResistance">
+									<value>0.67</value>
+								</parameter>
+								<parameter name="thermalCapacity">
+									<value>40</value>
+								</parameter>
+							</powerProfile>
+							<thermalProfile></thermalProfile>
+						</profile>
+						<computingResource class="Core" count="8"/>
+					</computingResource>
+				</computingResource>
+				</computingResource>
+			</computingResource>
+		</computingResource>
+		<scheduler class="Cluster" name="cluster">
+			<schedulingPlugin>
+				<name>experiments.simpat2014.models.article.FCFSBF_RandomPluginFansMng</name>
+				<frequency>4</frequency>
+			</schedulingPlugin>	
+			<managedComputingResources include="false">
+				<resourceName>room</resourceName>
+			</managedComputingResources>
+		</scheduler>	
+	</resources>
+
+</environment>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesRecs.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesRecs.xml	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesRecs.xml	(revision 1500)
@@ -0,0 +1,603 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<environment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+	xsi:noNamespaceSchemaLocation="../../../simulator/schemas/resources/DCwormsResSchema.xsd">
+
+   <timeEstimationPlugin>
+      <name>example.timeestimation.coolemall.PhaseBasedTimeEstimationPlugin</name>
+   </timeEstimationPlugin>
+	<resources  mode="CoolEmAll">
+		<computingResource class="Room" name="compRes">
+		
+		         <profile>
+            <powerProfile>
+               <energyEstimationPlugin>
+                  <name>experiments.simpat2014.models.recs.DataCenterEnergyEstimationPlugin</name>
+               </energyEstimationPlugin>
+            </powerProfile>
+            <thermalProfile></thermalProfile>
+         </profile>
+			 <device name="FlowPump1" class="Inlet">
+	            <parameter name="product">
+	               <value>60x60cm</value>
+	            </parameter>
+	            <parameter name="maxRPM">
+	               <value>0</value>
+	            </parameter>
+	            <parameter name="efficiency">
+	               <value>100</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/FlowPump1</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.recs.FlowPumpInletEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	               <airThroughputProfile/>
+	            </profile>
+	         </device>
+	         <device name="FlowPump2" class="Outlet">
+	            <parameter name="product">
+	               <value>60x60cm</value>
+	            </parameter>
+	            <parameter name="maxRPM">
+	               <value>0</value>
+	            </parameter>
+	            <parameter name="efficiency">
+	               <value>100</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/FlowPump2</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.recs.FlowPumpOutletEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	               <airThroughputProfile/>
+	            </profile>
+	         </device>
+	         <device name="CoolingDevice1" class="CoolingDevice">
+	            <parameter name="class">
+	               <value>Refrigeration</value>
+	            </parameter>
+	            <parameter name="CRAHFanEfficiency">
+	               <value>0.60</value>
+	            </parameter>
+	            <parameter name="coolingCoilEfficiency">
+	               <value>0.95</value>
+	            </parameter>
+	            <parameter name="deltaThEx">
+	               <value>10</value>
+	            </parameter>
+	            <parameter name="CWT">
+	               <value>30</value>
+	            </parameter>
+	            <parameter name="deltaThDryCooler">
+	               <value>10</value>
+	            </parameter>
+	            <parameter name="coolingCapacityRated">
+	               <value>3000</value>
+	            </parameter>
+	            <parameter name="EERRated">
+	               <value>5</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/CoolingDevice1</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.recs.CoolingDeviceEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	            </profile>
+	         </device>
+			<computingResource class="Rack" count="1">
+			            <profile>
+               <powerProfile>
+                  <energyEstimationPlugin>
+                     <name>experiments.simpat2014.models.recs.RackEnergyEstimationPlugin</name>
+                  </energyEstimationPlugin>
+               </powerProfile>
+               <thermalProfile></thermalProfile>
+            </profile>
+            	<computingResource class="NodeGroup" count="2">
+            		<device class="Fan" count="18">
+						<profile>
+							<powerProfile>
+								<energyEstimationPlugin>
+									<name>experiments.simpat2014.models.recs.FanEnergyEstimationPlugin</name>
+								</energyEstimationPlugin>
+								<powerStates>
+									<powerState>
+										<name>ON</name>
+										<powerUsage>6.6</powerUsage>
+									</powerState>
+									<powerState>
+										<name>OFF</name>
+										<powerUsage>0</powerUsage>
+									</powerState>
+								</powerStates>		
+								<parameter name="fanEfficiency">
+									<value>0.6</value>
+								</parameter>
+							</powerProfile>
+		  					<airThroughputProfile>
+		                        <airThroughputStates>
+		                           <airThroughputState>
+		                              <name>OFF</name>
+		                              <value>0.0000112</value>
+		                              <powerUsage>0</powerUsage>
+		                           </airThroughputState>
+		                            <airThroughputState>
+		                              <name>ON_10</name>
+		                              <value>0.00112</value>
+		                              <powerUsage>0.0066</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_20</name>
+		                              <value>0.00224</value>
+		                              <powerUsage>0.0528</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_30</name>
+		                              <value>0.00336</value>
+		                              <powerUsage>0.1782</powerUsage>
+		                           </airThroughputState>	                           
+		                            <airThroughputState>
+		                              <name>ON_40</name>
+		                              <value>0.00448</value>
+		                              <powerUsage>0.4224</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_50</name>
+		                              <value>0.0056</value>
+		                              <powerUsage>0.825</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_60</name>
+		                              <value>0.00672</value>
+		                              <powerUsage>1.4256</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_70</name>
+		                              <value>0.00784</value>
+		                              <powerUsage>2.2638</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_80</name>
+		                              <value>0.00896</value>
+		                              <powerUsage>3.3792</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_90</name>
+		                              <value>0.01008</value>
+		                              <powerUsage>4.8114</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_100</name>
+		                              <value>0.0112</value>
+		                              <powerUsage>6.6</powerUsage>
+		                           </airThroughputState>
+		                        </airThroughputStates>
+		                     </airThroughputProfile>
+							<thermalProfile></thermalProfile>
+						</profile>
+					</device>
+            	               <profile>
+                  <powerProfile>
+                     <energyEstimationPlugin>
+                        <name>experiments.simpat2014.models.recs.NodeGroupEnergyEstimationPlugin</name>
+                     </energyEstimationPlugin>
+                  </powerProfile>
+               </profile>
+				<computingResource class="Node" count="18" >
+					<profile>
+						<powerProfile>
+							<energyEstimationPlugin>
+								<name>experiments.simpat2014.models.recs.NodeEnergyEstimationPlugin</name>
+							</energyEstimationPlugin>
+							<powerStates>
+								<powerState>
+									<name>IDLE</name>
+									<powerUsage>10</powerUsage>
+								</powerState>
+								<powerState>
+									<name>FULL</name>
+									<powerUsage>70</powerUsage>
+								</powerState>
+							</powerStates>				
+						</powerProfile>
+						<thermalProfile></thermalProfile>
+					</profile>
+					<computingResource class="Processor" count="1">
+					    <parameter name="product">
+                        	<value>Core i7 - 3615QE</value>
+                     	</parameter>
+						<profile>
+							<powerProfile>
+								<energyEstimationPlugin>
+									<name>experiments.simpat2014.models.recs.CpuEnergyEstimationPlugin</name>
+								</energyEstimationPlugin>
+									<powerStates>
+		                              <powerState>
+		                                 <name>IDLE</name>
+		                                 <powerUsage>4</powerUsage>
+		                              </powerState>
+		                              <powerState>
+		                                 <name>FULL</name>
+		                                 <powerUsage>50</powerUsage>
+		                              </powerState>
+		                           </powerStates>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>1</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1200</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>11.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>14.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>18.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>10</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>2</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1300</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>20.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>3</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1400</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>21.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>4</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1500</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>10.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>15</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>12.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>20.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>5</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1600</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>12.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>16</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>14.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>22.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>6</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1700</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>15.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>13.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>24.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>7</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1800</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>10.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>20.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>10.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>23.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>8</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1900</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>16.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>21.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>15.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>24.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>9</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2000</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>17.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>21.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>26.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>10</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2100</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>17.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>25.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>11</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2200</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>18.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>13.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>26.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>12</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2300</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>25.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>30</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>13</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2301</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>22.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>32.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>19.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>50</value>
+		                              </property>
+		                           </parameter>
+								<parameter name="k">
+									<value>1020</value>
+								</parameter>
+								<parameter name="thermalResistance">
+									<value>0.9</value>
+								</parameter>
+								<parameter name="thermalCapacity">
+									<value>210</value>
+								</parameter>
+							</powerProfile>
+							<thermalProfile></thermalProfile>
+						</profile>
+					</computingResource>
+				</computingResource>
+				</computingResource>
+			</computingResource>
+		</computingResource>
+		<scheduler class="Cluster" name="cluster">
+			<schedulingPlugin>
+				<name>experiments.simpat2014.models.article.FCFSBF_RandomPluginMigrate</name>
+				<frequency>2</frequency>
+			</schedulingPlugin>	
+			<managedComputingResources include="false">
+				<resourceName>compRes</resourceName>
+			</managedComputingResources>
+		</scheduler>	
+	</resources>
+
+</environment>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesBasic.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesBasic.xml	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/resources/resourcesBasic.xml	(revision 1500)
@@ -0,0 +1,594 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<environment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+	xsi:noNamespaceSchemaLocation="../../../simulator/schemas/resources/DCwormsResSchema.xsd">
+
+   <timeEstimationPlugin>
+      <name>example.timeestimation.coolemall.PhaseBasedTimeEstimationPlugin</name>
+   </timeEstimationPlugin>
+	<resources  mode="CoolEmAll">
+		<computingResource class="Room" name="compRes">
+		
+		         <profile>
+            <powerProfile>
+               <energyEstimationPlugin>
+                  <name>experiments.simpat2014.models.basic.DataCenterEnergyEstimationPlugin</name>
+               </energyEstimationPlugin>
+            </powerProfile>
+            <thermalProfile></thermalProfile>
+         </profile>
+			 <device name="FlowPump1" class="Inlet">
+	            <parameter name="product">
+	               <value>60x60cm</value>
+	            </parameter>
+	            <parameter name="maxRPM">
+	               <value>0</value>
+	            </parameter>
+	            <parameter name="efficiency">
+	               <value>100</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/FlowPump1</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.basic.FlowPumpInletEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	               <airThroughputProfile/>
+	            </profile>
+	         </device>
+	         <device name="FlowPump2" class="Outlet">
+	            <parameter name="product">
+	               <value>60x60cm</value>
+	            </parameter>
+	            <parameter name="maxRPM">
+	               <value>0</value>
+	            </parameter>
+	            <parameter name="efficiency">
+	               <value>100</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/FlowPump2</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.basic.FlowPumpOutletEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	               <airThroughputProfile/>
+	            </profile>
+	         </device>
+	         <device name="CoolingDevice1" class="CoolingDevice">
+	            <parameter name="class">
+	               <value>Refrigeration</value>
+	            </parameter>
+	            <parameter name="CRAHFanEfficiency">
+	               <value>0.60</value>
+	            </parameter>
+	            <parameter name="coolingCoilEfficiency">
+	               <value>0.95</value>
+	            </parameter>
+	            <parameter name="deltaThEx">
+	               <value>10</value>
+	            </parameter>
+	            <parameter name="CWT">
+	               <value>30</value>
+	            </parameter>
+	            <parameter name="deltaThDryCooler">
+	               <value>10</value>
+	            </parameter>
+	            <parameter name="coolingCapacityRated">
+	               <value>3000</value>
+	            </parameter>
+	            <parameter name="EERRated">
+	               <value>5</value>
+	            </parameter>
+	            <parameter name="airflow_volume-sensor">
+	               <value>airflow_volume</value>
+	            </parameter>
+	            <parameter name="airflow_speed-sensor">
+	               <value>airflow_speed</value>
+	            </parameter>
+	            <parameter name="temperature-sensor">
+	               <value>temperature</value>
+	            </parameter>
+	            <parameter name="fullPath">
+	               <value>compRes/CoolingDevice1</value>
+	            </parameter>
+	            <profile>
+	               <powerProfile>
+	                  <energyEstimationPlugin>
+	                     <name>experiments.simpat2014.models.basic.CoolingDeviceEnergyEstimationPlugin</name>
+	                  </energyEstimationPlugin>
+	               </powerProfile>
+	            </profile>
+	         </device>
+			<computingResource class="Rack" count="1">
+			            <profile>
+               <powerProfile>
+                  <energyEstimationPlugin>
+                     <name>experiments.simpat2014.models.basic.RackEnergyEstimationPlugin</name>
+                  </energyEstimationPlugin>
+               </powerProfile>
+               <thermalProfile></thermalProfile>
+            </profile>
+				<computingResource class="Node" count="1">
+					<profile>
+						<powerProfile>
+							<energyEstimationPlugin>
+								<name>experiments.simpat2014.models.basic.NodeEnergyEstimationPlugin</name>
+							</energyEstimationPlugin>
+							<powerStates>
+								<powerState>
+									<name>IDLE</name>
+									<powerUsage>10</powerUsage>
+								</powerState>
+								<powerState>
+									<name>FULL</name>
+									<powerUsage>70</powerUsage>
+								</powerState>
+							</powerStates>				
+						</powerProfile>
+						<thermalProfile></thermalProfile>
+					</profile>
+					<device class="Fan">
+						<profile>
+							<powerProfile>
+								<energyEstimationPlugin>
+									<name>experiments.simpat2014.models.basic.FanEnergyEstimationPlugin</name>
+								</energyEstimationPlugin>
+								<powerStates>
+									<powerState>
+										<name>ON</name>
+										<powerUsage>6.6</powerUsage>
+									</powerState>
+									<powerState>
+										<name>OFF</name>
+										<powerUsage>0</powerUsage>
+									</powerState>
+								</powerStates>		
+								<parameter name="fanEfficiency">
+									<value>0.6</value>
+								</parameter>
+							</powerProfile>
+		  					<airThroughputProfile>
+		                        <airThroughputStates>
+		                           <airThroughputState>
+		                              <name>OFF</name>
+		                              <value>0.0000112</value>
+		                              <powerUsage>0</powerUsage>
+		                           </airThroughputState>
+		                            <airThroughputState>
+		                              <name>ON_10</name>
+		                              <value>0.00112</value>
+		                              <powerUsage>0.0066</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_20</name>
+		                              <value>0.00224</value>
+		                              <powerUsage>0.0528</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_30</name>
+		                              <value>0.00336</value>
+		                              <powerUsage>0.1782</powerUsage>
+		                           </airThroughputState>	                           
+		                            <airThroughputState>
+		                              <name>ON_40</name>
+		                              <value>0.00448</value>
+		                              <powerUsage>0.4224</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_50</name>
+		                              <value>0.0056</value>
+		                              <powerUsage>0.825</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_60</name>
+		                              <value>0.00672</value>
+		                              <powerUsage>1.4256</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_70</name>
+		                              <value>0.00784</value>
+		                              <powerUsage>2.2638</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_80</name>
+		                              <value>0.00896</value>
+		                              <powerUsage>3.3792</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_90</name>
+		                              <value>0.01008</value>
+		                              <powerUsage>4.8114</powerUsage>
+		                           </airThroughputState>
+		                           <airThroughputState>
+		                              <name>ON_100</name>
+		                              <value>0.0112</value>
+		                              <powerUsage>6.6</powerUsage>
+		                           </airThroughputState>
+		                        </airThroughputStates>
+		                     </airThroughputProfile>
+							<thermalProfile></thermalProfile>
+						</profile>
+					</device>
+					<computingResource class="Processor" count="1">
+					    <parameter name="product">
+                        	<value>Core i7 - 3615QE</value>
+                     	</parameter>
+						<profile>
+							<powerProfile>
+								<energyEstimationPlugin>
+									<name>experiments.simpat2014.models.basic.CpuEnergyEstimationPlugin</name>
+								</energyEstimationPlugin>
+									<powerStates>
+		                              <powerState>
+		                                 <name>IDLE</name>
+		                                 <powerUsage>4</powerUsage>
+		                              </powerState>
+		                              <powerState>
+		                                 <name>FULL</name>
+		                                 <powerUsage>50</powerUsage>
+		                              </powerState>
+		                           </powerStates>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>1</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1200</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>11.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>14.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>18.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>10</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>2</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1300</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>20.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>3</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1400</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>21.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>4</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1500</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>10.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>15</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>12.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>20.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>5</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1600</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>12.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>16</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>14.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>22.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>6</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1700</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>15.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>13.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>24.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>7</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1800</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>10.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>20.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>10.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>23.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>8</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>1900</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>16.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>21.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>15.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>24.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>9</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2000</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>17.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>21.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>26.5</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>10</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2100</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>17.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>9.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>25.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>11</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2200</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>18.75</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>13.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>26.75</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>12</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2300</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>14.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>25.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>12.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>30</value>
+		                              </property>
+		                           </parameter>
+		                           <parameter name="pState">
+		                              <property name="name">
+		                                 <value>13</value>
+		                              </property>
+		                              <property name="frequency">
+		                                 <value>2301</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>25</value>
+		                                 <value>22.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>50</value>
+		                                 <value>32.5</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>12.5</value>
+		                                 <value>19.25</value>
+		                              </property>
+		                              <property name="loadPowerUsage">
+		                                 <value>100</value>
+		                                 <value>50</value>
+		                              </property>
+		                           </parameter>
+								<parameter name="k">
+									<value>1020</value>
+								</parameter>
+								<parameter name="thermalResistance">
+									<value>0.9</value>
+								</parameter>
+								<parameter name="thermalCapacity">
+									<value>210</value>
+								</parameter>
+							</powerProfile>
+							<thermalProfile></thermalProfile>
+						</profile>
+					</computingResource>
+				</computingResource>
+			</computingResource>
+		</computingResource>
+		<scheduler class="Cluster" name="cluster">
+			<schedulingPlugin>
+				<name>experiments.simpat2014.models.article.FCFSBF_RandomPluginMigrate</name>
+				<frequency>2</frequency>
+			</schedulingPlugin>	
+			<managedComputingResources include="false">
+				<resourceName>compRes</resourceName>
+			</managedComputingResources>
+		</scheduler>	
+	</resources>
+
+</environment>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/experiment.properties
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/experiment.properties	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/experiment.properties	(revision 1500)
@@ -0,0 +1,38 @@
+# Use single *.swf file as workload description.
+
+# Path to xml file which describes resource characteristics.
+resdesc=src/experiments/simpat2014/resources/resourcesArticle.xml
+
+# and swf file, which name is declared by readscenario.workloadfilename parameter.
+# Swf file must be placed in readscenario.inputfolder directory.  
+readscenario.workloadfilename=src/experiments/simpat2014/workload/workloadOk.swf
+
+# Choose directory where all result files should be placed.
+stats.outputfolder=src/experiments/simpat2014_result
+
+# Define the type and content of charts to generate
+
+# Gantt chart
+#creatediagrams.gantt=true
+
+# Shows the execution times of tasks
+#creatediagrams.tasks=true
+
+# Shows the waiting times of tasks
+#creatediagrams.taskswaitingtime=true
+
+# Resource utilization chart - only for processors
+#creatediagrams.resutilization=Processor;Node
+
+#creatediagrams.restemperature=Processor;Node
+
+#creatediagrams.respowerusage=Room
+
+#creatediagrams.resairflow=Fan
+
+pressuredrop=65.337
+outletroomairtemperature=33
+inletroomairtemperature=18
+ambientairtemperature=25
+#airflowvolume=0.0304
+alpha=0.2
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/_result/experiment.properties
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/_result/experiment.properties	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/_result/experiment.properties	(revision 1500)
@@ -0,0 +1,38 @@
+# Use single *.swf file as workload description.
+
+# Path to xml file which describes resource characteristics.
+resdesc=src/experiments/simpat2014/resources/resourcesArticle.xml
+
+# and swf file, which name is declared by readscenario.workloadfilename parameter.
+# Swf file must be placed in readscenario.inputfolder directory.  
+readscenario.workloadfilename=src/experiments/simpat2014//workload/workloadOk.swf
+
+# Choose directory where all result files should be placed.
+stats.outputfolder=src/experiments/simpat2014/_result
+
+# Define the type and content of charts to generate
+
+# Gantt chart
+#creatediagrams.gantt=true
+
+# Shows the execution times of tasks
+#creatediagrams.tasks=true
+
+# Shows the waiting times of tasks
+#creatediagrams.taskswaitingtime=true
+
+# Resource utilization chart - only for processors
+#creatediagrams.resutilization=Processor;Node
+
+#creatediagrams.restemperature=Processor;Node
+
+#creatediagrams.respowerusage=Room
+
+#creatediagrams.resairflow=Fan
+
+pressuredrop=65.337
+outletroomairtemperature=33
+inletroomairtemperature=18
+ambientairtemperature=25
+#airflowvolume=0.0304
+alpha=0.2
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/EnvironmentConditions.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/EnvironmentConditions.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/EnvironmentConditions.java	(revision 1500)
@@ -0,0 +1,39 @@
+package experiments.simpat2014;
+
+public class EnvironmentConditions {
+	public static int ROOM_TEMPERATURE = 22;
+	public static int AIR_HEAT_CAPACITY = 1024;
+	public static double AIR_PRESSURE = 1013.25;
+	public static double AIR_DENSITY = 1.168;
+	//public static double SYSTEM_UDPATE_INTERVAL = 2.0;
+	
+	public static int TFanLow = 45;
+	public static int TFanHigh = 47;
+	
+	/*public static int tempLevelLow2Medium = 40;
+	public static int tempLevelMedium2Low = 36;
+	public static int tempLevelMedium2High = 54;
+	public static int tempLevelHigh2Medium = 50;*/
+	
+	/*public static int tempLevelLow2Medium = 40;
+	public static int tempLevelMedium2Low = 36;
+	public static int tempLevelMedium2High = 56;
+	public static int tempLevelHigh2Medium = 52;
+	public static int tempLevelHigh2Max = 82;
+	public static int tempLevelMax2High = 78;*/
+	
+	public static int tempLevelLow2Medium = 40;
+	public static int tempLevelMedium2Low = 36;
+	public static int tempLevelMedium2High = 48;
+	public static int tempLevelHigh2Medium = 44;
+	public static int tempLevelHigh2Max = 56;
+	public static int tempLevelMax2High = 52;
+	
+	public static int NODES_IN_A_ROW = 2;
+	public static int NODES_IN_A_COLUMN = 2;
+	
+	
+	public static int powerCapLevel = 196;
+	public static int powerUpgradeLevel = 180;
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/SimpatMetricsCalculator.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/SimpatMetricsCalculator.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/SimpatMetricsCalculator.java	(revision 1500)
@@ -0,0 +1,470 @@
+package experiments.simpat2014;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import simulator.stats.AbstractMetricsCalculator;
+import simulator.stats.DCwormsAccumulator;
+import simulator.stats.implementation.MetricsStats;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+
+public class SimpatMetricsCalculator extends AbstractMetricsCalculator{
+	
+	double leakage;
+	public SimpatMetricsCalculator (long startTime, long endTime, long timestamp){
+		super(startTime, endTime, timestamp);
+	}
+	
+	public List<MetricsStats> calulateMetrics(){
+		List<MetricsStats> metrics = new ArrayList<MetricsStats>();
+		/*for(String resourceTypeName: metricsData.keySet()){
+			MetricsStats metric = new MetricsStats(resourceTypeName, "energyUsage", metricsData.get(resourceTypeName).getMax());
+			metrics.add(metric);}
+		}*/
+		
+		leakage = calculateLeakageEnergyConsumption().getValue();
+		metrics.add(calculateLeakageEnergyConsumption());
+		metrics.add(calculateITComputingEnergyConsumption());
+		metrics.add(calculateITEnergyConsumption());
+		metrics.add(calculateNodeGroupFansEnergyConsumption());
+		
+		metrics.add(calculateRackEnergyConsumption());
+		metrics.add(calculateDataCenterFansEnergyConsumption());
+		metrics.add(calculateCoolingDeviceEnergyConsumption());
+		metrics.add(calculateOtherDevicesEnergyConsumption());
+		
+		metrics.add(calculateTotalEnergyConsumption());
+		
+		metrics.add(calculateMeanRackPower());
+		metrics.add(calculateMeanPower());
+		metrics.add(calculateMaxRackPower());
+		metrics.add(calculateMaxPower());
+		
+		metrics.add(calculatePUE());
+		metrics.add(calculatePUELevel4());
+		metrics.add(calculateEnergyWasteRate());
+		
+		metrics.add(calculateUsefulWork());
+		metrics.add(calculateProductivity());
+
+		return metrics;
+	}
+
+	private MetricsStats calculateLeakageEnergyConsumption() {
+		MetricsStats metric;
+		try{
+
+			double pl = 0;
+			for(String key: metricsData.keySet()){
+				if(key.contains("PowerLeakage")){
+					for(DCwormsAccumulator acc: metricsData.get(key)){
+						pl = pl + acc.getSum();
+					}
+				}
+			}
+
+			metric = new MetricsStats("CoolEmAllTestbed", "Power_Leakage_energy_consumption", (pl/2), timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Power_Leakage_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+
+	private MetricsStats calculateTotalEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+			
+			double roomPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Room")){
+				roomPower = roomPower + acc.getSum();
+			}
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_energy_consumption", roomPower, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculateITComputingEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+			double itComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Processor")){
+				itComputingPower = itComputingPower + acc.getSum();
+			}
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_processors_energy_consumption", (itComputingPower), timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_processors_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculateITEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+			double totalSitePower = 0; 
+			for(DCwormsAccumulator acc: metricsData.get("Rack")){
+				totalSitePower = totalSitePower + acc.getSum();
+			}
+			double nodeComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("NodeGroup")){
+				nodeComputingPower = nodeComputingPower+ acc.getSum();
+			}
+			double itComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Node")){
+				itComputingPower = itComputingPower + acc.getSum();
+			}
+			double nodeGroupFansPowerConumspion = nodeComputingPower - itComputingPower;
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_IT_energy_consumption", (totalSitePower * CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY - nodeGroupFansPowerConumspion), timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_IT_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculateNodeGroupFansEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+			double nodeComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("NodeGroup")){
+				nodeComputingPower = nodeComputingPower+ acc.getSum();
+			}
+			System.out.println("nodeComputingPower " + nodeComputingPower );
+			double itComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Node")){
+				itComputingPower = itComputingPower + acc.getSum();
+			}
+			System.out.println("itComputingPower  " +itComputingPower  );
+			double nodeGroupFansPowerConumspion = nodeComputingPower - itComputingPower;
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_node_group_fans_energy_consumption", nodeGroupFansPowerConumspion, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_node_group_fans_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculatePUELevel4(){
+		
+		MetricsStats metric;
+		try{
+			
+			double roomPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Room")){
+				roomPower = roomPower + acc.getSum();
+			}
+			
+			double totalSitePower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Rack")){
+				totalSitePower = totalSitePower + acc.getSum();
+			}
+			
+		
+			double nodeComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("NodeGroup")){
+				nodeComputingPower = nodeComputingPower+ acc.getSum();
+			}
+			double itComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Node")){
+				itComputingPower = itComputingPower + acc.getSum();
+			}
+			double nodeGroupFansPowerConumspion = nodeComputingPower - itComputingPower;
+
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE_Level_4", roomPower/(totalSitePower * CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY - nodeGroupFansPowerConumspion), timestamp, "");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE_Level_4", -1, timestamp, "");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculatePUE(){
+		
+		MetricsStats metric;
+		try{
+			
+			double roomPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Room")){
+				roomPower = roomPower + acc.getSum();
+			}
+			
+			double totalSitePower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Rack")){
+				totalSitePower = totalSitePower + acc.getSum();
+			}
+
+
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE", roomPower/totalSitePower, timestamp, "");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "PUE", -1, timestamp, "");
+		}
+		return metric;
+	}
+
+	private MetricsStats calculateUsefulWork(){
+		
+		MetricsStats metric;
+		try{
+			double usefulWork = 0;
+			for(String key: metricsData.keySet()){
+				if(key.contains("UW_")){
+					for(DCwormsAccumulator acc: metricsData.get(key)){
+						usefulWork= usefulWork + acc.getSum();
+					}
+				}
+			}
+			metric = new MetricsStats("CoolEmAllTestbed", "Useful_Work", usefulWork, timestamp, "UW units");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Useful_Work", -1, timestamp, "UW units");
+		}
+		
+		return metric;
+	}
+	
+	private MetricsStats calculateProductivity(){
+		
+		MetricsStats metric;
+		try{
+			double usefulWork = 0;
+			for(String key: metricsData.keySet()){
+				if(key.contains("/")){
+					for(DCwormsAccumulator acc: metricsData.get(key)){
+						usefulWork= usefulWork + acc.getSum();
+					}
+				}
+			}
+			double totalSitePower = 0; 
+			for(DCwormsAccumulator acc: metricsData.get("Rack")){
+				totalSitePower = totalSitePower + acc.getSum();
+			}
+			
+			metric = new MetricsStats("CoolEmAllTestbed", "Productivity", usefulWork/totalSitePower, timestamp, "UW units/Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Productivity", -1, timestamp, "UW units/Wh");
+		}
+		
+		return metric;
+	}
+	
+	
+	private MetricsStats calculateMaxRackPower(){
+		
+		MetricsStats metric;
+		try{
+			double maxPower = 0;
+			
+			for(DCwormsAccumulator acc: metricsData.get("Rack_MAX")){
+				maxPower = maxPower + acc.getSum();
+			}
+
+			metric = new MetricsStats("CoolEmAllTestbed", "Max_rack_power", maxPower, timestamp, "W");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Max_rack_power", -1, timestamp, "W");
+		}
+		
+		return metric;
+	}
+	
+	private MetricsStats calculateMaxPower(){
+		
+		MetricsStats metric;
+		try{
+			double maxPower = 0;
+			
+			for(DCwormsAccumulator acc: metricsData.get("Room_MAX")){
+				maxPower = maxPower + acc.getSum();
+			}
+
+			metric = new MetricsStats("CoolEmAllTestbed", "Max_power", maxPower, timestamp, "W");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Max_power", -1, timestamp, "W");
+		}
+		
+		return metric;
+	}
+	
+	private MetricsStats calculateDataCenterFansEnergyConsumptionNew(){
+		
+		MetricsStats metric;
+		try{
+			double inletsPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Inlet")){
+				inletsPower = inletsPower + acc.getSum();
+			}
+			
+			double outletsPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Outlet")){
+				outletsPower = outletsPower + acc.getSum();
+			}
+			
+			double nodeComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Node")){
+				nodeComputingPower = nodeComputingPower+ acc.getSum();
+			}
+			double itComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Processor")){
+				itComputingPower = itComputingPower + acc.getSum();
+			}
+			double nodeGroupFansPowerConumspion = nodeComputingPower - itComputingPower;
+			
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_data_center_fans_energy_consumption", (inletsPower + outletsPower - nodeGroupFansPowerConumspion), timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_data_center_fans_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculateRackEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+			double roomPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Rack")){
+				roomPower = roomPower + acc.getSum();
+			}
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_rack_energy_consumption", roomPower, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_rack_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculateCoolingDeviceEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+			double coolingDevicePower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("CoolingDevice")){
+				coolingDevicePower = coolingDevicePower + acc.getSum();
+			}
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_cooling_device_energy_consumption", coolingDevicePower, timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_cooling_device_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculateDataCenterFansEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+
+			double flowPump = 0;
+			for(String key: metricsData.keySet()){
+				if(key.contains("FlowPump")){
+					for(DCwormsAccumulator acc: metricsData.get(key)){
+						flowPump = flowPump + acc.getSum();
+					}
+				}
+			}
+
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_data_center_fans_energy_consumption", (flowPump), timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_data_center_fans_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+	
+	
+	private MetricsStats calculateOtherDevicesEnergyConsumption(){
+		
+		MetricsStats metric;
+		try{
+			double roomPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Room")){
+				roomPower = roomPower + acc.getSum();
+			}
+			
+			double totalSitePower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Rack")){
+				totalSitePower = totalSitePower + acc.getSum();
+			}
+			
+			double coolingDevicePower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("CoolingDevice")){
+				coolingDevicePower = coolingDevicePower + acc.getSum();
+			}
+			
+			double inletsPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Inlet")){
+				inletsPower = inletsPower + acc.getSum();
+			}
+			
+			double outletsPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Outlet")){
+				outletsPower = outletsPower + acc.getSum();
+			}
+			
+			double nodeComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("NodeGroup")){
+				nodeComputingPower = nodeComputingPower+ acc.getSum();
+			}
+			double itComputingPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Node")){
+				itComputingPower = itComputingPower + acc.getSum();
+			}
+			double nodeGroupFansPowerConumspion = nodeComputingPower - itComputingPower;
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_other_devices_energy_consumption", roomPower - (totalSitePower + coolingDevicePower + (inletsPower + outletsPower)), timestamp, "Wh");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Total_other_devices_energy_consumption", -1, timestamp, "Wh");
+		}
+		return metric;
+	}
+
+	
+	private MetricsStats calculateMeanPower(){
+		
+		MetricsStats metric;
+		try{
+			
+			double roomPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Room")){
+				roomPower = roomPower + acc.getSum();
+			}
+			metric = new MetricsStats("CoolEmAllTestbed", "Mean_power", roomPower/((this.endTime - this.startTime)/(SEC_IN_HOUR * MILLI_SEC)), timestamp, "W");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Mean_power", -1, timestamp, "W");
+		}
+		return metric;
+	}
+	
+	
+	private MetricsStats calculateMeanRackPower(){
+		
+		MetricsStats metric;
+		try{
+			
+			double roomPower = 0;
+			for(DCwormsAccumulator acc: metricsData.get("Rack")){
+				roomPower = roomPower + acc.getSum();
+			}
+			metric = new MetricsStats("CoolEmAllTestbed", "Mean_rack_power", roomPower/((this.endTime - this.startTime)/(SEC_IN_HOUR * MILLI_SEC)), timestamp, "W");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Mean_rack_power", -1, timestamp, "W");
+		}
+		return metric;
+	}
+	
+	private MetricsStats calculateEnergyWasteRate(){
+		
+		MetricsStats metric;
+		try{
+			double itComputingEnergy = 0;
+			
+			for(DCwormsAccumulator acc: metricsData.get("Processor_CALC")){
+				itComputingEnergy = itComputingEnergy + acc.getSum();
+			}
+			
+			double itEnergy = calculateITEnergyConsumption().getValue();
+
+			metric = new MetricsStats("CoolEmAllTestbed", "Energy_waste_rate", (1 - itComputingEnergy/itEnergy) * 100, timestamp, "%");
+		} catch (Exception e){
+			metric = new MetricsStats("CoolEmAllTestbed", "Energy_waste_rate", -1, timestamp, "%");
+		}
+		
+		return metric;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/cold.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/cold.xml	(revision 1470)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/cold.xml	(revision 1470)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<job id="frame4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:noNamespaceSchemaLocation="../QCGJobDescriptionSchemaNew.xsd">
+	<task id="common/scripts/cold">
+		<execution>
+            <resourceConsumptionProfile type="Core i7 - 3615QE">
+                <properties name="usefulWork">1000</properties>
+                <resourceConsumption>
+                    <referenceHardware>
+                        <reference name="cpu_cores">1</reference>
+                        <reference name="cpu_maxfreq">2300</reference>
+                    </referenceHardware>
+                    <duration>PT1000S</duration>
+                    <behaviour name="PM_CPU_Usage">
+                        <value>0.7</value>
+                    </behaviour>
+                    <behaviour name="PM_Threads">
+  						<value>1</value>
+  					</behaviour>    
+                </resourceConsumption>
+            </resourceConsumptionProfile>     
+		</execution>
+	</task>
+</job>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workload.swf
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workload.swf	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workload.swf	(revision 1500)
@@ -0,0 +1,20 @@
+;Automatically generated workload description by the Grid Scheduling Simulator																																				
+;		j|		s|		w|		r|		c|		c|		m|		p|		t|		m|		s|		u|		g|		e|		q|		p|		p|		t|
+;		o|		u|		a|		u|		p|		p|		e|		r|		i|		e|		t|		i|		i|		x|		u|		a|		r|		h|
+;		b|		b|		i|		n|		u|		u|		m|		o|		m|		m|		a|		d|		d|		e|		e|		r|		e|		i|
+;		 |		m|		t|		t|		 |		 |		 |		c|		e|		 |		t|		 |		 |		c|		u|		t|		c|		n|
+;		 |		i|		 |		i|		a|		t|		u|		 |		 |		r|		u|		 |		 |		u|		e|		i|		 |		k|
+;		 |		t|		 |		m|		l|		i|		s|		r|		r|		e|		s|		 |		 |		t|		 |		t|		j|		 |
+;		 |		 |		 |		e|		l|		m|		e|		e|		e|		q|		 |		 |		 |		a|		n|		i|		o|		t|
+;		 |		 |		 |		 |		o|		e|		d|		q|		q|		 |		 |		 |		 |		b|		r|		o|		b|		i|
+;		 |		 |		 |		 |		c|		 |		 |		 |		 |		 |		 |		 |		 |		l|		 |		n|		 |		m|
+;		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		e|		 |		 |		 |		e|
+;StartTime: Mon Nov 03 00:00:00 CET 2008																																				
+;PUSpeed: 1					
+;Application: 1 src/experiments/simpat2014/workload/hpl.xml		
+;Application: 2 src/experiments/simpat2014/workload/openssl.xml			
+;Application: 3 src/experiments/simpat2014/workload/ep.xml																														
+		0		100		-1		1800		8		-1		-1		8		1800		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1		100		-1		1800		8		-1		-1		8		1800		-1		-1		-1		-1		1		-1		-1		-1		-1
+		2		100		-1		1800		8		-1		-1		8		1800		-1		-1		-1		-1		1		-1		-1		-1		-1
+		3		100		-1		1800		8		-1		-1		8		1800		-1		-1		-1		-1		1		-1		-1		-1		-1		
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadMedium.swf
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadMedium.swf	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadMedium.swf	(revision 1500)
@@ -0,0 +1,234 @@
+;Automatically generated workload description by the Data Center Workload and Resource Management Simulator																																				
+;		j|		s|		w|		r|		c|		c|		m|		p|		t|		m|		s|		u|		g|		e|		q|		p|		p|		t|
+;		o|		u|		a|		u|		p|		p|		e|		r|		i|		e|		t|		i|		i|		x|		u|		a|		r|		h|
+;		b|		b|		i|		n|		u|		u|		m|		o|		m|		m|		a|		d|		d|		e|		e|		r|		e|		i|
+;		 |		m|		t|		t|		 |		 |		 |		c|		e|		 |		t|		 |		 |		c|		u|		t|		c|		n|
+;		 |		i|		 |		i|		a|		t|		u|		 |		 |		r|		u|		 |		 |		u|		e|		i|		 |		k|
+;		 |		t|		 |		m|		l|		i|		s|		r|		r|		e|		s|		 |		 |		t|		 |		t|		j|		 |
+;		 |		 |		 |		e|		l|		m|		e|		e|		e|		q|		 |		 |		 |		a|		n|		i|		o|		t|
+;		 |		 |		 |		 |		o|		e|		d|		q|		q|		 |		 |		 |		 |		b|		r|		o|		b|		i|
+;		 |		 |		 |		 |		c|		 |		 |		 |		 |		 |		 |		 |		 |		l|		 |		n|		 |		m|
+;		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		e|		 |		 |		 |		e|
+;PUSpeed: 1																																				
+;StartTime: Tue Oct 8 10:00:00 CET 2013		
+;Application: 1 src/experiments/simpat2014/workload/openssl.xml																																			
+;Application: 2 src/experiments/simpat2014/workload/hpl.xml				
+;Application: 3 src/experiments/simpat2014/workload/ep.xml																																						
+		0		0		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1		0		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		2		1		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		3		1		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		4		1		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		5		2		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		6		3		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		7		3		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		8		4		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		9		5		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		10		6		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		11		6		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		12		7		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		13		8		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		14		9		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		15		9		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		16		9		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		17		10		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		18		10		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		19		10		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		20		11		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		21		12		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		22		13		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		23		14		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		24		15		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		25		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		26		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		27		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		28		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		29		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		30		16		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		31		16		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		32		17		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		33		17		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		34		17		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		35		18		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		36		18		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		37		18		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		38		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		39		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		40		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		41		19		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		42		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		43		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		44		20		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		45		20		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		46		20		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		47		21		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		48		21		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		49		22		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		50		22		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		51		22		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		52		23		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		53		23		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		54		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		55		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		56		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		57		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		58		24		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		59		25		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		60		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		61		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		62		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		63		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		64		27		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		65		28		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		66		29		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		67		30		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		68		30		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		69		31		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		70		32		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		71		33		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		72		34		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		73		34		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		74		34		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		75		35		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		76		35		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		77		36		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		78		36		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		79		37		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		80		38		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		81		38		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		82		38		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		83		39		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		84		40		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		85		41		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		86		41		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		87		41		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		88		42		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		89		43		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		90		44		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		91		44		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		92		44		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		93		44		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		94		45		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		95		46		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		96		46		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		97		46		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		98		47		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		99		48		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		100		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		101		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		102		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		103		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		104		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		105		50		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		106		51		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		107		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		108		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		109		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		110		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		111		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		112		52		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		113		53		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		114		53		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		115		54		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		116		54		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		117		54		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		118		55		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		119		56		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		120		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		121		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		122		57		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		123		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		124		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		125		58		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		126		58		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		127		59		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		128		59		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		129		60		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		130		61		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		131		62		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		132		62		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		133		63		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		134		64		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		135		64		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		136		64		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		137		64		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		138		65		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		139		66		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		140		66		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		141		67		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		142		68		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		143		69		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		144		70		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		145		71		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		146		72		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		147		73		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		148		73		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		149		74		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		150		74		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		151		75		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		152		76		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		153		77		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		154		78		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		155		79		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		156		79		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		157		80		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		158		81		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		159		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		160		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		161		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		162		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		163		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		164		82		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		165		83		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		166		83		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		167		84		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		168		85		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		169		85		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		170		86		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		171		86		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		172		86		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		173		87		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		174		87		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		175		87		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		176		87		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		177		88		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		178		88		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		179		89		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		180		89		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		181		90		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		182		90		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		183		90		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		184		90		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		185		91		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		186		91		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		187		91		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		188		92		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		189		92		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		190		92		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		191		92		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		192		93		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		193		93		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		194		94		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		195		95		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		196		95		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		197		95		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		198		95		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		199		95		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		200		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		201		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		202		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		203		96		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		204		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		205		97		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		206		98		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		207		98		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		208		99		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		209		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		210		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		211		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		212		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		213		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		214		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		215		101		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		216		102		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		217		102		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/hpl.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/hpl.xml	(revision 1470)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/hpl.xml	(revision 1470)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<job id="frame1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:noNamespaceSchemaLocation="../QCGJobDescriptionSchemaNew.xsd">
+	<task id="common/scripts/hpl">
+		<execution>
+		   <resourceConsumptionProfile type="Core i7 - 3615QE">
+                <properties name="usefulWork">2000</properties>
+                <resourceConsumption>
+                    <referenceHardware>
+                        <reference name="cpu_cores">1</reference>
+                        <reference name="cpu_maxfreq">2300</reference>
+                    </referenceHardware>
+                    <duration>PT1800S</duration>
+                    <behaviour name="PM_CPU_Usage">
+                        <value>0.98</value>
+                    </behaviour>
+                    <behaviour name="PM_Threads">
+  						<value>8</value>
+  					</behaviour>    
+                </resourceConsumption>
+            </resourceConsumptionProfile>             
+		</execution>
+	</task>
+</job>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/openssl.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/openssl.xml	(revision 1470)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/openssl.xml	(revision 1470)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<job id="frame1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:noNamespaceSchemaLocation="../QCGJobDescriptionSchemaNew.xsd">
+	<task id="common/scripts/openssl">
+		<execution>
+		   <resourceConsumptionProfile type="Core i7 - 3615QE">
+                <properties name="usefulWork">100</properties>
+                <resourceConsumption>
+                    <referenceHardware>
+                        <reference name="cpu_cores">1</reference>
+                        <reference name="cpu_maxfreq">2300</reference>
+                    </referenceHardware>
+                    <duration>PT180S</duration>
+                    <behaviour name="PM_CPU_Usage">
+                        <value>0.123</value>
+                    </behaviour>
+                    <behaviour name="PM_Threads">
+  						<value>1</value>
+  					</behaviour>    
+                </resourceConsumption>
+            </resourceConsumptionProfile>             
+		</execution>
+	</task>
+</job>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/ep.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/ep.xml	(revision 1470)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/ep.xml	(revision 1470)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<job id="frame1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:noNamespaceSchemaLocation="../QCGJobDescriptionSchemaNew.xsd">
+	<task id="common/scripts/ep">
+		<execution>
+		   <resourceConsumptionProfile type="Core i7 - 3615QE">
+                <properties name="usefulWork">1000</properties>
+                <resourceConsumption>
+                    <referenceHardware>
+                        <reference name="cpu_cores">1</reference>
+                        <reference name="cpu_maxfreq">2300</reference>
+                    </referenceHardware>
+                    <duration>PT720S</duration>
+                    <behaviour name="PM_CPU_Usage">
+                        <value>0.84</value>
+                    </behaviour>
+                    <behaviour name="PM_Threads">
+  						<value>8</value>
+  					</behaviour>    
+                </resourceConsumption>
+            </resourceConsumptionProfile>             
+		</execution>
+	</task>
+</job>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/hot.xml
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/hot.xml	(revision 1470)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/hot.xml	(revision 1470)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<job id="frame1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:noNamespaceSchemaLocation="../QCGJobDescriptionSchemaNew.xsd">
+	<task id="common/scripts/hot">
+		<execution>
+		   <resourceConsumptionProfile type="Core i7 - 3615QE">
+                <properties name="usefulWork">2000</properties>
+                <resourceConsumption>
+                    <referenceHardware>
+                        <reference name="cpu_cores">1</reference>
+                        <reference name="cpu_maxfreq">2300</reference>
+                    </referenceHardware>
+                    <duration>PT1000S</duration>
+                    <behaviour name="PM_CPU_Usage">
+                        <value>0.8</value>
+                    </behaviour>
+                    <behaviour name="PM_Threads">
+  						<value>1</value>
+  					</behaviour>    
+                </resourceConsumption>
+            </resourceConsumptionProfile>             
+		</execution>
+	</task>
+</job>
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadOk.swf
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadOk.swf	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadOk.swf	(revision 1500)
@@ -0,0 +1,176 @@
+;Automatically generated workload description by the Data Center Workload and Resource Management Simulator																																				
+;		j|		s|		w|		r|		c|		c|		m|		p|		t|		m|		s|		u|		g|		e|		q|		p|		p|		t|
+;		o|		u|		a|		u|		p|		p|		e|		r|		i|		e|		t|		i|		i|		x|		u|		a|		r|		h|
+;		b|		b|		i|		n|		u|		u|		m|		o|		m|		m|		a|		d|		d|		e|		e|		r|		e|		i|
+;		 |		m|		t|		t|		 |		 |		 |		c|		e|		 |		t|		 |		 |		c|		u|		t|		c|		n|
+;		 |		i|		 |		i|		a|		t|		u|		 |		 |		r|		u|		 |		 |		u|		e|		i|		 |		k|
+;		 |		t|		 |		m|		l|		i|		s|		r|		r|		e|		s|		 |		 |		t|		 |		t|		j|		 |
+;		 |		 |		 |		e|		l|		m|		e|		e|		e|		q|		 |		 |		 |		a|		n|		i|		o|		t|
+;		 |		 |		 |		 |		o|		e|		d|		q|		q|		 |		 |		 |		 |		b|		r|		o|		b|		i|
+;		 |		 |		 |		 |		c|		 |		 |		 |		 |		 |		 |		 |		 |		l|		 |		n|		 |		m|
+;		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		e|		 |		 |		 |		e|
+;PUSpeed: 1																																				
+;StartTime: Tue Oct 8 10:00:00 CET 2013																																				
+;Application: 1 src/experiments/simpat2014/workload/openssl.xml																																				
+;Application: 2 src/experiments/simpat2014/workload/hpl.xml																																				
+;Application: 3 src/experiments/simpat2014/workload/ep.xml																																				
+		0		3		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1		7		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		2		11		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		3		16		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		4		20		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		5		22		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		6		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		7		31		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		8		35		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		9		38		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		10		44		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		11		47		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		12		50		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		13		54		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		14		58		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		15		61		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		16		63		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		17		67		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		18		73		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		19		79		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		20		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		21		86		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		22		92		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		23		98		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		24		101		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		25		106		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		26		108		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		27		112		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		28		118		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		29		121		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		30		125		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		31		129		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		32		134		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		33		137		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		34		141		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		35		146		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		36		148		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		37		152		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		38		157		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		39		158		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		40		160		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		41		164		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		42		167		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		43		170		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		44		174		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		45		178		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		46		182		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		47		184		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		48		190		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		49		196		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		50		201		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		51		204		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		52		208		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		53		213		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		54		218		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		55		219		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		56		223		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		57		227		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		58		233		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		59		236		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		60		240		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		61		243		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		62		247		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		63		251		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		64		256		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		65		258		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		66		264		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		67		269		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		68		274		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		69		278		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		70		282		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		71		288		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		72		292		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		73		298		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		74		302		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		75		307		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		76		309		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		77		311		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		78		316		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		79		318		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		80		324		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		81		327		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		82		331		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		83		336		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		84		338		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		85		341		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		86		342		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		87		347		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		88		353		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		89		359		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		90		363		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		91		369		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		92		373		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		93		379		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		94		382		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		95		388		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		96		392		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		97		395		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		98		396		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		99		398		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		100		402		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		101		408		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		102		414		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		103		417		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		104		423		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		105		427		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		106		431		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		107		434		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		108		439		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		109		445		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		110		451		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		111		457		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		112		461		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		113		465		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		114		471		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		115		473		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		116		475		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		117		480		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		118		485		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		119		486		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		120		490		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		121		496		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		122		499		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		123		504		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		124		506		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		125		511		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		126		516		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		127		519		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		128		525		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		129		531		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		130		537		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		131		539		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		132		543		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		133		549		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		134		551		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		135		556		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		136		561		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		137		567		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		138		571		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		139		575		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		140		581		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		141		586		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		142		590		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		143		596		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		144		601		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		145		606		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		146		609		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		147		611		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		148		614		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		149		615		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		150		616		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		151		621		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		152		626		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		153		630		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		154		632		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		155		635		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		156		638		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		157		642		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		158		646		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		159		648		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadLarge.swf
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadLarge.swf	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/workload/workloadLarge.swf	(revision 1500)
@@ -0,0 +1,1296 @@
+;Automatically generated workload description by the Data Center Workload and Resource Management Simulator																																				
+;		j|		s|		w|		r|		c|		c|		m|		p|		t|		m|		s|		u|		g|		e|		q|		p|		p|		t|
+;		o|		u|		a|		u|		p|		p|		e|		r|		i|		e|		t|		i|		i|		x|		u|		a|		r|		h|
+;		b|		b|		i|		n|		u|		u|		m|		o|		m|		m|		a|		d|		d|		e|		e|		r|		e|		i|
+;		 |		m|		t|		t|		 |		 |		 |		c|		e|		 |		t|		 |		 |		c|		u|		t|		c|		n|
+;		 |		i|		 |		i|		a|		t|		u|		 |		 |		r|		u|		 |		 |		u|		e|		i|		 |		k|
+;		 |		t|		 |		m|		l|		i|		s|		r|		r|		e|		s|		 |		 |		t|		 |		t|		j|		 |
+;		 |		 |		 |		e|		l|		m|		e|		e|		e|		q|		 |		 |		 |		a|		n|		i|		o|		t|
+;		 |		 |		 |		 |		o|		e|		d|		q|		q|		 |		 |		 |		 |		b|		r|		o|		b|		i|
+;		 |		 |		 |		 |		c|		 |		 |		 |		 |		 |		 |		 |		 |		l|		 |		n|		 |		m|
+;		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		 |		e|		 |		 |		 |		e|
+;PUSpeed: 1																																				
+;StartTime: Tue Oct 8 10:00:00 CET 2013		
+;Application: 1 src/experiments/simpat2014/workload/openssl.xml																																			
+;Application: 2 src/experiments/simpat2014/workload/hpl.xml				
+;Application: 3 src/experiments/simpat2014/workload/ep.xml																																						
+		0		0		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1		0		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		2		1		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		3		1		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		4		1		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		5		2		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		6		3		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		7		3		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		8		4		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		9		5		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		10		6		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		11		6		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		12		7		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		13		8		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		14		9		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		15		9		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		16		9		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		17		10		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		18		10		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		19		10		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		20		11		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		21		12		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		22		13		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		23		14		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		24		15		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		25		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		26		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		27		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		28		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		29		15		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		30		16		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		31		16		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		32		17		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		33		17		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		34		17		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		35		18		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		36		18		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		37		18		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		38		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		39		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		40		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		41		19		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		42		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		43		19		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		44		20		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		45		20		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		46		20		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		47		21		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		48		21		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		49		22		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		50		22		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		51		22		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		52		23		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		53		23		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		54		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		55		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		56		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		57		24		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		58		24		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		59		25		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		60		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		61		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		62		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		63		26		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		64		27		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		65		28		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		66		29		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		67		30		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		68		30		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		69		31		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		70		32		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		71		33		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		72		34		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		73		34		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		74		34		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		75		35		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		76		35		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		77		36		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		78		36		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		79		37		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		80		38		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		81		38		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		82		38		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		83		39		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		84		40		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		85		41		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		86		41		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		87		41		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		88		42		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		89		43		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		90		44		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		91		44		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		92		44		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		93		44		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		94		45		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		95		46		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		96		46		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		97		46		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		98		47		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		99		48		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		100		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		101		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		102		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		103		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		104		49		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		105		50		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		106		51		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		107		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		108		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		109		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		110		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		111		51		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		112		52		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		113		53		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		114		53		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		115		54		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		116		54		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		117		54		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		118		55		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		119		56		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		120		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		121		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		122		57		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		123		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		124		57		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		125		58		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		126		58		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		127		59		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		128		59		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		129		60		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		130		61		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		131		62		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		132		62		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		133		63		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		134		64		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		135		64		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		136		64		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		137		64		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		138		65		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		139		66		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		140		66		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		141		67		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		142		68		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		143		69		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		144		70		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		145		71		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		146		72		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		147		73		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		148		73		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		149		74		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		150		74		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		151		75		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		152		76		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		153		77		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		154		78		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		155		79		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		156		79		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		157		80		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		158		81		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		159		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		160		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		161		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		162		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		163		82		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		164		82		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		165		83		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		166		83		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		167		84		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		168		85		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		169		85		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		170		86		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		171		86		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		172		86		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		173		87		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		174		87		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		175		87		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		176		87		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		177		88		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		178		88		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		179		89		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		180		89		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		181		90		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		182		90		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		183		90		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		184		90		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		185		91		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		186		91		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		187		91		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		188		92		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		189		92		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		190		92		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		191		92		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		192		93		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		193		93		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		194		94		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		195		95		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		196		95		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		197		95		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		198		95		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		199		95		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		200		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		201		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		202		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		203		96		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		204		96		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		205		97		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		206		98		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		207		98		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		208		99		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		209		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		210		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		211		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		212		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		213		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		214		100		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		215		101		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		216		102		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		217		102		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		218		103		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		219		103		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		220		104		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		221		104		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		222		104		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		223		105		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		224		106		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		225		106		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		226		106		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		227		107		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		228		107		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		229		107		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		230		108		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		231		109		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		232		110		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		233		111		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		234		112		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		235		113		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		236		113		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		237		113		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		238		114		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		239		115		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		240		115		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		241		116		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		242		116		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		243		116		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		244		116		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		245		116		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		246		117		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		247		117		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		248		118		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		249		119		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		250		119		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		251		120		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		252		121		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		253		121		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		254		121		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		255		121		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		256		122		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		257		122		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		258		122		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		259		123		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		260		123		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		261		123		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		262		123		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		263		124		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		264		125		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		265		125		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		266		125		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		267		126		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		268		126		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		269		127		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		270		127		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		271		128		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		272		128		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		273		128		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		274		128		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		275		128		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		276		129		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		277		130		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		278		131		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		279		132		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		280		133		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		281		133		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		282		134		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		283		135		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		284		136		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		285		136		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		286		136		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		287		137		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		288		137		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		289		137		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		290		138		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		291		139		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		292		139		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		293		140		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		294		141		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		295		141		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		296		142		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		297		143		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		298		143		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		299		143		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		300		143		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		301		144		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		302		144		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		303		144		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		304		144		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		305		145		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		306		145		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		307		145		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		308		145		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		309		145		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		310		146		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		311		146		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		312		146		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		313		147		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		314		147		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		315		148		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		316		148		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		317		148		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		318		149		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		319		149		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		320		149		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		321		150		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		322		150		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		323		151		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		324		151		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		325		151		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		326		152		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		327		152		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		328		152		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		329		152		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		330		152		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		331		152		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		332		153		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		333		154		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		334		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		335		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		336		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		337		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		338		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		339		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		340		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		341		155		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		342		156		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		343		157		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		344		157		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		345		157		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		346		158		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		347		158		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		348		159		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		349		159		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		350		159		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		351		160		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		352		160		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		353		160		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		354		160		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		355		160		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		356		161		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		357		162		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		358		163		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		359		164		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		360		164		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		361		165		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		362		166		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		363		166		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		364		166		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		365		166		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		366		167		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		367		168		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		368		168		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		369		168		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		370		169		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		371		169		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		372		169		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		373		169		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		374		169		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		375		169		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		376		170		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		377		171		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		378		171		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		379		172		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		380		173		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		381		174		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		382		174		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		383		175		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		384		176		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		385		176		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		386		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		387		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		388		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		389		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		390		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		391		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		392		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		393		177		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		394		178		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		395		179		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		396		179		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		397		179		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		398		180		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		399		180		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		400		181		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		401		181		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		402		182		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		403		183		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		404		183		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		405		183		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		406		184		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		407		185		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		408		185		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		409		186		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		410		186		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		411		186		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		412		187		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		413		188		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		414		189		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		415		190		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		416		191		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		417		192		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		418		193		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		419		193		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		420		193		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		421		194		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		422		195		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		423		195		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		424		195		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		425		196		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		426		197		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		427		197		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		428		197		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		429		197		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		430		198		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		431		198		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		432		199		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		433		199		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		434		199		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		435		199		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		436		200		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		437		200		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		438		200		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		439		201		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		440		201		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		441		201		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		442		202		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		443		202		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		444		203		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		445		203		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		446		204		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		447		204		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		448		204		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		449		205		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		450		206		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		451		207		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		452		207		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		453		208		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		454		209		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		455		210		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		456		210		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		457		210		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		458		211		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		459		212		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		460		212		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		461		212		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		462		213		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		463		213		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		464		214		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		465		215		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		466		215		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		467		216		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		468		216		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		469		216		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		470		216		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		471		217		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		472		217		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		473		218		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		474		219		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		475		220		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		476		221		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		477		222		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		478		222		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		479		222		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		480		223		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		481		223		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		482		223		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		483		223		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		484		224		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		485		224		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		486		224		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		487		225		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		488		225		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		489		226		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		490		227		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		491		227		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		492		227		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		493		227		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		494		227		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		495		227		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		496		228		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		497		229		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		498		229		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		499		230		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		500		231		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		501		231		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		502		231		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		503		232		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		504		233		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		505		234		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		506		235		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		507		236		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		508		236		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		509		236		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		510		236		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		511		236		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		512		236		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		513		237		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		514		238		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		515		239		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		516		240		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		517		241		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		518		242		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		519		243		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		520		244		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		521		244		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		522		244		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		523		244		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		524		245		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		525		246		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		526		247		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		527		247		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		528		247		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		529		248		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		530		249		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		531		250		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		532		250		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		533		250		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		534		250		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		535		251		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		536		252		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		537		253		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		538		253		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		539		254		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		540		255		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		541		256		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		542		256		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		543		257		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		544		257		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		545		257		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		546		257		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		547		257		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		548		257		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		549		257		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		550		258		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		551		258		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		552		258		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		553		258		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		554		259		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		555		260		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		556		260		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		557		260		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		558		260		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		559		260		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		560		261		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		561		261		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		562		262		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		563		262		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		564		262		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		565		263		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		566		263		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		567		264		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		568		265		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		569		265		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		570		265		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		571		266		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		572		267		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		573		268		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		574		268		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		575		269		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		576		270		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		577		271		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		578		271		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		579		272		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		580		272		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		581		273		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		582		273		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		583		274		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		584		274		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		585		275		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		586		276		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		587		277		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		588		278		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		589		278		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		590		278		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		591		279		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		592		279		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		593		279		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		594		280		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		595		280		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		596		280		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		597		281		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		598		281		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		599		282		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		600		282		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		601		283		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		602		283		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		603		284		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		604		284		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		605		284		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		606		284		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		607		284		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		608		285		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		609		286		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		610		286		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		611		286		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		612		287		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		613		287		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		614		288		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		615		288		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		616		289		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		617		290		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		618		290		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		619		291		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		620		291		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		621		292		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		622		292		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		623		292		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		624		292		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		625		292		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		626		293		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		627		294		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		628		294		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		629		295		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		630		296		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		631		296		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		632		296		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		633		297		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		634		297		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		635		297		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		636		297		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		637		298		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		638		299		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		639		299		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		640		300		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		641		300		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		642		300		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		643		300		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		644		300		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		645		301		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		646		301		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		647		301		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		648		302		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		649		303		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		650		304		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		651		305		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		652		305		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		653		305		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		654		306		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		655		307		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		656		308		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		657		308		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		658		308		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		659		308		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		660		308		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		661		309		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		662		309		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		663		310		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		664		310		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		665		310		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		666		311		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		667		311		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		668		312		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		669		312		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		670		313		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		671		314		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		672		314		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		673		314		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		674		315		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		675		315		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		676		316		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		677		317		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		678		318		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		679		318		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		680		319		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		681		319		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		682		320		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		683		321		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		684		321		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		685		322		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		686		323		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		687		324		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		688		324		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		689		325		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		690		325		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		691		325		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		692		326		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		693		327		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		694		328		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		695		329		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		696		330		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		697		331		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		698		331		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		699		331		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		700		331		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		701		331		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		702		332		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		703		333		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		704		334		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		705		334		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		706		335		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		707		336		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		708		336		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		709		336		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		710		336		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		711		337		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		712		338		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		713		339		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		714		339		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		715		339		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		716		340		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		717		341		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		718		342		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		719		343		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		720		344		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		721		344		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		722		345		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		723		345		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		724		345		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		725		345		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		726		345		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		727		345		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		728		346		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		729		347		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		730		347		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		731		347		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		732		348		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		733		349		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		734		349		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		735		349		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		736		350		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		737		350		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		738		351		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		739		352		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		740		353		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		741		354		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		742		355		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		743		356		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		744		356		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		745		356		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		746		356		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		747		356		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		748		357		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		749		357		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		750		357		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		751		358		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		752		358		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		753		358		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		754		358		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		755		358		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		756		359		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		757		359		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		758		359		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		759		360		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		760		360		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		761		361		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		762		361		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		763		361		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		764		361		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		765		361		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		766		362		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		767		363		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		768		364		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		769		364		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		770		364		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		771		365		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		772		365		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		773		366		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		774		366		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		775		367		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		776		368		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		777		369		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		778		369		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		779		370		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		780		370		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		781		370		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		782		371		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		783		372		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		784		373		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		785		374		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		786		375		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		787		376		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		788		376		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		789		376		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		790		376		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		791		376		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		792		377		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		793		378		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		794		378		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		795		379		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		796		379		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		797		379		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		798		380		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		799		380		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		800		381		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		801		382		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		802		383		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		803		384		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		804		384		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		805		385		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		806		386		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		807		387		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		808		387		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		809		387		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		810		388		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		811		388		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		812		388		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		813		389		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		814		390		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		815		391		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		816		391		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		817		391		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		818		391		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		819		392		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		820		392		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		821		392		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		822		393		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		823		393		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		824		394		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		825		395		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		826		395		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		827		396		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		828		396		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		829		397		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		830		397		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		831		398		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		832		398		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		833		399		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		834		400		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		835		401		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		836		401		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		837		401		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		838		401		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		839		402		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		840		403		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		841		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		842		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		843		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		844		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		845		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		846		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		847		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		848		404		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		849		405		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		850		406		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		851		406		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		852		406		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		853		406		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		854		406		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		855		407		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		856		408		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		857		409		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		858		409		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		859		410		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		860		411		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		861		412		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		862		413		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		863		413		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		864		414		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		865		414		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		866		414		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		867		414		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		868		414		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		869		415		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		870		416		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		871		416		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		872		416		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		873		417		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		874		417		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		875		417		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		876		417		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		877		417		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		878		418		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		879		418		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		880		418		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		881		419		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		882		419		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		883		419		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		884		420		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		885		420		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		886		421		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		887		421		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		888		422		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		889		423		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		890		423		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		891		424		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		892		425		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		893		426		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		894		426		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		895		426		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		896		427		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		897		428		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		898		428		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		899		429		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		900		430		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		901		430		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		902		431		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		903		432		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		904		432		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		905		432		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		906		432		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		907		433		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		908		433		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		909		433		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		910		434		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		911		435		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		912		435		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		913		435		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		914		435		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		915		436		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		916		436		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		917		436		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		918		437		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		919		437		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		920		438		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		921		439		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		922		439		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		923		440		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		924		440		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		925		440		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		926		441		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		927		442		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		928		442		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		929		443		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		930		443		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		931		443		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		932		443		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		933		444		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		934		444		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		935		444		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		936		444		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		937		445		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		938		445		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		939		445		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		940		445		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		941		446		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		942		446		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		943		446		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		944		446		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		945		446		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		946		446		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		947		447		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		948		448		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		949		448		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		950		448		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		951		448		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		952		448		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		953		448		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		954		449		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		955		450		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		956		451		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		957		452		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		958		452		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		959		452		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		960		453		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		961		454		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		962		455		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		963		455		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		964		455		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		965		455		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		966		455		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		967		456		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		968		456		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		969		456		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		970		457		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		971		458		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		972		459		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		973		459		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		974		460		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		975		461		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		976		461		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		977		462		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		978		463		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		979		464		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		980		465		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		981		466		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		982		466		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		983		466		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		984		466		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		985		467		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		986		467		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		987		467		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		988		468		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		989		469		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		990		469		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		991		470		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		992		471		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		993		472		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		994		473		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		995		474		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		996		475		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		997		475		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		998		475		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		999		476		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1000		476		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1001		476		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1002		476		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1003		476		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1004		477		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1005		478		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1006		479		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1007		480		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1008		480		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1009		481		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1010		481		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1011		482		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1012		482		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1013		482		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1014		482		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1015		482		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1016		483		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1017		483		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1018		483		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1019		483		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1020		483		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1021		484		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1022		485		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1023		485		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1024		486		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1025		487		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1026		487		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1027		487		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1028		488		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1029		488		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1030		489		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1031		490		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1032		491		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1033		492		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1034		492		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1035		492		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1036		492		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1037		492		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1038		493		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1039		494		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1040		495		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1041		496		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1042		496		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1043		497		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1044		498		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1045		498		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1046		499		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1047		499		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1048		500		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1049		501		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1050		501		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1051		502		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1052		502		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1053		502		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1054		503		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1055		504		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1056		505		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1057		505		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1058		506		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1059		506		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1060		507		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1061		508		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1062		509		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1063		509		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1064		510		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1065		511		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1066		511		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1067		512		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1068		513		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1069		513		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1070		514		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1071		515		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1072		516		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1073		516		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1074		517		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1075		517		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1076		518		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1077		519		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1078		520		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1079		520		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1080		521		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1081		522		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1082		522		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1083		523		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1084		523		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1085		524		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1086		524		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1087		525		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1088		526		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1089		526		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1090		527		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1091		528		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1092		528		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1093		528		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1094		528		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1095		528		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1096		528		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1097		529		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1098		530		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1099		531		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1100		532		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1101		532		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1102		533		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1103		533		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1104		534		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1105		534		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1106		534		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1107		534		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1108		535		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1109		536		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1110		536		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1111		537		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1112		538		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1113		538		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1114		538		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1115		538		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1116		538		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1117		539		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1118		539		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1119		539		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1120		539		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1121		540		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1122		540		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1123		541		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1124		542		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1125		543		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1126		544		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1127		545		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1128		546		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1129		546		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1130		547		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1131		548		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1132		548		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1133		548		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1134		549		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1135		550		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1136		550		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1137		550		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1138		551		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1139		552		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1140		552		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1141		552		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1142		553		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1143		553		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1144		553		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1145		553		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1146		554		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1147		555		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1148		556		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1149		556		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1150		557		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1151		558		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1152		559		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1153		560		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1154		560		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1155		560		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1156		560		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1157		560		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1158		560		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1159		560		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1160		561		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1161		562		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1162		562		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1163		563		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1164		564		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1165		564		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1166		564		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1167		565		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1168		565		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1169		565		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1170		565		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1171		565		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1172		565		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1173		566		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1174		566		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1175		566		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1176		566		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1177		567		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1178		568		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1179		568		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1180		568		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1181		568		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1182		568		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1183		568		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1184		569		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1185		569		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1186		570		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1187		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1188		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1189		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1190		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1191		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1192		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1193		570		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1194		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1195		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1196		570		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1197		571		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1198		571		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1199		572		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1200		573		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1201		574		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1202		575		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1203		576		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1204		577		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1205		577		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1206		577		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1207		577		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1208		577		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1209		577		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1210		577		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1211		578		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1212		578		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1213		578		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1214		578		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1215		578		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1216		578		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1217		579		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1218		580		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1219		580		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1220		580		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1221		581		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1222		582		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1223		582		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1224		583		-1		514		1		-1		-1		1		514		-1		-1		-1		-1		1		-1		-1		-1		-1
+		1225		584		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		2		-1		-1		-1		-1
+		1226		585		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1227		585		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1228		586		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1229		587		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1230		588		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1231		588		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1232		589		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1233		589		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1234		590		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1235		590		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1236		591		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1237		592		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1238		593		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1239		593		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1240		593		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1241		594		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1242		594		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1243		595		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1244		595		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1245		595		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1246		596		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1247		597		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1248		597		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1249		598		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1250		599		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1251		600		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1252		601		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1253		601		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1254		601		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1255		602		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1256		602		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1257		602		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1258		602		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1259		603		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1260		604		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1261		605		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1262		606		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1263		606		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1264		607		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1265		608		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1266		608		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1267		608		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1268		608		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1269		609		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1270		609		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1271		609		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1272		609		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1273		609		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1274		609		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1275		610		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1276		611		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1277		611		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1278		611		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
+		1279		612		-1		514		8		-1		-1		8		514		-1		-1		-1		-1		3		-1		-1		-1		-1
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/CoolingDeviceEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/CoolingDeviceEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/CoolingDeviceEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,486 @@
+package experiments.simpat2014.models.basic;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+
+public class CoolingDeviceEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		return airflow;
+	}
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		
+		Device coolingDevice = (Device) resource;
+		ComputingResource room = (ComputingResource) coolingDevice.getComputingResource();
+		
+		double Pload_dc = calculatePit(room);
+		double Pothers = calculatePothers(Pload_dc);
+		double Pfans_dc = calculatePfans(room);
+		
+		
+		double Pchiller = calculatePchiller(Pload_dc, Pfans_dc, Pothers, room);
+		double Pdry_cooler = calculatePdryCooler(Pload_dc, Pfans_dc, Pothers, room);
+		
+		
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		double Tev = Tr_in - delta_Th_ex;
+		
+		//if data is not present in DB than don't take Pchiller into account
+		if(Tr_in != -1 && Tr_out != -1) {
+			if(Tamb != -1 && Tev - Tamb > 0 && delta_Th_dry_cooler < Tev - Tamb)
+				powerConsumption = Pdry_cooler;
+			else
+				powerConsumption = Pchiller;	
+		}
+		
+		
+		//System.out.println("CoolingDevice heat data: " + Qload_dc + "; " + Qothers + "; " + Qfans_dc + "; " + Qdc);
+		
+		//System.out.println("CoolingDevice power: " + powerConsumption);
+		
+		
+		return powerConsumption;
+	}
+	
+	private double calculatePit(ComputingResource room){
+		double Pload_dc = 0;
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			Pload_dc = Pload_dc + rack.getPowerInterface().getRecentPowerUsage().getValue();
+		}
+		return Pload_dc;
+	}
+	
+	private double calculatePothers(double Pload_dc){
+		
+		double Pothers = 0;
+		
+		double a;//experiment
+		try{
+			a = ConfigurationOptions.coolingData.getAlpha();
+		} catch (Exception e){
+			a = 0.2;
+		}
+
+		Pothers = a * Pload_dc;
+		return Pothers;
+	}
+	
+	private double calculatePfans(ComputingResource room){
+		
+		double Pfans_dc = 0;
+
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			Pfans_dc = delta_p * Vair_total / nf;
+		else {
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(Node node: rack.getNodes()){
+					for(Device device: node.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: node.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				Pfans_dc = delta_p * Vair_total / nf;
+		}
+		return Pfans_dc;
+	}
+	
+	private double calculatePchiller(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+		
+		double Pchiller = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+		
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+		double Qcooling_rated;//DEBB
+		try{
+			Qcooling_rated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCapacityRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			Qcooling_rated = 80000;
+		}
+		
+		double EERrated;//DEBB
+		try{
+			EERrated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("EERRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			EERrated = 5;
+		}
+
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		
+		double Tev;		
+		double CoolT;
+		double Qcooling_nom;
+		double PLR;
+
+		double delta_T;
+		double CoolPR;
+		double CoolPRrated;
+		double CoolPRT;
+		double CoolPRPLR;
+		double EER;
+		
+		
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Tev = Tr_in - delta_Th_ex;
+		double Tevf = 32 + 1.8 * Tev;
+		
+		double Tco = Tamb + delta_Th_dry_cooler;
+		
+		double Tcof = 32 + 1.8 * Tco;
+		CoolT = 0.647177 + 0.015888 * Tevf + 0.000103 * Math.pow(Tevf, 2) - 0.004167 * Tcof + 0.000007 * Math.pow(Tcof, 2) - 0.000064 * Tevf * Tcof;
+		Qcooling_nom = Qcooling_rated * CoolT;		
+		PLR = Qcooling / Qcooling_nom;
+		
+		delta_T = Tcof - Tevf;
+		CoolPRrated = 1 / EERrated;
+		CoolPRT = 0.564064 - 0.011463 * Tevf + 0.000112 * Math.pow(Tevf, 2) + 0.008091 * Tcof + 0.000070 * Math.pow(Tcof, 2) - 0.000126 * Tevf * Tcof;
+		CoolPRPLR = 0.023918 + 0.889469 * PLR + 0.077931 * Math.pow(PLR, 2) - 0.000264 * delta_T + 0.000007 * Math.pow(delta_T, 2) + 0.000180 * PLR * delta_T;
+		CoolPR = CoolPRrated * CoolPRT * CoolPRPLR;
+		EER = 1/CoolPR;
+		
+		Pchiller = Qcooling/EER;
+
+		return Pchiller;
+	}
+	
+	private double calculatePdryCooler(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Pdry_cooler = 0;
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double n_dry_cooler;//DEBB
+		try{
+			 n_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("dryCoolerEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			 n_dry_cooler = 0.02;
+		}
+
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Pdry_cooler = n_dry_cooler * Qcooling;
+		
+		return Pdry_cooler;
+	}
+	
+	private double calculateQ(double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Qdc = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+
+		/**************** HEAT ****************/
+		
+		double Qload_dc = 0;
+		double Qothers = 0;
+		double Qfans_dc = 0;
+
+		double delta_2; //DEBB - currently not present;
+		delta_2 = 0.4;
+		
+		for(ComputingResource cr: room.getChildren()){
+			double QnodeGroup = 0;
+			Rack rack = (Rack)cr;
+			for(Node node: rack.getNodes()){
+				double Qnodes = 0;
+
+				double Qcpu = 0;
+				for(Processor proc: node.getProcessors()){
+					Qcpu = Qcpu + proc.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				Qnodes = Qnodes + Qcpu;
+				
+				double Qfans = 0;
+				for(Device device: node.getResourceCharacteristic().getDevices()){
+					Fan fan = (Fan) device;
+					if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){
+						try {
+							Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+						} catch (NoSuchFieldException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					}else
+						Qfans = Qfans + (1 - delta_2) * fan.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				QnodeGroup = QnodeGroup + Qnodes + Qfans;
+			}
+			int nrOfPoweredOffNodes = 0;
+			for(Node node: rack.getNodes()){
+				if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+					nrOfPoweredOffNodes++;
+				}
+			}
+			if(nrOfPoweredOffNodes != rack.getNodes().size()){
+				Qload_dc  = Qload_dc + QnodeGroup + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION;
+			} else {
+				Qload_dc  = Qload_dc + QnodeGroup;
+			}
+		}
+		
+		Qothers = Pothers;
+		
+		Qfans_dc = (1 - nf) * Pfans_dc;
+		
+		Qdc = Qload_dc + Qothers + Qfans_dc;
+
+		
+		return Qdc;
+	}
+	
+	
+	private double calculateQ2(ComputingResource room){
+
+		double Qdc = 0;
+
+		double mair_total;
+		double Vair_total;
+		double ro = 1.168;//constant
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(Vair_total != -1) {
+			mair_total = Vair_total * ro;
+		}
+		else {
+	
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(Node node: rack.getNodes()){
+					for(Device device: node.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: node.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+		}
+		
+		double Cp = 1004;//constant
+
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+
+		Qdc = mair_total * Cp * (Tr_out - Tr_in);
+		
+		return Qdc;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/DataCenterEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/DataCenterEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/DataCenterEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,515 @@
+package experiments.simpat2014.models.basic;
+
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+
+public class DataCenterEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double Pdc;
+		
+		double Pload_dc = 0;
+		double Pothers = 0;
+		double Pfans_dc = 0;
+		double Pcooling_device = 0;
+
+		ComputingResource room = (ComputingResource) resource;
+		
+		/**************** IT PART ****************/
+		
+		/*********** Pload_dc ***********/
+		Pload_dc = calculatePit(room);
+
+		
+		
+		/**************** NON- IT PART ****************/
+		
+		/*********** Pothers ***********/		
+		Pothers = calculatePothers(Pload_dc);
+		
+		
+		
+		/************* COOLING PART *************/
+
+		
+		/*********** Pfans_dc ***********/
+		Pfans_dc = calculatePfans(room);
+		
+		/************ Pcooling_device ************/
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		
+		double Pchiller = calculatePchiller(Pload_dc, Pfans_dc, Pothers, room);
+		double Pdry_cooler = calculatePdryCooler(Pload_dc, Pfans_dc, Pothers, room);
+		
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		double Tev = Tr_in - delta_Th_ex;
+
+		
+		//if data not present in DB than don't take Pchiller into account
+		if(Tr_in != -1 && Tr_out != -1) {
+			if(Tamb != -1 && Tev - Tamb > 0 && delta_Th_dry_cooler < Tev - Tamb)
+				Pcooling_device = Pdry_cooler;
+			else
+				Pcooling_device = Pchiller;	
+		}
+		
+
+		Pdc = Pload_dc + Pothers + Pfans_dc + Pcooling_device;
+		//System.out.println("---");
+		//System.out.println("Pdry_cooler: " + Pdry_cooler + " Pchiller: "+ Pchiller);
+		//System.out.println("Pdc: " + Pdc + " Pload_dc: "+ Pload_dc + " Pothers: " + Pothers + " Pfans_dc: " + Pfans_dc + " Pcooling_device: " + Pcooling_device);
+		
+		//System.out.println("CB2 heat: " + Qload_dc + "; " + Qothers + "; " + Qfans_dc + "; " + Qdc);
+		//System.out.println("CB2 power: " + Pload_dc + "; " + Pothers + "; " + Pfans_dc + "; " + Pcooling_device + "; " + Pdc);
+
+		return Pdc;
+	}
+	
+	private double calculatePit(ComputingResource room){
+		double Pload_dc = 0;
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			Pload_dc = Pload_dc + rack.getPowerInterface().getRecentPowerUsage().getValue();
+		}
+		return Pload_dc;
+	}
+	
+	private double calculatePothers(double Pload_dc){
+		
+		double Pothers = 0;
+		
+		double a;//experiment
+		try{
+			a = ConfigurationOptions.coolingData.getAlpha();
+		} catch (Exception e){
+			a = 0.2;
+		}
+
+		Pothers = a * Pload_dc;
+		return Pothers;
+	}
+	
+	private double calculatePfans(ComputingResource room){
+		
+		double Pfans_dc = 0;
+
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			Pfans_dc = delta_p * Vair_total / nf;
+		else {
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(Node node: rack.getNodes()){
+					for(Device device: node.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: node.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				Pfans_dc = delta_p * Vair_total / nf;
+		}
+		return Pfans_dc;
+	}
+	
+	private double calculatePchiller(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+		
+		double Pchiller = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+		
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+		double Qcooling_rated;//DEBB
+		try{
+			Qcooling_rated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCapacityRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			Qcooling_rated = 80000;
+		}
+		
+		double EERrated;//DEBB
+		try{
+			EERrated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("EERRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			EERrated = 5;
+		}
+
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		
+		double Tev;		
+		double CoolT;
+		double Qcooling_nom;
+		double PLR;
+
+		double delta_T;
+		double CoolPR;
+		double CoolPRrated;
+		double CoolPRT;
+		double CoolPRPLR;
+		double EER;
+		
+		
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Tev = Tr_in - delta_Th_ex;
+		double Tevf = 32 + 1.8 * Tev;
+		
+		double Tco = Tamb + delta_Th_dry_cooler;
+		
+		double Tcof = 32 + 1.8 * Tco;
+		CoolT = 0.647177 + 0.015888 * Tevf + 0.000103 * Math.pow(Tevf, 2) - 0.004167 * Tcof + 0.000007 * Math.pow(Tcof, 2) - 0.000064 * Tevf * Tcof;
+		Qcooling_nom = Qcooling_rated * CoolT;		
+		PLR = Qcooling / Qcooling_nom;
+		
+		delta_T = Tcof - Tevf;
+		CoolPRrated = 1 / EERrated;
+		CoolPRT = 0.564064 - 0.011463 * Tevf + 0.000112 * Math.pow(Tevf, 2) + 0.008091 * Tcof + 0.000070 * Math.pow(Tcof, 2) - 0.000126 * Tevf * Tcof;
+		CoolPRPLR = 0.023918 + 0.889469 * PLR + 0.077931 * Math.pow(PLR, 2) - 0.000264 * delta_T + 0.000007 * Math.pow(delta_T, 2) + 0.000180 * PLR * delta_T;
+		CoolPR = CoolPRrated * CoolPRT * CoolPRPLR;
+		EER = 1/CoolPR;
+		
+		Pchiller = Qcooling/EER;
+
+		return Pchiller;
+	}
+	
+	private double calculatePdryCooler(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Pdry_cooler = 0;
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double n_dry_cooler;//DEBB
+		try{
+			 n_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("dryCoolerEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			 n_dry_cooler = 0.02;
+		}
+
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Pdry_cooler = n_dry_cooler * Qcooling;
+		
+		return Pdry_cooler;
+	}
+	
+	private double calculateQ(double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Qdc = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+
+		/**************** HEAT ****************/
+		
+		double Qload_dc = 0;
+		double Qothers = 0;
+		double Qfans_dc = 0;
+
+		double delta_2; //DEBB - currently not present;
+		delta_2 = 0.4;
+		
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			double QnodeGroup = 0;
+			for(Node node: rack.getNodes()){
+				double Qnodes = 0;
+
+				double Qcpu = 0;
+				for(Processor proc: node.getProcessors()){
+					Qcpu = Qcpu + proc.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				Qnodes = Qnodes + Qcpu;
+
+				double Qfans = 0;
+				for(Device device: node.getResourceCharacteristic().getDevices()){
+					Fan fan = (Fan) device;
+					if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){
+						try {
+							Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+						} catch (NoSuchFieldException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					}else
+						Qfans = Qfans + (1 - delta_2) * fan.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				QnodeGroup = QnodeGroup + Qnodes + Qfans;
+			}
+			int nrOfPoweredOffNodes = 0;
+			for(Node node: rack.getNodes()){
+				if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+					nrOfPoweredOffNodes++;
+				}
+			}
+			if(nrOfPoweredOffNodes != rack.getNodes().size()){
+				Qload_dc  = Qload_dc + QnodeGroup + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION;
+			} else {
+				Qload_dc  = Qload_dc + QnodeGroup;
+			}
+		}
+		
+		Qothers = Pothers;
+		
+		Qfans_dc = (1 - nf) * Pfans_dc;
+		
+		Qdc = Qload_dc + Qothers + Qfans_dc;
+
+		
+		return Qdc;
+	}
+	
+	
+	private double calculateQ2(ComputingResource room){
+
+		double Qdc = 0;
+
+		double mair_total;
+		double Vair_total;
+		double ro = 1.168;//constant
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(Vair_total != -1) {
+			mair_total = Vair_total * ro;
+		}
+		else {
+	
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(Node node: rack.getNodes()){
+					for(Device device: node.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: node.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+		}
+		
+		double Cp = 1004;//constant
+
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+
+		Qdc = mair_total * Cp * (Tr_out - Tr_in);
+		
+		return Qdc;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FCFSBF_RandomPluginMigrate.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FCFSBF_RandomPluginMigrate.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FCFSBF_RandomPluginMigrate.java	(revision 1500)
@@ -0,0 +1,414 @@
+package experiments.simpat2014.models.basic;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.events.scheduling.TaskFinishedEvent;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.ResourceEventType;
+import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.CustomPowerStateName;
+import schedframe.resources.computing.profiles.energy.power.PowerState;
+import schedframe.resources.computing.profiles.energy.power.PowerUsage;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.units.ProcessingElements;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.resources.units.StandardResourceUnitName;
+import schedframe.scheduling.ResourceItem;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.manager.tasks.JobRegistryImpl;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import simulator.DataCenterWorkloadSimulator;
+import dcworms.schedframe.scheduling.ExecTask;
+import eduni.simjava.Sim_system;
+import example.localplugin.BaseLocalSchedulingPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class FCFSBF_RandomPluginMigrate extends BaseLocalSchedulingPlugin {
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		List<Processor> processors = resourceManager.getProcessors();
+		SchedulingPlan plan = new SchedulingPlan();
+//for(Node node: resourceManager.getNodes()){
+//	System.out.println(node.getFullName());
+//}
+		// choose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		
+		
+		case TIMER:
+
+			System.out.println("##########################" + Sim_system.clock());
+			DataCenterWorkloadSimulator.getEventManager().sendToResources(StandardResourceType.Processor, 0.0, new ResourceEvent(ResourceEventType.TIMER, null));
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(EnvironmentConditions.SYSTEM_UDPATE_INTERVAL, DCWormsTags.TIMER, "Test");
+			break;
+			
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+
+			// our tasks are placed only in first queue (see BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(processors, task);
+					if (choosenResources != null) {
+						addToSchedulingPlan(plan, task, choosenResources);
+					} 
+				}
+			}
+
+			break;
+		case RESOURCE_TEMPERATURE_LIMIT_EXCEEDED:
+			System.out.println("tuning fans");
+			ComputingResource cr = resourceManager.getResourceByName(event.getSource());
+			double temp = cr.getThermalInterface().getRecentTemperature().getValue();
+			double prevTemp;
+			if(cr.getThermalInterface().getTemperatureHistory().size() == 1)
+				prevTemp = temp;
+			else {
+				prevTemp = cr.getThermalInterface().getTemperatureHistory().get(cr.getThermalInterface().getTemperatureHistory().size() - 2).getValue();
+			}
+
+			System.out.println(prevTemp+  ";  " + temp);
+			boolean getingHotter = prevTemp < temp;
+			Node n = (Node) cr.getParent();
+			for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
+				if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1])){
+					Fan f = (Fan) d;
+					int speed;
+					try{
+						speed= Integer.valueOf(f.getAirflowInterface().getAirflowState().getLabel().split("_")[1]).intValue();
+					} catch(Exception e){
+						speed = 0;
+					}
+					if(getingHotter){
+						if(temp > EnvironmentConditions.tempLevelLow2Medium && temp < EnvironmentConditions.tempLevelMedium2High){
+							if(speed < 60){
+								System.out.println("+++++++++ low 2 medium");
+								f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));
+							}
+						} else if (temp > EnvironmentConditions.tempLevelMedium2High && temp < EnvironmentConditions.tempLevelHigh2Max) {
+							if(speed < 80){
+								System.out.println("++++++++medium 2 high");
+								f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+							}
+						} else if (temp > EnvironmentConditions.tempLevelHigh2Max) {
+							if(speed < 100){
+								System.out.println("++++++++high 2 max");
+								f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_100"));
+							}
+						}					
+					} else {
+						if(temp > EnvironmentConditions.tempLevelHigh2Medium && temp < EnvironmentConditions.tempLevelMax2High){
+							System.out.println("-------- max 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						} else if(temp > EnvironmentConditions.tempLevelMedium2Low && temp < EnvironmentConditions.tempLevelHigh2Medium){
+							System.out.println("-------- high 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));
+						} else if (temp < EnvironmentConditions.tempLevelMedium2Low) {
+							System.out.println("-------- medium 2 low");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30"));
+						}
+					}
+				}
+			
+
+				/*AirflowStateName state = f.getAirflowInterface().getAirflowState();
+				try{
+					Integer level = Integer.valueOf(state.getLabel().split("_")[1]);
+					Integer newLevel = level + 10;		
+					if(newLevel <= 100)
+						f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_" + newLevel));			
+				} catch (Exception e){
+					f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_10"));
+				}	*/
+			}
+			//optimizeEnergyUsage(jobRegistry, resourceManager , src);
+			break;
+
+		}	
+
+		return plan;
+	}
+	
+
+	
+	// IRIT
+	private void firstFitConsolidation(JobRegistry jobRegistry, ClusterResourceManager resourceManager, SchedulingEvent event) {
+		Node underLoadedNode = getNodeFromEvent(jobRegistry, (TaskFinishedEvent) event);
+		double remainingLoad = underLoadedNode.getLoadInterface().getRecentUtilization().getValue();
+		if(remainingLoad == 0) { return; }
+
+		PowerUsage pow = underLoadedNode.getPowerInterface().getRecentPowerUsage();
+		System.out.println(" last  : "+pow.getValue());
+		System.out.println(" Estimate  : "+getPowerConsumptionAtLoad(underLoadedNode, remainingLoad));
+	
+		for(Node node: resourceManager.getNodes()) {
+			double destLoad = node.getLoadInterface().getRecentUtilization().getValue();
+			
+			if((node != underLoadedNode) && (destLoad!=0) && (destLoad + remainingLoad <= 100)) {
+				if(destLoad < remainingLoad) {
+					moveAllTask(jobRegistry, node, underLoadedNode);
+				}
+				else {
+					moveAllTask(jobRegistry, underLoadedNode, node);
+				}
+				return;
+			}
+		}
+	}
+	// IRIT
+	private Node getNodeFromEvent(JobRegistry jobRegistry, TaskFinishedEvent event) {
+		ExecTask task = jobRegistry.getTask(event.getJobId(), event.getTaskId());
+		ResourceItem r = task.getAllocatedResources().getLast();
+	    ProcessingElements pe = (ProcessingElements) r.getResourceUnits().get(StandardResourceUnitName.PE);
+	    ComputingResource c = pe.get(0);
+	    return (Node) c.getParent();
+
+	}
+	// IRIT
+	private void moveAllTask(JobRegistry jobRegistry, Node source, Node dest) {
+		double totalLoad = source.getLoadInterface().getRecentUtilization().getValue()+dest.getLoadInterface().getRecentUtilization().getValue();
+		if(totalLoad>100) {return;}
+		
+		JobRegistry srcHostJr = new JobRegistryImpl(source.getFullName());
+		int runningTasksNumber = srcHostJr.getRunningTasks().size();
+		for(int i=runningTasksNumber-1; i>=0; i--) {
+			ExecTask execTask = srcHostJr.getRunningTasks().get(i);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(dest.getProcessors(), execTask);
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+		}
+	}
+	// IRIT
+	public double getPowerConsumptionAtLoad(Node node, double loadLevel){
+		double powerConsumption = 0;
+		double lowestLoadLevel = 100;
+		double highestLoadLevel = 0;
+
+		System.out.println("ON_" + new Double(loadLevel).intValue());
+		System.out.println(node.getPowerInterface().supportPowerState(new CustomPowerStateName("ON_50")));
+		
+		try{
+			if(node.getPowerInterface().supportPowerState(new CustomPowerStateName("ON_" + new Double(loadLevel).intValue()))){
+				System.out.println("2 ON_" + new Double(loadLevel).intValue());
+
+				powerConsumption = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(loadLevel).intValue()));
+			} else {
+				for(PowerState powerState: node.getPowerInterface().getSupportedPowerStates()){
+					Double load;
+					System.out.println(" getname "+powerState.getName().getLabel());
+					try{
+						load = Double.valueOf(powerState.getName().getLabel().substring(3));
+					}catch (Exception e){
+						continue;
+					}
+					if(lowestLoadLevel > load){
+						lowestLoadLevel = load;
+					}
+					if(highestLoadLevel < load){
+						highestLoadLevel = load;
+					}
+				}
+				if(loadLevel == 0){
+					powerConsumption = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_0"));
+				} else {
+					
+					double lowerLoadLevel = lowestLoadLevel;
+					double higherLoadLevel = highestLoadLevel;
+
+					for(PowerState powerState: node.getPowerInterface().getSupportedPowerStates()){
+						Double load = Double.valueOf(powerState.getName().getLabel().substring(3));
+						if(loadLevel > load){
+							lowerLoadLevel = load;
+						}
+						else if(loadLevel < load){
+							higherLoadLevel = load;
+							break;
+						}
+					}
+					double powerBelow;
+					double powerAbove;
+					double a;
+					double b;
+					if(lowerLoadLevel != higherLoadLevel) {
+						powerBelow = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(lowerLoadLevel).intValue()));
+						powerAbove = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(higherLoadLevel).intValue()));
+						a = (powerAbove - powerBelow)/(higherLoadLevel - lowerLoadLevel);
+						b = powerAbove - a * higherLoadLevel;
+					} else {
+						powerBelow = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(lowestLoadLevel).intValue()));
+						powerAbove = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(highestLoadLevel).intValue()));
+						a = (powerAbove - powerBelow)/(highestLoadLevel - lowestLoadLevel);
+						b = powerAbove - a * highestLoadLevel;
+					}
+					powerConsumption = a * loadLevel + b;
+				}
+			}
+		} catch (Exception e){
+			
+		}
+	
+		return powerConsumption;
+	}
+
+
+
+	private void globalEnergyOptimizer(JobRegistry jobRegistry, ClusterResourceManager resourceManager, String resName) {
+		
+		Node leastLoadedNode = findLeastLoadedResource(resourceManager.getNodes());
+		Node mostLoadedNode = findMostLoadedResource(resourceManager.getNodes());
+		System.out.println("-------------ALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLERT");
+		System.out.println("             max : "+mostLoadedNode.getLoadInterface().getRecentUtilization().getValue());
+		System.out.println("             min : "+leastLoadedNode.getLoadInterface().getRecentUtilization().getValue());
+
+		
+		
+		if(leastLoadedNode.getLoadInterface().getRecentUtilization().getValue() >= mostLoadedNode.getLoadInterface().getRecentUtilization().getValue()){
+			return;
+		}
+		System.out.println("             ALLLLLLLLLLLLLLLL");
+		if(leastLoadedNode.getLoadInterface().getRecentUtilization().getValue()  != 0){
+			return;
+		}
+		System.out.println("                              LLLLLLLLLLLLLLLLLLLLERT");
+
+
+		
+		JobRegistry srcHostJr = new JobRegistryImpl(mostLoadedNode.getFullName());
+		int runningTasksNumber = srcHostJr.getRunningTasks().size();
+		System.out.println("           nbtasks source "+runningTasksNumber);
+		if(runningTasksNumber >= 1) {
+			ExecTask execTask = srcHostJr.getRunningTasks().get(0);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(findLeastLoadedResource(resourceManager.getNodes()).getProcessors(), execTask);
+			System.out.println("           "+destinationResources.toString());
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+		}
+/*for(int i = srcHostJr.getRunningTasks().size() - 1; i >= 0 && runningTasksNumber > 2; i--) {
+			System.out.println("           Migration");
+
+			ExecTask execTask = srcHostJr.getRunningTasks().get(i);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(findLeastLoadedResource(resourceManager.getNodes()).getProcessors(), execTask);
+			System.out.println("           "+destinationResources.toString());
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+			runningTasksNumber--;
+		
+		}
+	*/
+
+		
+	}
+	
+	
+	private void optimizeEnergyUsage(JobRegistry jobRegistry, ClusterResourceManager resourceManager, String resName) {
+		Node overLoadedNode = (Node)resourceManager .getResourceByName(resName);
+		Node leastLoadedNode = findLeastLoadedResource(resourceManager.getNodes());
+		
+		if(leastLoadedNode.getLoadInterface().getRecentUtilization().getValue() >= overLoadedNode.getLoadInterface().getRecentUtilization().getValue()){
+			return;
+		}
+
+		JobRegistry srcHostJr = new JobRegistryImpl(overLoadedNode.getFullName());
+		int runningTasksNumber = srcHostJr.getRunningTasks().size();
+		for(int i = srcHostJr.getRunningTasks().size() - 1; i >= 0 && runningTasksNumber > 2; i--) {
+			ExecTask execTask = srcHostJr.getRunningTasks().get(i);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(findLeastLoadedResource(resourceManager.getNodes()).getProcessors(), execTask);
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+			runningTasksNumber--;
+		}
+	}
+
+	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
+			List<Processor> processors, TaskInterface<?> task) {
+
+		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>(1);
+
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+
+		if (cpuRequest != 0) {
+
+			if (processors.size() < cpuRequest) {
+				return null;
+			}
+
+			List<ComputingResource> choosenResources = new ArrayList<ComputingResource>(cpuRequest);				
+			for (int i = 0; i < processors.size() && cpuRequest > 0; i++) {
+				if (processors.get(i).getStatus() == ResourceStatus.FREE) {
+					choosenResources.add(processors.get(i));
+					cpuRequest--;
+				}
+			}
+			if (cpuRequest > 0) {
+				return null;
+			}
+
+			ProcessingElements pe = new ProcessingElements();
+			pe.addAll(choosenResources);
+			map.put(StandardResourceUnitName.PE, pe);
+			return map;
+		}
+
+		return null;
+	}
+
+	private Node findLeastLoadedResource(List<Node> nodes ){
+		Node leastLoadedNoded = null;
+		double minLoad = Double.MAX_VALUE;
+		
+		for(int i = 0; i < nodes.size(); i++){
+			Node node = nodes.get(i);
+			double totalLoad = node.getLoadInterface().getRecentUtilization().getValue();
+			if(totalLoad < minLoad){
+				leastLoadedNoded= node;
+				minLoad = totalLoad;
+			}
+		}
+		return leastLoadedNoded;
+	}
+	private Node findMostLoadedResource(List<Node> nodes ){
+		Node mostLoadedNoded = null;
+		double minLoad = 0;
+		
+		for(int i = 0; i < nodes.size(); i++){
+			Node node = nodes.get(i);
+			double totalLoad = node.getLoadInterface().getRecentUtilization().getValue();
+			if(totalLoad >= minLoad){
+				mostLoadedNoded= node;
+				minLoad = totalLoad;
+			}
+		}
+		return mostLoadedNoded;
+	}
+}
+
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/RackEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/RackEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/RackEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,124 @@
+package experiments.simpat2014.models.basic;
+
+import java.util.List;
+
+import schedframe.resources.CoolEmAllResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+import gridsim.dcworms.DCWormsTags;
+
+public class RackEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	double powerCapLevel = -1;
+	double powerUpgradeLevel = -1;
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		if(powerCapLevel == -1 || powerUpgradeLevel == -1){
+			loadThresholds((ComputingResource) resource);
+		}
+		
+		double powerConsumption = 0;
+		Rack rack = (Rack)resource;
+		for(Node node:rack.getNodes()){
+			try{
+				powerConsumption = powerConsumption + node.getPowerInterface().getRecentPowerUsage().getValue();
+			} catch (Exception e){
+				
+			}
+		}
+		
+		int nrOfPoweredOffNodes = 0;
+		for(Node node: rack.getNodes()){
+			if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+				nrOfPoweredOffNodes++;
+			}
+		}
+		if(nrOfPoweredOffNodes != rack.getNodes().size()){
+			powerConsumption = (powerConsumption + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION)/CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY;			
+		}
+		
+		if(powerConsumption > powerCapLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, null);
+		}
+		else if(powerConsumption < powerUpgradeLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, null);
+		}
+		return powerConsumption;
+	}
+	
+	private void loadThresholds(ComputingResource compResource){
+		
+		Rack rack = (Rack) compResource;
+		double pcLevel = 0;
+		double puLevel = 0;
+		for(Processor proc: rack.getProcessors()){
+			PState highestPState =  proc.getPowerInterface().getHighestPState();
+			PState secondHighestPState =  proc.getPowerInterface().getLowestPState();
+			for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+				PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+				if(pState.getFrequency()  < secondHighestPState.getFrequency() && pState.getFrequency() > highestPState.getFrequency()){
+					secondHighestPState = pState;
+				}
+			}
+			double maxMinPowerUsage = 0;
+			double powerUsage = 0;
+			
+			for(Double load: highestPState.getLoadPowerUsage().keySet()){
+				powerUsage = highestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			pcLevel = pcLevel + maxMinPowerUsage;
+			
+			maxMinPowerUsage = 0;
+			powerUsage = 0;
+			
+			for(Double load: secondHighestPState.getLoadPowerUsage().keySet()){
+				powerUsage = secondHighestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			puLevel = puLevel + maxMinPowerUsage;
+			
+		}
+		
+		double fpc = 0;
+		for(Node node: rack.getNodes()){
+			for(Device device: node.getResourceCharacteristic().getDevices()){
+				try {
+					fpc = fpc + device.getAirflowInterface().getPowerConsumption(new CustomAirflowStateName("ON_100"));
+				} catch (NoSuchFieldException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+
+		}
+		pcLevel = (pcLevel + fpc) / CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY;
+		puLevel = (puLevel + fpc) / CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY;
+
+		puLevel = (pcLevel * pcLevel / puLevel);
+
+		powerCapLevel = pcLevel;
+		powerUpgradeLevel = puLevel;
+	}
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FanEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FanEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FanEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,76 @@
+package experiments.simpat2014.models.basic;
+
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class FanEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	/*private static int PFanMax = 6;
+	private static int TFanLow = 45;
+	private static int TFanHigh = 47;*/
+
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		Fan fan = (Fan) resource;
+		/*Node node = (Node) fan.getComputingResource();
+		double Tcpu = 0;
+		for(Processor cpu: node.getProcessors()){
+			Tcpu = Tcpu + cpu.getThermalInterface().getRecentTemperature().getValue();
+		}
+		Tcpu = Tcpu/node.getProcessors().size();
+		
+		if (Tcpu < TFanLow) {
+			powerConsumption = 4;
+		} else if (Tcpu > TFanHigh){
+			powerConsumption = PFanMax;
+		}
+		*/
+		
+		try {
+			powerConsumption = fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+		} catch (NoSuchFieldException e) {
+			//
+		}
+		
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		
+		double airflow = 0;
+		Fan fan = (Fan) resource;
+		
+		/*double fanEfficiency = 0;
+		try{
+			fanEfficiency = Double.valueOf(fan.getPowerInterface().getParameters().get("fanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+
+		double dp = 1013.25;
+		airflow = fan.getPowerInterface().getRecentPowerUsage().getValue() * fanEfficiency /dp;*/
+
+		try {
+			airflow = fan.getAirflowInterface().getAirflow(fan.getAirflowInterface().getAirflowState());
+		} catch (NoSuchFieldException e) {
+			//
+		}
+		return airflow;
+	}
+	
+	public double estimateTemperature (ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double temperature = EnvironmentConditions.ROOM_TEMPERATURE;
+		return temperature;
+	}
+	
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FlowPumpInletEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FlowPumpInletEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FlowPumpInletEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,145 @@
+package experiments.simpat2014.models.basic;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class FlowPumpInletEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		/*********** Pfans_dc ***********/
+		double powerConsumption = 0;
+		double nf = 0.6;
+		
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			powerConsumption = delta_p * Vair_total / nf;
+		else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(Node node: rack.getNodes()){
+					for(Device device: node.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: node.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				powerConsumption = delta_p * Vair_total / nf;
+		}
+		
+		//System.out.println("Flow Pump power: " + powerConsumption);
+		
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		double Vair_total;
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		if(Vair_total != -1) {
+			airflow = Vair_total;
+		} else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+
+			double ro = 1.168;//constant
+			
+			double mair_total;
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			airflow = Vair_total;
+		}
+		return airflow;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/NodeEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/NodeEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/NodeEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,155 @@
+package experiments.simpat2014.models.basic;
+
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class NodeEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	private static double Tidle = 26;
+
+	private double timestamp = 0;
+	private double old_temperature = Tidle;
+	private double new_temperature = -1;
+	private double objective_temperature = Tidle;
+	private boolean fan = false;
+	
+	private double next_timer = -1;
+
+	private static double Pidle = 10;
+	private static double Pfull = 76;
+
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		Node node = (Node) resource;
+		double powerConsumption = 0;
+
+		/*double Pcpu = 0;	
+		for(Processor cpu: node.getProcessors()){
+			Pcpu = Pcpu + cpu.getPowerInterface().getRecentPowerUsage().getValue();
+		}*/
+		
+		powerConsumption = Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100; 
+		double Pfan = 0;
+		for(Device device: node.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				Fan fan = (Fan) device;
+				Pfan = Pfan + fan.getPowerInterface().getRecentPowerUsage().getValue();
+			}
+		}
+		//powerConsumption = Pcpu + Pfan;
+		powerConsumption = powerConsumption + Pfan;
+		return powerConsumption;
+	}
+
+	@Override
+	public double estimateTemperature(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double future = -1;
+
+		Node node = (Node) resource;
+		Processor cpu = node.getProcessors().get(0);
+		double Pserv = 0;
+
+		double R = 0;
+		try{
+			R = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalResistance").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+
+		double C = 0;
+		try{
+			C = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalCapacity").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double K = 0;
+		double V = 0;
+		double Cair = EnvironmentConditions.AIR_HEAT_CAPACITY;
+		double ro = EnvironmentConditions.AIR_DENSITY;
+
+		for(Device device: node.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				Fan fan = (Fan) device;
+				V = V + fan.getAirflowInterface().getRecentAirflow().getValue();
+				//double dp = EnvironmentConditions.AIR_PRESSURE;
+				//V = fan.getPowerInterface().getRecentPowerUsage().getValue() * 0.6 /dp;
+			}
+		}
+
+		K = V * Cair * ro;
+		//System.out.println("-------A: " + A +  "; V:" + V);
+		// 1) look where we are
+		double delta_t = Sim_system.clock() - timestamp;
+		double currentCpuTemp = cpu.getThermalInterface().getRecentTemperature().getValue();
+		
+		double Tin = EnvironmentConditions.ROOM_TEMPERATURE;
+		Pserv = node.getPowerInterface().getRecentPowerUsage().getValue();
+		double Pcpu = node.getProcessors().get(0).getPowerInterface().getRecentPowerUsage().getValue();
+		double objectiveCpuTemp = Pcpu * R + Tin; 
+		double targetTemp = Pserv/K + Tin; 
+		objective_temperature = targetTemp;
+		//System.out.println("node: " + node.getFullName() +  "; objective_temperature"  + objective_temperature +" : currentCpuTemp + ; " +currentCpuTemp + "; targetCpuTemp: " +objectiveCpuTemp );
+		/*if(delta_t == 0)
+			new_temperature =Tin +  ((objectiveCpuTemp+ (currentCpuTemp-objectiveCpuTemp)* Math.exp(-delta_t/ (H * C)))/H)/A;
+		else
+			new_temperature =Tin +  ((objectiveCpuTemp+ (currentCpuTemp-objectiveCpuTemp)* Math.exp(-delta_t/ (H * C)))/H + (C *(1/delta_t)))/A;
+*/
+		
+		//new_temperature =currentCpuTemp +  (old_temperature-currentCpuTemp)* Math.exp(-delta_t/ (H * C));
+		new_temperature = objective_temperature + (old_temperature - objective_temperature) * Math.exp(-delta_t / (R * C));
+		//new_temperature = objective_temperature +   1/ (A *R) *(currentCpuTemp - objective_temperature)* Math.exp(-delta_t / (R * C));
+		
+		//new_temperature = currentCpuTemp + (Tin - currentCpuTemp) * Math.exp(-delta_t / (R * A));
+		//System.out.println("***************" +new_temperature);
+		//new_temperature = (Tin + Pserv/A + ((14.4 - Pserv/A) * Math.exp(- Sim_system.clock() * A / C)));
+		//System.out.println("################" + new_temperature);
+		//new_temperature =Tin + (currentCpuTemp - Tin)/(H * A) + (old_temperature-objective_temperature)* Math.exp(-delta_t * A/ C);
+		
+		
+		// 3) compute new objective
+
+
+		//System.out.println("=========== " + Sim_system.clock() +  "; objective_temperature: " + objective_temperature  + "; new_temperature: " + new_temperature +  "; targetTemp: " + targetTemp);
+
+		
+		// 4) check if we will need to tune fans
+		if(fan && targetTemp < EnvironmentConditions.TFanLow) {
+			double timer = Cair/K * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanLow));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+		if(!fan && targetTemp > EnvironmentConditions.TFanHigh) {
+			double timer = Cair/K * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanHigh));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+		
+		// 5) save everything
+		timestamp = Sim_system.clock();
+		old_temperature = new_temperature;
+		//objective_temperature = targetTemp;
+
+
+		if((future >= 0) && ((next_timer < Sim_system.clock()) || (next_timer >= future + Sim_system.clock()))) {
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(future, DCWormsTags.FANMGT, "Test");
+			next_timer = future + Sim_system.clock() - 0.01;
+		}		
+		//System.out.println("------- " + new_temperature);
+		return new_temperature;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FlowPumpOutletEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FlowPumpOutletEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/FlowPumpOutletEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,81 @@
+package experiments.simpat2014.models.basic;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class FlowPumpOutletEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		double Vair_total;
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		if(Vair_total != -1) {
+			airflow = Vair_total;
+		} else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+
+			double ro = 1.168;//constant
+			
+			double mair_total;
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(Node node: rack.getNodes()){
+					for(Device device: node.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: node.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			airflow = Vair_total;
+		}
+		return airflow;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/CpuEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/CpuEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/basic/CpuEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,185 @@
+package experiments.simpat2014.models.basic;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class CpuEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	private static double Pidle = 4;
+	private static double Pfull = 50;
+
+	private static int Tidle = 33;
+	
+	private double timestamp = 0;
+	private double old_temperature = Tidle;
+	private double new_temperature = -1;
+	private double objective_temperature = Tidle;
+	
+	private boolean fan = false;
+	
+	private double next_timer = -1;    
+	
+	private int cpu_temp_monitor = 0;
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		double powerConsumption = 0;
+
+		Processor cpu = (Processor)resource;
+		powerConsumption = Pidle + (Pfull- Pidle) * cpu.getLoadInterface().getRecentUtilization().getValue()/100;			
+
+		return powerConsumption;
+	}
+	
+	@Override
+	public double estimateTemperature(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double future = -1;
+
+		Processor cpu = (Processor) resource;
+
+		double R = 0;
+		double Rb = 0;
+		double Rcv = 0;
+		try{
+			Rb = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalResistance").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double k = 0;
+		try{
+			k = Double.valueOf(cpu.getPowerInterface().getParameters().get("k").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double a = 0;
+		try{
+			a = Double.valueOf(cpu.getPowerInterface().getParameters().get("a").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			a = 1;
+		}
+
+		double V = 0;
+	
+		for(Device device: cpu.getParent().getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				Fan fan = (Fan) device;
+				V = fan.getAirflowInterface().getRecentAirflow().getValue();
+			}
+		}
+
+		Rcv =  1/ (k * Math.pow(V, a));
+		R = Rb + Rcv; 
+		
+		double C = 0;
+		try{
+			C = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalCapacity").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		// 1) look where we are
+		double delta_t = Sim_system.clock() - timestamp;
+		/***************model1*************/
+		//new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/sink);
+		
+		/***************model2*************/
+		new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/(R * C));
+		 
+
+		// 2) calculate if fan is needed ?
+		if(new_temperature <= EnvironmentConditions.TFanLow) {
+			fan = false;
+		}
+		if(new_temperature >= EnvironmentConditions.TFanHigh) {
+			fan = true; 
+		}
+		
+		// 3) compute new objective
+		double Tin = EnvironmentConditions.ROOM_TEMPERATURE;
+		double Pcpu = cpu.getPowerInterface().getRecentPowerUsage().getValue();
+		new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/(R * C));
+		//new_temperature = (Pcpu * R + Tin) - (Pcpu * R + Tin - Tidle) * Math.exp(-Sim_system.clock()/(R * C));;
+		
+		/***************model1 - GEO1*************/
+		//double cpuLoad = cpu.getLoadInterface().getRecentUtilization().getValue();
+		//double targetTemp = Tidle + cpuLoad/100 * dTfull;
+		//if(fan) {
+		//	targetTemp = targetTemp - dTfan;
+		//}
+		
+		
+		/***************model2 - GEO2*************/
+		//Node node = (Node) cpu.getParent();
+		//Pserv = node.getPowerInterface().getRecentPowerUsage().getValue();
+		//double targetTemp = Pcpu * R + Tin; 
+		
+		/***************model3 - GEO1 + GEO2*************/
+		/*double targetTemp = Pcpu * R + Tin; 
+		if(fan) {
+			targetTemp = targetTemp - dTfan;
+		}*/
+	
+		/***************model4 - WP*************/
+		double targetTemp = Pcpu * R + Tin; 
+		
+		// 4) check if we will need to tune fans
+		if(fan && targetTemp < EnvironmentConditions.TFanLow) {
+			double timer = C * R * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanLow));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+		if(!fan && targetTemp > EnvironmentConditions.TFanHigh) {
+			double timer = C * R * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanHigh));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+
+		// 5) save everything
+		timestamp = Sim_system.clock();
+		old_temperature = new_temperature;
+		objective_temperature = targetTemp;
+
+
+		if((future >= 0) && ((next_timer < Sim_system.clock()) || (next_timer >= future + Sim_system.clock()))) {
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(future, DCWormsTags.FANMGT, "Test");
+			next_timer = future + Sim_system.clock() - 0.01;
+		}		
+		
+		if(new_temperature > EnvironmentConditions.tempLevelMedium2Low && new_temperature < EnvironmentConditions.tempLevelLow2Medium){
+			if(cpu_temp_monitor != 1){
+				cpu_temp_monitor = 1;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelLow2Medium && new_temperature < EnvironmentConditions.tempLevelHigh2Medium){
+			if(cpu_temp_monitor != 2){
+				cpu_temp_monitor = 2;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelHigh2Medium && new_temperature < EnvironmentConditions.tempLevelMedium2High){
+			if(cpu_temp_monitor != 3){
+				cpu_temp_monitor = 3;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelMedium2High){
+			if(cpu_temp_monitor != 4){
+				cpu_temp_monitor = 4;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		}
+		//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+
+		return new_temperature;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPlugin.java	(revision 1500)
@@ -0,0 +1,184 @@
+package experiments.simpat2014.models.article;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.events.scheduling.TaskFinishedEvent;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.ResourceEventType;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.CustomPowerStateName;
+import schedframe.resources.computing.profiles.energy.power.PowerState;
+import schedframe.resources.computing.profiles.energy.power.PowerUsage;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.units.ProcessingElements;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.resources.units.StandardResourceUnitName;
+import schedframe.scheduling.ResourceItem;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.manager.tasks.JobRegistryImpl;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import simulator.DataCenterWorkloadSimulator;
+import dcworms.schedframe.scheduling.ExecTask;
+import eduni.simjava.Sim_system;
+import example.localplugin.BaseLocalSchedulingPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class FCFSBF_RandomPlugin extends BaseLocalSchedulingPlugin {
+
+	private Random rand;
+	
+	public FCFSBF_RandomPlugin() {
+		rand = new Random(5);
+	}
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		List<Node> nodes = resourceManager.getNodes();
+		SchedulingPlan plan = new SchedulingPlan();
+
+		// choose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		
+		
+		case TIMER:
+
+			System.out.println("##########################" + Sim_system.clock());
+			DataCenterWorkloadSimulator.getEventManager().sendToResources(StandardResourceType.Processor, 0.0, new ResourceEvent(ResourceEventType.TIMER, null));
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(EnvironmentConditions.SYSTEM_UDPATE_INTERVAL, DCWormsTags.TIMER, "Test");
+			break;
+			
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+			// our tasks are placed only in first queue (see BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(nodes, task);
+					if (choosenResources != null) {
+						addToSchedulingPlan(plan, task, choosenResources);
+					} 
+				}
+			}
+
+			break;
+
+		}	
+		return plan;
+	}
+	
+
+	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
+			List<Node> nodes, TaskInterface<?> task) {
+
+		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>(1);
+
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+
+		List<Node> filteredNodes = filterNodes(nodes, cpuRequest);
+		if(filteredNodes.size()==0)
+			return null;
+		Node node = chooseRandomNode(filteredNodes);
+		while(node.getFreeCores().size() < cpuRequest){
+			node = chooseRandomNode(nodes);
+		}
+		
+		if (cpuRequest != 0) {
+
+			if (node.getFreeCores().size() < cpuRequest) {
+				return null;
+			}
+
+			List<Core> cores = node.getCores();
+			List<ComputingResource> choosenResources = new ArrayList<ComputingResource>(cpuRequest);				
+			for (int i = 0; i < cores.size() && cpuRequest > 0; i++) {
+				if (cores.get(i).getStatus() == ResourceStatus.FREE) {
+					choosenResources.add(cores.get(i));
+					cpuRequest--;
+				}
+			}
+			if (cpuRequest > 0) {
+				return null;
+			}
+
+			ProcessingElements pe = new ProcessingElements();
+			pe.addAll(choosenResources);
+			map.put(StandardResourceUnitName.PE, pe);
+			return map;
+		}
+
+		return null;
+	}
+
+
+	private List<Node> filterNodes(List<Node> nodes, int cpuRequest){
+		List<Node> filteredNodes = new ArrayList<Node>();
+
+		for (Node node : nodes) {
+
+			if (cpuRequest != 0) {
+
+				List<Core> cores = node.getCores();
+				if (cores.size() < cpuRequest) {
+					if(cores.size() == 0){
+						if(node.getProcessors().size() < cpuRequest)
+							continue;
+					}
+				}
+
+				int freeCores = 0;
+				for(Core core: cores){
+					if(core.getStatus() == ResourceStatus.FREE)
+						freeCores++;
+				}
+				
+				if(freeCores < cpuRequest)
+					continue;
+				
+				filteredNodes.add(node);
+			}
+		}
+		
+		return filteredNodes;
+	}
+	
+
+	private Node chooseRandomNode(List<Node> nodes) {
+		int nodeIdx = rand.nextInt(nodes.size());
+		return nodes.get(nodeIdx);
+	}
+
+
+}
+
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,134 @@
+package experiments.simpat2014.models.article;
+
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class NodeEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	private static double Tidle = 26;
+
+	private double timestamp = 0;
+	private double old_temperature = Tidle;
+	private double new_temperature = -1;
+	private double objective_temperature = Tidle;
+	private boolean fan = false;
+	
+	private double next_timer = -1;
+
+	private static double Pidle = 6;
+	private static double Pfull = 16;
+
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		Node node = (Node) resource;
+		double powerConsumption = 0;
+
+		double Pcpu = 0;	
+		for(Processor cpu: node.getProcessors()){
+			Pcpu = Pcpu + cpu.getPowerInterface().getRecentPowerUsage().getValue();
+		}
+		
+		powerConsumption = Pcpu + Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100;
+		//powerConsumption = powerConsumption + node.getProcessors().get(0).getResourceCharacteristic().getDevices().get(0).getPowerInterface().getRecentPowerUsage().getValue();
+		return powerConsumption;
+	}
+
+	@Override
+	public double estimateTemperature(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+
+		Node node = (Node) resource;
+		Processor cpu = node.getProcessors().get(0);
+		double Pserv = 0;
+
+		double R = 0;
+		double Rb = 0;
+		double Rcv = 0;
+		try{
+			Rb = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalResistance").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double k = 0;
+		try{
+			k = Double.valueOf(cpu.getPowerInterface().getParameters().get("k").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double a = 0;
+		try{
+			a = Double.valueOf(cpu.getPowerInterface().getParameters().get("a").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			a = 1;
+		}
+
+
+		double C = 0;
+		try{
+			C = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalCapacity").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double V = 0;
+		double Pfan = 0;
+		for(Device device: node.getParent().getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(node.getName().split("_")[1]) || Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+					Fan fan = (Fan) device;
+					V = fan.getAirflowInterface().getRecentAirflow().getValue();
+					Pfan =  fan.getPowerInterface().getRecentPowerUsage().getValue();
+					break;
+				}
+			}
+		}
+
+		Rcv =  1/ (k * Math.pow(V, a));
+		R = Rb + Rcv; 
+		
+		double K = 0;
+		double Cair = EnvironmentConditions.AIR_HEAT_CAPACITY;
+		double ro = EnvironmentConditions.AIR_DENSITY;
+
+		K = V * Cair * ro;
+		//System.out.println("-------K: " + K +  "; V:" + V);
+
+		double delta_t = Sim_system.clock() - timestamp;
+
+		double Tin = EnvironmentConditions.ROOM_TEMPERATURE;
+		Pserv = node.getPowerInterface().getRecentPowerUsage().getValue();
+		Pserv = Pserv + Pfan;
+		
+		NodeGroup ng = (NodeGroup) node.getParent();
+		for(Node n: ng.getNodes()){
+			if(Integer.valueOf(n.getName().split("_")[1]) - Integer.valueOf(node.getName().split("_")[1]) == EnvironmentConditions.NODES_IN_A_ROW){
+				Tin = n.getThermalInterface().getRecentTemperature().getValue();
+			}
+		}
+		
+		double targetTemp = Pserv/K + Tin; 
+		objective_temperature = targetTemp;
+
+		new_temperature = objective_temperature + (old_temperature - objective_temperature) * Math.exp(-delta_t / (R * C));
+
+		// 5) save everything
+		timestamp = Sim_system.clock();
+		old_temperature = new_temperature;
+
+		return new_temperature;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CpuEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CpuEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CpuEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,291 @@
+package experiments.simpat2014.models.article;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class CpuEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	private static double Pidle = 4;
+	private static double Pfull = 26;
+
+	private static int Tidle = 33;
+	
+	private double timestamp = 0;
+	private double old_temperature = Tidle;
+	private double new_temperature = -1;
+	private double objective_temperature = Tidle;
+	
+	private boolean fan = false;
+	
+	private double next_timer = -1;    
+	
+	private int cpu_temp_monitor = 0;
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		/*double powerConsumption = 0;
+
+		Processor cpu = (Processor)resource;
+		powerConsumption = Pidle + (Pfull- Pidle) * cpu.getLoadInterface().getRecentUtilization().getValue()/100;			
+
+		return powerConsumption;*/
+		
+		double processorLoad = 0;
+		double powerConsumption = 0;
+		Processor proc = (Processor)resource;
+		if(resource.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF))
+			return 0;
+		else {
+			
+			processorLoad = proc.getLoadInterface().getRecentUtilization().getValue();
+			double lowestLoadLevel = 100;
+			double highestLoadLevel = 0;
+			if(proc.getPowerInterface().getPState().getLoadPowerUsage().containsKey(new Double(processorLoad))){
+				powerConsumption = proc.getPowerInterface().getPState().getLoadPowerUsage().get(new Double(processorLoad));
+				//System.out.println("power from profile: " + powerConsumption);
+			} else {
+				for(Double load: proc.getPowerInterface().getPState().getLoadPowerUsage().keySet()){
+					if(lowestLoadLevel > load){
+						lowestLoadLevel = load;
+					}
+					if(highestLoadLevel < load){
+						highestLoadLevel = load;
+					}
+				}
+				if(processorLoad == 0){
+					try{
+						powerConsumption = proc.getPowerInterface().getSupportedPowerStates().get(0).getPowerUsage();
+						//System.out.println("load = 0; power = idle power usage: " + powerConsumption);
+					} catch (Exception e){
+						powerConsumption = 0.7 * proc.getPowerInterface().getPState().getLoadPowerUsage().get(new Double(highestLoadLevel));
+						//System.out.println("error load = 0; power = 0.7 max power: " + powerConsumption);
+					}
+				} else {
+					
+					double lowerLoadLevel = lowestLoadLevel;
+					double higherLoadLevel = highestLoadLevel;
+					
+					try{
+					
+						for(Double load: proc.getPowerInterface().getPState().getLoadPowerUsage().keySet()){
+							if(processorLoad > load){
+								lowerLoadLevel = load;
+							}
+							else if(processorLoad < load){
+								higherLoadLevel = load;
+								break;
+							}
+						}
+						double powerBelow;
+						double powerAbove;
+						double a;
+						double b;
+						if(lowerLoadLevel != higherLoadLevel) {
+							powerBelow = proc.getPowerInterface().getPState().getLoadPowerUsage().get(lowerLoadLevel);
+							powerAbove = proc.getPowerInterface().getPState().getLoadPowerUsage().get(higherLoadLevel);
+							a = (powerAbove - powerBelow)/(higherLoadLevel - lowerLoadLevel);
+							b = powerAbove - a * higherLoadLevel;
+						} else {
+							powerBelow = proc.getPowerInterface().getPState().getLoadPowerUsage().get(lowestLoadLevel);
+							powerAbove = proc.getPowerInterface().getPState().getLoadPowerUsage().get(highestLoadLevel);
+							a = (powerAbove - powerBelow)/(highestLoadLevel - lowestLoadLevel);
+							b = powerAbove - a * highestLoadLevel;
+						}
+						powerConsumption = a * processorLoad + b;
+						/*System.out.println("a" +lowestLoadLevel + ";" +highestLoadLevel);
+						System.out.println("b" +lowerLoadLevel + ";" +higherLoadLevel);
+						System.out.println("c" +powerBelow + ";" +powerAbove);
+						System.out.println(resource.getFullName() + "load: " + processorLoad + "linear power estimation " + powerConsumption);*/
+	
+					} catch (Exception e){
+						powerConsumption = 0.7 * proc.getPowerInterface().getPState().getLoadPowerUsage().get(new Double(highestLoadLevel));	
+						//System.out.println("error; power = 0.7 max power: " + powerConsumption);
+					}
+				}
+			}
+		}
+		//System.out.println("estimated power consumption: " + powerConsumption);
+		return powerConsumption;
+	}
+	
+	@Override
+	public double estimateTemperature(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double future = -1;
+
+		Processor cpu = (Processor) resource;
+
+		double R = 0;
+		double Rb = 0;
+		double Rcv = 0;
+		try{
+			Rb = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalResistance").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double k = 0;
+		try{
+			k = Double.valueOf(cpu.getPowerInterface().getParameters().get("k").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double a = 0;
+		try{
+			a = Double.valueOf(cpu.getPowerInterface().getParameters().get("a").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			a = 1;
+		}
+
+		double V = 0;
+	
+		for(Device device: cpu.getParent().getParent().getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) /*|| Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW*/){
+					Fan fan = (Fan) device;
+					V = fan.getAirflowInterface().getRecentAirflow().getValue();
+					break;
+				}
+			}
+		}
+
+		Rcv =  1/ (k * Math.pow(V, a));
+		R = Rb + Rcv; 
+		double C = 0;
+		try{
+			C = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalCapacity").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		// 1) look where we are
+		double delta_t = Sim_system.clock() - timestamp;
+		/***************model1*************/
+		//new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/sink);
+		
+		/***************model2*************/
+		new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/(R * C));
+		 
+
+		// 2) calculate if fan is needed ?
+		if(new_temperature <= EnvironmentConditions.TFanLow) {
+			fan = false;
+		}
+		if(new_temperature >= EnvironmentConditions.TFanHigh) {
+			fan = true; 
+		}
+		
+		// 3) compute new objective
+		double Tin = EnvironmentConditions.ROOM_TEMPERATURE;
+		double Pcpu = cpu.getPowerInterface().getRecentPowerUsage().getValue();
+		new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/(R * C));
+		//new_temperature = (Pcpu * R + Tin) - (Pcpu * R + Tin - Tidle) * Math.exp(-Sim_system.clock()/(R * C));;
+		
+		
+		NodeGroup ng = (NodeGroup) cpu.getParent().getParent();
+		for(Node n: ng.getNodes()){
+			if(Integer.valueOf(n.getName().split("_")[1]) - Integer.valueOf(cpu.getParent().getName().split("_")[1]) == EnvironmentConditions.NODES_IN_A_ROW){
+				Tin = n.getThermalInterface().getRecentTemperature().getValue();
+
+			}
+		}
+		Tin = (2 * Tin + cpu.getThermalInterface().getRecentTemperature().getValue())/3;
+		/***************model1 - GEO1*************/
+		//double cpuLoad = cpu.getLoadInterface().getRecentUtilization().getValue();
+		//double targetTemp = Tidle + cpuLoad/100 * dTfull;
+		//if(fan) {
+		//	targetTemp = targetTemp - dTfan;
+		//}
+		
+		
+		/***************model2 - GEO2*************/
+		//Node node = (Node) cpu.getParent();
+		//Pserv = node.getPowerInterface().getRecentPowerUsage().getValue();
+		//double targetTemp = Pcpu * R + Tin; 
+		
+		/***************model3 - GEO1 + GEO2*************/
+		/*double targetTemp = Pcpu * R + Tin; 
+		if(fan) {
+			targetTemp = targetTemp - dTfan;
+		}*/
+	
+		/***************model4 - WP*************/
+		double targetTemp = Pcpu * R + Tin; 
+		//System.out.println("----------" + targetTemp +  ": " +  Pcpu +  ": " +  R +  ": " +  Tin);
+		// 4) check if we will need to tune fans
+		if(fan && targetTemp < EnvironmentConditions.TFanLow) {
+			double timer = C * R * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanLow));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+		if(!fan && targetTemp > EnvironmentConditions.TFanHigh) {
+			double timer = C * R * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanHigh));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+
+		// 5) save everything
+		timestamp = Sim_system.clock();
+		old_temperature = new_temperature;
+		objective_temperature = targetTemp;
+
+
+		if((future >= 0) && ((next_timer < Sim_system.clock()) || (next_timer >= future + Sim_system.clock()))) {
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(future, DCWormsTags.FANMGT, "Test");
+			next_timer = future + Sim_system.clock() - 0.01;
+		}		
+		
+		if(new_temperature < EnvironmentConditions.tempLevelMedium2Low){
+			if(cpu_temp_monitor != 1){
+				cpu_temp_monitor = 1;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelMedium2Low && new_temperature < EnvironmentConditions.tempLevelLow2Medium){
+			if(cpu_temp_monitor != 2){
+				cpu_temp_monitor = 2;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelLow2Medium && new_temperature < EnvironmentConditions.tempLevelHigh2Medium){
+			if(cpu_temp_monitor != 3){
+				cpu_temp_monitor = 3;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelHigh2Medium && new_temperature < EnvironmentConditions.tempLevelMedium2High){
+			if(cpu_temp_monitor != 4){
+				cpu_temp_monitor = 4;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelMedium2High && new_temperature < EnvironmentConditions.tempLevelMax2High){
+			if(cpu_temp_monitor != 5){
+				cpu_temp_monitor = 5;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelMax2High && new_temperature < EnvironmentConditions.tempLevelHigh2Max){
+			if(cpu_temp_monitor != 6){
+				cpu_temp_monitor = 6;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelHigh2Max){
+			if(cpu_temp_monitor != 7){
+				cpu_temp_monitor = 7;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		}
+		//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+
+		return new_temperature;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginMigrate.java	(revision 1500)
@@ -0,0 +1,287 @@
+package experiments.simpat2014.models.article;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.events.scheduling.TaskFinishedEvent;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.ResourceEventType;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.CustomPowerStateName;
+import schedframe.resources.computing.profiles.energy.power.PowerState;
+import schedframe.resources.computing.profiles.energy.power.PowerUsage;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.units.ProcessingElements;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.resources.units.StandardResourceUnitName;
+import schedframe.scheduling.ResourceItem;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.manager.tasks.JobRegistryImpl;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import simulator.DataCenterWorkloadSimulator;
+import dcworms.schedframe.scheduling.ExecTask;
+import eduni.simjava.Sim_system;
+import example.localplugin.BaseLocalSchedulingPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class FCFSBF_RandomPluginMigrate extends BaseLocalSchedulingPlugin {
+
+
+	private Random rand;
+	
+	public FCFSBF_RandomPluginMigrate() {
+		rand = new Random(5);
+	}
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		List<Node> nodes = resourceManager.getNodes();
+		SchedulingPlan plan = new SchedulingPlan();
+//for(Node node: resourceManager.getNodes()){
+//	System.out.println(node.getFullName());
+//}
+		// choose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		
+		
+		case TIMER:
+
+			System.out.println("##" + Sim_system.clock());
+			DataCenterWorkloadSimulator.getEventManager().sendToResources(StandardResourceType.Processor, 0.0, new ResourceEvent(ResourceEventType.TIMER, null));
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(EnvironmentConditions.SYSTEM_UDPATE_INTERVAL, DCWormsTags.TIMER, "Test");
+			break;
+			
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+
+			// our tasks are placed only in first queue (see BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(nodes, task);
+					if (choosenResources != null) {
+						addToSchedulingPlan(plan, task, choosenResources);
+					} 
+				}
+			}
+
+			break;
+		case RESOURCE_TEMPERATURE_LIMIT_EXCEEDED:
+			manageFans(resourceManager.getResourceByName(event.getSource()));
+			Node n = resourceManager.getNodes().get(0);
+			double min_temp = -1;
+			List<Node> availableNodes = filterNodes(resourceManager.getNodes(), 8);
+			for(Node node: availableNodes) {
+				if(min_temp == -1 || min_temp > node.getProcessors().get(0).getThermalInterface().getRecentTemperature().getValue()){
+					min_temp = node.getProcessors().get(0).getThermalInterface().getRecentTemperature().getValue();
+					n = node;
+					
+				}
+			}
+
+			for(Node node: resourceManager.getNodes()) {
+				if(node.getProcessors().get(0).getThermalInterface().getRecentTemperature().getValue() > 46 && node != n) {
+					System.out.println("   ----------------------- OVERHEAT !");
+					moveAllTask(jobRegistry, node, n);
+					break;
+				}
+			}		
+			//optimizeEnergyUsage(jobRegistry, resourceManager , src);
+			break;
+
+		}	
+
+		return plan;
+	}
+	
+	private void manageFans(ComputingResource cr ){
+		//System.out.println("tuning fans");
+		double temp = cr.getThermalInterface().getRecentTemperature().getValue();
+		double prevTemp;
+		if(cr.getThermalInterface().getTemperatureHistory().size() == 1)
+			prevTemp = temp;
+		else {
+			prevTemp = cr.getThermalInterface().getTemperatureHistory().get(cr.getThermalInterface().getTemperatureHistory().size() - 2).getValue();
+		}
+
+		//System.out.println(prevTemp+  ";  " + temp);
+		boolean getingHotter = prevTemp < temp;
+		boolean getingColder = prevTemp > temp;
+		Node n = (Node) cr.getParent();
+		for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
+			//System.out.println(d.getName() + "; " + n.getName());
+			if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+				Fan f = (Fan) d;
+				int speed;
+				try{
+					speed= Integer.valueOf(f.getAirflowInterface().getAirflowState().getLabel().split("_")[1]).intValue();
+				} catch(Exception e){
+					speed = 0;
+				}
+				if(getingHotter){
+					if(temp > EnvironmentConditions.tempLevelLow2Medium && temp < EnvironmentConditions.tempLevelMedium2High){
+						if(speed < 60){
+							//System.out.println("+++++++++ low 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));
+						}
+					} else if (temp > EnvironmentConditions.tempLevelMedium2High && temp < EnvironmentConditions.tempLevelHigh2Max) {
+						if(speed < 80){
+							//System.out.println("++++++++medium 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						}
+					} else if (temp > EnvironmentConditions.tempLevelHigh2Max) {
+						if(speed < 100){
+							//System.out.println("++++++++high 2 max");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_100"));
+						}
+					}					
+				} else if (getingColder){
+					if(temp > EnvironmentConditions.tempLevelHigh2Medium && temp < EnvironmentConditions.tempLevelMax2High){
+						if(speed == 100){
+							//System.out.println("-------- max 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						}
+					} else if(temp > EnvironmentConditions.tempLevelMedium2Low && temp < EnvironmentConditions.tempLevelHigh2Medium){
+						if(speed >= 80){
+							//System.out.println("-------- high 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));		
+						}
+					} else if (temp < EnvironmentConditions.tempLevelMedium2Low) {
+						if(speed >= 60){
+							//System.out.println("-------- medium 2 low");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30"));	
+						}
+					}
+				}
+			}
+		}
+	}
+
+	private void moveAllTask(JobRegistry jobRegistry, Node source, Node dest) {
+		double totalLoad = source.getLoadInterface().getRecentUtilization().getValue()+dest.getLoadInterface().getRecentUtilization().getValue();
+		if(totalLoad>100) {return;}
+		
+		JobRegistry srcHostJr = new JobRegistryImpl(source.getFullName());
+		int runningTasksNumber = srcHostJr.getRunningTasks().size();
+		for(int i=runningTasksNumber-1; i>=0; i--) {
+			ExecTask execTask = srcHostJr.getRunningTasks().get(i);
+			List<Node> nodes = new ArrayList<Node>();
+			nodes.add(dest);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(nodes, execTask);
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+		}
+	}
+
+	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
+			List<Node> nodes, TaskInterface<?> task) {
+
+		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>(1);
+
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+
+		List<Node> filteredNodes = filterNodes(nodes, cpuRequest);
+		if(filteredNodes.size()==0)
+			return null;
+		Node node = chooseRandomNode(filteredNodes);
+		while(node.getFreeCores().size() < cpuRequest){
+			node = chooseRandomNode(nodes);
+		}
+		
+		if (cpuRequest != 0) {
+
+			if (node.getFreeCores().size() < cpuRequest) {
+				return null;
+			}
+
+			List<Processor>  processors = node.getProcessors();
+			List<Core> cores = node.getCores();
+			List<ComputingResource> choosenResources = new ArrayList<ComputingResource>(cpuRequest);				
+			for (int i = 0; i < cores.size() && cpuRequest > 0; i++) {
+				if (cores.get(i).getStatus() == ResourceStatus.FREE) {
+					choosenResources.add(cores.get(i));
+					cpuRequest--;
+				}
+			}
+			if (cpuRequest > 0) {
+				return null;
+			}
+
+			ProcessingElements pe = new ProcessingElements();
+			pe.addAll(choosenResources);
+			map.put(StandardResourceUnitName.PE, pe);
+			return map;
+		}
+
+		return null;
+	}
+
+	
+	private List<Node> filterNodes(List<Node> nodes, int cpuRequest){
+		List<Node> filteredNodes = new ArrayList<Node>();
+
+		for (Node node : nodes) {
+
+			if (cpuRequest != 0) {
+
+				List<Core> cores = node.getCores();
+				if (cores.size() < cpuRequest) {
+					if(cores.size() == 0){
+						if(node.getProcessors().size() < cpuRequest)
+							continue;
+					}
+				}
+
+				int freeCores = 0;
+				for(Core core: cores){
+					if(core.getStatus() == ResourceStatus.FREE)
+						freeCores++;
+				}
+				
+				if(freeCores < cpuRequest)
+					continue;
+				
+				filteredNodes.add(node);
+			}
+		}
+		
+		return filteredNodes;
+	}
+	
+
+	private Node chooseRandomNode(List<Node> nodes) {
+		int nodeIdx = rand.nextInt(nodes.size());
+		return nodes.get(nodeIdx);
+	}
+}
+
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginFansMng.java	(revision 1500)
@@ -0,0 +1,253 @@
+package experiments.simpat2014.models.article;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.ResourceEventType;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.units.ProcessingElements;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.resources.units.StandardResourceUnitName;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.localplugin.BaseLocalSchedulingPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class FCFSBF_RandomPluginFansMng extends BaseLocalSchedulingPlugin {
+
+
+	private Random rand;
+	
+	public FCFSBF_RandomPluginFansMng() {
+		rand = new Random(5);
+	}
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		List<Node> nodes = resourceManager.getNodes();
+		SchedulingPlan plan = new SchedulingPlan();
+
+		// choose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		
+		
+		case TIMER:
+
+			System.out.println("##" + Sim_system.clock());
+			DataCenterWorkloadSimulator.getEventManager().sendToResources(StandardResourceType.Processor, 0.0, new ResourceEvent(ResourceEventType.TIMER, null));
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(EnvironmentConditions.SYSTEM_UDPATE_INTERVAL, DCWormsTags.TIMER, "Test");
+			break;
+			
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+
+			// our tasks are placed only in first queue (see BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(nodes, task);
+					if (choosenResources != null) {
+						addToSchedulingPlan(plan, task, choosenResources);
+					} 
+				}
+			}
+
+			break;
+		case RESOURCE_TEMPERATURE_LIMIT_EXCEEDED:
+			manageFans(resourceManager.getResourceByName(event.getSource()));
+			break;
+
+		}	
+
+		return plan;
+	}
+	
+	private void manageFans(ComputingResource cr ){
+		//System.out.println("tuning fans");
+		double temp = cr.getThermalInterface().getRecentTemperature().getValue();
+		double prevTemp;
+		if(cr.getThermalInterface().getTemperatureHistory().size() == 1)
+			prevTemp = temp;
+		else {
+			prevTemp = cr.getThermalInterface().getTemperatureHistory().get(cr.getThermalInterface().getTemperatureHistory().size() - 2).getValue();
+		}
+
+		//System.out.println(prevTemp+  ";  " + temp);
+		boolean getingHotter = prevTemp < temp;
+		boolean getingColder = prevTemp > temp;
+		Node n = (Node) cr.getParent();
+		for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
+			//System.out.println(d.getName() + "; " + n.getName());
+			if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+				Fan f = (Fan) d;
+				int speed;
+				try{
+					speed= Integer.valueOf(f.getAirflowInterface().getAirflowState().getLabel().split("_")[1]).intValue();
+				} catch(Exception e){
+					speed = 0;
+				}
+				//System.out.println("getingHotter: "+ (prevTemp < temp));
+				if(getingHotter){
+					if(temp > EnvironmentConditions.tempLevelLow2Medium && temp < EnvironmentConditions.tempLevelMedium2High){
+						if(speed < 60){
+							//System.out.println("+++++++++ low 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));
+						}
+					} else if (temp > EnvironmentConditions.tempLevelMedium2High && temp < EnvironmentConditions.tempLevelHigh2Max) {
+						if(speed < 80){
+							//System.out.println("++++++++medium 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						}
+					} else if (temp > EnvironmentConditions.tempLevelHigh2Max) {
+						if(speed < 100){
+							//System.out.println("++++++++high 2 max");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_100"));
+						}
+					}					
+				} else if (getingColder){
+					if(temp > EnvironmentConditions.tempLevelHigh2Medium && temp < EnvironmentConditions.tempLevelMax2High){
+						if(speed == 100){
+							//System.out.println("-------- max 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						}
+					} else if(temp > EnvironmentConditions.tempLevelMedium2Low && temp < EnvironmentConditions.tempLevelHigh2Medium){
+						if(speed >= 80){
+							//System.out.println("-------- high 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));		
+						}
+					} else if (temp < EnvironmentConditions.tempLevelMedium2Low) {
+						if(speed >= 60){
+							//System.out.println("-------- medium 2 low");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30"));	
+						}
+					}
+				}
+			}
+		}
+	}
+	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
+			List<Node> nodes, TaskInterface<?> task) {
+
+		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>(1);
+
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+
+		List<Node> filteredNodes = filterNodes(nodes, task);
+		if(filteredNodes.size()==0)
+			return null;
+		Node node = chooseRandomNode(filteredNodes);
+		while(node.getFreeCores().size() < cpuRequest){
+			node = chooseRandomNode(nodes);
+		}
+		
+		if (cpuRequest != 0) {
+
+			if (node.getFreeCores().size() < cpuRequest) {
+				return null;
+			}
+
+			List<Processor>  processors = node.getProcessors();
+			List<Core> cores = node.getCores();
+			List<ComputingResource> choosenResources = new ArrayList<ComputingResource>(cpuRequest);				
+			for (int i = 0; i < cores.size() && cpuRequest > 0; i++) {
+				if (cores.get(i).getStatus() == ResourceStatus.FREE) {
+					choosenResources.add(cores.get(i));
+					cpuRequest--;
+				}
+			}
+			if (cpuRequest > 0) {
+				return null;
+			}
+
+			ProcessingElements pe = new ProcessingElements();
+			pe.addAll(choosenResources);
+			map.put(StandardResourceUnitName.PE, pe);
+			return map;
+		}
+
+		return null;
+	}
+
+	
+	private List<Node> filterNodes(List<Node> nodes, TaskInterface<?> task){
+		List<Node> filteredNodes = new ArrayList<Node>();
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+		for (Node node : nodes) {
+
+			if (cpuRequest != 0) {
+
+				List<Core> cores = node.getCores();
+				if (cores.size() < cpuRequest) {
+					if(cores.size() == 0){
+						if(node.getProcessors().size() < cpuRequest)
+							continue;
+					}
+				}
+
+				int freeCores = 0;
+				for(Core core: cores){
+					if(core.getStatus() == ResourceStatus.FREE)
+						freeCores++;
+				}
+				
+				if(freeCores < cpuRequest)
+					continue;
+				
+				filteredNodes.add(node);
+			}
+		}
+		
+		return filteredNodes;
+	}
+	
+
+	private Node chooseRandomNode(List<Node> nodes) {
+		int nodeIdx = rand.nextInt(nodes.size());
+		return nodes.get(nodeIdx);
+	}
+
+
+}
+
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FCFSBF_RandomPluginPowerCapping.java	(revision 1500)
@@ -0,0 +1,505 @@
+package experiments.simpat2014.models.article;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.resources.CoolEmAllResourceType;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Core;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.ResourceEventType;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.units.ProcessingElements;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.resources.units.StandardResourceUnitName;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import simulator.DataCenterWorkloadSimulator;
+import test.Node_Fan_Mapping;
+import eduni.simjava.Sim_system;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+import example.localplugin.BaseLocalSchedulingPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class FCFSBF_RandomPluginPowerCapping extends BaseLocalSchedulingPlugin {
+
+	private Random rand;
+	
+	private Map<String, Double> powerCapsLevels;
+	private Map<String, Double> powerUpgradesLevels;
+	private Map<String, Double> currentFrequencyLevels;
+	
+	public FCFSBF_RandomPluginPowerCapping () {
+		rand = new Random(5);
+		currentFrequencyLevels = new HashMap<String, Double>();
+		powerCapsLevels  = new HashMap<String, Double>();
+		powerUpgradesLevels  = new HashMap<String, Double>();
+	}
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			 ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		SchedulingPlan plan = new SchedulingPlan();
+		// choose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		case TIMER:
+
+			System.out.println("##" + Sim_system.clock());
+			DataCenterWorkloadSimulator.getEventManager().sendToResources(StandardResourceType.Processor, 0.0, new ResourceEvent(ResourceEventType.TIMER, null));
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(EnvironmentConditions.SYSTEM_UDPATE_INTERVAL, DCWormsTags.TIMER, "Test");
+			break;
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+		//case TIMER:
+			// our tasks are placed only in first queue (see
+			// BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			
+			// check all tasks in queue
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+
+					if(resourceManager.getResourcesByTypeWithStatus(StandardResourceType.Core, ResourceStatus.FREE).size() == 0)
+						break;
+
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(resourceManager, task);
+					if (choosenResources != null) {
+						addToSchedulingPlan(plan, task, choosenResources);
+					}
+				}
+			}
+			break;
+		case RESOURCE_POWER_LIMIT_EXCEEDED:
+			powerCap(resManager, event.getSource().toString());
+			break;
+		case RESOURCE_TEMPERATURE_LIMIT_EXCEEDED:
+			manageFans(resourceManager.getResourceByName(event.getSource()));
+			break;
+
+		}
+		
+		return plan;
+	}
+
+	private void manageFans(ComputingResource cr ){
+		//System.out.println("tuning fans");
+		double temp = cr.getThermalInterface().getRecentTemperature().getValue();
+		double prevTemp;
+		if(cr.getThermalInterface().getTemperatureHistory().size() == 1)
+			prevTemp = temp;
+		else {
+			prevTemp = cr.getThermalInterface().getTemperatureHistory().get(cr.getThermalInterface().getTemperatureHistory().size() - 2).getValue();
+		}
+
+		//System.out.println(prevTemp+  ";  " + temp);
+		boolean getingHotter = prevTemp < temp;
+		boolean getingColder = prevTemp > temp;
+		Node n = (Node) cr.getParent();
+		for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
+			//System.out.println(d.getName() + "; " + n.getName());
+			if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) || Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+				Fan f = (Fan) d;
+				int speed;
+				try{
+					speed= Integer.valueOf(f.getAirflowInterface().getAirflowState().getLabel().split("_")[1]).intValue();
+				} catch(Exception e){
+					speed = 0;
+				}
+				if(getingHotter){
+					if(temp > EnvironmentConditions.tempLevelLow2Medium && temp < EnvironmentConditions.tempLevelMedium2High){
+						if(speed < 60){
+							//System.out.println("+++++++++ low 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));
+						}
+					} else if (temp > EnvironmentConditions.tempLevelMedium2High && temp < EnvironmentConditions.tempLevelHigh2Max) {
+						if(speed < 80){
+							//System.out.println("++++++++medium 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						}
+					} else if (temp > EnvironmentConditions.tempLevelHigh2Max) {
+						if(speed < 100){
+							//System.out.println("++++++++high 2 max");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_100"));
+						}
+					}					
+				} else if (getingColder){
+					if(temp > EnvironmentConditions.tempLevelHigh2Medium && temp < EnvironmentConditions.tempLevelMax2High){
+						if(speed == 100){
+							//System.out.println("-------- max 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						}
+					} else if(temp > EnvironmentConditions.tempLevelMedium2Low && temp < EnvironmentConditions.tempLevelHigh2Medium){
+						if(speed >= 80){
+							//System.out.println("-------- high 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));		
+						}
+					} else if (temp < EnvironmentConditions.tempLevelMedium2Low) {
+						if(speed >= 60){
+							//System.out.println("-------- medium 2 low");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30"));	
+						}
+					}
+				}
+			}
+		}
+	}
+	
+	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
+			ClusterResourceManager resourceManager, TaskInterface<?> task) {
+
+		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>();
+		
+		List<Node> nodes = resourceManager.getNodes();
+		List<Node> avNodes = filterNodes(nodes, task);
+		if(avNodes.size() == 0)
+			return null;
+		Node node = randomNode(avNodes);
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+
+		if (cpuRequest != 0) {
+
+			List<ComputingResource> choosenResources = new ArrayList<ComputingResource>();	
+			List<Core> cores = node.getCores();			
+			for (int i = 0; i < cores.size() && cpuRequest > 0; i++) {
+				if (cores.get(i).getStatus() == ResourceStatus.FREE) {
+					choosenResources.add(cores.get(i));
+					cpuRequest--;
+				}
+			}
+			if (cpuRequest > 0) {
+				return null;
+			}
+
+			//choosenResources.add(node.getProcessors().get(0));
+			ProcessingElements pe = new ProcessingElements();
+			pe.addAll(choosenResources);
+			map.put(StandardResourceUnitName.PE, pe);
+			return map;
+		}
+		return null;
+	}
+	
+	private List<Node> filterNodes(List<Node> nodes, TaskInterface<?> task){
+		List<Node> filteredNodes = new ArrayList<Node>();
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+		for (Node node : nodes) {
+
+			if (cpuRequest != 0) {
+
+				List<Core> cores = node.getCores();
+				if (cores.size() < cpuRequest) {
+					if(cores.size() == 0){
+						if(node.getProcessors().size() < cpuRequest)
+							continue;
+					}
+				}
+
+				int freeCores = 0;
+				for(Core core: cores){
+					if(core.getStatus() == ResourceStatus.FREE)
+						freeCores++;
+				}
+				
+				if(freeCores < cpuRequest)
+					continue;
+				
+				filteredNodes.add(node);
+			}
+		}
+		
+		return filteredNodes;
+	}
+	
+	private Node randomNode(List<Node> nodes){
+		return nodes.get(rand.nextInt(nodes.size()));
+	}
+	
+	private void powerCap(ResourceManager resManager, String resName){
+		ComputingResource compRes = resManager.getResourceByName(resName);
+		//for(ComputingResource compRes: resManager.getResourcesOfType(CoolEmAllResourceType.NodeGroup)){
+			if(!powerCapsLevels.containsKey(compRes.getFullName()) || !powerUpgradesLevels.containsKey(compRes.getFullName())){
+				loadThresholds(compRes);
+			}
+			double powerConsumption = compRes.getPowerInterface().getRecentPowerUsage().getValue();
+			//System.out.println(compRes.getFullName() + " current: " + powerConsumption);
+			if(powerConsumption > powerCapsLevels.get(compRes.getFullName())){
+				NodeGroup nodeGroup = (NodeGroup) compRes;
+				List<Processor> processors = nodeGroup.getProcessors();
+				
+				double currentFrequencyLevel = 0;
+				if(currentFrequencyLevels.get(compRes.getFullName()) != null){
+					currentFrequencyLevel = currentFrequencyLevels.get(compRes.getFullName());
+				} else {
+					currentFrequencyLevel = processors.get(0).getPowerInterface().getLowestPState().getFrequency();
+				}
+				boolean overThreshold = true;
+				boolean canDoBetter = true;
+
+				while(overThreshold && canDoBetter){
+					//System.out.println(compRes.getFullName() + " - downgrading");
+					int procNumberWithoutChange = 0;
+					boolean improvement = false;
+					//System.out.println(compRes.getFullName() + "; currentFrequencyLevel: " + currentFrequencyLevel);
+					for (Processor proc: processors){
+						PState currPState = proc.getPowerInterface().getPState();
+						//System.out.println(proc.getFullName() + " - checking");
+						if(currPState.getFrequency() <= currentFrequencyLevel && proc.getFreeCores().size() != proc.getCores().size()){
+							//System.out.println("operating same level");
+							procNumberWithoutChange++;
+							continue;
+						} 
+						if (proc.getFreeCores().size() == proc.getCores().size()){	
+							//System.out.println("free");
+							procNumberWithoutChange++;
+							continue;
+						} 
+		
+						double lowerFrequency = proc.getPowerInterface().getHighestPState().getFrequency();
+						for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+							PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+							if(pState.getFrequency() > lowerFrequency && pState.getFrequency() < currPState.getFrequency()){
+								lowerFrequency = pState.getFrequency();
+							}
+						}
+						//System.out.println(proc.getFullName() + "; lower frequency: " + lowerFrequency);
+						if(lowerFrequency < currentFrequencyLevel){
+							//System.out.println(compRes.getFullName() + " - changing current frequency level");
+							currentFrequencyLevels.put(compRes.getFullName(), lowerFrequency);
+							currentFrequencyLevel = currentFrequencyLevels.get(compRes.getFullName());
+						}
+						
+						if(lowerFrequency != currPState.getFrequency()) {
+							//System.out.println(proc.getFullName() + " - lowering frequency");
+							proc.getPowerInterface().setFrequency(lowerFrequency);
+							Node n = proc.getNode();
+							for(Device device: n.getParent().getResourceCharacteristic().getDevices()){
+								
+								if(device.getType().equals(StandardResourceType.Fan) || device.getType().equals(StandardResourceType.Inlet) | device.getType().equals(StandardResourceType.Outlet)){
+									Fan fan = (Fan) device;
+
+									if(fan.getChilledResources().contains(n.getFullName())){
+										fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2"));
+									}
+								}
+							}
+							improvement = true;
+						}
+						if(lowerFrequency == proc.getPowerInterface().getHighestPState().getFrequency()){
+							canDoBetter = false;
+						} else {
+							canDoBetter = true;
+						}
+						if(compRes.getPowerInterface().getRecentPowerUsage().getValue() <= powerCapsLevels.get(compRes.getFullName())){
+							overThreshold = false;
+							break;
+						}
+					}	
+					if(procNumberWithoutChange == processors.size() || improvement == false){
+						//System.out.println(compRes.getFullName() + " - failed to improve");
+						double nextFrequencyLevel = processors.get(0).getPowerInterface().getHighestPState().getFrequency();
+						for (Processor proc: processors){
+							for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+								PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+								if(pState.getFrequency() > nextFrequencyLevel && pState.getFrequency() < currentFrequencyLevel){
+									nextFrequencyLevel = pState.getFrequency();
+								} 
+							}
+						}
+						//System.out.println(compRes.getFullName() + "; nextFrequencyLevel: " + nextFrequencyLevel);
+						currentFrequencyLevels.put(compRes.getFullName(), nextFrequencyLevel);
+						currentFrequencyLevel = currentFrequencyLevels.get(compRes.getFullName());
+						if(currentFrequencyLevel == processors.get(0).getPowerInterface().getHighestPState().getFrequency()){
+							canDoBetter = false;
+						}
+						procNumberWithoutChange = 0;
+					}
+				}
+
+			} else if (powerConsumption < powerUpgradesLevels.get(compRes.getFullName())) {
+				NodeGroup nodeGroup = (NodeGroup) compRes;
+				List<Processor> processors = nodeGroup.getProcessors();
+				
+				double currentFrequencyLevel = 0;
+				if(currentFrequencyLevels.get(compRes.getFullName()) != null){
+					currentFrequencyLevel = currentFrequencyLevels.get(compRes.getFullName());
+				} else {
+					currentFrequencyLevel = processors.get(0).getPowerInterface().getLowestPState().getFrequency();
+				}
+				boolean overThreshold = true;
+				boolean canDoBetter = true;
+
+				while(overThreshold && canDoBetter){
+					//System.out.println(compRes.getFullName() + " - downgrading");
+					int procNumberWithoutChange = 0;
+					boolean improvement = false;
+					//System.out.println(compRes.getFullName() + "; currentFrequencyLevel: " + currentFrequencyLevel);
+					for (Processor proc: processors){
+						PState currPState = proc.getPowerInterface().getPState();
+						//System.out.println(proc.getFullName() + " - checking");
+						if(currPState.getFrequency() >= currentFrequencyLevel && proc.getFreeCores().size() != proc.getCores().size()){
+							//System.out.println("operating same level");
+							procNumberWithoutChange++;
+							continue;
+						} 
+						if (proc.getFreeCores().size() == proc.getCores().size()){	
+							//System.out.println("free");
+							procNumberWithoutChange++;
+							continue;
+						} 
+		
+						double higherFrequency = proc.getPowerInterface().getLowestPState().getFrequency();
+						for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+							PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+							if(pState.getFrequency() < higherFrequency && pState.getFrequency() > currPState.getFrequency()){
+								higherFrequency = pState.getFrequency();
+							}
+						}
+						//System.out.println(proc.getFullName() + "; lower frequency: " + lowerFrequency);
+						if(higherFrequency > currentFrequencyLevel){
+							//System.out.println(compRes.getFullName() + " - changing current frequency level");
+							currentFrequencyLevels.put(compRes.getFullName(), higherFrequency);
+							currentFrequencyLevel = currentFrequencyLevels.get(compRes.getFullName());
+						}
+						
+						if(higherFrequency != currPState.getFrequency()) {
+							//System.out.println(proc.getFullName() + " - lowering frequency");
+							proc.getPowerInterface().setFrequency(higherFrequency);
+							Node n = proc.getNode();
+							for(Device device: n.getParent().getResourceCharacteristic().getDevices()){
+								
+								if(device.getType().equals(StandardResourceType.Fan) || device.getType().equals(StandardResourceType.Inlet) | device.getType().equals(StandardResourceType.Outlet)){
+									Fan fan = (Fan) device;
+
+									if(fan.getChilledResources().contains(n.getFullName())){
+										fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2"));
+									}
+								}
+							}
+							improvement = true;
+						}
+						if(higherFrequency == proc.getPowerInterface().getLowestPState().getFrequency()){
+							canDoBetter = false;
+						} else {
+							canDoBetter = true;
+						}
+						if(compRes.getPowerInterface().getRecentPowerUsage().getValue() >= powerCapsLevels.get(compRes.getFullName())){
+							overThreshold = false;
+							break;
+						}
+					}
+					if(procNumberWithoutChange == processors.size() || improvement == false){
+						//System.out.println(compRes.getFullName() + " - failed to improve");
+						double nextFrequencyLevel = processors.get(0).getPowerInterface().getLowestPState().getFrequency();
+						for (Processor proc: processors){
+							for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+								PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+								if(pState.getFrequency() < nextFrequencyLevel && pState.getFrequency() > currentFrequencyLevel){
+									nextFrequencyLevel = pState.getFrequency();
+								} 
+							}
+						}
+						//System.out.println(compRes.getFullName() + "; nextFrequencyLevel: " + nextFrequencyLevel);
+						currentFrequencyLevels.put(compRes.getFullName(), nextFrequencyLevel);
+						currentFrequencyLevel = currentFrequencyLevels.get(compRes.getFullName());
+						if(currentFrequencyLevel == processors.get(0).getPowerInterface().getLowestPState().getFrequency()){
+							canDoBetter = false;
+						}
+						procNumberWithoutChange = 0;
+					}
+				}
+
+			}
+		//}
+			//if(Sim_system.clock() > 1000 && Sim_system.clock() < 1100 || Sim_system.clock() > 3400)
+			//System.out.println(currentFrequencyLevels);
+
+	}
+	
+	private void loadThresholds(ComputingResource compResource){
+		
+		double pcLevel = 0;
+		double puLevel = 0;
+		
+		/*NodeGroup ng = (NodeGroup) compResource;
+		for(Processor proc: ng.getProcessors()){
+			PState highestPState =  proc.getPowerInterface().getHighestPState();
+			PState secondHighestPState =  proc.getPowerInterface().getLowestPState();
+			for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+				PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+				if(pState.getFrequency()  < secondHighestPState.getFrequency() && pState.getFrequency() > highestPState.getFrequency()){
+					secondHighestPState = pState;
+				}
+			}
+			double maxMinPowerUsage = 0;
+			double powerUsage = 0;
+			
+			for(Double load: highestPState.getLoadPowerUsage().keySet()){
+				powerUsage = highestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			pcLevel = pcLevel + maxMinPowerUsage;
+			
+			maxMinPowerUsage = 0;
+			powerUsage = 0;
+			
+			for(Double load: secondHighestPState.getLoadPowerUsage().keySet()){
+				powerUsage = secondHighestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			puLevel = puLevel + maxMinPowerUsage;
+			
+		}
+
+		puLevel = (pcLevel * pcLevel / puLevel);
+
+		*/
+		
+		pcLevel = EnvironmentConditions.powerCapLevel;
+		puLevel = EnvironmentConditions.powerUpgradeLevel;
+		
+		powerCapsLevels.put(compResource.getFullName(), pcLevel);
+		powerUpgradesLevels.put(compResource.getFullName(), puLevel);
+	}
+}
+
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,37 @@
+package experiments.simpat2014.models.article;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class NodeGroupEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		NodeGroup nodeGroup = (NodeGroup)resource;
+		for(Node node: nodeGroup.getNodes()){
+			try{
+				powerConsumption = powerConsumption + node.getPowerInterface().getRecentPowerUsage().getValue();
+
+			} catch (Exception e){
+			}
+		}
+
+		for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				Fan fan = (Fan) device;
+				powerConsumption = powerConsumption + fan.getPowerInterface().getRecentPowerUsage().getValue();
+			}
+		}
+		return powerConsumption;
+	}
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FanEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FanEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FanEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,76 @@
+package experiments.simpat2014.models.article;
+
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class FanEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	/*private static int PFanMax = 6;
+	private static int TFanLow = 45;
+	private static int TFanHigh = 47;*/
+
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		Fan fan = (Fan) resource;
+		/*Node node = (Node) fan.getComputingResource();
+		double Tcpu = 0;
+		for(Processor cpu: node.getProcessors()){
+			Tcpu = Tcpu + cpu.getThermalInterface().getRecentTemperature().getValue();
+		}
+		Tcpu = Tcpu/node.getProcessors().size();
+		
+		if (Tcpu < TFanLow) {
+			powerConsumption = 4;
+		} else if (Tcpu > TFanHigh){
+			powerConsumption = PFanMax;
+		}
+		*/
+		
+		try {
+			powerConsumption = fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+		} catch (NoSuchFieldException e) {
+			//
+		}
+		
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		
+		double airflow = 0;
+		Fan fan = (Fan) resource;
+		
+		/*double fanEfficiency = 0;
+		try{
+			fanEfficiency = Double.valueOf(fan.getPowerInterface().getParameters().get("fanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+
+		double dp = 1013.25;
+		airflow = fan.getPowerInterface().getRecentPowerUsage().getValue() * fanEfficiency /dp;*/
+
+		try {
+			airflow = fan.getAirflowInterface().getAirflow(fan.getAirflowInterface().getAirflowState());
+		} catch (NoSuchFieldException e) {
+			//
+		}
+		return airflow;
+	}
+	
+	public double estimateTemperature (ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double temperature = EnvironmentConditions.ROOM_TEMPERATURE;
+		return temperature;
+	}
+	
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeEnergyEstimationPluginPowerCapping.java	(revision 1500)
@@ -0,0 +1,206 @@
+package experiments.simpat2014.models.article;
+
+
+import java.util.List;
+
+import schedframe.resources.CoolEmAllResourceType;
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+
+public class NodeEnergyEstimationPluginPowerCapping extends BaseEnergyEstimationPlugin {
+
+	//double powerCapLevel = -1;
+	//double powerUpgradeLevel = -1;
+	
+	
+	private static double Tidle = 26;
+
+	private double timestamp = 0;
+	private double old_temperature = Tidle;
+	private double new_temperature = -1;
+	private double objective_temperature = Tidle;
+	private boolean fan = false;
+	
+	private double next_timer = -1;
+
+	private static double Pidle = 15;
+	private static double Pfull = 76;
+
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+
+		//loadThresholds((ComputingResource)resource);
+
+		Node node = (Node) resource;
+		double powerConsumption = 0;
+
+		/*double Pcpu = 0;	
+		for(Processor cpu: node.getProcessors()){
+			Pcpu = Pcpu + cpu.getPowerInterface().getRecentPowerUsage().getValue();
+		}*/
+		
+		//powerConsumption = Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100; 
+		powerConsumption = Pidle + node.getProcessors().get(0).getPowerInterface().getRecentPowerUsage().getValue(); 
+		
+		/*if(powerCapLevel!= -1 && powerConsumption > powerCapLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, null);
+		}
+		else if(powerUpgradeLevel != -1 && powerConsumption < powerUpgradeLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, null);
+		}*/
+		return powerConsumption;
+	}
+
+	@Override
+	public double estimateTemperature(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+
+		Node node = (Node) resource;
+		Processor cpu = node.getProcessors().get(0);
+		double Pserv = 0;
+
+		double R = 0;
+		double Rb = 0;
+		double Rcv = 0;
+		try{
+			Rb = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalResistance").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double k = 0;
+		try{
+			k = Double.valueOf(cpu.getPowerInterface().getParameters().get("k").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double a = 0;
+		try{
+			a = Double.valueOf(cpu.getPowerInterface().getParameters().get("a").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			a = 1;
+		}
+
+
+		double C = 0;
+		try{
+			C = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalCapacity").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double V = 0;
+		double Pfan = 0;
+		for(Device device: node.getParent().getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(node.getName().split("_")[1]) || Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+					Fan fan = (Fan) device;
+					V = fan.getAirflowInterface().getRecentAirflow().getValue();
+					Pfan =  fan.getPowerInterface().getRecentPowerUsage().getValue();
+					break;
+				}
+			}
+		}
+
+		Rcv =  1/ (k * Math.pow(V, a));
+		R = Rb + Rcv; 
+		
+		double K = 0;
+		double Cair = EnvironmentConditions.AIR_HEAT_CAPACITY;
+		double ro = EnvironmentConditions.AIR_DENSITY;
+
+		K = V * Cair * ro;
+		//System.out.println("-------K: " + K +  "; V:" + V);
+
+		double delta_t = Sim_system.clock() - timestamp;
+
+		double Tin = EnvironmentConditions.ROOM_TEMPERATURE;
+		Pserv = node.getPowerInterface().getRecentPowerUsage().getValue();
+		Pserv = Pserv + Pfan;
+		
+		NodeGroup ng = (NodeGroup) node.getParent();
+		for(Node n: ng.getNodes()){
+			if(Integer.valueOf(n.getName().split("_")[1]) - Integer.valueOf(node.getName().split("_")[1]) == EnvironmentConditions.NODES_IN_A_ROW){
+				Tin = n.getThermalInterface().getRecentTemperature().getValue();
+			}
+		}
+		
+		double targetTemp = Pserv/K + Tin; 
+		objective_temperature = targetTemp;
+
+		new_temperature = objective_temperature + (old_temperature - objective_temperature) * Math.exp(-delta_t / (R * C));
+
+		// 5) save everything
+		timestamp = Sim_system.clock();
+		old_temperature = new_temperature;
+
+		return new_temperature;
+	}
+	
+	/*private void loadThresholds(ComputingResource compResource){
+		
+		Node n = (Node) compResource;
+		double pcLevel = 0;
+		double puLevel = 0;
+		for(Processor proc: n.getProcessors()){
+			PState highestPState =  proc.getPowerInterface().getHighestPState();
+			PState secondHighestPState =  proc.getPowerInterface().getLowestPState();
+			for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+				PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+				if(pState.getFrequency()  < secondHighestPState.getFrequency() && pState.getFrequency() > highestPState.getFrequency()){
+					secondHighestPState = pState;
+				}
+			}
+			double maxMinPowerUsage = 0;
+			double powerUsage = 0;
+			
+			for(Double load: highestPState.getLoadPowerUsage().keySet()){
+				powerUsage = highestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			pcLevel = pcLevel + maxMinPowerUsage;
+			
+			maxMinPowerUsage = 0;
+			powerUsage = 0;
+			
+			for(Double load: secondHighestPState.getLoadPowerUsage().keySet()){
+				powerUsage = secondHighestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			puLevel = puLevel + maxMinPowerUsage;
+			
+		}
+
+		puLevel = (pcLevel * pcLevel / puLevel);
+
+		//powerCapLevel = pcLevel;
+		//powerUpgradeLevel = puLevel;
+		
+		powerCapLevel = 60;
+		powerUpgradeLevel = 40;
+	}*/
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FlowPumpInletEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FlowPumpInletEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FlowPumpInletEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,143 @@
+package experiments.simpat2014.models.article;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class FlowPumpInletEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		/*********** Pfans_dc ***********/
+		double powerConsumption = 0;
+		double nf = 0.6;
+		
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			powerConsumption = delta_p * Vair_total / nf;
+		else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Fan)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Fan) &&  Integer.valueOf(device2.getName().split("_")[1]) == Integer.valueOf(device.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				powerConsumption = delta_p * Vair_total / nf;
+		}
+		
+		//System.out.println("Flow Pump power: " + powerConsumption);
+		
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		double Vair_total;
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		if(Vair_total != -1) {
+			airflow = Vair_total;
+		} else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+
+			double ro = 1.168;//constant
+			
+			double mair_total;
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			airflow = Vair_total;
+		}
+		return airflow;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FlowPumpOutletEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FlowPumpOutletEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/FlowPumpOutletEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,82 @@
+package experiments.simpat2014.models.article;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class FlowPumpOutletEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		double Vair_total;
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		if(Vair_total != -1) {
+			airflow = Vair_total;
+		} else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+
+			double ro = 1.168;//constant
+			
+			double mair_total;
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Fan)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Fan) || Integer.valueOf(device2.getName().split("_")[1]) == Integer.valueOf(device.getName().split("_")[1]) - EnvironmentConditions.NODES_IN_A_ROW){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			airflow = Vair_total;
+		}
+		return airflow;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/PowerLeakageEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,45 @@
+package experiments.simpat2014.models.article;
+
+import java.util.List;
+
+import schedframe.resources.CoolEmAllResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+import gridsim.dcworms.DCWormsTags;
+
+public class PowerLeakageEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	private static double Tidle = 28;
+	private static double Tfull = 60;
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+
+		double powerConsumption = 0;
+		Device pl = (Device) resource;
+		double tempDiff = pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() - Tidle;
+		double factor = 0.01 * tempDiff;
+		powerConsumption = factor * pl.getComputingResource().getPowerInterface().getRecentPowerUsage().getValue();
+		/*Device pl = (Device) resource;
+		if(pl.getComputingResource().getThermalInterface().getRecentTemperature().getValue() > 90){
+			powerConsumption = powerConsumption + 15;
+		}*/
+		return powerConsumption;
+	}
+
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CoolingDeviceEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CoolingDeviceEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/CoolingDeviceEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,487 @@
+package experiments.simpat2014.models.article;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+
+public class CoolingDeviceEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		return airflow;
+	}
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		
+		Device coolingDevice = (Device) resource;
+		ComputingResource room = (ComputingResource) coolingDevice.getComputingResource();
+		
+		double Pload_dc = calculatePit(room);
+		double Pothers = calculatePothers(Pload_dc);
+		double Pfans_dc = calculatePfans(room);
+		
+		
+		double Pchiller = calculatePchiller(Pload_dc, Pfans_dc, Pothers, room);
+		double Pdry_cooler = calculatePdryCooler(Pload_dc, Pfans_dc, Pothers, room);
+		
+		
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		double Tev = Tr_in - delta_Th_ex;
+		
+		//if data is not present in DB than don't take Pchiller into account
+		if(Tr_in != -1 && Tr_out != -1) {
+			if(Tamb != -1 && Tev - Tamb > 0 && delta_Th_dry_cooler < Tev - Tamb)
+				powerConsumption = Pdry_cooler;
+			else
+				powerConsumption = Pchiller;	
+		}
+		
+		
+		//System.out.println("CoolingDevice heat data: " + Qload_dc + "; " + Qothers + "; " + Qfans_dc + "; " + Qdc);
+		
+		//System.out.println("CoolingDevice power: " + powerConsumption);
+		
+		
+		return powerConsumption;
+	}
+	
+	private double calculatePit(ComputingResource room){
+		double Pload_dc = 0;
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			Pload_dc = Pload_dc + rack.getPowerInterface().getRecentPowerUsage().getValue();
+		}
+		return Pload_dc;
+	}
+	
+	private double calculatePothers(double Pload_dc){
+		
+		double Pothers = 0;
+		
+		double a;//experiment
+		try{
+			a = ConfigurationOptions.coolingData.getAlpha();
+		} catch (Exception e){
+			a = 0.2;
+		}
+
+		Pothers = a * Pload_dc;
+		return Pothers;
+	}
+	
+	private double calculatePfans(ComputingResource room){
+		
+		double Pfans_dc = 0;
+
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			Pfans_dc = delta_p * Vair_total / nf;
+		else {
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				Pfans_dc = delta_p * Vair_total / nf;
+		}
+		return Pfans_dc;
+	}
+	
+	private double calculatePchiller(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+		
+		double Pchiller = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+		
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+		double Qcooling_rated;//DEBB
+		try{
+			Qcooling_rated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCapacityRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			Qcooling_rated = 80000;
+		}
+		
+		double EERrated;//DEBB
+		try{
+			EERrated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("EERRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			EERrated = 5;
+		}
+
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		
+		double Tev;		
+		double CoolT;
+		double Qcooling_nom;
+		double PLR;
+
+		double delta_T;
+		double CoolPR;
+		double CoolPRrated;
+		double CoolPRT;
+		double CoolPRPLR;
+		double EER;
+		
+		
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Tev = Tr_in - delta_Th_ex;
+		double Tevf = 32 + 1.8 * Tev;
+		
+		double Tco = Tamb + delta_Th_dry_cooler;
+		
+		double Tcof = 32 + 1.8 * Tco;
+		CoolT = 0.647177 + 0.015888 * Tevf + 0.000103 * Math.pow(Tevf, 2) - 0.004167 * Tcof + 0.000007 * Math.pow(Tcof, 2) - 0.000064 * Tevf * Tcof;
+		Qcooling_nom = Qcooling_rated * CoolT;		
+		PLR = Qcooling / Qcooling_nom;
+		
+		delta_T = Tcof - Tevf;
+		CoolPRrated = 1 / EERrated;
+		CoolPRT = 0.564064 - 0.011463 * Tevf + 0.000112 * Math.pow(Tevf, 2) + 0.008091 * Tcof + 0.000070 * Math.pow(Tcof, 2) - 0.000126 * Tevf * Tcof;
+		CoolPRPLR = 0.023918 + 0.889469 * PLR + 0.077931 * Math.pow(PLR, 2) - 0.000264 * delta_T + 0.000007 * Math.pow(delta_T, 2) + 0.000180 * PLR * delta_T;
+		CoolPR = CoolPRrated * CoolPRT * CoolPRPLR;
+		EER = 1/CoolPR;
+		
+		Pchiller = Qcooling/EER;
+
+		return Pchiller;
+	}
+	
+	private double calculatePdryCooler(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Pdry_cooler = 0;
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double n_dry_cooler;//DEBB
+		try{
+			 n_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("dryCoolerEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			 n_dry_cooler = 0.02;
+		}
+
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Pdry_cooler = n_dry_cooler * Qcooling;
+		
+		return Pdry_cooler;
+	}
+	
+	private double calculateQ(double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Qdc = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+
+		/**************** HEAT ****************/
+		
+		double Qload_dc = 0;
+		double Qothers = 0;
+		double Qfans_dc = 0;
+
+		double delta_2; //DEBB - currently not present;
+		delta_2 = 0.4;
+		
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			double QnodeGroup = 0;
+			for(ComputingResource nodeGroup: rack.getChildren()){
+				double Qnodes = 0;
+				for(ComputingResource node: nodeGroup.getChildren()){
+					double Qcpu = 0;
+					Node n = (Node)node;
+					for(Processor proc: n.getProcessors()){
+						Qcpu = Qcpu + proc.getPowerInterface().getRecentPowerUsage().getValue();
+					}
+					Qnodes = Qnodes + Qcpu;
+				}
+				double Qfans = 0;
+				for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+					Fan fan = (Fan) device;
+					if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){
+						try {
+							Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+						} catch (NoSuchFieldException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					}else
+						Qfans = Qfans + (1 - delta_2) * fan.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				QnodeGroup = QnodeGroup + Qnodes + Qfans;
+			}
+			int nrOfPoweredOffNodes = 0;
+			for(Node node: rack.getNodes()){
+				if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+					nrOfPoweredOffNodes++;
+				}
+			}
+			if(nrOfPoweredOffNodes != rack.getNodes().size()){
+				Qload_dc  = Qload_dc + QnodeGroup + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION;
+			} else {
+				Qload_dc  = Qload_dc + QnodeGroup;
+			}
+		}
+		
+		Qothers = Pothers;
+		
+		Qfans_dc = (1 - nf) * Pfans_dc;
+		
+		Qdc = Qload_dc + Qothers + Qfans_dc;
+
+		
+		return Qdc;
+	}
+	
+	
+	private double calculateQ2(ComputingResource room){
+
+		double Qdc = 0;
+
+		double mair_total;
+		double Vair_total;
+		double ro = 1.168;//constant
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(Vair_total != -1) {
+			mair_total = Vair_total * ro;
+		}
+		else {
+	
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+		}
+		
+		double Cp = 1004;//constant
+
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+
+		Qdc = mair_total * Cp * (Tr_out - Tr_in);
+		
+		return Qdc;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/DataCenterEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/DataCenterEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/DataCenterEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,516 @@
+package experiments.simpat2014.models.article;
+
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+
+public class DataCenterEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double Pdc;
+		
+		double Pload_dc = 0;
+		double Pothers = 0;
+		double Pfans_dc = 0;
+		double Pcooling_device = 0;
+
+		ComputingResource room = (ComputingResource) resource;
+		
+		/**************** IT PART ****************/
+		
+		/*********** Pload_dc ***********/
+		Pload_dc = calculatePit(room);
+
+		
+		
+		/**************** NON- IT PART ****************/
+		
+		/*********** Pothers ***********/		
+		Pothers = calculatePothers(Pload_dc);
+		
+		
+		
+		/************* COOLING PART *************/
+
+		
+		/*********** Pfans_dc ***********/
+		Pfans_dc = calculatePfans(room);
+		
+		/************ Pcooling_device ************/
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		
+		double Pchiller = calculatePchiller(Pload_dc, Pfans_dc, Pothers, room);
+		double Pdry_cooler = calculatePdryCooler(Pload_dc, Pfans_dc, Pothers, room);
+		
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		double Tev = Tr_in - delta_Th_ex;
+
+		
+		//if data not present in DB than don't take Pchiller into account
+		if(Tr_in != -1 && Tr_out != -1) {
+			if(Tamb != -1 && Tev - Tamb > 0 && delta_Th_dry_cooler < Tev - Tamb)
+				Pcooling_device = Pdry_cooler;
+			else
+				Pcooling_device = Pchiller;	
+		}
+		
+
+		Pdc = Pload_dc + Pothers + Pfans_dc + Pcooling_device;
+		//System.out.println("---");
+		//System.out.println("Pdry_cooler: " + Pdry_cooler + " Pchiller: "+ Pchiller);
+		//System.out.println("Pdc: " + Pdc + " Pload_dc: "+ Pload_dc + " Pothers: " + Pothers + " Pfans_dc: " + Pfans_dc + " Pcooling_device: " + Pcooling_device);
+		
+		//System.out.println("CB2 heat: " + Qload_dc + "; " + Qothers + "; " + Qfans_dc + "; " + Qdc);
+		//System.out.println("CB2 power: " + Pload_dc + "; " + Pothers + "; " + Pfans_dc + "; " + Pcooling_device + "; " + Pdc);
+
+		return Pdc;
+	}
+	
+	private double calculatePit(ComputingResource room){
+		double Pload_dc = 0;
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			Pload_dc = Pload_dc + rack.getPowerInterface().getRecentPowerUsage().getValue();
+		}
+		return Pload_dc;
+	}
+	
+	private double calculatePothers(double Pload_dc){
+		
+		double Pothers = 0;
+		
+		double a;//experiment
+		try{
+			a = ConfigurationOptions.coolingData.getAlpha();
+		} catch (Exception e){
+			a = 0.2;
+		}
+
+		Pothers = a * Pload_dc;
+		return Pothers;
+	}
+	
+	private double calculatePfans(ComputingResource room){
+		
+		double Pfans_dc = 0;
+
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			Pfans_dc = delta_p * Vair_total / nf;
+		else {
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				Pfans_dc = delta_p * Vair_total / nf;
+		}
+		return Pfans_dc;
+	}
+	
+	private double calculatePchiller(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+		
+		double Pchiller = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+		
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+		double Qcooling_rated;//DEBB
+		try{
+			Qcooling_rated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCapacityRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			Qcooling_rated = 80000;
+		}
+		
+		double EERrated;//DEBB
+		try{
+			EERrated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("EERRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			EERrated = 5;
+		}
+
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		
+		double Tev;		
+		double CoolT;
+		double Qcooling_nom;
+		double PLR;
+
+		double delta_T;
+		double CoolPR;
+		double CoolPRrated;
+		double CoolPRT;
+		double CoolPRPLR;
+		double EER;
+		
+		
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Tev = Tr_in - delta_Th_ex;
+		double Tevf = 32 + 1.8 * Tev;
+		
+		double Tco = Tamb + delta_Th_dry_cooler;
+		
+		double Tcof = 32 + 1.8 * Tco;
+		CoolT = 0.647177 + 0.015888 * Tevf + 0.000103 * Math.pow(Tevf, 2) - 0.004167 * Tcof + 0.000007 * Math.pow(Tcof, 2) - 0.000064 * Tevf * Tcof;
+		Qcooling_nom = Qcooling_rated * CoolT;		
+		PLR = Qcooling / Qcooling_nom;
+		
+		delta_T = Tcof - Tevf;
+		CoolPRrated = 1 / EERrated;
+		CoolPRT = 0.564064 - 0.011463 * Tevf + 0.000112 * Math.pow(Tevf, 2) + 0.008091 * Tcof + 0.000070 * Math.pow(Tcof, 2) - 0.000126 * Tevf * Tcof;
+		CoolPRPLR = 0.023918 + 0.889469 * PLR + 0.077931 * Math.pow(PLR, 2) - 0.000264 * delta_T + 0.000007 * Math.pow(delta_T, 2) + 0.000180 * PLR * delta_T;
+		CoolPR = CoolPRrated * CoolPRT * CoolPRPLR;
+		EER = 1/CoolPR;
+		
+		Pchiller = Qcooling/EER;
+
+		return Pchiller;
+	}
+	
+	private double calculatePdryCooler(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Pdry_cooler = 0;
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double n_dry_cooler;//DEBB
+		try{
+			 n_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("dryCoolerEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			 n_dry_cooler = 0.02;
+		}
+
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Pdry_cooler = n_dry_cooler * Qcooling;
+		
+		return Pdry_cooler;
+	}
+	
+	private double calculateQ(double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Qdc = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+
+		/**************** HEAT ****************/
+		
+		double Qload_dc = 0;
+		double Qothers = 0;
+		double Qfans_dc = 0;
+
+		double delta_2; //DEBB - currently not present;
+		delta_2 = 0.4;
+		
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			double QnodeGroup = 0;
+			for(ComputingResource nodeGroup: rack.getChildren()){
+				double Qnodes = 0;
+				for(ComputingResource node: nodeGroup.getChildren()){
+					double Qcpu = 0;
+					Node n = (Node)node;
+					for(Processor proc: n.getProcessors()){
+						Qcpu = Qcpu + proc.getPowerInterface().getRecentPowerUsage().getValue();
+					}
+					Qnodes = Qnodes + Qcpu;
+				}
+				double Qfans = 0;
+				for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+					Fan fan = (Fan) device;
+					if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){
+						try {
+							Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+						} catch (NoSuchFieldException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					}else
+						Qfans = Qfans + (1 - delta_2) * fan.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				QnodeGroup = QnodeGroup + Qnodes + Qfans;
+			}
+			int nrOfPoweredOffNodes = 0;
+			for(Node node: rack.getNodes()){
+				if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+					nrOfPoweredOffNodes++;
+				}
+			}
+			if(nrOfPoweredOffNodes != rack.getNodes().size()){
+				Qload_dc  = Qload_dc + QnodeGroup + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION;
+			} else {
+				Qload_dc  = Qload_dc + QnodeGroup;
+			}
+		}
+		
+		Qothers = Pothers;
+		
+		Qfans_dc = (1 - nf) * Pfans_dc;
+		
+		Qdc = Qload_dc + Qothers + Qfans_dc;
+
+		
+		return Qdc;
+	}
+	
+	
+	private double calculateQ2(ComputingResource room){
+
+		double Qdc = 0;
+
+		double mair_total;
+		double Vair_total;
+		double ro = 1.168;//constant
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(Vair_total != -1) {
+			mair_total = Vair_total * ro;
+		}
+		else {
+	
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+		}
+		
+		double Cp = 1004;//constant
+
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+
+		Qdc = mair_total * Cp * (Tr_out - Tr_in);
+		
+		return Qdc;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/RackEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/RackEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/RackEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,60 @@
+package experiments.simpat2014.models.article;
+
+import java.util.List;
+
+import schedframe.resources.CoolEmAllResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+import gridsim.dcworms.DCWormsTags;
+
+public class RackEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+
+		
+		double powerConsumption = 0;
+		Rack rack = (Rack)resource;
+		for(ComputingResource nodeGroup: rack.getChildren()){
+			try{
+				powerConsumption = powerConsumption + nodeGroup.getPowerInterface().getRecentPowerUsage().getValue();
+			} catch (Exception e){
+				
+			}
+		}
+		
+		for(Node node: rack.getNodes()){
+				if(node.getProcessors().get(0).getThermalInterface().getRecentTemperature().getValue() > 90){
+					//powerConsumption = powerConsumption + 15;
+				}
+		}
+		
+		int nrOfPoweredOffNodes = 0;
+		for(Node node: rack.getNodes()){
+			if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+				nrOfPoweredOffNodes++;
+			}
+		}
+		if(nrOfPoweredOffNodes != rack.getNodes().size()){
+			powerConsumption = (powerConsumption + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION)/CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY;			
+		}
+
+		return powerConsumption;
+	}
+	
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPluginPowerCapping.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPluginPowerCapping.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/article/NodeGroupEnergyEstimationPluginPowerCapping.java	(revision 1500)
@@ -0,0 +1,104 @@
+package experiments.simpat2014.models.article;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class NodeGroupEnergyEstimationPluginPowerCapping extends BaseEnergyEstimationPlugin{
+
+	double powerCapLevel = -1;
+	double powerUpgradeLevel = -1;
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+
+		loadThresholds((ComputingResource)resource);
+		
+		double powerConsumption = 0;
+		NodeGroup nodeGroup = (NodeGroup)resource;
+		for(Node node: nodeGroup.getNodes()){
+			try{
+				powerConsumption = powerConsumption + node.getPowerInterface().getRecentPowerUsage().getValue();
+				powerConsumption = powerConsumption + node.getProcessors().get(0).getResourceCharacteristic().getDevices().get(0).getPowerInterface().getRecentPowerUsage().getValue();
+
+			} catch (Exception e){
+			}
+		}
+
+		for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				Fan fan = (Fan) device;
+				powerConsumption = powerConsumption + fan.getPowerInterface().getRecentPowerUsage().getValue();
+			}
+		}
+		
+		if(powerCapLevel!= -1 && powerConsumption > powerCapLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, resource.getFullName());
+		}
+		else if(powerUpgradeLevel != -1 && powerConsumption < powerUpgradeLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, resource.getFullName());
+		}
+		
+		return powerConsumption;
+	}
+
+	private void loadThresholds(ComputingResource compResource){
+		
+		NodeGroup ng = (NodeGroup) compResource;
+		double pcLevel = 0;
+		double puLevel = 0;
+		for(Processor proc: ng.getProcessors()){
+			PState highestPState =  proc.getPowerInterface().getHighestPState();
+			PState secondHighestPState =  proc.getPowerInterface().getLowestPState();
+			for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+				PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+				if(pState.getFrequency()  < secondHighestPState.getFrequency() && pState.getFrequency() > highestPState.getFrequency()){
+					secondHighestPState = pState;
+				}
+			}
+			double maxMinPowerUsage = 0;
+			double powerUsage = 0;
+			
+			for(Double load: highestPState.getLoadPowerUsage().keySet()){
+				powerUsage = highestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			pcLevel = pcLevel + maxMinPowerUsage;
+			
+			maxMinPowerUsage = 0;
+			powerUsage = 0;
+			
+			for(Double load: secondHighestPState.getLoadPowerUsage().keySet()){
+				powerUsage = secondHighestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			puLevel = puLevel + maxMinPowerUsage;
+			
+		}
+
+		puLevel = (pcLevel * pcLevel / puLevel);
+
+		//powerCapLevel = pcLevel;
+		//powerUpgradeLevel = puLevel;
+		
+		powerCapLevel = EnvironmentConditions.powerCapLevel;
+		powerUpgradeLevel = EnvironmentConditions.powerUpgradeLevel;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/CpuEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/CpuEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/CpuEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,198 @@
+package experiments.simpat2014.models.recs;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class CpuEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	private static double Pidle = 4;
+	private static double Pfull = 50;
+
+	private static int Tidle = 33;
+	
+	private double timestamp = 0;
+	private double old_temperature = Tidle;
+	private double new_temperature = -1;
+	private double objective_temperature = Tidle;
+	
+	private boolean fan = false;
+	
+	private double next_timer = -1;    
+	
+	private int cpu_temp_monitor = 0;
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		double powerConsumption = 0;
+
+		Processor cpu = (Processor)resource;
+		powerConsumption = Pidle + (Pfull- Pidle) * cpu.getLoadInterface().getRecentUtilization().getValue()/100;			
+
+		return powerConsumption;
+	}
+	
+	@Override
+	public double estimateTemperature(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double future = -1;
+
+		Processor cpu = (Processor) resource;
+
+		double R = 0;
+		double Rb = 0;
+		double Rcv = 0;
+		try{
+			Rb = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalResistance").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double k = 0;
+		try{
+			k = Double.valueOf(cpu.getPowerInterface().getParameters().get("k").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double a = 0;
+		try{
+			a = Double.valueOf(cpu.getPowerInterface().getParameters().get("a").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			a = 1;
+		}
+
+		double V = 0;
+	
+		for(Device device: cpu.getParent().getParent().getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(cpu.getParent().getName().split("_")[1])){
+					Fan fan = (Fan) device;
+					V = fan.getAirflowInterface().getRecentAirflow().getValue();
+					break;
+				}
+			}
+		}
+
+		Rcv =  1/ (k * Math.pow(V, a));
+		R = Rb + Rcv; 
+		
+		double C = 0;
+		try{
+			C = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalCapacity").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		// 1) look where we are
+		double delta_t = Sim_system.clock() - timestamp;
+		/***************model1*************/
+		//new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/sink);
+		
+		/***************model2*************/
+		new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/(R * C));
+		 
+
+		// 2) calculate if fan is needed ?
+		if(new_temperature <= EnvironmentConditions.TFanLow) {
+			fan = false;
+		}
+		if(new_temperature >= EnvironmentConditions.TFanHigh) {
+			fan = true; 
+		}
+		
+		// 3) compute new objective
+		double Tin = EnvironmentConditions.ROOM_TEMPERATURE;
+		double Pcpu = cpu.getPowerInterface().getRecentPowerUsage().getValue();
+		new_temperature = objective_temperature - (objective_temperature - old_temperature) * Math.exp(-delta_t/(R * C));
+		//new_temperature = (Pcpu * R + Tin) - (Pcpu * R + Tin - Tidle) * Math.exp(-Sim_system.clock()/(R * C));;
+		
+		
+		NodeGroup ng = (NodeGroup) cpu.getParent().getParent();
+		for(Node n: ng.getNodes()){
+			if(Integer.valueOf(n.getName().split("_")[1]) - Integer.valueOf(cpu.getParent().getName().split("_")[1]) == EnvironmentConditions.NODES_IN_A_ROW){
+				Tin = n.getThermalInterface().getRecentTemperature().getValue();
+			}
+		}
+		
+		/***************model1 - GEO1*************/
+		//double cpuLoad = cpu.getLoadInterface().getRecentUtilization().getValue();
+		//double targetTemp = Tidle + cpuLoad/100 * dTfull;
+		//if(fan) {
+		//	targetTemp = targetTemp - dTfan;
+		//}
+		
+		
+		/***************model2 - GEO2*************/
+		//Node node = (Node) cpu.getParent();
+		//Pserv = node.getPowerInterface().getRecentPowerUsage().getValue();
+		//double targetTemp = Pcpu * R + Tin; 
+		
+		/***************model3 - GEO1 + GEO2*************/
+		/*double targetTemp = Pcpu * R + Tin; 
+		if(fan) {
+			targetTemp = targetTemp - dTfan;
+		}*/
+	
+		/***************model4 - WP*************/
+		double targetTemp = Pcpu * R + Tin; 
+		
+		// 4) check if we will need to tune fans
+		if(fan && targetTemp < EnvironmentConditions.TFanLow) {
+			double timer = C * R * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanLow));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+		if(!fan && targetTemp > EnvironmentConditions.TFanHigh) {
+			double timer = C * R * Math.log((new_temperature - targetTemp)/(targetTemp - EnvironmentConditions.TFanHigh));
+			if(future == -1 || future > timer) {
+				future = timer;
+			}
+		}
+
+		// 5) save everything
+		timestamp = Sim_system.clock();
+		old_temperature = new_temperature;
+		objective_temperature = targetTemp;
+
+
+		if((future >= 0) && ((next_timer < Sim_system.clock()) || (next_timer >= future + Sim_system.clock()))) {
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(future, DCWormsTags.FANMGT, "Test");
+			next_timer = future + Sim_system.clock() - 0.01;
+		}		
+		
+		if(new_temperature > EnvironmentConditions.tempLevelMedium2Low && new_temperature < EnvironmentConditions.tempLevelLow2Medium){
+			if(cpu_temp_monitor != 1){
+				cpu_temp_monitor = 1;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelLow2Medium && new_temperature < EnvironmentConditions.tempLevelHigh2Medium){
+			if(cpu_temp_monitor != 2){
+				cpu_temp_monitor = 2;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelHigh2Medium && new_temperature < EnvironmentConditions.tempLevelMedium2High){
+			if(cpu_temp_monitor != 3){
+				cpu_temp_monitor = 3;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		} else if(new_temperature > EnvironmentConditions.tempLevelMedium2High){
+			if(cpu_temp_monitor != 4){
+				cpu_temp_monitor = 4;
+				DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+			}
+		}
+		//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_TEMPERATURE_LIMIT_EXCEEDED, resource.getFullName());
+
+		return new_temperature;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/CoolingDeviceEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/CoolingDeviceEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/CoolingDeviceEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,487 @@
+package experiments.simpat2014.models.recs;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+
+public class CoolingDeviceEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		return airflow;
+	}
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		
+		Device coolingDevice = (Device) resource;
+		ComputingResource room = (ComputingResource) coolingDevice.getComputingResource();
+		
+		double Pload_dc = calculatePit(room);
+		double Pothers = calculatePothers(Pload_dc);
+		double Pfans_dc = calculatePfans(room);
+		
+		
+		double Pchiller = calculatePchiller(Pload_dc, Pfans_dc, Pothers, room);
+		double Pdry_cooler = calculatePdryCooler(Pload_dc, Pfans_dc, Pothers, room);
+		
+		
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		double Tev = Tr_in - delta_Th_ex;
+		
+		//if data is not present in DB than don't take Pchiller into account
+		if(Tr_in != -1 && Tr_out != -1) {
+			if(Tamb != -1 && Tev - Tamb > 0 && delta_Th_dry_cooler < Tev - Tamb)
+				powerConsumption = Pdry_cooler;
+			else
+				powerConsumption = Pchiller;	
+		}
+		
+		
+		//System.out.println("CoolingDevice heat data: " + Qload_dc + "; " + Qothers + "; " + Qfans_dc + "; " + Qdc);
+		
+		//System.out.println("CoolingDevice power: " + powerConsumption);
+		
+		
+		return powerConsumption;
+	}
+	
+	private double calculatePit(ComputingResource room){
+		double Pload_dc = 0;
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			Pload_dc = Pload_dc + rack.getPowerInterface().getRecentPowerUsage().getValue();
+		}
+		return Pload_dc;
+	}
+	
+	private double calculatePothers(double Pload_dc){
+		
+		double Pothers = 0;
+		
+		double a;//experiment
+		try{
+			a = ConfigurationOptions.coolingData.getAlpha();
+		} catch (Exception e){
+			a = 0.2;
+		}
+
+		Pothers = a * Pload_dc;
+		return Pothers;
+	}
+	
+	private double calculatePfans(ComputingResource room){
+		
+		double Pfans_dc = 0;
+
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			Pfans_dc = delta_p * Vair_total / nf;
+		else {
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				Pfans_dc = delta_p * Vair_total / nf;
+		}
+		return Pfans_dc;
+	}
+	
+	private double calculatePchiller(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+		
+		double Pchiller = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+		
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+		double Qcooling_rated;//DEBB
+		try{
+			Qcooling_rated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCapacityRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			Qcooling_rated = 80000;
+		}
+		
+		double EERrated;//DEBB
+		try{
+			EERrated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("EERRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			EERrated = 5;
+		}
+
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		
+		double Tev;		
+		double CoolT;
+		double Qcooling_nom;
+		double PLR;
+
+		double delta_T;
+		double CoolPR;
+		double CoolPRrated;
+		double CoolPRT;
+		double CoolPRPLR;
+		double EER;
+		
+		
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Tev = Tr_in - delta_Th_ex;
+		double Tevf = 32 + 1.8 * Tev;
+		
+		double Tco = Tamb + delta_Th_dry_cooler;
+		
+		double Tcof = 32 + 1.8 * Tco;
+		CoolT = 0.647177 + 0.015888 * Tevf + 0.000103 * Math.pow(Tevf, 2) - 0.004167 * Tcof + 0.000007 * Math.pow(Tcof, 2) - 0.000064 * Tevf * Tcof;
+		Qcooling_nom = Qcooling_rated * CoolT;		
+		PLR = Qcooling / Qcooling_nom;
+		
+		delta_T = Tcof - Tevf;
+		CoolPRrated = 1 / EERrated;
+		CoolPRT = 0.564064 - 0.011463 * Tevf + 0.000112 * Math.pow(Tevf, 2) + 0.008091 * Tcof + 0.000070 * Math.pow(Tcof, 2) - 0.000126 * Tevf * Tcof;
+		CoolPRPLR = 0.023918 + 0.889469 * PLR + 0.077931 * Math.pow(PLR, 2) - 0.000264 * delta_T + 0.000007 * Math.pow(delta_T, 2) + 0.000180 * PLR * delta_T;
+		CoolPR = CoolPRrated * CoolPRT * CoolPRPLR;
+		EER = 1/CoolPR;
+		
+		Pchiller = Qcooling/EER;
+
+		return Pchiller;
+	}
+	
+	private double calculatePdryCooler(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Pdry_cooler = 0;
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double n_dry_cooler;//DEBB
+		try{
+			 n_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("dryCoolerEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			 n_dry_cooler = 0.02;
+		}
+
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Pdry_cooler = n_dry_cooler * Qcooling;
+		
+		return Pdry_cooler;
+	}
+	
+	private double calculateQ(double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Qdc = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+
+		/**************** HEAT ****************/
+		
+		double Qload_dc = 0;
+		double Qothers = 0;
+		double Qfans_dc = 0;
+
+		double delta_2; //DEBB - currently not present;
+		delta_2 = 0.4;
+		
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			double QnodeGroup = 0;
+			for(ComputingResource nodeGroup: rack.getChildren()){
+				double Qnodes = 0;
+				for(ComputingResource node: nodeGroup.getChildren()){
+					double Qcpu = 0;
+					Node n = (Node)node;
+					for(Processor proc: n.getProcessors()){
+						Qcpu = Qcpu + proc.getPowerInterface().getRecentPowerUsage().getValue();
+					}
+					Qnodes = Qnodes + Qcpu;
+				}
+				double Qfans = 0;
+				for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+					Fan fan = (Fan) device;
+					if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){
+						try {
+							Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+						} catch (NoSuchFieldException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					}else
+						Qfans = Qfans + (1 - delta_2) * fan.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				QnodeGroup = QnodeGroup + Qnodes + Qfans;
+			}
+			int nrOfPoweredOffNodes = 0;
+			for(Node node: rack.getNodes()){
+				if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+					nrOfPoweredOffNodes++;
+				}
+			}
+			if(nrOfPoweredOffNodes != rack.getNodes().size()){
+				Qload_dc  = Qload_dc + QnodeGroup + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION;
+			} else {
+				Qload_dc  = Qload_dc + QnodeGroup;
+			}
+		}
+		
+		Qothers = Pothers;
+		
+		Qfans_dc = (1 - nf) * Pfans_dc;
+		
+		Qdc = Qload_dc + Qothers + Qfans_dc;
+
+		
+		return Qdc;
+	}
+	
+	
+	private double calculateQ2(ComputingResource room){
+
+		double Qdc = 0;
+
+		double mair_total;
+		double Vair_total;
+		double ro = 1.168;//constant
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(Vair_total != -1) {
+			mair_total = Vair_total * ro;
+		}
+		else {
+	
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+		}
+		
+		double Cp = 1004;//constant
+
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+
+		Qdc = mair_total * Cp * (Tr_out - Tr_in);
+		
+		return Qdc;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/DataCenterEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/DataCenterEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/DataCenterEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,516 @@
+package experiments.simpat2014.models.recs;
+
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+
+public class DataCenterEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double Pdc;
+		
+		double Pload_dc = 0;
+		double Pothers = 0;
+		double Pfans_dc = 0;
+		double Pcooling_device = 0;
+
+		ComputingResource room = (ComputingResource) resource;
+		
+		/**************** IT PART ****************/
+		
+		/*********** Pload_dc ***********/
+		Pload_dc = calculatePit(room);
+
+		
+		
+		/**************** NON- IT PART ****************/
+		
+		/*********** Pothers ***********/		
+		Pothers = calculatePothers(Pload_dc);
+		
+		
+		
+		/************* COOLING PART *************/
+
+		
+		/*********** Pfans_dc ***********/
+		Pfans_dc = calculatePfans(room);
+		
+		/************ Pcooling_device ************/
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		
+		double Pchiller = calculatePchiller(Pload_dc, Pfans_dc, Pothers, room);
+		double Pdry_cooler = calculatePdryCooler(Pload_dc, Pfans_dc, Pothers, room);
+		
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		double Tev = Tr_in - delta_Th_ex;
+
+		
+		//if data not present in DB than don't take Pchiller into account
+		if(Tr_in != -1 && Tr_out != -1) {
+			if(Tamb != -1 && Tev - Tamb > 0 && delta_Th_dry_cooler < Tev - Tamb)
+				Pcooling_device = Pdry_cooler;
+			else
+				Pcooling_device = Pchiller;	
+		}
+		
+
+		Pdc = Pload_dc + Pothers + Pfans_dc + Pcooling_device;
+		//System.out.println("---");
+		//System.out.println("Pdry_cooler: " + Pdry_cooler + " Pchiller: "+ Pchiller);
+		//System.out.println("Pdc: " + Pdc + " Pload_dc: "+ Pload_dc + " Pothers: " + Pothers + " Pfans_dc: " + Pfans_dc + " Pcooling_device: " + Pcooling_device);
+		
+		//System.out.println("CB2 heat: " + Qload_dc + "; " + Qothers + "; " + Qfans_dc + "; " + Qdc);
+		//System.out.println("CB2 power: " + Pload_dc + "; " + Pothers + "; " + Pfans_dc + "; " + Pcooling_device + "; " + Pdc);
+
+		return Pdc;
+	}
+	
+	private double calculatePit(ComputingResource room){
+		double Pload_dc = 0;
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			Pload_dc = Pload_dc + rack.getPowerInterface().getRecentPowerUsage().getValue();
+		}
+		return Pload_dc;
+	}
+	
+	private double calculatePothers(double Pload_dc){
+		
+		double Pothers = 0;
+		
+		double a;//experiment
+		try{
+			a = ConfigurationOptions.coolingData.getAlpha();
+		} catch (Exception e){
+			a = 0.2;
+		}
+
+		Pothers = a * Pload_dc;
+		return Pothers;
+	}
+	
+	private double calculatePfans(ComputingResource room){
+		
+		double Pfans_dc = 0;
+
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			Pfans_dc = delta_p * Vair_total / nf;
+		else {
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				Pfans_dc = delta_p * Vair_total / nf;
+		}
+		return Pfans_dc;
+	}
+	
+	private double calculatePchiller(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+		
+		double Pchiller = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double delta_Th_dry_cooler;//DEBB
+		try{
+			delta_Th_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThDryCooler").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_dry_cooler = 10;
+		}
+		
+		double Tamb;//experiment
+		try{
+			Tamb = ConfigurationOptions.coolingData.getAmbientAirTempeature();
+		} catch (Exception e){
+			Tamb = -1;
+		}
+		
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+		double Qcooling_rated;//DEBB
+		try{
+			Qcooling_rated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCapacityRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			Qcooling_rated = 80000;
+		}
+		
+		double EERrated;//DEBB
+		try{
+			EERrated = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("EERRated").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			EERrated = 5;
+		}
+
+		double delta_Th_ex;//DEBB
+		try{
+			delta_Th_ex = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("deltaThEx").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			delta_Th_ex = 10;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+		
+		double Tev;		
+		double CoolT;
+		double Qcooling_nom;
+		double PLR;
+
+		double delta_T;
+		double CoolPR;
+		double CoolPRrated;
+		double CoolPRT;
+		double CoolPRPLR;
+		double EER;
+		
+		
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Tev = Tr_in - delta_Th_ex;
+		double Tevf = 32 + 1.8 * Tev;
+		
+		double Tco = Tamb + delta_Th_dry_cooler;
+		
+		double Tcof = 32 + 1.8 * Tco;
+		CoolT = 0.647177 + 0.015888 * Tevf + 0.000103 * Math.pow(Tevf, 2) - 0.004167 * Tcof + 0.000007 * Math.pow(Tcof, 2) - 0.000064 * Tevf * Tcof;
+		Qcooling_nom = Qcooling_rated * CoolT;		
+		PLR = Qcooling / Qcooling_nom;
+		
+		delta_T = Tcof - Tevf;
+		CoolPRrated = 1 / EERrated;
+		CoolPRT = 0.564064 - 0.011463 * Tevf + 0.000112 * Math.pow(Tevf, 2) + 0.008091 * Tcof + 0.000070 * Math.pow(Tcof, 2) - 0.000126 * Tevf * Tcof;
+		CoolPRPLR = 0.023918 + 0.889469 * PLR + 0.077931 * Math.pow(PLR, 2) - 0.000264 * delta_T + 0.000007 * Math.pow(delta_T, 2) + 0.000180 * PLR * delta_T;
+		CoolPR = CoolPRrated * CoolPRT * CoolPRPLR;
+		EER = 1/CoolPR;
+		
+		Pchiller = Qcooling/EER;
+
+		return Pchiller;
+	}
+	
+	private double calculatePdryCooler(double Pload_dc, double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Pdry_cooler = 0;
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+		
+		double n_dry_cooler;//DEBB
+		try{
+			 n_dry_cooler = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("dryCoolerEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			 n_dry_cooler = 0.02;
+		}
+
+		double ncc;//DEBB
+		try{
+			ncc = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("coolingCoilEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			ncc = 0.95;
+		}
+		
+
+		double Qdc = calculateQ(Pfans_dc, Pothers, room);
+		double Qcooling = Qdc / ncc;
+
+		Pdry_cooler = n_dry_cooler * Qcooling;
+		
+		return Pdry_cooler;
+	}
+	
+	private double calculateQ(double Pfans_dc, double Pothers, ComputingResource room){
+
+		double Qdc = 0;
+		
+		Device coolingDevice = null;
+		for(Device device: room.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.CoolingDevice)){
+				coolingDevice = device;
+				break;
+			}
+		}
+
+		double nf;//DEBB
+		try{
+			nf = Double.valueOf(coolingDevice.getResourceCharacteristic().getParameters().get("CRAHFanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			nf = 0.6;
+		}
+
+		/**************** HEAT ****************/
+		
+		double Qload_dc = 0;
+		double Qothers = 0;
+		double Qfans_dc = 0;
+
+		double delta_2; //DEBB - currently not present;
+		delta_2 = 0.4;
+		
+		for(ComputingResource cr: room.getChildren()){
+			Rack rack = (Rack)cr;
+			double QnodeGroup = 0;
+			for(ComputingResource nodeGroup: rack.getChildren()){
+				double Qnodes = 0;
+				for(ComputingResource node: nodeGroup.getChildren()){
+					double Qcpu = 0;
+					Node n = (Node)node;
+					for(Processor proc: n.getProcessors()){
+						Qcpu = Qcpu + proc.getPowerInterface().getRecentPowerUsage().getValue();
+					}
+					Qnodes = Qnodes + Qcpu;
+				}
+				double Qfans = 0;
+				for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+					Fan fan = (Fan) device;
+					if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){
+						try {
+							Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+						} catch (NoSuchFieldException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					}else
+						Qfans = Qfans + (1 - delta_2) * fan.getPowerInterface().getRecentPowerUsage().getValue();
+				}
+				QnodeGroup = QnodeGroup + Qnodes + Qfans;
+			}
+			int nrOfPoweredOffNodes = 0;
+			for(Node node: rack.getNodes()){
+				if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+					nrOfPoweredOffNodes++;
+				}
+			}
+			if(nrOfPoweredOffNodes != rack.getNodes().size()){
+				Qload_dc  = Qload_dc + QnodeGroup + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION;
+			} else {
+				Qload_dc  = Qload_dc + QnodeGroup;
+			}
+		}
+		
+		Qothers = Pothers;
+		
+		Qfans_dc = (1 - nf) * Pfans_dc;
+		
+		Qdc = Qload_dc + Qothers + Qfans_dc;
+
+		
+		return Qdc;
+	}
+	
+	
+	private double calculateQ2(ComputingResource room){
+
+		double Qdc = 0;
+
+		double mair_total;
+		double Vair_total;
+		double ro = 1.168;//constant
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(Vair_total != -1) {
+			mair_total = Vair_total * ro;
+		}
+		else {
+	
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+		}
+		
+		double Cp = 1004;//constant
+
+
+		double Tr_out;//from database, CFD
+		try{
+			Tr_out = ConfigurationOptions.coolingData.getOutletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_out = -1;
+		}
+		
+		double Tr_in;//experiment
+		try{
+			Tr_in = ConfigurationOptions.coolingData.getInletRoomAirTempeature();
+		} catch (Exception e){
+			Tr_in = -1;
+		}
+
+
+		Qdc = mair_total * Cp * (Tr_out - Tr_in);
+		
+		return Qdc;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FCFSBF_RandomPluginMigrate.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FCFSBF_RandomPluginMigrate.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FCFSBF_RandomPluginMigrate.java	(revision 1500)
@@ -0,0 +1,414 @@
+package experiments.simpat2014.models.recs;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.events.scheduling.TaskFinishedEvent;
+import schedframe.resources.ResourceStatus;
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.ResourceEventType;
+import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.CustomPowerStateName;
+import schedframe.resources.computing.profiles.energy.power.PowerState;
+import schedframe.resources.computing.profiles.energy.power.PowerUsage;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.units.ProcessingElements;
+import schedframe.resources.units.ResourceUnit;
+import schedframe.resources.units.ResourceUnitName;
+import schedframe.resources.units.StandardResourceUnitName;
+import schedframe.scheduling.ResourceItem;
+import schedframe.scheduling.manager.resources.ClusterResourceManager;
+import schedframe.scheduling.manager.resources.ResourceManager;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import schedframe.scheduling.manager.tasks.JobRegistryImpl;
+import schedframe.scheduling.plan.SchedulingPlanInterface;
+import schedframe.scheduling.plan.impl.SchedulingPlan;
+import schedframe.scheduling.plugin.ModuleList;
+import schedframe.scheduling.queue.TaskQueue;
+import schedframe.scheduling.queue.TaskQueueList;
+import schedframe.scheduling.tasks.TaskInterface;
+import simulator.DataCenterWorkloadSimulator;
+import dcworms.schedframe.scheduling.ExecTask;
+import eduni.simjava.Sim_system;
+import example.localplugin.BaseLocalSchedulingPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+import gridsim.dcworms.DCWormsTags;
+
+public class FCFSBF_RandomPluginMigrate extends BaseLocalSchedulingPlugin {
+
+	public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry,
+			ResourceManager resManager, ModuleList modules) {
+
+		ClusterResourceManager resourceManager = (ClusterResourceManager) resManager;
+		List<Processor> processors = resourceManager.getProcessors();
+		SchedulingPlan plan = new SchedulingPlan();
+//for(Node node: resourceManager.getNodes()){
+//	System.out.println(node.getFullName());
+//}
+		// choose the events types to serve.
+		// Different actions for different events are possible.
+		switch (event.getType()) {
+		
+		
+		case TIMER:
+
+			System.out.println("##########################" + Sim_system.clock());
+			DataCenterWorkloadSimulator.getEventManager().sendToResources(StandardResourceType.Processor, 0.0, new ResourceEvent(ResourceEventType.TIMER, null));
+			//DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(EnvironmentConditions.SYSTEM_UDPATE_INTERVAL, DCWormsTags.TIMER, "Test");
+			break;
+			
+		case START_TASK_EXECUTION:
+		case TASK_FINISHED:
+
+			// our tasks are placed only in first queue (see BaseLocalSchedulingPlugin.placeJobsInQueues() method)
+			TaskQueue q = queues.get(0);
+			// check all tasks in queue
+
+			for (int i = 0; i < q.size(); i++) {
+				TaskInterface<?> task = q.get(i);
+				// if status of the tasks in READY
+				if (task.getStatus() == DCWormsTags.READY) {
+					Map<ResourceUnitName, ResourceUnit> choosenResources = chooseResourcesForExecution(processors, task);
+					if (choosenResources != null) {
+						addToSchedulingPlan(plan, task, choosenResources);
+					} 
+				}
+			}
+
+			break;
+		case RESOURCE_TEMPERATURE_LIMIT_EXCEEDED:
+			System.out.println("tuning fans");
+			ComputingResource cr = resourceManager.getResourceByName(event.getSource());
+			double temp = cr.getThermalInterface().getRecentTemperature().getValue();
+			double prevTemp;
+			if(cr.getThermalInterface().getTemperatureHistory().size() == 1)
+				prevTemp = temp;
+			else {
+				prevTemp = cr.getThermalInterface().getTemperatureHistory().get(cr.getThermalInterface().getTemperatureHistory().size() - 2).getValue();
+			}
+
+			System.out.println(prevTemp+  ";  " + temp);
+			boolean getingHotter = prevTemp < temp;
+			Node n = (Node) cr.getParent();
+			for(Device d: n.getParent().getResourceCharacteristic().getDevices()){
+				if(Integer.valueOf(d.getName().split("_")[1]) == Integer.valueOf(n.getName().split("_")[1])){
+					Fan f = (Fan) d;
+					int speed;
+					try{
+						speed= Integer.valueOf(f.getAirflowInterface().getAirflowState().getLabel().split("_")[1]).intValue();
+					} catch(Exception e){
+						speed = 0;
+					}
+					if(getingHotter){
+						if(temp > EnvironmentConditions.tempLevelLow2Medium && temp < EnvironmentConditions.tempLevelMedium2High){
+							if(speed < 60){
+								System.out.println("+++++++++ low 2 medium");
+								f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));
+							}
+						} else if (temp > EnvironmentConditions.tempLevelMedium2High && temp < EnvironmentConditions.tempLevelHigh2Max) {
+							if(speed < 80){
+								System.out.println("++++++++medium 2 high");
+								f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+							}
+						} else if (temp > EnvironmentConditions.tempLevelHigh2Max) {
+							if(speed < 100){
+								System.out.println("++++++++high 2 max");
+								f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_100"));
+							}
+						}					
+					} else {
+						if(temp > EnvironmentConditions.tempLevelHigh2Medium && temp < EnvironmentConditions.tempLevelMax2High){
+							System.out.println("-------- max 2 high");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_80"));
+						} else if(temp > EnvironmentConditions.tempLevelMedium2Low && temp < EnvironmentConditions.tempLevelHigh2Medium){
+							System.out.println("-------- high 2 medium");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_60"));
+						} else if (temp < EnvironmentConditions.tempLevelMedium2Low) {
+							System.out.println("-------- medium 2 low");
+							f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_30"));
+						}
+					}
+				}
+			
+
+				/*AirflowStateName state = f.getAirflowInterface().getAirflowState();
+				try{
+					Integer level = Integer.valueOf(state.getLabel().split("_")[1]);
+					Integer newLevel = level + 10;		
+					if(newLevel <= 100)
+						f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_" + newLevel));			
+				} catch (Exception e){
+					f.getAirflowInterface().setAirflowState(new CustomAirflowStateName("ON_10"));
+				}	*/
+			}
+			//optimizeEnergyUsage(jobRegistry, resourceManager , src);
+			break;
+
+		}	
+
+		return plan;
+	}
+	
+
+	
+	// IRIT
+	private void firstFitConsolidation(JobRegistry jobRegistry, ClusterResourceManager resourceManager, SchedulingEvent event) {
+		Node underLoadedNode = getNodeFromEvent(jobRegistry, (TaskFinishedEvent) event);
+		double remainingLoad = underLoadedNode.getLoadInterface().getRecentUtilization().getValue();
+		if(remainingLoad == 0) { return; }
+
+		PowerUsage pow = underLoadedNode.getPowerInterface().getRecentPowerUsage();
+		System.out.println(" last  : "+pow.getValue());
+		System.out.println(" Estimate  : "+getPowerConsumptionAtLoad(underLoadedNode, remainingLoad));
+	
+		for(Node node: resourceManager.getNodes()) {
+			double destLoad = node.getLoadInterface().getRecentUtilization().getValue();
+			
+			if((node != underLoadedNode) && (destLoad!=0) && (destLoad + remainingLoad <= 100)) {
+				if(destLoad < remainingLoad) {
+					moveAllTask(jobRegistry, node, underLoadedNode);
+				}
+				else {
+					moveAllTask(jobRegistry, underLoadedNode, node);
+				}
+				return;
+			}
+		}
+	}
+	// IRIT
+	private Node getNodeFromEvent(JobRegistry jobRegistry, TaskFinishedEvent event) {
+		ExecTask task = jobRegistry.getTask(event.getJobId(), event.getTaskId());
+		ResourceItem r = task.getAllocatedResources().getLast();
+	    ProcessingElements pe = (ProcessingElements) r.getResourceUnits().get(StandardResourceUnitName.PE);
+	    ComputingResource c = pe.get(0);
+	    return (Node) c.getParent();
+
+	}
+	// IRIT
+	private void moveAllTask(JobRegistry jobRegistry, Node source, Node dest) {
+		double totalLoad = source.getLoadInterface().getRecentUtilization().getValue()+dest.getLoadInterface().getRecentUtilization().getValue();
+		if(totalLoad>100) {return;}
+		
+		JobRegistry srcHostJr = new JobRegistryImpl(source.getFullName());
+		int runningTasksNumber = srcHostJr.getRunningTasks().size();
+		for(int i=runningTasksNumber-1; i>=0; i--) {
+			ExecTask execTask = srcHostJr.getRunningTasks().get(i);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(dest.getProcessors(), execTask);
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+		}
+	}
+	// IRIT
+	public double getPowerConsumptionAtLoad(Node node, double loadLevel){
+		double powerConsumption = 0;
+		double lowestLoadLevel = 100;
+		double highestLoadLevel = 0;
+
+		System.out.println("ON_" + new Double(loadLevel).intValue());
+		System.out.println(node.getPowerInterface().supportPowerState(new CustomPowerStateName("ON_50")));
+		
+		try{
+			if(node.getPowerInterface().supportPowerState(new CustomPowerStateName("ON_" + new Double(loadLevel).intValue()))){
+				System.out.println("2 ON_" + new Double(loadLevel).intValue());
+
+				powerConsumption = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(loadLevel).intValue()));
+			} else {
+				for(PowerState powerState: node.getPowerInterface().getSupportedPowerStates()){
+					Double load;
+					System.out.println(" getname "+powerState.getName().getLabel());
+					try{
+						load = Double.valueOf(powerState.getName().getLabel().substring(3));
+					}catch (Exception e){
+						continue;
+					}
+					if(lowestLoadLevel > load){
+						lowestLoadLevel = load;
+					}
+					if(highestLoadLevel < load){
+						highestLoadLevel = load;
+					}
+				}
+				if(loadLevel == 0){
+					powerConsumption = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_0"));
+				} else {
+					
+					double lowerLoadLevel = lowestLoadLevel;
+					double higherLoadLevel = highestLoadLevel;
+
+					for(PowerState powerState: node.getPowerInterface().getSupportedPowerStates()){
+						Double load = Double.valueOf(powerState.getName().getLabel().substring(3));
+						if(loadLevel > load){
+							lowerLoadLevel = load;
+						}
+						else if(loadLevel < load){
+							higherLoadLevel = load;
+							break;
+						}
+					}
+					double powerBelow;
+					double powerAbove;
+					double a;
+					double b;
+					if(lowerLoadLevel != higherLoadLevel) {
+						powerBelow = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(lowerLoadLevel).intValue()));
+						powerAbove = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(higherLoadLevel).intValue()));
+						a = (powerAbove - powerBelow)/(higherLoadLevel - lowerLoadLevel);
+						b = powerAbove - a * higherLoadLevel;
+					} else {
+						powerBelow = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(lowestLoadLevel).intValue()));
+						powerAbove = node.getPowerInterface().getPowerConsumption(new CustomPowerStateName("ON_" + new Double(highestLoadLevel).intValue()));
+						a = (powerAbove - powerBelow)/(highestLoadLevel - lowestLoadLevel);
+						b = powerAbove - a * highestLoadLevel;
+					}
+					powerConsumption = a * loadLevel + b;
+				}
+			}
+		} catch (Exception e){
+			
+		}
+	
+		return powerConsumption;
+	}
+
+
+
+	private void globalEnergyOptimizer(JobRegistry jobRegistry, ClusterResourceManager resourceManager, String resName) {
+		
+		Node leastLoadedNode = findLeastLoadedResource(resourceManager.getNodes());
+		Node mostLoadedNode = findMostLoadedResource(resourceManager.getNodes());
+		System.out.println("-------------ALLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLERT");
+		System.out.println("             max : "+mostLoadedNode.getLoadInterface().getRecentUtilization().getValue());
+		System.out.println("             min : "+leastLoadedNode.getLoadInterface().getRecentUtilization().getValue());
+
+		
+		
+		if(leastLoadedNode.getLoadInterface().getRecentUtilization().getValue() >= mostLoadedNode.getLoadInterface().getRecentUtilization().getValue()){
+			return;
+		}
+		System.out.println("             ALLLLLLLLLLLLLLLL");
+		if(leastLoadedNode.getLoadInterface().getRecentUtilization().getValue()  != 0){
+			return;
+		}
+		System.out.println("                              LLLLLLLLLLLLLLLLLLLLERT");
+
+
+		
+		JobRegistry srcHostJr = new JobRegistryImpl(mostLoadedNode.getFullName());
+		int runningTasksNumber = srcHostJr.getRunningTasks().size();
+		System.out.println("           nbtasks source "+runningTasksNumber);
+		if(runningTasksNumber >= 1) {
+			ExecTask execTask = srcHostJr.getRunningTasks().get(0);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(findLeastLoadedResource(resourceManager.getNodes()).getProcessors(), execTask);
+			System.out.println("           "+destinationResources.toString());
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+		}
+/*for(int i = srcHostJr.getRunningTasks().size() - 1; i >= 0 && runningTasksNumber > 2; i--) {
+			System.out.println("           Migration");
+
+			ExecTask execTask = srcHostJr.getRunningTasks().get(i);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(findLeastLoadedResource(resourceManager.getNodes()).getProcessors(), execTask);
+			System.out.println("           "+destinationResources.toString());
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+			runningTasksNumber--;
+		
+		}
+	*/
+
+		
+	}
+	
+	
+	private void optimizeEnergyUsage(JobRegistry jobRegistry, ClusterResourceManager resourceManager, String resName) {
+		Node overLoadedNode = (Node)resourceManager .getResourceByName(resName);
+		Node leastLoadedNode = findLeastLoadedResource(resourceManager.getNodes());
+		
+		if(leastLoadedNode.getLoadInterface().getRecentUtilization().getValue() >= overLoadedNode.getLoadInterface().getRecentUtilization().getValue()){
+			return;
+		}
+
+		JobRegistry srcHostJr = new JobRegistryImpl(overLoadedNode.getFullName());
+		int runningTasksNumber = srcHostJr.getRunningTasks().size();
+		for(int i = srcHostJr.getRunningTasks().size() - 1; i >= 0 && runningTasksNumber > 2; i--) {
+			ExecTask execTask = srcHostJr.getRunningTasks().get(i);
+			Map<ResourceUnitName, ResourceUnit> destinationResources = chooseResourcesForExecution(findLeastLoadedResource(resourceManager.getNodes()).getProcessors(), execTask);
+			jobRegistry.migrateTask(execTask.getJobId(), execTask.getId(), destinationResources);
+			runningTasksNumber--;
+		}
+	}
+
+	private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution(
+			List<Processor> processors, TaskInterface<?> task) {
+
+		Map<ResourceUnitName, ResourceUnit> map = new HashMap<ResourceUnitName, ResourceUnit>(1);
+
+		int cpuRequest;
+		try {
+			cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue();
+		} catch (NoSuchFieldException e) {
+			cpuRequest = 0;
+		}
+
+		if (cpuRequest != 0) {
+
+			if (processors.size() < cpuRequest) {
+				return null;
+			}
+
+			List<ComputingResource> choosenResources = new ArrayList<ComputingResource>(cpuRequest);				
+			for (int i = 0; i < processors.size() && cpuRequest > 0; i++) {
+				if (processors.get(i).getStatus() == ResourceStatus.FREE) {
+					choosenResources.add(processors.get(i));
+					cpuRequest--;
+				}
+			}
+			if (cpuRequest > 0) {
+				return null;
+			}
+
+			ProcessingElements pe = new ProcessingElements();
+			pe.addAll(choosenResources);
+			map.put(StandardResourceUnitName.PE, pe);
+			return map;
+		}
+
+		return null;
+	}
+
+	private Node findLeastLoadedResource(List<Node> nodes ){
+		Node leastLoadedNoded = null;
+		double minLoad = Double.MAX_VALUE;
+		
+		for(int i = 0; i < nodes.size(); i++){
+			Node node = nodes.get(i);
+			double totalLoad = node.getLoadInterface().getRecentUtilization().getValue();
+			if(totalLoad < minLoad){
+				leastLoadedNoded= node;
+				minLoad = totalLoad;
+			}
+		}
+		return leastLoadedNoded;
+	}
+	private Node findMostLoadedResource(List<Node> nodes ){
+		Node mostLoadedNoded = null;
+		double minLoad = 0;
+		
+		for(int i = 0; i < nodes.size(); i++){
+			Node node = nodes.get(i);
+			double totalLoad = node.getLoadInterface().getRecentUtilization().getValue();
+			if(totalLoad >= minLoad){
+				mostLoadedNoded= node;
+				minLoad = totalLoad;
+			}
+		}
+		return mostLoadedNoded;
+	}
+}
+
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/RackEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/RackEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/RackEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,124 @@
+package experiments.simpat2014.models.recs;
+
+import java.util.List;
+
+import schedframe.resources.CoolEmAllResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName;
+import schedframe.resources.computing.profiles.energy.power.PState;
+import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import example.energy.BaseEnergyEstimationPlugin;
+import example.energy.coolemall.CoolEmAllTestbedMeasurements;
+import gridsim.dcworms.DCWormsTags;
+
+public class RackEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	double powerCapLevel = -1;
+	double powerUpgradeLevel = -1;
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		if(powerCapLevel == -1 || powerUpgradeLevel == -1){
+			loadThresholds((ComputingResource) resource);
+		}
+		
+		double powerConsumption = 0;
+		Rack rack = (Rack)resource;
+		for(ComputingResource nodeGroup: rack.getChildren()){
+			try{
+				powerConsumption = powerConsumption + nodeGroup.getPowerInterface().getRecentPowerUsage().getValue();
+			} catch (Exception e){
+				
+			}
+		}
+		
+		int nrOfPoweredOffNodes = 0;
+		for(Node node: rack.getNodes()){
+			if(node.getPowerInterface().getPowerState().equals(StandardPowerStateName.OFF)){
+				nrOfPoweredOffNodes++;
+			}
+		}
+		if(nrOfPoweredOffNodes != rack.getNodes().size()){
+			powerConsumption = (powerConsumption + CoolEmAllTestbedMeasurements.OTHER_DEVICES_POWER_CONSUMPTION)/CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY;			
+		}
+		
+		if(powerConsumption > powerCapLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, null);
+		}
+		else if(powerConsumption < powerUpgradeLevel){
+			DataCenterWorkloadSimulator.getEventManager().sendToAllSchedulers(0, DCWormsTags.RESOURCE_POWER_LIMIT_EXCEEDED, null);
+		}
+		return powerConsumption;
+	}
+	
+	private void loadThresholds(ComputingResource compResource){
+		
+		Rack rack = (Rack) compResource;
+		double pcLevel = 0;
+		double puLevel = 0;
+		for(Processor proc: rack.getProcessors()){
+			PState highestPState =  proc.getPowerInterface().getHighestPState();
+			PState secondHighestPState =  proc.getPowerInterface().getLowestPState();
+			for(String pStateName: proc.getPowerInterface().getSupportedPStates().keySet()){
+				PState pState = proc.getPowerInterface().getSupportedPStates().get(pStateName);
+				if(pState.getFrequency()  < secondHighestPState.getFrequency() && pState.getFrequency() > highestPState.getFrequency()){
+					secondHighestPState = pState;
+				}
+			}
+			double maxMinPowerUsage = 0;
+			double powerUsage = 0;
+			
+			for(Double load: highestPState.getLoadPowerUsage().keySet()){
+				powerUsage = highestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			pcLevel = pcLevel + maxMinPowerUsage;
+			
+			maxMinPowerUsage = 0;
+			powerUsage = 0;
+			
+			for(Double load: secondHighestPState.getLoadPowerUsage().keySet()){
+				powerUsage = secondHighestPState.getLoadPowerUsage().get(load);
+				if(powerUsage > maxMinPowerUsage){
+					maxMinPowerUsage= powerUsage;				
+				}
+			}
+			puLevel = puLevel + maxMinPowerUsage;
+			
+		}
+		
+		double fpc = 0;
+		for(ComputingResource nodeGroup: rack.getChildren()){
+			for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+				try {
+					fpc = fpc + device.getAirflowInterface().getPowerConsumption(new CustomAirflowStateName("ON_100"));
+				} catch (NoSuchFieldException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+
+		}
+		pcLevel = (pcLevel + fpc) / CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY;
+		puLevel = (puLevel + fpc) / CoolEmAllTestbedMeasurements.POWER_SUPPLY_EFFICIENCY;
+
+		puLevel = (pcLevel * pcLevel / puLevel);
+
+		powerCapLevel = pcLevel;
+		powerUpgradeLevel = puLevel;
+	}
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/NodeGroupEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/NodeGroupEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/NodeGroupEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,36 @@
+package experiments.simpat2014.models.recs;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class NodeGroupEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		NodeGroup nodeGroup = (NodeGroup)resource;
+		for(Node node: nodeGroup.getNodes()){
+			try{
+				powerConsumption = powerConsumption + node.getPowerInterface().getRecentPowerUsage().getValue();
+			} catch (Exception e){
+			}
+		}
+
+		for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				Fan fan = (Fan) device;
+				powerConsumption = powerConsumption + fan.getPowerInterface().getRecentPowerUsage().getValue();
+			}
+		}
+		return powerConsumption;
+	}
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FanEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FanEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FanEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,76 @@
+package experiments.simpat2014.models.recs;
+
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class FanEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	/*private static int PFanMax = 6;
+	private static int TFanLow = 45;
+	private static int TFanHigh = 47;*/
+
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+		Fan fan = (Fan) resource;
+		/*Node node = (Node) fan.getComputingResource();
+		double Tcpu = 0;
+		for(Processor cpu: node.getProcessors()){
+			Tcpu = Tcpu + cpu.getThermalInterface().getRecentTemperature().getValue();
+		}
+		Tcpu = Tcpu/node.getProcessors().size();
+		
+		if (Tcpu < TFanLow) {
+			powerConsumption = 4;
+		} else if (Tcpu > TFanHigh){
+			powerConsumption = PFanMax;
+		}
+		*/
+		
+		try {
+			powerConsumption = fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState());
+		} catch (NoSuchFieldException e) {
+			//
+		}
+		
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		
+		double airflow = 0;
+		Fan fan = (Fan) resource;
+		
+		/*double fanEfficiency = 0;
+		try{
+			fanEfficiency = Double.valueOf(fan.getPowerInterface().getParameters().get("fanEfficiency").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+
+		double dp = 1013.25;
+		airflow = fan.getPowerInterface().getRecentPowerUsage().getValue() * fanEfficiency /dp;*/
+
+		try {
+			airflow = fan.getAirflowInterface().getAirflow(fan.getAirflowInterface().getAirflowState());
+		} catch (NoSuchFieldException e) {
+			//
+		}
+		return airflow;
+	}
+	
+	public double estimateTemperature (ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double temperature = EnvironmentConditions.ROOM_TEMPERATURE;
+		return temperature;
+	}
+	
+
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FlowPumpInletEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FlowPumpInletEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FlowPumpInletEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,145 @@
+package experiments.simpat2014.models.recs;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class FlowPumpInletEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		/*********** Pfans_dc ***********/
+		double powerConsumption = 0;
+		double nf = 0.6;
+		
+		double delta_p;//from database, CFD
+		double Vair_total;
+		
+		delta_p = ConfigurationOptions.coolingData.getPressureDrop();
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		
+		if(delta_p != -1 && Vair_total != -1)
+			powerConsumption = delta_p * Vair_total / nf;
+		else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+			
+			double ro = 1.168;//constant
+		
+			double mair_total;
+			
+			//in case of DCworms calculation of Vair_total
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			
+
+			if(delta_p != -1 && Vair_total != -1)
+				powerConsumption = delta_p * Vair_total / nf;
+		}
+		
+		//System.out.println("Flow Pump power: " + powerConsumption);
+		
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		double Vair_total;
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		if(Vair_total != -1) {
+			airflow = Vair_total;
+		} else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+
+			double ro = 1.168;//constant
+			
+			double mair_total;
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			airflow = Vair_total;
+		}
+		return airflow;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/NodeEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/NodeEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/NodeEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,131 @@
+package experiments.simpat2014.models.recs;
+
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Processor;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.DataCenterWorkloadSimulator;
+import eduni.simjava.Sim_system;
+import example.energy.BaseEnergyEstimationPlugin;
+import experiments.simpat2014.EnvironmentConditions;
+
+public class NodeEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	private static double Tidle = 26;
+
+	private double timestamp = 0;
+	private double old_temperature = Tidle;
+	private double new_temperature = -1;
+	private double objective_temperature = Tidle;
+	private boolean fan = false;
+	
+	private double next_timer = -1;
+
+	private static double Pidle = 10;
+	private static double Pfull = 76;
+
+	
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		Node node = (Node) resource;
+		double powerConsumption = 0;
+
+		/*double Pcpu = 0;	
+		for(Processor cpu: node.getProcessors()){
+			Pcpu = Pcpu + cpu.getPowerInterface().getRecentPowerUsage().getValue();
+		}*/
+		
+		powerConsumption = Pidle + (Pfull- Pidle) * node.getLoadInterface().getRecentUtilization().getValue()/100; 
+		return powerConsumption;
+	}
+
+	@Override
+	public double estimateTemperature(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+
+		Node node = (Node) resource;
+		Processor cpu = node.getProcessors().get(0);
+		double Pserv = 0;
+
+		double R = 0;
+		double Rb = 0;
+		double Rcv = 0;
+		try{
+			Rb = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalResistance").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double k = 0;
+		try{
+			k = Double.valueOf(cpu.getPowerInterface().getParameters().get("k").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double a = 0;
+		try{
+			a = Double.valueOf(cpu.getPowerInterface().getParameters().get("a").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			a = 1;
+		}
+
+
+		double C = 0;
+		try{
+			C = Double.valueOf(cpu.getPowerInterface().getParameters().get("thermalCapacity").get(0).getContent()).doubleValue();
+		} catch (Exception e){
+			//
+		}
+		
+		double V = 0;
+		
+		for(Device device: node.getParent().getResourceCharacteristic().getDevices()){
+			if(device.getType().equals(StandardResourceType.Fan)){
+				if(Integer.valueOf(device.getName().split("_")[1]) == Integer.valueOf(node.getName().split("_")[1])){
+					Fan fan = (Fan) device;
+					V = fan.getAirflowInterface().getRecentAirflow().getValue();
+					break;
+				}
+			}
+		}
+
+		Rcv =  1/ (k * Math.pow(V, a));
+		R = Rb + Rcv; 
+		
+		double K = 0;
+		double Cair = EnvironmentConditions.AIR_HEAT_CAPACITY;
+		double ro = EnvironmentConditions.AIR_DENSITY;
+
+		K = V * Cair * ro;
+		//System.out.println("-------K: " + K +  "; V:" + V);
+
+		double delta_t = Sim_system.clock() - timestamp;
+
+		double Tin = EnvironmentConditions.ROOM_TEMPERATURE;
+		Pserv = node.getPowerInterface().getRecentPowerUsage().getValue();
+		
+		NodeGroup ng = (NodeGroup) node.getParent();
+		for(Node n: ng.getNodes()){
+			if(Integer.valueOf(n.getName().split("_")[1]) - Integer.valueOf(node.getName().split("_")[1]) == EnvironmentConditions.NODES_IN_A_ROW){
+				Tin = n.getThermalInterface().getRecentTemperature().getValue();
+			}
+		}
+		
+		double targetTemp = Pserv/K + Tin; 
+		objective_temperature = targetTemp;
+
+		new_temperature = objective_temperature + (old_temperature - objective_temperature) * Math.exp(-delta_t / (R * C));
+
+		// 5) save everything
+		timestamp = Sim_system.clock();
+		old_temperature = new_temperature;
+
+		return new_temperature;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FlowPumpOutletEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FlowPumpOutletEnergyEstimationPlugin.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/models/recs/FlowPumpOutletEnergyEstimationPlugin.java	(revision 1500)
@@ -0,0 +1,81 @@
+package experiments.simpat2014.models.recs;
+
+import schedframe.resources.StandardResourceType;
+import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.Node;
+import schedframe.resources.computing.Rack;
+import schedframe.resources.computing.coolemall.ComputeBox1;
+import schedframe.resources.computing.coolemall.NodeGroup;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
+import schedframe.resources.devices.Device;
+import schedframe.resources.devices.Fan;
+import schedframe.resources.devices.PhysicalResource;
+import schedframe.scheduling.manager.tasks.JobRegistry;
+import simulator.ConfigurationOptions;
+import example.energy.BaseEnergyEstimationPlugin;
+
+public class FlowPumpOutletEnergyEstimationPlugin extends BaseEnergyEstimationPlugin {
+
+	public double estimatePowerConsumption(ResourceEvent event, JobRegistry jobRegistry,
+			PhysicalResource resource) {
+		
+		double powerConsumption = 0;
+
+		return powerConsumption;
+	}
+	
+	public double estimateAirflow(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) {
+		double airflow = 0;
+		double Vair_total;
+		
+		Vair_total = ConfigurationOptions.coolingData.getAirflowVolume();
+		if(Vair_total != -1) {
+			airflow = Vair_total;
+		} else {
+			Device flowPump = (Device) resource;
+			ComputingResource room = flowPump.getComputingResource();
+
+			double ro = 1.168;//constant
+			
+			double mair_total;
+			double mair_rack = 0;
+
+			for(ComputingResource cr: room.getChildren()){
+				Rack rack = (Rack)cr;
+				for(ComputingResource nodeGroup: rack.getChildren()){
+					for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){
+						if(device.getType().equals(StandardResourceType.Outlet)){
+							
+							Fan fan = (Fan) device;
+							double mair_recs = 0;
+							double Vair_recs = 0;
+							
+							double Vair_recs1 = 0;
+
+							Vair_recs1  = fan.getAirflowInterface().getRecentAirflow().getValue();
+
+							double Vair_recs2 = 0;
+							for(Device device2: nodeGroup.getResourceCharacteristic().getDevices()){
+								if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){
+
+									Vair_recs2  = device2.getAirflowInterface().getRecentAirflow().getValue();
+
+									break;
+								}
+							}	
+
+							Vair_recs  = Math.max(Vair_recs1, Vair_recs2);
+
+							mair_recs = Vair_recs * ro;
+							mair_rack  = mair_rack + mair_recs;
+						}
+					}
+				}
+			}
+			mair_total = mair_rack;
+			Vair_total = mair_total / ro;
+			airflow = Vair_total;
+		}
+		return airflow;
+	}
+}
Index: DCWoRMS/branches/coolemall/src/experiments/simpat2014/RunExperiment.java
===================================================================
--- DCWoRMS/branches/coolemall/src/experiments/simpat2014/RunExperiment.java	(revision 1500)
+++ DCWoRMS/branches/coolemall/src/experiments/simpat2014/RunExperiment.java	(revision 1500)
@@ -0,0 +1,19 @@
+package experiments.simpat2014;
+import simulator.DataCenterWorkloadSimulator;
+
+
+public class RunExperiment {
+	
+	public static void main(String args[]){
+		RunExperiment runner = new RunExperiment();
+		runner.run();
+	}
+	
+	public void run(){
+		String args[] = {
+				"src/experiments/simpat2014//experiment.properties"
+				};
+		DataCenterWorkloadSimulator.main(args);
+	}
+
+}
