public static String createTestPtTravelTimesAndDistancesCSVFile(){
  String location=TempDirectoryUtil.createCustomTempDirectory("ptStopFileDir") + "/ptTravelInfo.csv";
  BufferedWriter bw=IOUtils.getBufferedWriter(location);
  try {
    for (int origin=1; origin <= 4; origin++) {
      for (int destination=1; destination <= 4; destination++) {
        if (origin == destination)         bw.write(origin + " " + destination+ " 0"+ org.matsim.contrib.matsim4urbansim.utils.InternalConstants.NEW_LINE);
 else         bw.write(origin + " " + destination+ " 100"+ org.matsim.contrib.matsim4urbansim.utils.InternalConstants.NEW_LINE);
      }
    }
    bw.flush();
    bw.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return location;
}

public static String createTestPtTravelTimesAndDistancesCSVFile ( ) { String location = TempDirectoryUtil . createCustomTempDirectory ( "ptStopFileDir" ) + "/ptTravelInfo.csv" ; BufferedWriter bw = IOUtils . getBufferedWriter ( location ) ; try { for ( int origin = 1 ; origin <= 4 ; origin ++ ) { for ( int destination = 1 ; destination <= 4 ; destination ++ ) { if ( origin == destination ) bw . write ( origin + " " + destination + " 0" + org . matsim . contrib . matsim4urbansim . utils . InternalConstants . NEW_LINE ) ; else bw . write ( origin + " " + destination + " 100" + org . matsim . contrib . matsim4urbansim . utils . InternalConstants . NEW_LINE ) ; } } bw . flush ( ) ; bw . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return location ; }
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 .
