Index: /DCWoRMS/branches/coolemall/simulator/schemas/resources/DCwormsResSchema.xsd
===================================================================
--- /DCWoRMS/branches/coolemall/simulator/schemas/resources/DCwormsResSchema.xsd	(revision 1263)
+++ /DCWoRMS/branches/coolemall/simulator/schemas/resources/DCwormsResSchema.xsd	(revision 1302)
@@ -6,5 +6,5 @@
 		<xs:annotation>
 			<xs:documentation>Base plugin type. 
-			Plugins allow configuring and adapting the simulation framework to his/her experiment 
+			Plugins allow configuring and adapting the simulation framework to the purpose of particular experiment 
 			starting from modeling job performance, through method of calculating energy estimation up to implementation of scheduling policies
 			Name of the plugin specifies the JAVA class that implements dedicated interface.</xs:documentation>
@@ -291,4 +291,5 @@
 			<xs:element name="airThroughputProfile" type="airThroughputProfileType" minOccurs="0"></xs:element>
 			<xs:element name="thermalProfile" type="thermalProfileType" minOccurs="0"></xs:element>
+			<xs:element name="loadProfile" type="loadProfileType" minOccurs="0"></xs:element>
 		</xs:sequence>
 	</xs:complexType>
@@ -414,4 +415,25 @@
 			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 		</xs:sequence>
+	</xs:complexType>
+	
+	<xs:complexType name="loadProfileType">
+		<xs:annotation>
+			<xs:documentation>Load profile provides loadEstimation plugin and supports modelinf of a local utilization of the given resource during the time</xs:documentation>
+		</xs:annotation>
+		<xs:sequence>
+			<xs:element name="loadEstimationPlugin" type="loadEstimationPluginType" minOccurs="0"></xs:element>
+			<xs:element name="loadCalendar" type="loadCalendarType" minOccurs="0"></xs:element>
+			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	
+	<xs:complexType name="loadEstimationPluginType">
+		<xs:annotation>
+			<xs:documentation>LoadEstimationPlugin derived from pluginType. 
+			Load plugin is used to calclulate load on the given resource if it's based on user-defined model</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="pluginType"/>
+		</xs:complexContent>
 	</xs:complexType>
 	
@@ -454,4 +476,62 @@
 	</xs:complexType>
 	
+	
+	<xs:complexType name="loadCalendarType">
+		<xs:choice>
+			<xs:element name="weekDay" type="weekDayType"  maxOccurs="unbounded"/>
+			<xs:element name="loadSchedule" type="loadScheduleType" maxOccurs="unbounded"/>
+		</xs:choice>
+	</xs:complexType>
+	
+	<xs:complexType name="weekDayType">
+		<xs:sequence>
+			<xs:element name="type" type="dayType"></xs:element>
+			<xs:choice>
+				<xs:element name="timePeriod" maxOccurs="unbounded">
+					<xs:complexType>
+						<xs:sequence>
+							<xs:element name="fromTime" type="xs:time"/>
+							<xs:element name="toTime" type="xs:time"/>
+							<xs:element name="loadLevel" type="xs:double"/>
+						</xs:sequence>
+					</xs:complexType>
+				</xs:element>
+				<xs:element name="loadLevel" type="xs:double"/>
+			</xs:choice>
+		</xs:sequence>
+	</xs:complexType>
+		
+	<xs:complexType name="loadScheduleType">
+		<xs:sequence>
+			<xs:element name="loadDistribution" maxOccurs="unbounded">
+				<xs:complexType>
+					<xs:sequence>
+						<xs:element name="fromTime" type="xs:long"/>
+						<xs:element name="toTime" type="xs:long"/>
+						<xs:element name="loadLevel" type="xs:double"/>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
+				
+	<xs:simpleType name="dayType">
+		<xs:annotation>
+			<xs:documentation>The type of day. Values are: 0=AllDays,
+				1=Sunday, 2=Monday, 3=Tuesday, 4=Wednesday, 5=Thursday,
+				6=Friday, 7=Saturday.</xs:documentation>
+		</xs:annotation>
+		<xs:restriction base="xs:integer">
+			<xs:enumeration value="0" />
+			<xs:enumeration value="1" />
+			<xs:enumeration value="2" />
+			<xs:enumeration value="3" />
+			<xs:enumeration value="4" />
+			<xs:enumeration value="5" />
+			<xs:enumeration value="6" />
+			<xs:enumeration value="7" />
+		</xs:restriction>
+	</xs:simpleType>
+	
 	<xs:element name="environment">
 		<xs:annotation>
