package example.load; import schedframe.resources.computing.ComputingResource; import schedframe.resources.computing.profiles.energy.ResourceEvent; import schedframe.resources.devices.PhysicalResource; import schedframe.scheduling.manager.tasks.JobRegistry; import simulator.stats.DCwormsAccumulator; public class DefaultLoadEstimationPlugin extends BaseLoadEstimationPlugin{ public double estimateUtlization(ResourceEvent event, JobRegistry jobRegistry, PhysicalResource resource) { ComputingResource computingResource = (ComputingResource) resource; DCwormsAccumulator childrenLoad = new DCwormsAccumulator(); for(ComputingResource compRes: computingResource.getChildren()){ childrenLoad.add(compRes.getLoadInterface().getRecentUtilization().getValue()); } //double backgroundLoad = resource.getLoadInterface().getLoadCalendar().getCurrentLoad(); //return childrenLoad.getMean() + backgroundLoad; return childrenLoad.getMean(); } }