Index: xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example1.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example1.xml	(revision 323)
+++ xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example1.xml	(revision 326)
@@ -7,7 +7,22 @@
 
 	<resources>
-		<computingResource class="DataCenter" count="1" id="dataCenter">
-			<computingResource class="Rack" count="4" id="rack">
+		<description>
+		This basic example defines simple resource hierarchy within a single data center. It consist of 4 racks. 
+		Each of them contains 64 computing nodes with 2 processors. Speed of every processor is equal 2.
+		All computing nodes have 12GB of memory and 4TB storage.
+		Task are submitted to the single cluster built on top of the data center. It is under the control of queueing system
+		with FCFS scheduling policy. The commented out cluster definition is equal to the one above it 
+		(it demonstrated two possible ways of defining managed computing resources using "include" attribute).
+		</description>
+		
+		<computingResource class="DataCenter" name="dataCenter">
+			<computingResource class="Rack" count="4" name="rack">
 				<computingResource class="ComputingNode" count="64">
+					<resourceUnit class="Memory">
+						<amount unit="MB">12288</amount>
+					</resourceUnit>
+					<resourceUnit class="Storage">
+						<amount unit="MB">4194304</amount>
+					</resourceUnit>
 					<computingResource class="Processor" count="2">
 						<parameter name="Speed">
@@ -15,21 +30,15 @@
 						</parameter>
 					</computingResource>
-					<resourceUnit class="Memory">
-						<amount>12288</amount>
-					</resourceUnit>
-					<resourceUnit class="Storage">
-						<amount>4194304</amount>
-					</resourceUnit>
 				</computingResource>
 			</computingResource>
 		</computingResource>
 
-		<scheduler class="Cluster" id="cluster">
+		<scheduler class="Cluster" name="cluster">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
 			</schedulingPlugin>	
-			<managedComputingResource include="false">
-				<resourceId>dataCenter</resourceId>
-			</managedComputingResource>
+			<managedComputingResources include="false">
+				<resourceName>dataCenter</resourceName>
+			</managedComputingResources>
 		</scheduler>
 		
@@ -40,8 +49,8 @@
 			</schedulingPlugin>		
 			<managedComputingResource include="true">
-				<resourceId>rack1</resourceId>
-				<resourceId>rack2</resourceId>
-				<resourceId>rack3</resourceId>
-				<resourceId>rack4</resourceId>
+				<resourceId>rack_1</resourceId>
+				<resourceId>rack_2</resourceId>
+				<resourceId>rack_3</resourceId>
+				<resourceId>rack_4</resourceId>
 			</managedComputingResource>
 		</scheduler>
Index: xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example2.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example2.xml	(revision 322)
+++ xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example2.xml	(revision 326)
@@ -3,7 +3,74 @@
 	
 	<resources>
-		<computingResource class="DataCenter" count="1" id="dataCenter">
-			<computingResource class="Rack" count="4" id="rack">
+		<description>
+		This example aims to show how to introduce energy-related parameters to the simulation environment 
+		Simulated architecture consist of data center with 4 racks. Each of them contains 64 computing nodes with 2 processors. 
+		Speed of every processor is equal 2.All computing nodes have 12GB of memory and 4TB storage.
+		For the detailed energy characteristics description, see the following comments. 
+		Task are submitted to the single cluster built on top of the data center. It is under the control of queueing system
+		with FCFS scheduling policy.
+		</description>
+		
+		<computingResource class="DataCenter" name="dataCenter">
+			<computingResource class="Rack" count="4" name="rack">
 				<computingResource class="ComputingNode" count="64">
