public static String createTestPtTravelTimesAndDistancesCSVFile(File file){
  try (BufferedWriter bw=IOUtils.getBufferedWriter(file.getCanonicalPath())){
    for (int origin=1; origin <= 4; origin++) {
      for (int destination=1; destination <= 4; destination++) {
        if (origin == destination) {
          bw.write(origin + " " + destination+ " 0");
          bw.newLine();
        }
 else {
          bw.write(origin + " " + destination+ " 100");
          bw.newLine();
        }
      }
    }
    bw.flush();
    return file.getCanonicalPath();
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

public static String createTestPtTravelTimesAndDistancesCSVFile ( File file ) { try ( BufferedWriter bw = IOUtils . getBufferedWriter ( file . getCanonicalPath ( ) ) ) { for ( int origin = 1 ; origin <= 4 ; origin ++ ) { for ( int destination = 1 ; destination <= 4 ; destination ++ ) { if ( origin == destination ) { bw . write ( origin + " " + destination + " 0" ) ; bw . newLine ( ) ; } else { bw . write ( origin + " " + destination + " 100" ) ; bw . newLine ( ) ; } } } bw . flush ( ) ; return file . getCanonicalPath ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
this methods creates a csv file with informations about pt travel times and pt distances for the test network from createtestnetwork ( ) . we set the pt travel time between all pairs of pt stops to 100 seconds , except pairs of same pt stops where the travel time is 0 seconds . we set the pt distance between all pairs of pt stops to 100 meter , except pairs of same pt stops where the distance is 0 meter . because the data in the csv file does not need an entity , you can use the same csv file for both informations .
