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