Beispiel #1
0
  public void runSP() {
    // main method to run the synthetic population generator

    if (!ResourceUtil.getBooleanProperty(rb, PROPERTIES_RUN_SP)) return;

    logger.info("Generating synthetic populations of household/persons, dwellings and jobs");
    identifyUniquePUMAzones();
    readControlTotals();
    createJobs();
    processPums();
    generateAutoOwnership();
    //        summarizeData.summarizeAutoOwnershipByCounty();
    addVacantDwellings();
    if (ResourceUtil.getBooleanProperty(rb, PROPERTIES_VALIDATE_SYNTH_POP)) validateHHandDD();
    logger.info("  Total number of households created " + Household.getHouseholdCount());
    logger.info("  Total number of persons created    " + Person.getPersonCount());
    logger.info("  Total number of dwellings created  " + Dwelling.getDwellingCount());
    logger.info("  Total number of jobs created       " + Job.getJobCount());
    calculateVacancyRate();
    if (!jobErrorCounter.isEmpty()) {
      logger.warn(
          "  Could not find sufficient number of jobs in these PUMA zones (note that most of these "
              + "zones are outside the MSTM area):");
      Set<Integer> list = jobErrorCounter.keySet();
      for (Integer puma : list)
        logger.warn("  -> " + puma + " is missing " + jobErrorCounter.get(puma) + " jobs.");
    } else {
      logger.info("  Succeeded in assigning job to every worker.");
    }
    //        summarizeVacantJobsByRegion();
    //        summarizeByPersonRelationship();
    summarizeData.writeOutSyntheticPopulation(rb, SiloUtil.getBaseYear());
    //        writeSyntheticPopulation();
    logger.info("  Completed generation of synthetic population");
  }