Ignore:
Timestamp:
01/09/13 12:41:08 (12 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/schedframe/scheduling/policy/local/LocalManagementSystem.java

    r678 r763  
    404404                         
    405405                        Map<ResourceUnitName, ResourceUnit> choosenResources = exec.getUsedResources().getLast().getResourceUnits(); 
    406                         int time =  Double.valueOf(execTimeEstimationPlugin.execTimeEstimation(new SchedulingEvent(SchedulingEventType.RESOURCE_STATE_CHANGED),  
     406                        int time = Double.valueOf(execTimeEstimationPlugin.execTimeEstimation(new SchedulingEvent(SchedulingEventType.RESOURCE_STATE_CHANGED),  
    407407                                        execTask, choosenResources, exec.getCompletionPercentage())).intValue(); 
    408408 
    409409                        //check if the new estimated end time is equal to the previous one; if yes the continue without update 
    410                         if( DoubleMath.subtract((exec.getExecStartTime() + exec.getEstimatedDuration()), (new DateTime().getMillis()/1000 + time)) == 0.0){ 
     410                        if(DoubleMath.subtract((exec.getExecStartTime() + exec.getEstimatedDuration()), (new DateTime().getMillis()/1000 + time)) == 0.0){ 
    411411                                continue; 
    412412                        } 
     
    483483                        List<ResourceUnit> choosenPEUnits = new ArrayList<ResourceUnit>(); 
    484484                        for (int i = 0; i < availableUnits.size() && cpuRequest > 0; i++) { 
    485                                 PEUnit peUnit = (PEUnit) availableUnits .get(i); 
     485                                PEUnit peUnit = (PEUnit) availableUnits.get(i); 
    486486                                if(peUnit.getFreeAmount() > 0){ 
    487                                         int  allocPE = Math.min(peUnit.getFreeAmount(), cpuRequest); 
     487                                        int allocPE = Math.min(peUnit.getFreeAmount(), cpuRequest); 
    488488                                        cpuRequest = cpuRequest - allocPE; 
    489489                                        choosenPEUnits.add(peUnit.replicate(allocPE));   
Note: See TracChangeset for help on using the changeset viewer.