Index: /DCWoRMS/branches/coolemall/simulator/schemas/resources/debb/LoadCalendarSchema.xsd
===================================================================
--- /DCWoRMS/branches/coolemall/simulator/schemas/resources/debb/LoadCalendarSchema.xsd	(revision 1302)
+++ /DCWoRMS/branches/coolemall/simulator/schemas/resources/debb/LoadCalendarSchema.xsd	(revision 1302)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	elementFormDefault="qualified" attributeFormDefault="unqualified">
+	
+	<xs:complexType name="resourceLoadType">
+		<xs:sequence>
+			<xs:element name="loadCalendar" type="loadCalendarType" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:attribute name="name" type="xs:string" use="optional"/>
+		<xs:attribute name="class" type="xs:string" use="required"/>
+	</xs:complexType>
+	
+	<xs:complexType name="loadCalendarType">
+		<xs:choice>
+			<xs:element name="loadSchedule" type="loadScheduleType" maxOccurs="unbounded"/>
+		</xs:choice>
+	</xs:complexType>
+
+	<xs:complexType name="loadScheduleType">
+		<xs:sequence>
+			<xs:element name="loadDistribution" maxOccurs="unbounded">
+				<xs:complexType>
+					<xs:sequence>
+						<xs:element name="fromTime" type="xs:long"/>
+						<xs:element name="toTime" type="xs:long"/>
+						<xs:element name="loadLevel" type="xs:double"/>
+					</xs:sequence>
+				</xs:complexType>
+			</xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	
+	<xs:element name="resources">
+		<xs:annotation>
+			<xs:documentation>Schema describing background load distribution for the simulated environment</xs:documentation>
+		</xs:annotation>
+		<xs:complexType>
+			<xs:annotation>
+				<xs:documentation>Description of load levels for particular resources</xs:documentation>
+			</xs:annotation>
+
+			<xs:sequence>
+				<xs:element name="computingResource" type="resourceLoadType" maxOccurs="unbounded"/>
+			</xs:sequence>
+		</xs:complexType>
+	</xs:element>
+</xs:schema>
Index: /DCWoRMS/branches/coolemall/simulator/xslt/debb/PLMXMLTranslator.xsl
===================================================================
--- /DCWoRMS/branches/coolemall/simulator/xslt/debb/PLMXMLTranslator.xsl	(revision 1266)
+++ /DCWoRMS/branches/coolemall/simulator/xslt/debb/PLMXMLTranslator.xsl	(revision 1302)
@@ -94,5 +94,5 @@
 							<xsl:value-of select="$templateStartLevel"/>
 						</xsl:attribute>
-						<xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" mode="component"/>		
+						<xsl:apply-templates select="$nestedDoc//*[PartID=$debbComponentId]" mode="component"/>		
 						<xsl:element name="device">
 						<xsl:variable name="deviceName" select="distinct-values($rootDoc//plm:ProductRevisionView[plm:UserData/plm:UserValue/@value=$devicesIds[$index3]]/@name)[1]" />		
@@ -114,5 +114,5 @@
 				</xsl:variable>
 								<xsl:variable name="nestedDoc2" select="document($deviceFileFullName)" />
-								<xsl:apply-templates select="$nestedDoc2//*[ComponentId=$devicesIds[$index3]]" mode="heatsink">
+								<xsl:apply-templates select="$nestedDoc2//*[PartID=$devicesIds[$index3]]" mode="heatsink">
 						<xsl:with-param name="instanceRefs" select="distinct-values($rootDoc//plm:ProductRevisionView[plm:UserData/plm:UserValue/@value=$devicesIds[$index3]]/@id)[1]" />		
 							</xsl:apply-templates>
@@ -207,5 +207,5 @@
 					<xsl:when test="$debbComponentFile != ''">
 						<xsl:variable name="nestedDoc" select="document($debbComponentFile)" />
-						<xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" mode="component">
+						<xsl:apply-templates select="$nestedDoc//*[PartID=$debbComponentId]" mode="component">
 							<xsl:with-param name="instanceRefs" select="@instanceRefs" />		
 						</xsl:apply-templates>
@@ -247,15 +247,15 @@
 
 			<xsl:if test="$debbLevel = 'CoolingDevice'">
-				<xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" mode="coolingDevice">
+				<xsl:apply-templates select="$nestedDoc//*[PartID=$debbComponentId]" mode="coolingDevice">
 					<xsl:with-param name="instanceRefs" select="@id" />		
 				</xsl:apply-templates>
 			</xsl:if>	
 			<xsl:if test="$debbLevel = 'Inlet' or $debbLevel = 'Outlet'">
-				<xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" mode="fan">
+				<xsl:apply-templates select="$nestedDoc//*[PartID=$debbComponentId]" mode="fan">
 					<xsl:with-param name="instanceRefs" select="@id" />		
 				</xsl:apply-templates>
 			</xsl:if>
 			<xsl:if test="$debbLevel = 'Heatsink'">
-				<xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" mode="heatsink">
+				<xsl:apply-templates select="$nestedDoc//*[PartID=$debbComponentId]" mode="heatsink">
 					<xsl:with-param name="instanceRefs" select="@id" />		
 				</xsl:apply-templates>
@@ -296,5 +296,5 @@
 						<xsl:variable name="nestedDoc" select="document($debbComponentFile)" />
 
