Index: DCWoRMS/branches/coolemall/simulator/schemas/resources/DCWormsResSchema.xsd
===================================================================
--- DCWoRMS/branches/coolemall/simulator/schemas/resources/DCWormsResSchema.xsd	(revision 961)
+++ DCWoRMS/branches/coolemall/simulator/schemas/resources/DCWormsResSchema.xsd	(revision 1235)
@@ -3,5 +3,5 @@
 	elementFormDefault="qualified" attributeFormDefault="unqualified">
 		
-		<xs:complexType name="pluginType">
+	<xs:complexType name="pluginType">
 		<xs:annotation>
 			<xs:documentation>Base plugin type. 
@@ -25,5 +25,5 @@
 			<xs:restriction base="pluginType">
 				<xs:sequence>
-					<xs:element name="name" type="xs:string" default="ExecTimeEstimationPlugin"></xs:element>
+					<xs:element name="name" type="xs:string"></xs:element>
 					<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 				</xs:sequence>
@@ -49,5 +49,5 @@
 	</xs:complexType>
 
-	<xs:complexType name="computingResourceType">
+	<xs:complexType name="physicalResourceType">
 		<xs:annotation>
 			<xs:documentation> ComputingResource derived from resourceType
@@ -62,22 +62,64 @@
 		<xs:complexContent>
 			<xs:extension base="resourceType">
+				<xs:attribute name="groupId" type="xs:integer" use="optional"/>			
+				<xs:attribute name="count" type="xs:integer" use="optional"/>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	
+	<xs:complexType name="computingResourceType">
+		<xs:annotation>
+			<xs:documentation> ComputingResource derived from physicalResourceType
+			Computing resource specifies resources that are able to perform computing operations. 
+			From the simulator point of view computing resource is everything that is/contains processing element.
+			Hence, all entities like core, processor, computing node, as well as those which aggregate them (like shelf, rack, container etc.)
+			should be define using this type. This way of description provides flexibility in defining system architecture
+			and allows to build hierarchy of resources that corresponds to real world.
+			Attributes: groupId - allows to group resources of the given class in the logical structures that can be used during binding them with schedulers
+			count - defines number of resources of the given class</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="physicalResourceType">
 				<xs:sequence>
 					<xs:choice>
 						<xs:sequence>
-							<xs:element name="resourceUnit" type="resourceUnitType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+							<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
 							<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 							<xs:element name="profile" type="profileType" minOccurs="0" maxOccurs="1"></xs:element>
+							<xs:element name="device" type="deviceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+							<xs:element name="resourceUnit" type="resourceUnitType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+							<xs:element name="computingResource" type="computingResourceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+						</xs:sequence>
+						<xs:sequence>
+							<xs:element name="templateId" type="xs:string"/>
 							<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
-							<xs:element name="computingResource" type="computingResourceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+							<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+						</xs:sequence>
+					</xs:choice>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	
+	<xs:complexType name="deviceType">
+		<xs:annotation>
+			<xs:documentation> Device derived from physicalResourceType</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="physicalResourceType">
+				<xs:sequence>
+					<xs:choice>
+						<xs:sequence>
+							<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
+							<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+							<xs:element name="profile" type="profileType" minOccurs="0" maxOccurs="1"></xs:element>
 						</xs:sequence>
 						<xs:sequence>
 							<xs:element name="templateId" type="xs:string"/>
+							<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
 							<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
-							<xs:element name="location" type="locationType" minOccurs="0" maxOccurs="1"></xs:element>
 						</xs:sequence>
 					</xs:choice>
 				</xs:sequence>
-				<xs:attribute name="groupId" type="xs:integer" use="optional"/>			
-				<xs:attribute name="count" type="xs:integer" use="optional"/>
 			</xs:extension>
 		</xs:complexContent>
@@ -93,8 +135,25 @@
 			<xs:extension base="resourceType">
 				<xs:sequence>
-					<xs:element name="resourceUnit" type="resourceUnitType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 					<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 					<xs:element name="profile" type="profileType" minOccurs="0" maxOccurs="1"></xs:element>
+					<xs:element name="device" type="deviceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+					<xs:element name="resourceUnit" type="resourceUnitType" minOccurs="0" maxOccurs="unbounded"></xs:element>
 					<xs:element name="computingResource" type="computingResourceType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+				</xs:sequence>
