public UtilizationModelPlanetLabInMemory(String inputPath,double schedulingInterval,int dataSamples) throws NumberFormatException, IOException {
  setSchedulingInterval(schedulingInterval);
  data=new double[dataSamples];
  BufferedReader input=new BufferedReader(new FileReader(inputPath));
  int n=data.length;
  for (int i=0; i < n - 1; i++) {
    data[i]=Integer.valueOf(input.readLine()) / 100.0;
  }
  data[n - 1]=data[n - 2];
  input.close();
}

public UtilizationModelPlanetLabInMemory ( String inputPath , double schedulingInterval , int dataSamples ) throws NumberFormatException , IOException { setSchedulingInterval ( schedulingInterval ) ; data = new double [ dataSamples ] ; BufferedReader input = new BufferedReader ( new FileReader ( inputPath ) ) ; int n = data . length ; for ( int i = 0 ; i < n - 1 ; i ++ ) { data [ i ] = Integer . valueOf ( input . readLine ( ) ) / 100.0 ; } data [ n - 1 ] = data [ n - 2 ] ; input . close ( ) ; }
instantiates a new planetlab resource utilization model with variable data samples from a trace file .
