private void writeOutputFiles(){
  if (config.getOutputNetworkFile() != null && config.getOutputScheduleFile() != null) {
    try {
      ScheduleTools.writeTransitSchedule(schedule,config.getOutputScheduleFile());
      NetworkTools.writeNetwork(network,config.getOutputNetworkFile());
    }
 catch (    Exception e) {
      log.error("Cannot write to output directory! Trying to write schedule and network file in working directory");
      long t=System.nanoTime() / 1000000;
      try {
        ScheduleTools.writeTransitSchedule(schedule,t + "schedule.xml.gz");
        NetworkTools.writeNetwork(network,t + "network.xml.gz");
      }
 catch (      Exception e1) {
        throw new RuntimeException("Files could not be written in working directory");
      }
    }
    if (config.getOutputStreetNetworkFile() != null) {
      NetworkTools.writeNetwork(NetworkTools.filterNetworkByLinkMode(network,Collections.singleton(TransportMode.car)),config.getOutputStreetNetworkFile());
    }
  }
 else {
    log.info("");
    log.info("No output paths defined, schedule and network are not written to files.");
  }
}

private void writeOutputFiles ( ) { if ( config . getOutputNetworkFile ( ) != null && config . getOutputScheduleFile ( ) != null ) { try { ScheduleTools . writeTransitSchedule ( schedule , config . getOutputScheduleFile ( ) ) ; NetworkTools . writeNetwork ( network , config . getOutputNetworkFile ( ) ) ; } catch ( Exception e ) { log . error ( "Cannot write to output directory! Trying to write schedule and network file in working directory" ) ; long t = System . nanoTime ( ) / 1000000 ; try { ScheduleTools . writeTransitSchedule ( schedule , t + "schedule.xml.gz" ) ; NetworkTools . writeNetwork ( network , t + "network.xml.gz" ) ; } catch ( Exception e1 ) { throw new RuntimeException ( "Files could not be written in working directory" ) ; } } if ( config . getOutputStreetNetworkFile ( ) != null ) { NetworkTools . writeNetwork ( NetworkTools . filterNetworkByLinkMode ( network , Collections . singleton ( TransportMode . car ) ) , config . getOutputStreetNetworkFile ( ) ) ; } } else { log . info ( "" ) ; log . info ( "No output paths defined, schedule and network are not written to files." ) ; } }
write the schedule and network to output files ( if defined in config )