-						<xsl:apply-templates select="$nestedDoc//*[ComponentId=$debbComponentId]" mode="component"> 
+						<xsl:apply-templates select="$nestedDoc//*[PartID=$debbComponentId]" mode="component"> 
 							<xsl:with-param name="instanceRefs" select="@instanceRefs" />							
 						</xsl:apply-templates>
Index: /DCWoRMS/branches/coolemall/simulator/xslt/debb/coolemallPlugins.xml
===================================================================
--- /DCWoRMS/branches/coolemall/simulator/xslt/debb/coolemallPlugins.xml	(revision 1266)
+++ /DCWoRMS/branches/coolemall/simulator/xslt/debb/coolemallPlugins.xml	(revision 1302)
@@ -5,9 +5,9 @@
 		<name>example.timeestimation.coolemall.PhaseTimeEstimationPlugin</name>
 	</timeEstimationPlugin>
-	
+		
 	<schedulingPlugin>
-		<name>example.localplugin.coolemall.computebox1.CB1_FCFS_Random_SP</name>
+		<name>example.localplugin.coolemall.computebox2.CB2_FCFS_Random_SP</name>
 		<resources>
-			<class>Rack</class>
+			<class>Room</class>
 		</resources>
 	</schedulingPlugin>
@@ -93,5 +93,5 @@
 		<resources>
 			<class>Inlet</class>
-			<name>FlowPump1</name>
+			<type>RoomInlet</type>
 		</resources>
 	</energyEstimationPlugin>
@@ -101,5 +101,5 @@
 		<resources>
 			<class>Outlet</class>
-			<name>FlowPump2</name>
+			<type>RoomOutlet</type>
 		</resources>
 	</energyEstimationPlugin>
@@ -113,5 +113,5 @@
 	
 	<loadEstimationPlugin>
-		<name>example.energy.coolemall.DefaultLoadEstimationPlugin</name>
+		<name>example.load.DefaultLoadEstimationPlugin</name>
 		<resources>
 			<class>ComputeBox2</class>
Index: /DCWoRMS/branches/coolemall/simulator/xslt/debb/DEBBComponentTranslator.xsl
===================================================================
--- /DCWoRMS/branches/coolemall/simulator/xslt/debb/DEBBComponentTranslator.xsl	(revision 1260)
+++ /DCWoRMS/branches/coolemall/simulator/xslt/debb/DEBBComponentTranslator.xsl	(revision 1302)
@@ -9,5 +9,5 @@
 	<xsl:param name="plmxmlFileName" select="plmxmlFileName" />	
 
-	<xsl:template match="//*[ComponentId]" mode="component">
+	<xsl:template match="//*[PartID]" mode="component">
 		<xsl:param name="instanceRefs"/>
 		<xsl:call-template name="translateComputingElement">
@@ -16,5 +16,5 @@
 	</xsl:template>
 	
-	<xsl:template match="//*[ComponentId]"  mode="coolingDevice">
+	<xsl:template match="//*[PartID]"  mode="coolingDevice">
 		<xsl:param name="instanceRefs"/>
 		<xsl:call-template name="translateCoolingDevice">
@@ -23,5 +23,5 @@
 	</xsl:template>
 	
-	<xsl:template match="//*[ComponentId]"  mode="fan">
+	<xsl:template match="//*[PartID]"  mode="fan">
 		<xsl:param name="instanceRefs"/>
 		<xsl:call-template name="translateFan">
@@ -30,5 +30,5 @@
 	</xsl:template>
 	
-	<xsl:template match="//*[ComponentId]"  mode="heatsink">
+	<xsl:template match="//*[PartID]"  mode="heatsink">
 		<xsl:param name="instanceRefs"/>
 		<xsl:call-template name="translateHeatsink">
@@ -46,4 +46,5 @@
 		</xsl:if>
 		
+		<!-- PERFORMANCE
 		<xsl:if test="Baseboard">
 			<xsl:apply-templates select="Baseboard" />
@@ -53,4 +54,5 @@
 			<xsl:apply-templates select="Sensor" />
 		</xsl:if>
+		-->	
 		
 		<xsl:if test="PowerSupply">
@@ -84,4 +86,6 @@
 		</xsl:if>	
 		 -->	
+		 
+		<!-- PERFORMANCE
 		<xsl:if test="Slot">
 			<xsl:apply-templates select="Slot" />
@@ -100,5 +104,6 @@
 			<xsl:apply-templates select="Network" />
 		</xsl:if>
-		
+		 -->	
+		 
 	</xsl:template>
 
@@ -116,4 +121,10 @@
 			<xsl:attribute name="name">sensor</xsl:attribute>
 			<xsl:element name="property">
+				<xsl:attribute name="name">name</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="Name" />
+				</xsl:element>
+			</xsl:element>
+			<xsl:element name="property">
 				<xsl:attribute name="name">class</xsl:attribute>
 				<xsl:element name="value">
@@ -170,9 +181,19 @@
 			<xsl:attribute name="class">Processor</xsl:attribute>
 			<xsl:call-template name="BasicDEBBPhysicalElementParameters" />