+					<energyEstimationPlugin>
+						<name>ComputingNodeEnergyEstimationPlugin</name>
+					</energyEstimationPlugin>
+					<profile>
+						<!-- Definition of computing node power profile
+						According to it, there are two supported power states: ON and OFF
+						Computing node in ON state consume 20 watts, while in OFF state 0.
+						Transition between ON and OFF state took 30 seconds ant consumes 30 watts, 
+						while in the opposite energy consumption rate is equal 60 watts over 40 seconds 
+						 -->
+						<powerProfile>
+							<powerStates>
+								<powerState>
+									<name>ON</name>
+									<powerUsage unit="watts">20</powerUsage>
+									<transition>
+										<to>OFF</to>
+										<powerUsage unit="watts">30</powerUsage>
+										<time unit="seconds">30</time>
+									</transition>
+								</powerState>
+								<powerState>
+									<name>OFF</name>
+									<powerUsage unit="watts">0</powerUsage>
+									<transition>
+										<to>ON</to>
+										<powerUsage unit="watts">40</powerUsage>
+										<time unit="seconds">60</time>
+									</transition>
+								</powerState>
+							</powerStates>
+						</powerProfile>
+						<!-- Definition of computing node air throughput profile (for instance fan related with the given node)
+						Fan can operate in the 4 states, characterized by name, air flow value and power consumption.
+						 -->
+						<airThroughputProfile>
+							<airThroughputState>
+								<name>mode1</name>
+								<value unit="m3/h">105</value>
+								<powerUsage unit="watts">10.3</powerUsage>
+							</airThroughputState>
+							<airThroughputState>
+								<name>mode2</name>
+								<value unit="m3/h">110</value>
+								<powerUsage unit="watts">10.9</powerUsage>
+							</airThroughputState>
+							<airThroughputState>
+								<name>mode3</name>
+								<value unit="m3/h">115</value>
+								<powerUsage unit="watts">11.4</powerUsage>
+							</airThroughputState>
+							<airThroughputState>
+								<name>mode4</name>
+								<value unit="m3/h">120</value>
+								<powerUsage unit="watts">12.1</powerUsage>
+							</airThroughputState>
+						</airThroughputProfile>
+					</profile>
 					<computingResource class="Processor" count="2">
 						<energyEstimationPlugin>
@@ -11,4 +78,8 @@
 						</energyEstimationPlugin>
 						<profile>
+							 <!-- Definition of processor power profile
+							According to it, processor can operate in two p-states: P0 and P1
+							P0 p-state is characterized 
+							 -->
 							<powerProfile>
 								<parameter name="pState">
@@ -17,5 +88,5 @@
 									</property>	
 									<property name="frequency">
-										<value>3000</value>
+										<value >3000</value>
 									</property>		
 									<property name="voltage">
@@ -43,67 +114,18 @@
 						</profile>
 					</computingResource>
-					<energyEstimationPlugin>
-						<name>ComputingNodeEnergyEstimationPlugin</name>
-					</energyEstimationPlugin>
-					<profile>
-						<powerProfile>
-							<powerStates>
-								<powerState>
-									<name>ON</name>
-									<powerUsage>20</powerUsage>
-									<transition>
-										<to>OFF</to>
-										<powerUsage>30</powerUsage>
-										<time>30</time>
-									</transition>
-								</powerState>
-								<powerState>
-									<name>OFF</name>
-									<powerUsage>0</powerUsage>
-									<transition>
-										<to>ON</to>
-										<powerUsage>40</powerUsage>
-										<time>60</time>
-									</transition>
-								</powerState>
-							</powerStates>
-						</powerProfile>
-						<airThroughputProfile>
-							<airThroughputState>
-								<name>mode1</name>
-								<value>105</value>
-								<powerUsage>10.3</powerUsage>
-							</airThroughputState>
-							<airThroughputState>
-								<name>mode2</name>
-								<value>110</value>
-								<powerUsage>10.9</powerUsage>
-							</airThroughputState>
-							<airThroughputState>
-								<name>mode3</name>
-								<value>115</value>
-								<powerUsage>11.4</powerUsage>
-							</airThroughputState>
-							<airThroughputState>
-								<name>mode4</name>
-								<value>120</value>
-								<powerUsage>12.1</powerUsage>
-							</airThroughputState>
-						</airThroughputProfile>
-					</profile>
 				</computingResource>
 			</computingResource>
 		</computingResource>
 		
-		<scheduler class="Cluster" id="cluster">
+		<scheduler class="Cluster" name="cluster">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
 			</schedulingPlugin>		
-			<managedComputingResource include="true">
-				<resourceId>rack1</resourceId>
-				<resourceId>rack2</resourceId>
-				<resourceId>rack3</resourceId>
-				<resourceId>rack4</resourceId>
-			</managedComputingResource>
+			<managedComputingResources include="true">
+				<resourceName>rack_1</resourceName>
+				<resourceName>rack_2</resourceName>
+				<resourceName>rack_3</resourceName>
+				<resourceName>rack_4</resourceName>
+			</managedComputingResources>
 		</scheduler>
 