+			</xs:extension>
+		</xs:complexContent>
+	</xs:complexType>
+	
+	<xs:complexType name="deviceTemplateType">
+		<xs:annotation>
+			<xs:documentation>ComputingResourceTemplate derived from resourceType.
+			It allows user to define model of computing resource component that may constitute other computing resources
+			Computing resource templates can be then referred in computing resource definition</xs:documentation>
+		</xs:annotation>
+		<xs:complexContent>
+			<xs:extension base="resourceType">
+				<xs:sequence>
+					<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+					<xs:element name="profile" type="profileType" minOccurs="0" maxOccurs="1"></xs:element>
 				</xs:sequence>
 			</xs:extension>
@@ -241,10 +300,11 @@
 		<xs:sequence>
 			<xs:element name="energyEstimationPlugin" type="energyEstimationPluginType" minOccurs="0"></xs:element>
-			<xs:element name="powerStates" type="powerStatesType" minOccurs="0"></xs:element>
-			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
-		</xs:sequence>
-	</xs:complexType>
-	
-	<xs:complexType name="powerStatesType">
+			<xs:element name="powerStates" type="powerStatesListType" minOccurs="0"></xs:element>
+			<xs:element name="loadPowerUsage" type="loadPowerUsageType" minOccurs="0"></xs:element>			
+			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	
+	<xs:complexType name="powerStatesListType">
 		<xs:annotation>
 			<xs:documentation>PowerState type act as a container for power states. It contains energy-related characteristics of the computing resource</xs:documentation>
@@ -284,4 +344,11 @@
 		</xs:sequence>
 	</xs:complexType>
+		
+	<xs:complexType name="loadPowerUsageType">
+		<xs:sequence>
+			<xs:element name="load" type="xs:float" maxOccurs="1" minOccurs="1"></xs:element>
+			<xs:element name="powerUsage" type="xs:float" maxOccurs="1" minOccurs="1"></xs:element>
+		</xs:sequence>
+	</xs:complexType>
 	
 	<xs:complexType name="airThroughputEstimationPluginType">
@@ -301,10 +368,10 @@
 		<xs:sequence>
 			<xs:element name="airThroughputEstimationPlugin" type="airThroughputEstimationPluginType" minOccurs="0"></xs:element>
-			<xs:element name="airThroughputStates" type="airThroughputStatesType" minOccurs="0"></xs:element>
-			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
-		</xs:sequence>
-	</xs:complexType>
-	
-	<xs:complexType name="airThroughputStatesType">
+			<xs:element name="airThroughputStates" type="airThroughputStatesListType" minOccurs="0"></xs:element>
+			<xs:element name="parameter" type="parameterType" minOccurs="0" maxOccurs="unbounded"></xs:element>
+		</xs:sequence>
+	</xs:complexType>
+	
+	<xs:complexType name="airThroughputStatesListType">
 		<xs:annotation>
 			<xs:documentation>AirThroughputStates type act as a container for air throughput states.</xs:documentation>
@@ -318,5 +385,5 @@
 	<xs:complexType name="airThroughputStateType">
 		<xs:annotation>
-			<xs:documentation>Air througput state provides means to define air flow level. 
+			<xs:documentation>Air throughput state provides means to define air flow level. 
 			It can represent, for instance, a fan working state</xs:documentation>
 		</xs:annotation>
@@ -341,5 +408,5 @@
 	<xs:complexType name="thermalProfileType">
 		<xs:annotation>
-			<xs:documentation>ThermalProfile provides temperatureEstimation plugin,  and other thermal-related parameters definition</xs:documentation>
+			<xs:documentation>ThermalProfile provides temperatureEstimation plugin, and other thermal-related parameters definition</xs:documentation>
 		</xs:annotation>
 		<xs:sequence>
@@ -405,4 +472,5 @@
 							<xs:element name="scheduler" type="schedulerType" maxOccurs="unbounded"/>
 						</xs:sequence>
+						<xs:attribute name="mode" type="xs:string" default="Standard"/>
 					</xs:complexType>
 				</xs:element>
@@ -414,5 +482,6 @@
 						<xs:sequence>
 							<xs:element name="description" type="xs:string" minOccurs="0" ></xs:element>
-							<xs:element name="computingResourceTemplate" type="computingResourceTemplateType" maxOccurs="unbounded"/>
+							<xs:element name="computingResourceTemplate" type="computingResourceTemplateType" minOccurs="0" maxOccurs="unbounded"/>
+							<xs:element name="deviceTemplate" type="deviceTemplateType" minOccurs="0" maxOccurs="unbounded"/>
 						</xs:sequence>
 					</xs:complexType>