+			<xsl:variable name="threads">
+				 <xsl:choose>
+			    	<xsl:when test="VirtualCoresPerCore">
+			    		<xsl:value-of select="VirtualCoresPerCore"/>
+			    	</xsl:when>
+			    	<xsl:otherwise>1</xsl:otherwise>
+			  	</xsl:choose>
+			</xsl:variable>
+					
 			<xsl:if test="Cores">
 				<xsl:element name="computingResource">
 					<xsl:attribute name="class">Core</xsl:attribute>
+					<xsl:variable name="nrOfCores" select="Cores"/>
 					<xsl:attribute name="count">
-						<xsl:value-of select="Cores" />
+						<xsl:value-of select="$nrOfCores" />
 					</xsl:attribute>
 				</xsl:element>
@@ -184,4 +205,13 @@
 				</xsl:element>
 			</xsl:element>
+			
+			<xsl:if test="VirtualCoresPerCore">
+				<xsl:element name="parameter">
+					<xsl:attribute name="name">threads</xsl:attribute>
+					<xsl:element name="value">
+						<xsl:value-of select="VirtualCoresPerCore"/>
+					</xsl:element>
+				</xsl:element>
+			</xsl:if>
 			<xsl:if test="PState | CState">
 				<!-- If PState or CState elements present add powerProfile element -->
@@ -195,10 +225,5 @@
 							</xsl:element>
 						</xsl:if>
-						
-						<!--  
-						<xsl:if test="PState/LoadPowerUsage">
-							<xsl:apply-templates select="PState/LoadPowerUsage" />
-						</xsl:if>
-						-->
+
 						<xsl:apply-templates select="PState" />						
 					</xsl:element>
@@ -206,4 +231,5 @@
 			</xsl:if>
 			
+			<!-- PERFORMANCE
 			<xsl:if test="TDP">
 				<xsl:element name="parameter">
@@ -214,4 +240,6 @@
 				</xsl:element>
 			</xsl:if>
+			-->
+			 
 		</xsl:element>
 	</xsl:template>
@@ -232,4 +260,5 @@
 				</xsl:element>
 			</xsl:element>
+			<!-- PERFORMANCE
 			<xsl:element name="property">
 				<xsl:attribute name="name">voltage</xsl:attribute>
@@ -238,4 +267,5 @@
 				</xsl:element>
 			</xsl:element>
+			-->
 			<!-- 	
 			<xsl:element name="property">
@@ -354,91 +384,65 @@
 			</xsl:element>
 		</xsl:if>
-		
-		<xsl:if test="MaxCoolingCapacity">
-			<xsl:element name="parameter">
+
+  		<xsl:if test="CRAH">
+  			<xsl:element name="parameter">
+				<xsl:attribute name="name">fanEfficiency</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="CRAH/FanEfficiency" />
+				</xsl:element>
+			</xsl:element>
+  			<xsl:element name="parameter">
+				<xsl:attribute name="name">coolingCoilEfficiency</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="CRAH/CoolingCoilEfficiency" />
+				</xsl:element>
+			</xsl:element>
+  			<xsl:element name="parameter">
+				<xsl:attribute name="name">deltaThEx</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="CRAH/DeltaThEx" />
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>
+		
+		<xsl:if test="Chiller">
+		  	<xsl:element name="parameter">
 				<xsl:attribute name="name">maxCoolingCapacity</xsl:attribute>
 				<xsl:element name="value">
-					<xsl:value-of select="MaxCoolingCapacity" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-		
-		<xsl:if test="MaxAirThroughput">
-			<xsl:element name="parameter">
-				<xsl:attribute name="name">maxAirThroughput</xsl:attribute>
-				<xsl:element name="value">
-					<xsl:value-of select="MaxAirThroughput" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-		
-		<xsl:if test="CRAHFanEfficiency">
-			<xsl:element name="parameter">
-				<xsl:attribute name="name">CRAHFanEfficiency</xsl:attribute>
-				<xsl:element name="value">
-					<xsl:value-of select="CRAHFanEfficiency" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-		 
-		 <xsl:if test="CoolingCoilEfficiency">
-			<xsl:element name="parameter">
-				<xsl:attribute name="name">coolingCoilEfficiency</xsl:attribute>
-				<xsl:element name="value">
-					<xsl:value-of select="CoolingCoilEfficiency" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-		
-		 <xsl:if test="DeltaThEx">
-			<xsl:element name="parameter">
-				<xsl:attribute name="name">deltaThEx</xsl:attribute>
-				<xsl:element name="value">
-					<xsl:value-of select="DeltaThEx" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-		
-		<xsl:if test="CWT">
-			<xsl:element name="parameter">
-				<xsl:attribute name="name">CWT</xsl:attribute>
-				<xsl:element name="value">
-					<xsl:value-of select="CWT" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-
-		<xsl:if test="DeltaThDryCooler">
-			<xsl:element name="parameter">
+					<xsl:value-of select="Chiller/MaxCoolingCapacity" />
+				</xsl:element>
+			</xsl:element>
+  			<xsl:element name="parameter">
+				<xsl:attribute name="name">coolingCapacityRated</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="Chiller/CoolingCapacityRated" />
+				</xsl:element>
+			</xsl:element>
+  			<xsl:element name="parameter">
+				<xsl:attribute name="name">EERRated</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="Chiller/EERRated" />
+				</xsl:element>
+			</xsl:element>
+			<xsl:apply-templates select="Chiller/EnergyEfficiencyRatio/Item"/>
+		</xsl:if>
+		
+		<xsl:if test="DryCooler">
+  			<xsl:element name="parameter">
 				<xsl:attribute name="name">deltaThDryCooler</xsl:attribute>
 				<xsl:element name="value">
