Ignore:
Timestamp:
04/12/12 08:02:02 (13 years ago)
Author:
piontek
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • xssim/branches/tpiontek/src/example/timeestimation/ExecTimeEstimationPlugin.java

    r241 r250  
    4747                double remainingLength =  task.getLength() * (1- completionPercentage); 
    4848                // do the calculation 
    49                 double execTime = (remainingLength / (cnt * speed/1000)); 
     49                 
     50                 
     51                int type = Integer.parseInt( task.getJobId()) % 4; 
     52                 
     53                double factor = 1; 
     54                if( type == 0 && ((Processor)pes.get(0)).getComputingNode().getCategory().getName().equals("A")) 
     55                { 
     56                        factor = 0.6; 
     57                } 
     58                 
     59                double execTime = (remainingLength / (cnt * (double)speed * factor / 1000)); 
     60                 
    5061 
    5162                // if the result is very close to 0, but less then one millisecond then round this result to 0.001 
     
    5667                // time is measured in integer units, so get the nearest execTime int value. 
    5768                execTime = Math.ceil(execTime); 
     69                 
    5870                return execTime; 
    5971        } 
Note: See TracChangeset for help on using the changeset viewer.