Index: xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example3.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example3.xml	(revision 321)
+++ xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example3.xml	(revision 326)
@@ -4,45 +4,5 @@
 	<!-- CoolEmAll testbed description -->
 	<resources>
-		<computingResource class="Rack" count="1" id="rack">
-			<computingResource class="RackUnitServer" count="1" id="recs1">
-				<computingResource class="ComputingNode" count="18">
-					<computingResource class="Processor" count="1" type="i7">
-						<computingResource class="Core" count="4"/>
-					</computingResource>
-					<resourceUnit class="Memory">
-						<amount>16384</amount>
-					</resourceUnit>
-				</computingResource>
-			</computingResource>
-			<computingResource class="RackUnitServer" count="1" id="recs2">
-				<computingResource class="ComputingNode" count="18">
-					<computingResource class="Processor" count="1" type="Atom">
-						<computingResource class="Core" count="2"/>
-					</computingResource>
-					<resourceUnit class="Memory">
-						<amount>4096</amount>
-					</resourceUnit>
-				</computingResource>
-			</computingResource>
-			<computingResource class="RackUnitServer" count="1" id="recs3">
-				<computingResource class="ComputingNode" count="18">
-					<computingResource class="Processor" count="1" type="AMD Fusion">
-						<computingResource class="Core" count="2"/>
-					</computingResource>
-					<resourceUnit class="Memory">
-						<amount>2048</amount>
-					</resourceUnit>
-				</computingResource>
-			</computingResource>
-			<computingResource class="RackUnitServer" count="1" id="recs4">
-				<computingResource class="ComputingNode" count="18">
-					<computingResource class="Processor" count="1" type="ARM">
-						<computingResource class="Core" count="1"/>
-					</computingResource>
-					<resourceUnit class="Memory">
-						<amount>2048</amount>
-					</resourceUnit>
-				</computingResource>
-			</computingResource>
+		<computingResource class="Rack" name="rack">
 			<resourceUnit class="Storage">
 				<amount>4915200</amount>
@@ -54,13 +14,53 @@
 				</property>
 			</parameter>
+			<computingResource class="RECS" name="recs1">
+				<computingResource class="ComputingNode" count="18">
+					<resourceUnit class="Memory">
+						<amount>16384</amount>
+					</resourceUnit>
+					<computingResource class="Processor" type="i7">
+						<computingResource class="Core" count="4"/>
+					</computingResource>
+				</computingResource>
+			</computingResource>
+			<computingResource class="RECS" name="recs2">
+				<computingResource class="ComputingNode" count="18">
+					<resourceUnit class="Memory">
+						<amount>4096</amount>
+					</resourceUnit>
+					<computingResource class="Processor" type="Atom">
+						<computingResource class="Core" count="2"/>
+					</computingResource>
+				</computingResource>
+			</computingResource>
+			<computingResource class="RECS" name="recs3">
+				<computingResource class="ComputingNode" count="18">
+					<resourceUnit class="Memory">
+						<amount>2048</amount>
+					</resourceUnit>
+					<computingResource class="Processor" type="AMD Fusion">
+						<computingResource class="Core" count="2"/>
+					</computingResource>
+				</computingResource>
+			</computingResource>
+			<computingResource class="RECS" name="recs4">
+				<computingResource class="ComputingNode" count="18">
+					<resourceUnit class="Memory">
+						<amount>2048</amount>
+					</resourceUnit>
+					<computingResource class="Processor" type="ARM">
+						<computingResource class="Core"/>
+					</computingResource>
+				</computingResource>
+			</computingResource>
 		</computingResource>
 
-		<scheduler class="Cluster" id="cluster">
+		<scheduler class="Cluster" name="cluster">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
 			</schedulingPlugin>		
-			<managedComputingResource include="false">
-				<resourceId>rack</resourceId>
-			</managedComputingResource>
+			<managedComputingResources include="false">
+				<resourceName>rack</resourceName>
+			</managedComputingResources>
 		</scheduler>
 
Index: xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example4.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example4.xml	(revision 321)
+++ xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example4.xml	(revision 326)
@@ -4,7 +4,12 @@
 	
 	<resources>
-		<computingResource class="DataCenter" id="dataCenter">
-			<computingResource class="Rack" id="rack1">
-				<computingResource class="ComputingNode" id="node11">
+		<computingResource class="DataCenter" name="dataCenter">
+			<computingResource class="Rack" name="rack1">
+				<location>
+					<vertical>0</vertical>
+					<horizontal>4</horizontal>
+					<depth>2</depth>
+				</location>
+				<computingResource class="ComputingNode" name="node11">
 					<location>
 						<vertical>0</vertical>