-					<xsl:value-of select="DeltaThDryCooler" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-
-
-		<xsl:if test="CoolingCapacityRated">
-			<xsl:element name="parameter">
-				<xsl:attribute name="name">coolingCapacityRated</xsl:attribute>
-				<xsl:element name="value">
-					<xsl:value-of select="CoolingCapacityRated" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-		
-		<xsl:if test="EERRated">
-			<xsl:element name="parameter">
-				<xsl:attribute name="name">EERRated</xsl:attribute>
-				<xsl:element name="value">
-					<xsl:value-of select="EERRated" />
-				</xsl:element>
-			</xsl:element>
-		</xsl:if>
-		
-  
+					<xsl:value-of select="DryCooler/DeltaThDryCooler" />
+				</xsl:element>
+			</xsl:element>
+  			<xsl:element name="parameter">
+				<xsl:attribute name="name">dryCoolerEfficiency</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="DryCooler/DryCoolerEfficiency" />
+				</xsl:element>
+			</xsl:element>		
+		</xsl:if>
+		
 		<xsl:apply-templates select="EnergyEfficiencyRatio/Item"/>
-				
-		<!-- Air throughput connected, advanced, technical data -->					
+			
 		<xsl:apply-templates select="AirThroughputProfile" />
 		
@@ -555,7 +559,49 @@
 			</xsl:element>
 		</xsl:if>
-	</xsl:template>
-	
-
+		<xsl:if test="Efficiency">
+			<xsl:element name="parameter">
+				<xsl:attribute name="name">efficiency</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="Efficiency" />
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	
+	<xsl:template name ="FlowStateItemAir">
+		<xsl:element name="name">
+			<xsl:variable name="state" select="State"/>
+			<xsl:choose>
+				<xsl:when test="$state = '1'">
+					<xsl:value-of>OFF</xsl:value-of>
+				</xsl:when>
+				<xsl:when test="$state = '2'">
+					<xsl:value-of>ON</xsl:value-of>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:value-of select="$state" />
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:element>
+		<xsl:if test="Flow">
+			<xsl:element name="value">
+				<xsl:value-of select="Flow" />
+			</xsl:element>
+		</xsl:if>
+		<xsl:if test="PowerUsage">
+			<xsl:element name="powerUsage">
+				<xsl:value-of select="PowerUsage" />
+			</xsl:element>
+		</xsl:if>
+		<xsl:if test="Efficiency">
+			<xsl:element name="parameter">
+				<xsl:attribute name="name">efficiency</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="Efficiency" />
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>
+	</xsl:template>
+	
 
 	<xsl:template name="translateHeatsink">
@@ -642,4 +688,5 @@
 	<!-- Template for transforming basic parameters of all devices of any type -->
 	<xsl:template name="BasicDEBBPhysicalElementParameters">
+
 		<xsl:if test="Label">
 			<xsl:element name="parameter">
@@ -650,5 +697,5 @@
 			</xsl:element>
 		</xsl:if>
-	
+		<!-- PERFORMANCE
 		<xsl:if test="Manufacturer">
 			<xsl:element name="parameter">
@@ -659,4 +706,5 @@
 			</xsl:element>
 		</xsl:if>
+		-->
 		<xsl:if test="Product">
 			<xsl:element name="parameter">
@@ -687,4 +735,5 @@
 		<!-- TODO: PowerUsageProfile -->
 
+		<!-- PERFORMANCE
 		<xsl:if test="Type">
 			<xsl:element name="parameter">
@@ -695,8 +744,26 @@
 			</xsl:element>
 		</xsl:if>	
+		-->		
+		<xsl:if test="MinAllowedTemperature">
+			<xsl:element name="parameter">
+				<xsl:attribute name="name">minAllowedTemperature</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="MinAllowedTemperature" />
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>	
+		
+		<xsl:if test="MaxAllowedTemperature">
+			<xsl:element name="parameter">
+				<xsl:attribute name="name">maxAllowedTemperature</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="MaxAllowedTemperature" />
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>	
 	</xsl:template>
 
 	<xsl:template name="BasicDEBBPhysicalElementProperties">
