private boolean checkTripZoneConsistency(){
  log.info("Checking that zones and trips are consistent.");
  HashSet<String> missingZones=new HashSet<String>();
  for (  Trip T : trips.values()) {
    BasicLocation zo=zones.getLocation(Id.create(T.zone_o,Zone.class));
    BasicLocation zd=zones.getLocation(Id.create(T.zone_d,Zone.class));
    if (zo == null) {
      missingZones.add(T.zone_o);
    }
    if (zd == null) {
      missingZones.add(T.zone_d);
    }
  }
  if (missingZones.size() > 0) {
    String msg=missingZones.size() + " zones are missing! Full list below: ";
    for (    String s : missingZones)     msg+="\n\tZone \"" + s.toString() + "\"";
    log.error(msg);
    return false;
  }
 else   log.info("All zones OK!");
  return true;
}

private boolean checkTripZoneConsistency ( ) { log . info ( "Checking that zones and trips are consistent." ) ; HashSet < String > missingZones = new HashSet < String > ( ) ; for ( Trip T : trips . values ( ) ) { BasicLocation zo = zones . getLocation ( Id . create ( T . zone_o , Zone . class ) ) ; BasicLocation zd = zones . getLocation ( Id . create ( T . zone_d , Zone . class ) ) ; if ( zo == null ) { missingZones . add ( T . zone_o ) ; } if ( zd == null ) { missingZones . add ( T . zone_d ) ; } } if ( missingZones . size ( ) > 0 ) { String msg = missingZones . size ( ) + " zones are missing! Full list below: " ; for ( String s : missingZones ) msg += "\n\tZone \"" + s . toString ( ) + "\"" ; log . error ( msg ) ; return false ; } else log . info ( "All zones OK!" ) ; return true ; }
checks that all trips start and end in zones represented in the zones file .