@@ -13,5 +18,5 @@
 					</location>
 				</computingResource>
-				<computingResource class="ComputingNode" id="node12">
+				<computingResource class="ComputingNode" name="node12">
 					<location>
 						<vertical>1</vertical>
@@ -20,12 +25,12 @@
 					</location>
 				</computingResource>
+			</computingResource>	
+			<computingResource class="Rack" name="rack2">
 				<location>
 					<vertical>0</vertical>
-					<horizontal>4</horizontal>
+					<horizontal>6</horizontal>
 					<depth>2</depth>
 				</location>
-			</computingResource>	
-			<computingResource class="Rack" id="rack2">
-				<computingResource class="ComputingNode" id="node21">
+				<computingResource class="ComputingNode" name="node21">
 					<location>
 						<vertical>0</vertical>
@@ -34,5 +39,5 @@
 					</location>
 				</computingResource>
-				<computingResource class="ComputingNode" id="node22">
+				<computingResource class="ComputingNode" name="node22">
 					<location>
 						<vertical>0</vertical>
@@ -41,18 +46,13 @@
 					</location>
 				</computingResource>
-				<location>
-					<vertical>0</vertical>
-					<horizontal>6</horizontal>
-					<depth>2</depth>
-				</location>
 			</computingResource>
 		</computingResource>	
-		<scheduler class="Cluster" id="cluster">
+		<scheduler class="Cluster" name="cluster">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
 			</schedulingPlugin>		
-			<managedComputingResource include="false">
-				<resourceId>dataCenter</resourceId>
-			</managedComputingResource>
+			<managedComputingResources include="false">
+				<resourceName>dataCenter</resourceName>
+			</managedComputingResources>
 		</scheduler>
 	</resources>
Index: xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example7.xml
===================================================================
--- xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example7.xml	(revision 323)
+++ xssim/trunk/src/test/rewolucja/schemas/example/coolemall/example7.xml	(revision 326)
@@ -4,16 +4,16 @@
 	
 	<resources>
-		<computingResource class="DataCenter" id="dataCenter">
-			<computingResource class="Rack" id="rack1">
-				<computingResource class="ComputingNode" id="node11">
+		<computingResource class="DataCenter" name="dataCenter">
+			<computingResource class="Rack" name="rack1">
+				<computingResource class="ComputingNode" name="node11">
 				</computingResource>
-				<computingResource class="ComputingNode" id="node12">
+				<computingResource class="ComputingNode" name="node12">
 				</computingResource>
 			</computingResource>	
-			<computingResource class="Rack" id="rack2">
-				<computingResource class="ComputingNode" id="node21">
+			<computingResource class="Rack" name="rack2">
+				<computingResource class="ComputingNode" name="node21">
 					<templateId>modelNodeA</templateId>
 				</computingResource>
-				<computingResource class="ComputingNode" id="node22">
+				<computingResource class="ComputingNode" name="node22">
 					<computingResource class="Processor" count="8">
 						<templateId>modelProcessorB</templateId>
@@ -22,189 +22,23 @@
 			</computingResource>
 		</computingResource>	
-		<scheduler class="Cluster" id="cluster">
+		<scheduler class="Cluster" name="cluster">
 			<schedulingPlugin>
 				<name>FCFSLocalSchedulingPlugin</name>
 			</schedulingPlugin>		
-			<managedComputingResource include="false">
-				<resourceId>dataCenter</resourceId>
-			</managedComputingResource>
+			<managedComputingResources include="false">
+				<resourceName>dataCenter</resourceName>
+			</managedComputingResources>
 		</scheduler>
 	</resources>
 	
 	<templates>
-		<computingResourceTemplate class="ComputingNode" id="modelNodeA">
+		<computingResourceTemplate class="ComputingNode" name="modelNodeA">
 			<computingResource class="Processor" count="4">
 				<templateId>modelProcessorA</templateId>
 			</computingResource>
 		</computingResourceTemplate>	
