Index: DCWoRMS/trunk/src/simulator/stats/implementation/DCWormsStatistics.java
===================================================================
--- DCWoRMS/trunk/src/simulator/stats/implementation/DCWormsStatistics.java	(revision 512)
+++ DCWoRMS/trunk/src/simulator/stats/implementation/DCWormsStatistics.java	(revision 520)
@@ -333,5 +333,5 @@
 						EnergyExtension een = (EnergyExtension)(resource.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION));
 						if(resourceController.getComputingResources().contains(resource)) {
-							if( een != null /*&& een.getPp() != null*/ ){
+							if( een != null && een.getPowerProfile() != null ){
 								accStats.meanEnergyUsage.add(energyUsage.getMeanValue());
 							}
@@ -339,7 +339,7 @@
 						} else if( een != null && een.getPowerProfile() != null ){
 							ComputingResource parent = resource.getParent();
-							een = (EnergyExtension)(parent.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION));
 							boolean top = true;
 							while(parent != null){
+								een = (EnergyExtension)(parent.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION));
 								if(een != null &&  een.getPowerProfile() != null) {
 									top = false;
Index: DCWoRMS/trunk/src/test/experiment_result/experiment.properties
===================================================================
--- DCWoRMS/trunk/src/test/experiment_result/experiment.properties	(revision 520)
+++ DCWoRMS/trunk/src/test/experiment_result/experiment.properties	(revision 520)
@@ -0,0 +1,17 @@
+# Use single *.swf file as workload description.
+
+# Path to xml file which describes resource characteristics.
+resdesc=src/test/ariel/resources.xml
+
+# and swf file, which name is declared by readscenario.workloadfilename parameter.
+# Swf file must be placed in readscenario.inputfolder directory.  
+readscenario.workloadfilename=src/test/ariel/workload.swf
+
+# Choose directory where all result files should be placed.
+stats.outputfolder=../experiment_result
+
+
+creatediagrams.gantt=true
+
+creatediagrams.respowerusage=Processor
+
Index: DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Jobs.txt
===================================================================
--- DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Jobs.txt	(revision 520)
+++ DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Jobs.txt	(revision 520)
@@ -0,0 +1,5 @@
+jobID;meanTaskCompletionTime;meanTaskExecutionTime;meanTaskStartTime;meanTaskFlowTime;meanTaskWaitingTime;meanTaskGQ_WaitingTime;lateness;tardiness;makespan;
+1;12,600;12,600;0;12,600;0;0;0;0;12,600;
+2;24,370;22,570;0;22,570;1,800;-1,800;0;0;24,370;
+3;30,600;27,000;0;27,000;3,600;-3,600;0;0;30,600;
+4;34,200;28,800;0;28,800;5,400;-5,400;0;0;34,200;
Index: DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_EnergyUsage.txt
===================================================================
--- DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_EnergyUsage.txt	(revision 520)
+++ DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_EnergyUsage.txt	(revision 520)
@@ -0,0 +1,30 @@
+resourceName;timestamp;consumption;
+
+Processor_0;1225666800000;350;
+Processor_0;1225668600000;343;
+Processor_0;1225670400000;337;
+Processor_0;1225672200000;330;
+Processor_0;1225701000000;330;
+mean: 332.10526315789474 sum: 3155.0
+
+Processor_1;1225666800000;350;
+Processor_1;1225668600000;343;
+Processor_1;1225670400000;337;
+Processor_1;1225672200000;330;
+Processor_1;1225701000000;330;
+mean: 332.10526315789474 sum: 3155.0
+
+Processor_2;1225666800000;350;
+Processor_2;1225668600000;343;
+Processor_2;1225670400000;337;
+Processor_2;1225672200000;330;
+Processor_2;1225701000000;330;
+mean: 332.10526315789474 sum: 3155.0
+
+Processor_3;1225666800000;350;
+Processor_3;1225668600000;343;
+Processor_3;1225670400000;337;
+Processor_3;1225672200000;330;
+Processor_3;1225701000000;330;
+mean: 332.10526315789474 sum: 3155.0
+
Index: DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_ResourceUtilization.txt
===================================================================
--- DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_ResourceUtilization.txt	(revision 520)
+++ DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_ResourceUtilization.txt	(revision 520)
@@ -0,0 +1,27 @@
+resourceName;timestamp;utilization;
+compRes;1225666800000;0.25;
+compRes;1225668600000;0.5;
+compRes;1225670400000;0.75;
+compRes;1225672200000;1;
+compRes;1225679400000;0.75;
+compRes;1225691170000;0.5;
+compRes;1225697400000;0.25;
+compRes;1225701000000;0;
+mean: 0.6649853801169591
+
+Processor_0;1225666800000;1;
+Processor_0;1225679400000;0;
+mean: 0.3684210526315789
+
+Processor_1;1225668600000;1;
+Processor_1;1225691170000;0;
+mean: 0.6599415204678363
+
+Processor_2;1225670400000;1;
+Processor_2;1225697400000;0;
+mean: 0.7894736842105263
+
+Processor_3;1225672200000;1;
+Processor_3;1225701000000;0;
+mean: 0.8421052631578947
+
Index: DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Simulation.txt
===================================================================
--- DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Simulation.txt	(revision 520)
+++ DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Simulation.txt	(revision 520)
@@ -0,0 +1,15 @@
+Resource name;mean;stdev;variance;minimum;maximum;sum;count;
+Delayed tasks;0;0;0;0;0;0;1;
+Failed requests (tasks);0;0;0;0;0;0;1;
+Makespan;34,200;0;0;34,200;34,200;34,200;1;
+Resources queue length;0.158;0;0;0.158;0.158;0.158;1;
+Resources total load;0.665;0;0;0.665;0.665;0.665;1;
+Resources reservation load;?;?;?;?;?;?;0;
+Energy usage;332.105;0;0;332.105;332.105;1,328.421;4;
+Task completion time;25,442.5;8,206.304;67,343,418.75;12,600;34,200;101,770;4;
+Task execution time;22,742.5;6,279.325;39,429,918.75;12,600;28,800;90,970;4;
+Task start time;0;0;0;0;0;0;4;
+Task flow time;22,742.5;6,279.325;39,429,918.75;12,600;28,800;90,970;4;
+Task waiting time;2,700;2,012.461;4,050,000;0;5,400;10,800;4;
+Task lateness;0;0;0;0;0;0;4;
+Task tardiness;0;0;0;0;0;0;4;
Index: DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_AirThroughput.txt
===================================================================
--- DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_AirThroughput.txt	(revision 520)
+++ DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_AirThroughput.txt	(revision 520)
@@ -0,0 +1,6 @@
+resourceName;timestamp;airFlow;
+
+
+
+
+
Index: DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Tasks.txt
===================================================================
--- DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Tasks.txt	(revision 520)
+++ DCWoRMS/trunk/src/test/experiment_result/Stats_Simulation 1_Tasks.txt	(revision 520)
@@ -0,0 +1,5 @@
+JobID;TaskID;UserDN;ResName;CpuCnt;ExecStartDate;ExecFinishDate;ExecEndDate;GB_SubDate;LB_SubDate;CompletionTime;ExecStartTime;ExecutionTime;ReadyTime;StartTime;FlowTime;WaitingTime;GQ_WaitingTime;Lateness;Tardiness;ReservStartDate;ReservFinishDate;ProcessorName;Energy;
+1;1;-1;ManagementSystem@cluster;1;1225666800;1225679400;1225679400;1225666800;1225666800;12600;0;12600;0;0;12600;0;0;0;0;0;0;[Processor_0];
+2;2;-1;ManagementSystem@cluster;1;1225668600;1225691170;1225691170;1225668600;1225666800;24370;1800;22570;1800;0;22570;1800;-1800;0;0;0;0;[Processor_1];
+3;3;-1;ManagementSystem@cluster;1;1225670400;1225697400;1225697400;1225670400;1225666800;30600;3600;27000;3600;0;27000;3600;-3600;0;0;0;0;[Processor_2];
+4;4;-1;ManagementSystem@cluster;1;1225672200;1225701000;1225701000;1225672200;1225666800;34200;5400;28800;5400;0;28800;5400;-5400;0;0;0;0;[Processor_3];
Index: DCWoRMS/trunk/src/schedframe/resources/computing/DataCenter.java
===================================================================
--- DCWoRMS/trunk/src/schedframe/resources/computing/DataCenter.java	(revision 495)
+++ DCWoRMS/trunk/src/schedframe/resources/computing/DataCenter.java	(revision 520)
@@ -1,4 +1,7 @@
 package schedframe.resources.computing;
 
+import java.util.List;
+
+import schedframe.resources.StandardResourceType;
 import schedframe.resources.computing.description.ComputingResourceDescription;
 import schedframe.resources.computing.profiles.energy.EnergyExtension;
@@ -19,3 +22,8 @@
 		e.setResource(this);
 	}
+	
+	@SuppressWarnings("unchecked")
+	public List<ComputingNode> getComputingNodes(){
+		return (List<ComputingNode>) getDescendantsByType(StandardResourceType.ComputingNode);
+	}
 }
Index: DCWoRMS/trunk/src/example/energy/DataCenterEnergyEstimationPlugin.java
===================================================================
--- DCWoRMS/trunk/src/example/energy/DataCenterEnergyEstimationPlugin.java	(revision 497)
+++ DCWoRMS/trunk/src/example/energy/DataCenterEnergyEstimationPlugin.java	(revision 520)
@@ -3,4 +3,5 @@
 import schedframe.resources.computing.ComputingNode;
 import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.DataCenter;
 import schedframe.resources.computing.profiles.energy.EnergyEvent;
 import schedframe.resources.computing.profiles.energy.power.PowerUsage;
@@ -13,7 +14,7 @@
 			ComputingResource resource) {
 		double power = 0;
-		for(ComputingResource child:resource.getChildren()){
-			ComputingNode node = (ComputingNode)child;
-			PowerUsage powerUsage = node.getPowerInterface().getRecentPowerUsage();
+		DataCenter dataCenter = (DataCenter)resource;
+		for(ComputingNode cn:dataCenter.getComputingNodes()){
+			PowerUsage powerUsage = cn.getPowerInterface().getRecentPowerUsage();
 			power += (powerUsage == null ? 0 : powerUsage.getValue());
 		}