-		
+
 		<xsl:if test="Label">
 			<xsl:element name="property">
@@ -752,5 +819,22 @@
 			</xsl:element>
 		</xsl:if>
-
+		
+		<xsl:if test="MinAllowedTemperature">
+			<xsl:element name="property">
+				<xsl:attribute name="name">minAllowedTemperature</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="MinAllowedTemperature" />
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>	
+		
+		<xsl:if test="MaxAllowedTemperature">
+			<xsl:element name="property">
+				<xsl:attribute name="name">maxAllowedTemperature</xsl:attribute>
+				<xsl:element name="value">
+					<xsl:value-of select="MaxAllowedTemperature" />
+				</xsl:element>
+			</xsl:element>
+		</xsl:if>	
 	</xsl:template>
 
Index: /DCWoRMS/branches/coolemall/simulator/xslt/debb/LoadCalendarUpdater.xsl
===================================================================
--- /DCWoRMS/branches/coolemall/simulator/xslt/debb/LoadCalendarUpdater.xsl	(revision 1302)
+++ /DCWoRMS/branches/coolemall/simulator/xslt/debb/LoadCalendarUpdater.xsl	(revision 1302)
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="2.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dcworms="DCWormsResSchema.xsd"
+	xmlns:debb2dcworms="../../debb2dcworms.xsd"
+	xmlns:fun="http://whatever">
+
+	<!-- Specification of the output document -->
+	<xsl:output method="xml" version="1.0" encoding="UTF-8"
+		indent="yes" />
+
+	<!-- Root of the DCworms XML document -->
+	<xsl:variable name="rootDoc" select="/" />
+
+	<xsl:param name="additionalInformationFileName" select="additionalInformationFileName" />
+	<xsl:param name="estimatorsInformationFileName" select="estimatorsInformationFileName" />
+
+	<xsl:variable name="nestedDoc"
+		select="document($additionalInformationFileName)" />
+		
+	<xsl:variable name="estimatorsDoc"
+		select="document($estimatorsInformationFileName)" />
+
+	<xsl:template match="/">
+		<xsl:apply-templates select="environment" />
+	</xsl:template>
+
+	<xsl:template match="environment">
+		<xsl:copy>
+			<xsl:copy-of select="@*" />
+			<xsl:apply-templates select="timeEstimationPlugin" />
+			<xsl:apply-templates select="resources" />
+			<xsl:apply-templates select="templates"/>
+		</xsl:copy>
+	</xsl:template>
+
+	<xsl:template match="resources">
+		<xsl:copy copy-namespaces="no">
+		<xsl:copy-of select="@*" />
+			<xsl:apply-templates select="//resources/computingResource" />
+			<xsl:apply-templates select="scheduler"/>
+		</xsl:copy>
+	</xsl:template>
+
+
+	
+	<xsl:template match="loadCalendar">
+		<xsl:element name="loadProfile">
+			<xsl:copy-of select="." copy-namespaces="no" />
+		</xsl:element>
+	</xsl:template>
+
+
+	<xsl:template match="computingResourceTemplate | computingResource">
+		<xsl:copy copy-namespaces="no">
+			<xsl:copy-of select="@*" />
+			<!-- Find nested elements in appropriate order and copy them -->
+			
+			<!-- templateId -->
+			<xsl:apply-templates select="templateId" />
+			<!-- location -->
+			<xsl:apply-templates select="location" />
+			<!-- parameter -->
+			<xsl:apply-templates select="parameter" />
+									
+			
+			<xsl:variable name="resourceClass" select="@class"/>
+			<xsl:variable name="resourceName" select="@name"/>
+			<xsl:variable name="debbFullPath" select="fun:getFullPath(.)"/>
+			
+			<xsl:if test="not(templateId)">
+				<xsl:variable name="loadCalendar" select="fun:getLoadCalendar($resourceClass, $debbFullPath)"/>
+				<xsl:variable name="hasProfile" select="profile != ''"/>
+	
+				<xsl:if test="$hasProfile = false() and $loadCalendar != ''">
+					<xsl:element name="profile">
+						<xsl:element name="loadProfile">
+							<xsl:element name="loadEstimationPlugin">
+								<xsl:element name="name">
+									<xsl:value-of select="fun:getLoadEstimator($resourceClass)"/>
+								</xsl:element>
+							</xsl:element> 
+							<xsl:copy-of
+									select="$loadCalendar" />
+						</xsl:element>
+					</xsl:element>
+				</xsl:if>
+			</xsl:if>
+			
+			<!-- profile -->
+			<xsl:apply-templates select="profile" />
+			<!-- device -->
+			<xsl:apply-templates select="device" />
+			<!-- resourceUnit -->
+			<xsl:apply-templates select="resourceUnit" />
+			<!-- computingResource -->
+			<xsl:apply-templates select="computingResource" />
+						
+		</xsl:copy>
+	</xsl:template>
+	
+	
+	<xsl:function name="fun:getLoadCalendar">
+		<xsl:param name="computingResourceClass"/>
+		<xsl:param name="computingResourceName"/>
+		
+		<xsl:variable name="loadCalendar" >
+			<xsl:choose>
+				<xsl:when test="$nestedDoc//computingResource[@class=$computingResourceClass and @name=$computingResourceName]">
+					<xsl:copy-of select="$nestedDoc//computingResource[@class=$computingResourceClass and @name=$computingResourceName]/loadCalendar"/>
+				</xsl:when>
+				<xsl:when test="$nestedDoc//computingResource[@class=$computingResourceClass]">
+					<xsl:copy-of select="$nestedDoc//computingResource[@class=$computingResourceClass and not(@name)]/loadCalendar"/>
+				</xsl:when>
+				<xsl:otherwise>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+		<xsl:copy-of select="$loadCalendar"/>
+	</xsl:function>
+
+	<xsl:function name="fun:getLoadEstimator">
+		<xsl:param name="computingResourceClass"/>
+   
+		<xsl:variable name="estimatorName" >
+			<xsl:choose>
+				<xsl:when test="$estimatorsDoc//loadEstimationPlugin[resources/class=$computingResourceClass]/name !=''">
+					<xsl:value-of select="$estimatorsDoc//loadEstimationPlugin[resources/class=$computingResourceClass ]/name"/>
+				</xsl:when>
+				<xsl:otherwise>
+				</xsl:otherwise>
+			</xsl:choose>
+		</xsl:variable>
+		<xsl:value-of select="$estimatorName"/>
+	</xsl:function>
+	
+	<xsl:template match="timeEstimationPlugin | scheduler | device | resourceUnit | parameter | location | powerProfile | airThroughputProfile">
+		<xsl:copy-of select="." copy-namespaces="no" />
+	</xsl:template>
+
+	<xsl:function name="fun:getFullPath">
+		<xsl:param name="currentComputingResource"/>
+		<xsl:variable name="ancestors" select="$currentComputingResource/ancestor::computingResource/@name"/>
+
+		
+		<xsl:variable name="fullPath">
+			<xsl:for-each select="1 to count($ancestors)">
+				<xsl:variable name="index" select="." />
+				<xsl:value-of select="$ancestors[$index]"/>
+				<xsl:text>/</xsl:text>
+			</xsl:for-each>	
+			<xsl:value-of select="$currentComputingResource/@name"></xsl:value-of>	
+		</xsl:variable>
+		
+		<xsl:value-of select="$fullPath"/>
+	</xsl:function>
+
+	<xsl:template match="profile">
+		<xsl:copy copy-namespaces="no">
+		<xsl:copy-of select="@*" />
+		
+			<xsl:apply-templates select="powerProfile" />
+			<xsl:apply-templates select="airThroughputProfile" />
+			
+			<xsl:variable name="resourceClass" select="../@class"></xsl:variable>
+			<xsl:variable name="resourceName" select="../@name"></xsl:variable>
+			<xsl:variable name="debbFullPath" select="fun:getFullPath(..)"/>
+			
+			<xsl:variable name="loadCalendar" select="fun:getLoadCalendar($resourceClass, $debbFullPath)"/>
+			<xsl:if test="$loadCalendar != ''">
+				<xsl:element name="loadProfile">
+					<xsl:element name="loadEstimationPlugin">
+						<xsl:element name="name">
+							<xsl:value-of select="fun:getLoadEstimator($resourceClass)"/>
+						</xsl:element>
+					</xsl:element> 
+					<xsl:copy-of
+						select="$loadCalendar" />
+				</xsl:element>
+			</xsl:if>
+		</xsl:copy>
+
+	</xsl:template>
+
+
+	<xsl:template match="templates">
+		<xsl:copy copy-namespaces="no">
+			<xsl:apply-templates/>	
+		</xsl:copy>
+		
+	</xsl:template>
+	
+	<xsl:template match="@*|node()">
+		<xsl:copy>
+			<xsl:apply-templates select="@*" />
+			<xsl:apply-templates />
+		</xsl:copy>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /DCWoRMS/branches/coolemall/simulator/xslt/debb/DCwormsDEBBUpdater.xsl
===================================================================
--- /DCWoRMS/branches/coolemall/simulator/xslt/debb/DCwormsDEBBUpdater.xsl	(revision 1260)
+++ /DCWoRMS/branches/coolemall/simulator/xslt/debb/DCwormsDEBBUpdater.xsl	(revision 1302)
@@ -182,5 +182,8 @@
 			<xsl:apply-templates select="profile" />
 			<!-- device -->
