Ignore:
Timestamp:
07/30/14 12:25:00 (11 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/branches/coolemall/src/schedframe/resources
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/resources/ResourceStatus.java

    r477 r1423  
    44        BUSY, 
    55        FREE, 
    6         RESERVED, 
    76        FAILED, 
    87        PENDING, 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ComputingResource.java

    r1415 r1423  
    4747        //protected ResourceCharacteristics resourceCharacteristic; 
    4848 
    49  
     49         
    5050        public ComputingResource(ComputingResourceDescription resDesc) { 
    5151                this.type = resDesc.getType(); 
     
    5353                this.category = resDesc.getCategory(); 
    5454                this.status = ResourceStatus.FREE; 
    55                 this.extensionList = new ExtensionListImpl(1); 
     55                this.extensionList = new ExtensionListImpl(2); 
    5656                initCharacteristics(resDesc); 
    5757                accept(new LoadExtension(resDesc.getLoadProfile(), this)); 
    5858                accept(new EnergyExtension.Builder().resource(this).powerProfile(resDesc.getPowerProfile()).airflowProfile(resDesc.getAirflowProfile()).thermalProfile(resDesc.getThermalProfile()).build());    
     59 
    5960        } 
    6061 
    6162        protected void initCharacteristics(ComputingResourceDescription resDesc){ 
    62                 resourceCharacteristic = ComputingResourceCharacteristics.builder().resourceUnits(resDesc.getResourceUnits()).location(resDesc.getLocation()).parameters(resDesc.getParameters()).device(resDesc.getDevices()).build(); 
     63                this.resourceCharacteristic = ComputingResourceCharacteristics.builder().resourceUnits(resDesc.getResourceUnits()).location(resDesc.getLocation()).parameters(resDesc.getParameters()).device(resDesc.getDevices()).build(); 
    6364                for(Device device: ((ComputingResourceCharacteristics)resourceCharacteristic).getDevices()){ 
    6465                        device.setComputingResource(this); 
     
    7172 
    7273        public void setParent(ComputingResource newParent) { 
    73                 parent = newParent; 
     74                this.parent = newParent; 
    7475                /*if(this.getLoadInterface().getLoadCalendar().getLoadDistribution().size() == 0){ 
    7576                        this.getLoadInterface().getLoadCalendar().getLoadDistribution().addAll(parent.getLoadInterface().getLoadCalendar().getLoadDistribution()); 
     
    7980        public List<ComputingResource> getChildren() { 
    8081                if (children == null) 
    81                         return new ArrayList<ComputingResource>(1); 
     82                        return new ArrayList<ComputingResource>(0); 
    8283                return children; 
    8384        } 
     
    124125                ResourceEventCommand rec = new ResourceEventCommand(this); 
    125126                rec.execute(event); 
    126                 SchedulingEventCommand sec = new SchedulingEventCommand(this); 
    127                 sec.execute(event); 
    128  
     127                if((scheduler != null && (parent != null && scheduler != parent.getScheduler()))  && !event.getSource().equals(scheduler.getFullName())){ 
     128                        SchedulingEventCommand sec = new SchedulingEventCommand(this); 
     129                        sec.execute(event); 
     130                } 
    129131                //old, correctly working method 
    130132                /*if (extensionList != null) { 
     
    143145        } 
    144146         
     147 
     148        public void updateState(ResourceEvent event){ 
     149                for (Device device: ((ComputingResourceCharacteristics)resourceCharacteristic).getDevices()) { 
     150                        for (Extension extension: device.getExtensionList()) { 
     151                                if (extension.supportsEvent(event)) { 
     152                                        extension.handleEvent(event); 
     153                                } 
     154                        } 
     155                } 
     156                 
     157                if (extensionList != null) { 
     158                        for (Extension extension: extensionList) { 
     159                                if (extension.supportsEvent(event)) { 
     160                                        extension.handleEvent(event); 
     161                                } 
     162                        } 
     163                } 
     164                 
     165        } 
     166         
    145167        public List <? extends ComputingResource> getDescendantsByType(ResourceType type) { 
    146                 List<ResourceValidator> validators = new ArrayList<ResourceValidator>(); 
     168                List<ResourceValidator> validators = new ArrayList<ResourceValidator>(1); 
    147169                validators.add(new ResourceTypeValidator(type)); 
    148170                return searchDescendants(validators, true); 
     
    150172 
    151173        public List<? extends ComputingResource> getDescendantsByTypeAndStatus(ResourceType type, ResourceStatus status) { 
    152                 List<ResourceValidator> validators = new ArrayList<ResourceValidator>(); 
     174                List<ResourceValidator> validators = new ArrayList<ResourceValidator>(2); 
    153175                validators.add(new ResourceStatusValidator(status)); 
    154176                validators.add(new ResourceTypeValidator(type)); 
     
    157179 
    158180        public ComputingResource getDescendantByName(String resourceName){ 
    159                 List<ResourceValidator> validators = new ArrayList<ResourceValidator>(); 
     181                List<ResourceValidator> validators = new ArrayList<ResourceValidator>(1); 
    160182                validators.add(new ResourceNameValidator(resourceName)); 
    161183                List<? extends ComputingResource> resources = searchDescendants(validators, true); 
     
    227249                 
    228250                public void handleResourceEvent(ResourceEvent event){ 
     251                        for (Device device: ((ComputingResourceCharacteristics)resourceCharacteristic).getDevices()) { 
     252                                for (Extension extension: device.getExtensionList()) { 
     253                                        if (extension.supportsEvent(event)) { 
     254                                                extension.handleEvent(event); 
     255                                        } 
     256                                } 
     257                        } 
     258                         
    229259                        if (extensionList != null) { 
    230260                                for (Extension extension: extensionList) { 
    231261                                        if (extension.supportsEvent(event)) { 
    232262                                                extension.handleEvent(event); 
    233                                         } 
    234                                 } 
    235                                  
    236                                 for (Device device: ((ComputingResourceCharacteristics)resourceCharacteristic).getDevices()) { 
    237                                         for (Extension extension: device.getExtensionList()) { 
    238                                                 if (extension.supportsEvent(event)) { 
    239                                                         extension.handleEvent(event); 
    240                                                 } 
    241263                                        } 
    242264                                } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ComputingResourceCharacteristics.java

    r1207 r1423  
    2020                this.resUnits = builder.resUnits; 
    2121                this.devices = builder.devices; 
    22                 // TODO Auto-generated constructor stub 
    2322        } 
    2423 
    2524        public Map<ResourceUnitName, List<ResourceUnit>> getResourceUnits() { 
    2625                if(resUnits == null) 
    27                         return new HashMap<ResourceUnitName, List<ResourceUnit>>(); 
     26                        return new HashMap<ResourceUnitName, List<ResourceUnit>>(2); 
    2827                return resUnits; 
    2928        } 
     
    5453        public List<Device> getDevices(){ 
    5554                if(devices == null) 
    56                         return new ArrayList<Device>(); 
     55                        return new ArrayList<Device>(0); 
    5756                return devices; 
    5857        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ResourceCharacteristics.java

    r1207 r1423  
    3030        public Parameters getParameters() { 
    3131                if(parameters == null) 
    32                         return new Parameters(); 
     32                        return new Parameters(2); 
    3333                return parameters; 
    3434        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/description/ComputingResourceDescription.java

    r1344 r1423  
    112112        public void addResourceUnit(ResourceUnit unit) { 
    113113                if (this.resUnits == null) 
    114                         this.resUnits = new HashMap<ResourceUnitName, List<ResourceUnit>>(1); 
     114                        this.resUnits = new HashMap<ResourceUnitName, List<ResourceUnit>>(2); 
    115115                List<ResourceUnit> list = null; 
    116116                if (this.resUnits.containsKey(unit.getName())) { 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/EnergyExtension.java

    r1415 r1423  
    111111                if(powerProfile == null || powerProfile.getEnergyEstimationPlugin() == null) 
    112112                        return false; 
    113                 if(event.getType().getName().equals(ResourceEventType.POWER_STATE_CHANGED.getName())) 
     113                if(event.getType().getName().equals(ResourceEventType.UTILIZATION_CHANGED.getName())) 
     114                        return true; 
     115                else if(event.getType().getName().equals(ResourceEventType.TASK_STARTED.getName())) 
     116                        return true; 
     117                else if(event.getType().getName().equals(ResourceEventType.TASK_FINISHED.getName())) 
     118                        return true; 
     119                else if(event.getType().getName().equals(ResourceEventType.POWER_STATE_CHANGED.getName())) 
    114120                        return true; 
    115121                else if(event.getType().getName().equals(ResourceEventType.CPU_FREQUENCY_CHANGED.getName())) 
    116122                        return true; 
    117                 else if(event.getType().getName().equals(ResourceEventType.TASK_STARTED.getName())) 
    118                         return true; 
    119                 else if(event.getType().getName().equals(ResourceEventType.TASK_FINISHED.getName())) 
    120                         return true; 
    121                 else if(event.getType().getName().equals(ResourceEventType.UTILIZATION_CHANGED.getName())) 
     123                else if(event.getType().getName().equals(ResourceEventType.UPDATE_POWER_STATE.getName())) 
    122124                        return true; 
    123125         
     
    138140                        switch (resEvent.getType()) { 
    139141                         
    140                         case UPDATE_POWER_STATE: 
    141                                 PowerStateName newPowerState = (PowerStateName) resEvent.getData(); 
    142                                 powerInterface.setPowerState(newPowerState); 
    143                                 break; 
    144                                  
     142                        case UTILIZATION_CHANGED: 
     143                                power = powerProfile.getEnergyEstimationPlugin().estimatePowerConsumption(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     144                                status = powerProfile.addToPowerUsageHistory(power); 
     145                                break; 
     146                                 
     147                        case TASK_STARTED: 
     148                                power = powerProfile.getEnergyEstimationPlugin().estimatePowerConsumption(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     149                                status = powerProfile.addToPowerUsageHistory(power); 
     150                                break; 
     151         
     152                        case TASK_FINISHED: 
     153                                power = powerProfile.getEnergyEstimationPlugin().estimatePowerConsumption(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     154                                status = powerProfile.addToPowerUsageHistory(power); 
     155                                break; 
     156                                                                 
    145157                        case POWER_STATE_CHANGED: 
    146158                                power = powerProfile.getEnergyEstimationPlugin().estimatePowerConsumption(resEvent, new JobRegistryImpl(resource.getFullName()), resource);                      
     
    153165                                break; 
    154166                                 
    155                         case TASK_STARTED: 
    156                                 power = powerProfile.getEnergyEstimationPlugin().estimatePowerConsumption(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    157                                 status = powerProfile.addToPowerUsageHistory(power); 
    158                                 break; 
    159          
    160                         case TASK_FINISHED: 
    161                                 power = powerProfile.getEnergyEstimationPlugin().estimatePowerConsumption(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    162                                 status = powerProfile.addToPowerUsageHistory(power); 
    163                                 break; 
    164                                  
    165                         case UTILIZATION_CHANGED: 
    166                                 power = powerProfile.getEnergyEstimationPlugin().estimatePowerConsumption(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    167                                 status = powerProfile.addToPowerUsageHistory(power); 
     167                        case UPDATE_POWER_STATE: 
     168                                if(resource.getFullName().equals(resEvent.getSource())){ 
     169                                        PowerStateName newPowerState = (PowerStateName) resEvent.getData(); 
     170                                        powerInterface.setPowerState(newPowerState); 
     171                                } 
    168172                                break; 
    169173                                 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/AirflowInterface.java

    r1396 r1423  
    2424        public AirflowValue getRecentAirflow(); 
    2525         
    26         List<AirflowValue> getAirflowHistory(); 
     26        public List<AirflowValue> getAirflowHistory(); 
    2727         
    2828        public Parameters getParameters(); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/ComputingResourceAirflowInterface.java

    r1415 r1423  
    11package schedframe.resources.computing.profiles.energy.airthroughput.ui; 
    22 
    3 import java.util.ArrayList; 
    43import java.util.List; 
    54 
     
    5453 
    5554        public List<AirflowState> getSupportedAirflowStates() { 
    56                 List<AirflowState> airflowStates = new ArrayList<AirflowState>(); 
    57                 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 
    58                         airflowStates.add(airflowState); 
    59                 } 
    60                 return airflowStates; 
     55                return airflowProfile.getAirflowStates(); 
    6156        } 
    6257 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerProfile.java

    r1207 r1423  
    6464        public List<PowerState> getSupportedPowerStates() { 
    6565                if(supportedPowerStates == null) 
    66                         return new ArrayList<PowerState>(); 
     66                        return new ArrayList<PowerState>(0); 
    6767                return supportedPowerStates; 
    6868        } 
     
    7070        public Map<String, PState> getSupportedPStates() { 
    7171                if(supportedPStates == null) 
    72                         return new HashMap<String, PState>(); 
     72                        return new HashMap<String, PState>(0); 
    7373                return supportedPStates; 
    7474        } 
     
    117117                boolean supportsOFF = false; 
    118118                if(supportedPowerStates == null){ 
    119                         supportedPowerStates = new ArrayList<PowerState>(); 
     119                        supportedPowerStates = new ArrayList<PowerState>(4); 
    120120                } 
    121121                for(PowerState ps: supportedPowerStates){ 
     
    128128                 
    129129                if(!supportsON){ 
    130                         supportedPowerStates.add(new PowerState(StandardPowerStateName.ON, -1, new ArrayList<Transition>())); 
     130                        supportedPowerStates.add(new PowerState(StandardPowerStateName.ON, -1, null)); 
     131                        supportedPowerStates.add(new PowerState(StandardPowerStateName.BOOT, -1, null)); 
    131132                } 
    132133                if(!supportsOFF){ 
    133                         supportedPowerStates.add(new PowerState(StandardPowerStateName.OFF, -1, new ArrayList<Transition>())); 
     134                        supportedPowerStates.add(new PowerState(StandardPowerStateName.OFF, -1, null)); 
     135                        supportedPowerStates.add(new PowerState(StandardPowerStateName.POWEROFF, -1, null)); 
    134136                } 
    135137        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerState.java

    r477 r1423  
    11package schedframe.resources.computing.profiles.energy.power; 
    22 
     3import java.util.ArrayList; 
    34import java.util.List; 
    45 
     
    2425        } 
    2526        public List<Transition> getTransitions() { 
     27                if(transitions == null) 
     28                        return new ArrayList<Transition>(0); 
    2629                return transitions; 
    2730        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/ui/ComputingResourcePowerInterface.java

    r1415 r1423  
    11package schedframe.resources.computing.profiles.energy.power.ui; 
    22 
    3 import java.util.ArrayList; 
    43import java.util.List; 
    54 
     
    6564 
    6665        public List<PowerState> getSupportedPowerStates(){ 
    67                 List<PowerState> powerStates = new ArrayList<PowerState>(); 
    68                 for(PowerState powerState: powerProfile.getSupportedPowerStates()){ 
    69                         powerStates.add(powerState); 
    70                 } 
    71                 return powerStates; 
     66                return powerProfile.getSupportedPowerStates(); 
    7267        } 
    7368 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/ui/NodePowerInterface.java

    r1415 r1423  
    44 
    55import java.util.List; 
     6 
    67 
    78import schedframe.resources.ResourceStatus; 
     
    3738                        } 
    3839 
    39                         if(state == StandardPowerStateName.OFF){ 
     40                        if(state == StandardPowerStateName.OFF || state == StandardPowerStateName.POWEROFF){ 
    4041                                node.setStatus(ResourceStatus.UNAVAILABLE); 
    4142                        } 
    42                         else if(state == StandardPowerStateName.ON){ 
     43                        else if(state == StandardPowerStateName.ON || state == StandardPowerStateName.BOOT){ 
    4344                                node.setStatus(ResourceStatus.FREE); 
    4445                        } 
     
    5556                /*double timePenalty = getTransitionTime(currentPowerState, StandardPowerStateName.ON); 
    5657                setPowerState(StandardPowerStateName.BOOT); 
    57                 DataCenterWorkloadSimulator.getEventManager().sendToResource(resource.getFullName(), timePenalty, new ResourceEvent(ResourceEventType.UPDATE_POWER_STATE, StandardPowerStateName.ON, resource.getFullName()));*/ 
     58                DataCenterWorkloadSimulator.getEventManager().sendToResource(resource.getFullName(), timePenalty, new ResourceEvent(ResourceEventType.UPDATE_POWER_STATE, StandardPowerStateName.ON, resource.getFullName())); 
     59                 */              
    5860                setPowerState(StandardPowerStateName.ON); 
    5961        } 
     
    6870        private double getTransitionTime(PowerStateName from, PowerStateName to){ 
    6971                List<PowerState> availablePowerStates = getSupportedPowerStates(); 
    70                 double timePenalty = 0; 
     72                double time = 0; 
    7173                for(PowerState ps : availablePowerStates){ 
    7274                        if(ps.getName().getLabel().equals(from.getLabel())){ 
     
    7476                                for(Transition t: transitions){ 
    7577                                        if(t.getTo().getLabel().equals(to)){ 
    76                                                 timePenalty = t.getTime(); 
     78                                                time = t.getTime(); 
    7779                                        } 
    7880                                } 
    7981                        } 
    8082                } 
    81                 return timePenalty; 
     83                return time; 
    8284        } 
    8385 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/ui/PowerInterface.java

    r1380 r1423  
    2424        //public double getCurrentPowerConsumption(); 
    2525         
    26         List<PowerUsage> getPowerUsageHistory(); 
     26        public List<PowerUsage> getPowerUsageHistory(); 
    2727         
    2828        public Parameters getParameters(); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/thermal/ui/ThermalInterface.java

    r804 r1423  
    1010        public TemperatureValue getRecentTemperature(); 
    1111         
    12         List<TemperatureValue> getTemperatureHistory(); 
     12        public List<TemperatureValue> getTemperatureHistory(); 
    1313         
    1414        public Parameters getParameters(); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/load/LoadEstimationPluginFactory.java

    r1293 r1423  
    11package schedframe.resources.computing.profiles.load; 
    22 
     3import example.load.AppBasedProcessorLoadEstimationPlugin; 
    34import example.load.DefaultLoadEstimationPlugin; 
    45import example.load.ProcessorLoadEstimationPlugin; 
     
    1415                 
    1516                if(resType.getName().equals(StandardResourceType.Processor.getName())) 
    16                         loadEstimationPlugin = new ProcessorLoadEstimationPlugin(); 
     17                        loadEstimationPlugin = new AppBasedProcessorLoadEstimationPlugin(); 
    1718                else 
    1819                        loadEstimationPlugin = new DefaultLoadEstimationPlugin(); 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/load/LoadExtension.java

    r1415 r1423  
    1919        protected PhysicalResource resource; 
    2020 
    21         public LoadExtension(LoadProfile loadProfile,  PhysicalResource resource) { 
     21        public LoadExtension(LoadProfile loadProfile, PhysicalResource resource) { 
    2222                this.loadProfile = loadProfile; 
    2323                this.loadInterface =  LoadInterfaceFactory.createLoadInterface(resource, loadProfile); 
     
    2929                if(loadProfile == null || loadProfile.getLoadEstimationPlugin() == null) 
    3030                        return false; 
    31                 if(event.getType().getName().equals(ResourceEventType.POWER_STATE_CHANGED.getName())) 
    32                         return true; 
    33                 else if(event.getType().getName().equals(ResourceEventType.CPU_FREQUENCY_CHANGED.getName())) 
     31                if(event.getType().getName().equals(ResourceEventType.UTILIZATION_CHANGED.getName())) 
    3432                        return true; 
    3533                else if(event.getType().getName().equals(ResourceEventType.TASK_STARTED.getName())) 
     
    3735                else if(event.getType().getName().equals(ResourceEventType.TASK_FINISHED.getName())) 
    3836                        return true; 
    39                 else if(event.getType().getName().equals(ResourceEventType.UTILIZATION_CHANGED.getName())) 
    40                         return true;             
     37                else if(event.getType().getName().equals(ResourceEventType.POWER_STATE_CHANGED.getName())) 
     38                        return true; 
     39                else if(event.getType().getName().equals(ResourceEventType.CPU_FREQUENCY_CHANGED.getName())) 
     40                        return true; 
    4141                else return false; 
    4242        } 
     
    4444        public void handleEvent(Event event) { 
    4545                 
    46                 ResourceEvent enEvent = (ResourceEvent)event; 
     46                ResourceEvent resEvent = (ResourceEvent)event; 
    4747                double load = 0; 
    4848                try{ 
    49                         switch (enEvent.getType()) { 
     49                        switch (resEvent.getType()) { 
    5050                         
     51                        case UTILIZATION_CHANGED: 
     52                                load = loadProfile.getLoadEstimationPlugin().estimateUtlization(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     53                                loadProfile.addToLoadHistory(load); 
     54                                break; 
     55                                 
     56                        case TASK_STARTED: 
     57                                load = loadProfile.getLoadEstimationPlugin().estimateUtlization(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     58                                loadProfile.addToLoadHistory(load); 
     59                                break; 
     60         
     61                        case TASK_FINISHED: 
     62                                load = loadProfile.getLoadEstimationPlugin().estimateUtlization(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     63                                loadProfile.addToLoadHistory(load); 
     64                                break; 
     65                                 
    5166                        case POWER_STATE_CHANGED: 
    52                                 load = loadProfile.getLoadEstimationPlugin().estimateUtlization(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     67                                load = loadProfile.getLoadEstimationPlugin().estimateUtlization(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    5368                                loadProfile.addToLoadHistory(load); 
    5469                                break; 
    5570                                 
    5671                        case CPU_FREQUENCY_CHANGED: 
    57                                 load = loadProfile.getLoadEstimationPlugin().estimateUtlization(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    58                                 loadProfile.addToLoadHistory(load); 
    59                                 break; 
    60                                  
    61                         case TASK_STARTED: 
    62                                 load = loadProfile.getLoadEstimationPlugin().estimateUtlization(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    63                                 loadProfile.addToLoadHistory(load); 
    64                                 break; 
    65          
    66                         case TASK_FINISHED: 
    67                                 load = loadProfile.getLoadEstimationPlugin().estimateUtlization(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    68                                 loadProfile.addToLoadHistory(load); 
    69                                 break; 
    70                                  
    71                         case UTILIZATION_CHANGED: 
    72                                 load = loadProfile.getLoadEstimationPlugin().estimateUtlization(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 
     72                                load = loadProfile.getLoadEstimationPlugin().estimateUtlization(resEvent, new JobRegistryImpl(resource.getFullName()), resource); 
    7373                                loadProfile.addToLoadHistory(load); 
    7474                                break; 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/DeviceAirflowInterface.java

    r1415 r1423  
    11package schedframe.resources.devices; 
    22 
    3 import java.util.ArrayList; 
    43import java.util.List; 
    54 
     
    5453 
    5554        public List<AirflowState> getSupportedAirflowStates(){ 
    56                 List<AirflowState> airflowStates = new ArrayList<AirflowState>(); 
    57                 for(AirflowState airFlowState: airflowProfile.getAirflowStates()){ 
    58                         airflowStates.add(airFlowState); 
    59                 } 
    60                 return airflowStates; 
     55                return airflowProfile.getAirflowStates(); 
    6156        } 
    6257 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/DeviceResourceCharacteristics.java

    r1207 r1423  
    1010        } 
    1111 
    12  
    1312} 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/PhysicalResource.java

    r1415 r1423  
    22 
    33import schedframe.Initializable; 
    4 import schedframe.events.Event; 
    54import schedframe.events.EventHandler; 
    65import schedframe.resources.Resource; 
     
    109import schedframe.resources.computing.extensions.Extension; 
    1110import schedframe.resources.computing.extensions.ExtensionList; 
     11import schedframe.resources.computing.extensions.ExtensionListImpl; 
    1212import schedframe.resources.computing.extensions.ExtensionType; 
    1313import schedframe.resources.computing.profiles.energy.EnergyExtension; 
     
    9999         
    100100        public ExtensionList getExtensionList() { 
     101                if(extensionList == null){ 
     102                        return new ExtensionListImpl(0); 
     103                } 
    101104                return extensionList; 
    102105        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/devices/description/PhysicalResourceDescription.java

    r1415 r1423  
    9191                                         
    9292                                        if(params == null) 
    93                                                 params = new Parameters(); 
     93                                                params = new Parameters(2); 
    9494                                        params.put("powerCapLevel", param); 
    9595                                } 
     
    102102                                         
    103103                                        if(params == null) 
    104                                                 params = new Parameters(); 
     104                                                params = new Parameters(2); 
    105105                                        params.put("powerFloorLevel", param); 
    106106                                } 
     
    273273                 
    274274                if(parameters.length != 0) 
    275                         params = new Parameters(); 
     275                        params = new Parameters(2); 
    276276                 
    277277                for(int i = 0; i < parameters.length; i++){ 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/units/ProcessingElements.java

    r1392 r1423  
    239239         
    240240        public ProcessingElements replicate(int amount){ 
    241                 List<ComputingResource> compResources =  new ArrayList<ComputingResource>(amount); 
     241                List<ComputingResource> compResources = new ArrayList<ComputingResource>(amount); 
    242242                Iterator<ComputingResource> it = resources.iterator(); 
    243243                amount = Math.min(resources.size(), amount); 
Note: See TracChangeset for help on using the changeset viewer.