-		<computingResourceTemplate class="Processor" id="modelProcessorA">
-			<energyEstimationPlugin>
-				<name>CPUEnergyEstimationPlugin</name>
-			</energyEstimationPlugin>
-			<profile>
-				<powerProfile>
-					<powerStates>
-						<powerState>
-							<name>ON</name>
-							<powerUsage>20</powerUsage>
-							<transition>
-								<to>OFF</to>
-								<powerUsage>30</powerUsage>
-								<time>30</time>
-							</transition>
-						</powerState>
-						<powerState>
-							<name>OFF</name>
-							<powerUsage>0</powerUsage>
-							<transition>
-								<to>ON</to>
-								<powerUsage>40</powerUsage>
-								<time>60</time>
-							</transition>
-						</powerState>
-					</powerStates>
-					<parameter name="pState">
-						<property name="name">
-							<value>P0</value>
-						</property>	
-						<property name="frequency">
-							<value>3000</value>
-						</property>		
-						<property name="voltage">
-							<value>1.3</value>
-						</property>
-						<property name="power">
-							<value>14</value>
-						</property>						
-					</parameter>
-					<parameter name="pState">
-						<property name="name">
-							<value>P1</value>
-						</property>	
-						<property name="frequency">
-							<value>2660</value>
-						</property>		
-						<property name="voltage">
-							<value>1.2</value>
-						</property>
-						<property name="power">
-							<value>12</value>
-						</property>						
-					</parameter>
-					<parameter name="pState">
-						<property name="name">
-							<value>P2</value>
-						</property>	
-						<property name="frequency">
-							<value>2330</value>
-						</property>		
-						<property name="voltage">
-							<value>1.1</value>
-						</property>
-						<property name="power">
-							<value>10</value>
-						</property>						
-					</parameter>
-					<parameter name="pState">
-						<property name="name">
-							<value>P3</value>
-						</property>	
-						<property name="frequency">
-							<value>2000</value>
-						</property>		
-						<property name="voltage">
-							<value>1.0</value>
-						</property>
-						<property name="power">
-							<value>8</value>
-						</property>						
-					</parameter>							
-				</powerProfile>
-			</profile>
+		<computingResourceTemplate class="Processor" name="modelProcessorA">
 		</computingResourceTemplate>
-		<computingResourceTemplate class="Processor" id="modelProcessorB">
-			<energyEstimationPlugin>
-				<name>CPUEnergyEstimationPlugin</name>
-			</energyEstimationPlugin>
-			<profile>
-				<powerProfile>
-					<powerStates>
-						<powerState>
-							<name>ON</name>
-							<powerUsage>20</powerUsage>
-							<transition>
-								<to>OFF</to>
-								<powerUsage>30</powerUsage>
-								<time>30</time>
-							</transition>
-						</powerState>
-						<powerState>
-							<name>OFF</name>
-							<powerUsage>0</powerUsage>
-							<transition>
-								<to>ON</to>
-								<powerUsage>40</powerUsage>
-								<time>60</time>
-							</transition>
-						</powerState>
-					</powerStates>
-					<parameter name="pState">
-						<property name="name">
-							<value>P0</value>
-						</property>	
-						<property name="frequency">
-							<value>2200</value>
-						</property>		
-						<property name="voltage">
-							<value>1.3</value>
-						</property>
-						<property name="power">
-							<value>20</value>
-						</property>						
-					</parameter>
-					<parameter name="pState">
-						<property name="name">
-							<value>P1</value>
-						</property>	
-						<property name="frequency">
-							<value>2000</value>
-						</property>		
-						<property name="voltage">
-							<value>1.2</value>
-						</property>
-						<property name="power">
-							<value>17</value>
-						</property>						
-					</parameter>
-					<parameter name="pState">
-						<property name="name">
-							<value>P2</value>
-						</property>	
-						<property name="frequency">
-							<value>1800</value>
-						</property>		
-						<property name="voltage">
-							<value>1.1</value>
-						</property>
-						<property name="power">
-							<value>16</value>
-						</property>						
-					</parameter>
-					<parameter name="pState">
-						<property name="name">
-							<value>P3</value>
-						</property>	
-						<property name="frequency">
-							<value>1000</value>
-						</property>		
-						<property name="voltage">
-							<value>1.0</value>
-						</property>
-						<property name="power">
-							<value>10</value>
-						</property>						
-					</parameter>
-				</powerProfile>
-			</profile>
+		<computingResourceTemplate class="Processor" name="modelProcessorB">
 		</computingResourceTemplate>
 	</templates>
