Index: DCWoRMS/branches/coolemall/src/schedframe/resources/devices/description/PhysicalResourceDescription.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/resources/devices/description/PhysicalResourceDescription.java	(revision 1207)
+++ DCWoRMS/branches/coolemall/src/schedframe/resources/devices/description/PhysicalResourceDescription.java	(revision 1288)
@@ -23,8 +23,13 @@
 import schedframe.resources.computing.profiles.energy.thermal.plugin.DefaultTemperatureEstimationPlugin;
 import schedframe.resources.computing.profiles.energy.thermal.plugin.TemperatureEstimationPlugin;
+import schedframe.resources.computing.profiles.load.LoadEstimationPluginFactory;
+import schedframe.resources.computing.profiles.load.LoadProfile;
+import schedframe.resources.computing.profiles.load.ResourceLoadCalendar;
+import schedframe.resources.computing.profiles.load.plugin.LoadEstimationPlugin;
 import schemas.PowerUsage;
 import schemas.Profile;
 import simulator.utils.InstanceFactory;
 import example.energy.DefaultEnergyEstimationPlugin;
+import example.energy.coolemall.DefaultLoadEstimationPlugin;
 
 public class PhysicalResourceDescription extends ResourceDescription{
@@ -33,4 +38,5 @@
 	protected AirThroughputProfile airThroughputProfile;
 	protected ThermalProfile thermalProfile;
+	protected LoadProfile loadProfile;
 	
 	protected String category;
@@ -47,4 +53,7 @@
 			initAirThroughputProfile(profile.getAirThroughputProfile());
 			initThermalProfile(profile.getThermalProfile());
+			initLoadProfile(profile.getLoadProfile());
+		} else {
+			initLoadProfile(null);
 		}
 	}
@@ -115,13 +124,5 @@
 									builder = builder.powerUsage(Double.valueOf(property.getStringValueWithUnit(0).getContent()));	
 								}
-							} else if (property.getName().equals("powerUsageMin")){
-								if(property.getStringValueWithUnit(0).getContent() != null && property.getStringValueWithUnit(0).getContent().length() > 0){
-									builder = builder.powerUsageMin(Double.valueOf(property.getStringValueWithUnit(0).getContent()));	
-								}
-							} else if (property.getName().equals("powerUsageMax")){
-								if(property.getStringValueWithUnit(0).getContent() != null && property.getStringValueWithUnit(0).getContent().length() > 0){
-									builder = builder.powerUsageMax(Double.valueOf(property.getStringValueWithUnit(0).getContent()));	
-								}
-							}else if (property.getName().equals("loadPowerUsage")){
+							} else if (property.getName().equals("loadPowerUsage")){
 								if(property.getStringValueWithUnit(0).getContent() != null && property.getStringValueWithUnit(0).getContent().length() > 0 &&
 										property.getStringValueWithUnit(1).getContent() != null && property.getStringValueWithUnit(1).getContent().length() > 0){
@@ -197,4 +198,32 @@
 			Parameters params = extractParameters(thermalProfile.getParameter());
 			this.thermalProfile.init(params);
+		}
+	}
+	
+	protected void initLoadProfile(schemas.LoadProfile loadProfile) {
+		
+		if (loadProfile != null) {
+			
+			LoadEstimationPlugin loadEstimationPlugin = null;
+
+			if(loadProfile.getLoadEstimationPlugin() != null){
+				String loadEstimationPluginName = loadProfile.getLoadEstimationPlugin().getName();
+				if(loadEstimationPluginName != null) {
+					loadEstimationPlugin = (LoadEstimationPlugin) InstanceFactory.createInstance(
+							loadEstimationPluginName, LoadEstimationPlugin.class);			
+				} else {
+					loadEstimationPlugin = new DefaultLoadEstimationPlugin();
+				}
+				Parameters params = extractParameters(loadProfile.getLoadEstimationPlugin().getParameter());
+				loadEstimationPlugin.init(params);
+			}
+			ResourceLoadCalendar resLoadCalander = new ResourceLoadCalendar(loadProfile.getLoadCalendar());
+			this.loadProfile = new LoadProfile(loadEstimationPlugin, resLoadCalander);
+			Parameters params = extractParameters(loadProfile.getParameter());
+			this.loadProfile.init(params);
+		} else {
+			ResourceLoadCalendar resLoadCalander = new ResourceLoadCalendar();
+			LoadEstimationPlugin loadEstimationPlugin = LoadEstimationPluginFactory.createLoadEstimationPlugi(getType());
+			this.loadProfile = new LoadProfile(loadEstimationPlugin, resLoadCalander);
 		}
 	}
@@ -252,4 +281,8 @@
 		return thermalProfile;
 	}
+
+	public LoadProfile getLoadProfile() {
+		return loadProfile;
+	}
 	
 	public Location getLocation() {