-			<xsl:apply-templates select="device" />
+			<xsl:apply-templates select="device">
+				<xsl:with-param name="parResourceClass" select="$resourceClass" />		
+			</xsl:apply-templates>
+						
 			<!-- resourceUnit -->
 			<xsl:apply-templates select="resourceUnit" />
@@ -194,4 +197,5 @@
 	
 	<xsl:template match="device">
+		<xsl:param name="parResourceClass"/>
 		<xsl:copy copy-namespaces="no">
 			<xsl:copy-of select="@*" />
@@ -222,5 +226,10 @@
 			
 			<xsl:variable name="resourceClass" select="@class"/>
-			<xsl:variable name="resourceType" select="@type"/>
+			<!-- 
+			<xsl:variable name="resourceType" select="@type"/>			
+			 -->
+			<xsl:variable name="resourceType">
+				<xsl:value-of select="concat($parResourceClass, $resourceClass)" />
+			</xsl:variable>
 			<xsl:variable name="resourceName" select="@name"/>
 			
@@ -230,5 +239,4 @@
 				<xsl:variable name="estimationPluginName" select="fun:getEnergyEstimator($resourceClass, $resourceType, $resourceName)"/>
 				<xsl:variable name="hasProfile" select="profile != ''"/>
-				<xsl:variable name="hasPowerProfile" select="profile/powerProfile != ''"/>
 	
 				<xsl:if test="$hasProfile = false() and $estimationPluginName != ''">
