public Map<String,Tuple<Coord,Tuple<Double,Double>>> parseCustomerFile(String inputFile){
  BufferedReader br=IOUtils.getBufferedReader(inputFile);
  Map<String,Tuple<Coord,Tuple<Double,Double>>> customerMap=new HashMap<String,Tuple<Coord,Tuple<Double,Double>>>();
  try {
    br.readLine();
    String line;
    while ((line=br.readLine()) != null) {
      String[] array=line.split(",");
      String customer=array[1];
      double longi=Double.parseDouble(array[2]);
      double lati=Double.parseDouble(array[3]);
      double distance=Double.parseDouble(array[4]);
      double earliestStart=Double.parseDouble(array[5]);
      double latestEnd=Double.parseDouble(array[6]);
      Coord coord=new Coord(longi,lati);
      Tuple<Double,Double> timeWindow=new Tuple<Double,Double>(earliestStart,latestEnd);
      Tuple<Coord,Tuple<Double,Double>> entry=new Tuple<Coord,Tuple<Double,Double>>(coord,timeWindow);
      customerMap.put(customer,entry);
    }
  }
 catch (  IOException e) {
    log.error("Could not read customer file");
  }
 finally {
    try {
      br.close();
    }
 catch (    IOException e) {
      log.info("Could not close customer file");
    }
  }
  return customerMap;
}

public Map < String , Tuple < Coord , Tuple < Double , Double > > > parseCustomerFile ( String inputFile ) { BufferedReader br = IOUtils . getBufferedReader ( inputFile ) ; Map < String , Tuple < Coord , Tuple < Double , Double > > > customerMap = new HashMap < String , Tuple < Coord , Tuple < Double , Double > > > ( ) ; try { br . readLine ( ) ; String line ; while ( ( line = br . readLine ( ) ) != null ) { String [ ] array = line . split ( "," ) ; String customer = array [ 1 ] ; double longi = Double . parseDouble ( array [ 2 ] ) ; double lati = Double . parseDouble ( array [ 3 ] ) ; double distance = Double . parseDouble ( array [ 4 ] ) ; double earliestStart = Double . parseDouble ( array [ 5 ] ) ; double latestEnd = Double . parseDouble ( array [ 6 ] ) ; Coord coord = new Coord ( longi , lati ) ; Tuple < Double , Double > timeWindow = new Tuple < Double , Double > ( earliestStart , latestEnd ) ; Tuple < Coord , Tuple < Double , Double > > entry = new Tuple < Coord , Tuple < Double , Double > > ( coord , timeWindow ) ; customerMap . put ( customer , entry ) ; } } catch ( IOException e ) { log . error ( "Could not read customer file" ) ; } finally { try { br . close ( ) ; } catch ( IOException e ) { log . info ( "Could not close customer file" ) ; } } return customerMap ; }
read in file containing only the customers to consider