@@ -246,5 +254,7 @@
 			
 			<!-- profile -->
-			<xsl:apply-templates select="profile" />
+			<xsl:apply-templates select="profile" mode="device">
+				<xsl:with-param name="parResourceClass" select="$parResourceClass" />	
+			</xsl:apply-templates>
 						
 		</xsl:copy>
@@ -253,16 +263,22 @@
 
 	<xsl:function name="fun:getEnergyEstimator">
-		<xsl:param name="computingResourceClass"/>
-		<xsl:param name="computingResourceType"/>
-		<xsl:param name="computingResourceName"/>
+		<xsl:param name="resourceClass"/>
+		<xsl:param name="resourceType"/>
+		<xsl:param name="resourceName"/>
 		
    
 		<xsl:variable name="estimatorName" >
 			<xsl:choose>
-				<xsl:when test="$nestedDoc//energyEstimationPlugin[resources/class=$computingResourceClass and resources/name=$computingResourceName]/name !=''">
-					<xsl:value-of select="$nestedDoc//energyEstimationPlugin[resources/class=$computingResourceClass and resources/name=$computingResourceName]/name"/>
-				</xsl:when>
-				<xsl:when test="$nestedDoc//energyEstimationPlugin[resources/class=$computingResourceClass]/name !=''">
-					<xsl:value-of  select="$nestedDoc//energyEstimationPlugin[resources/class=$computingResourceClass ]/name"/>
+				<xsl:when test="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resource/type=$resourceType and resources/name=$resourceName]/name !=''">
+					<xsl:value-of select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resource/type=$resourceType and resources/name=$resourceName]/name"/>
+				</xsl:when>
+				<xsl:when test="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resources/type=$resourceType]/name !=''">
+					<xsl:value-of select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resources/type=$resourceType]/name"/>
+				</xsl:when>
+				<xsl:when test="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resources/name=$resourceName]/name !=''">
+					<xsl:value-of select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass and resources/name=$resourceName]/name"/>
+				</xsl:when>
+				<xsl:when test="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass]/name !=''">
+					<xsl:value-of  select="$nestedDoc//energyEstimationPlugin[resources/class=$resourceClass ]/name"/>
 				</xsl:when>
 				<xsl:otherwise>
@@ -341,4 +357,41 @@
 	</xsl:template>
 
+	<xsl:template match="profile" mode="device">
+		<xsl:param name="parResourceClass"/>
+		<xsl:copy copy-namespaces="no">
+			<xsl:copy-of select="@*" />
+			
+			
+			<xsl:variable name="resourceClass" select="../@class"/>
+			<!-- 
+			<xsl:variable name="resourceType" select="@type"/>			
+			 -->
+			<xsl:variable name="resourceType">
+				<xsl:value-of select="concat($parResourceClass, $resourceClass)" />
+			</xsl:variable>
+			<xsl:variable name="resourceName" select="../@name"/>
+			
+
+			<!-- Don't add energyEstimationPlugin information if there is a template defined for the computingResource.
+			 It will appear in the template. -->
+			<xsl:variable name="estimationPluginName" select="fun:getEnergyEstimator($resourceClass, $resourceType, $resourceName)"/>
+			<xsl:variable name="hasPowerProfile" select="powerProfile != ''"/>
+
+			<xsl:if test="$hasPowerProfile = false() and $estimationPluginName != ''">
+					<xsl:element name="powerProfile">
+						<xsl:element name="energyEstimationPlugin">
+							<xsl:element name="name">
+								<xsl:value-of select="$estimationPluginName"/>
+							</xsl:element>
+						</xsl:element>
+					</xsl:element>
+			</xsl:if>
+			
+			<xsl:apply-templates select="powerProfile" />
+			<xsl:apply-templates select="airThroughputProfile" />
+
+		</xsl:copy>
+	</xsl:template>
+	
 	<xsl:template match="powerProfile">
 		<xsl:copy copy-namespaces="no">
