uk.ac.leeds.ccg.andyt.projects.genesis.society.demography
Class GENESIS_Demographics

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.genesis.society.demography.GENESIS_Demographics
All Implemented Interfaces:
java.io.Serializable

public class GENESIS_Demographics
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
 class GENESIS_Demographics.Gender_Age
           
 
Field Summary
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _ClinicalMiscarriage
          For storing clinical miscarriage counts by age of mother.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _Deaths
          For storing death counts.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _EarlyPregnancyLoss
          For storing total early pregnancy loss miscarriage counts by age of mother.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Fertility>> _Fertility
          For storing region fertility probabilities.
 GENESIS_Environment _GENESIS_Environment
           
 GENESIS_Migration _Migration
          For storing migration probabilities by age and gender.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Miscarriage>> _Miscarriage
          For storing region miscarriage probabilities.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Mortality>> _Mortality
          For storing region mortality probabilities.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _Population
          For storing region populations.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _SingleBirths
          For storing single birth counts by age of mother.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _TripletBirths
          For storing triplet birth counts by age of mother.
 java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _TwinBirths
          For storing twin birth counts by age of mother.
 
Constructor Summary
GENESIS_Demographics()
           
GENESIS_Demographics(GENESIS_Demographics a_Demographics)
           
GENESIS_Demographics(GENESIS_Environment a_GENESIS_Environment)
           
GENESIS_Demographics(GENESIS_Environment a_GENESIS_Environment, GENESIS_Demographics a_Demographics)
           
 
Method Summary
 GENESIS_Demographics aggregate(java.util.TreeMap<java.lang.String,java.lang.String> subregionToAggregateRegionLookup, java.util.TreeSet<java.lang.String> aggregateRegionIDs)
           
 java.lang.Object[] aggregateSubregionResults(java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> regionIDs, java.util.TreeMap<java.lang.String,java.lang.String> subregionAggregateRegionLookup, java.util.TreeSet<java.lang.String> aggregateRegionIDs, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> startYearPopulation, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> endYearPopulation, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> aliveDays, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> deaths, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> labours, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> births, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> earlyPregnancyLosses, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> clinicalMiscarriages, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInEarlyPregnancy, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInLatePregnancy, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> twins, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> triplets, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> pregnancies)
          Aggregates subregion data to aggregate regions.
 java.lang.Object[] get_Population_Alive_Male_Female_ID_HashSet(GENESIS_Time a_Time)
           
protected  java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> getClinicalMiscarriageRates(java.lang.String regionID, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfMiscarriage_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInPregnancy_TreeMap, int decimalPlacePrecisionForCalculation, java.math.RoundingMode a_RoundingMode)
          a measure of the number of days in late pregnancy (ndlp) cm * 224 / ndlp (N.B.
protected  java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> getEarlyPregnancyLossRates(java.lang.String regionID, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfMiscarriage_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInPregnancy_TreeMap, int scale, java.math.RoundingMode a_RoundingMode)
          A measure of the number of days in early pregnancy (ndep) epl * 42 / ndep (N.B.
static java.lang.Object[] getExpectedAndSumOfSquaredDifference(java.lang.String regionID, GENESIS_Demographics startDemographics, GENESIS_Demographics endDemographics, int decimalPlacePrecisionForCalculations)
          Collects the theoretically expected populations and calculates the Sum of Squared Differences between this and the simulated output population.
 java.lang.Object[] getExpectedAndSumOfSquaredDifferences(java.lang.String regionID, GENESIS_Demographics input_Demographics, java.util.HashMap<GENESIS_AgeBound,GENESIS_Demographics> output_Demographics_HashMap)
          Collects the theoretically expected populations and a Sum of Squared Difference between this and the simulated output and returns these.
static java.util.TreeMap<java.lang.String,GENESIS_Fertility> getInitialFertilityRate(GENESIS_Environment a_GENESIS_Environment, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> singleYearOfAgePopulation, java.util.TreeMap<java.lang.String,GENESIS_Population> inputBirthCount, int decimalPlaces, java.math.RoundingMode roundingMode)
           
static java.util.TreeMap<java.lang.String,GENESIS_Mortality> getInitialMortalityRate(GENESIS_Environment a_GENESIS_Environment, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> singleYearOfAgePopulation, java.util.TreeMap<java.lang.String,GENESIS_Population> inputDeathCount, int decimalPlaces, java.math.RoundingMode roundingMode)
           
static java.util.logging.Logger getLogger()
           
static java.lang.Object[] getTheoreticalEndYearPopulationsAndFertility(GENESIS_Population population, GENESIS_Mortality mortality, GENESIS_Fertility fertility, int decimalPlacePrecisionForCalculations)
          Applies annual mortality rates to start year populations to create end year population that have died and survived.
static java.lang.Object[] getTheoreticalFertilityAndNewBornPopulation(java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleStartYearPopulation, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleTheoreticalEndYearAgedPopulation, GENESIS_Mortality mortality, GENESIS_Fertility fertility, int decimalPlacePrecisionForCalculations)
           
static java.lang.Object[] getTheoreticallySurvivedAndDiedPopulation(GENESIS_Population population, GENESIS_Mortality mortality)
          Applies annual mortality rates to start year populations to created map0Value end year population that have died and survived.
static java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> getTreeMapWithExtremeProbabilitiesSetToOne(java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> map)
          Returns a new but with identical mapping map to map except with all values greater than one set to one.
static java.util.TreeMap<java.lang.String,GENESIS_Population> loadInputBirthCount(GENESIS_Environment a_GENESIS_Environment, int year, java.io.File directory, java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> _regionIDs)
          This method loads Local Authority District (LAD) birth count data.
static java.util.TreeMap<java.lang.String,GENESIS_Population> loadInputDeathCount(GENESIS_Environment a_GENESIS_Environment, int year, java.io.File directory, java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> _regionIDs)
          This method loads Local Authority District (LAD) death count data.
static java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> loadInputPopulation(GENESIS_Environment a_GENESIS_Environment, java.io.File directory)
          This method loads Local Authority District (LAD) populations that comprise of Output Area (OA) populations.
 java.util.HashSet<java.util.concurrent.Future> output(java.util.concurrent.ExecutorService executorService, java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> regionIDs, java.util.TreeMap<java.lang.String,java.lang.String> subregionToAggregateRegionLookup, java.util.TreeSet<java.lang.String> aggregateRegionIDs, int dataWidthForScatterAndRegressionPlots, int dataHeightForScatterAndRegressionPlots, int dataWidthForAllAgesAgeGenderPlots, int dataHeightForAllAgesAgeGenderPlots, int dataWidthForFertileAgesAgeGenderPlots, int dataHeightForFertileAgesAgeGenderPlots, int decimalPlacePrecisionForCalculation, int decimalPlacePrecisionForDisplay, java.math.RoundingMode roundingMode, GENESIS_Demographics startYear_Demographics, java.lang.Long minAgeYearsForPopulationDisplays, java.lang.Long maxAgeYearsForPopulationDisplays, java.lang.Long minAgeYearsForFertilityDisplays, java.lang.Long maxAgeYearsForFertilityDisplays, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> aliveDays, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> deaths, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> labours, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> births, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> earlyPregnancyLosses, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> clinicalMiscarriages, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInEarlyPregnancy, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInLatePregnancy, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> twins, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> triplets, java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> pregnancies)
           
 java.util.HashSet<java.util.concurrent.Future> output(java.lang.String regionID, java.io.File demographicsDirectory_File, int dataWidthForScatterAndRegressionPlots, int dataHeightForScatterAndRegressionPlots, int dataWidthForAllAgesPopulationDisplays, int dataHeightForAllAgesPopulationDisplays, int dataWidthForFertileAgesPopulationDisplays, int dataHeightForFertileAgesPopulationDisplays, int decimalPlacePrecisionForCalculations, int decimalPlacePrecisionForDisplay, java.math.RoundingMode roundingMode, GENESIS_Population startYearPopulation, GENESIS_Population endYearPopulation, GENESIS_Mortality startYear_Demographics_Mortality, GENESIS_Fertility startYear_Demographics_Fertility, GENESIS_Mortality endYear_Demographics_Mortality, GENESIS_Fertility endYear_Demographics_Fertility, java.lang.Long minAgeYearsForAllAgesPopulationDisplays, java.lang.Long maxAgeYearsForAllAgesPopulationDisplays, java.lang.Long minAgeYearsForFertilityAgesPopulationDisplays, java.lang.Long maxAgeYearsForFertilityAgesPopulationDisplays, GENESIS_Population populationAliveDaysThisYear, GENESIS_Population populationDeathsThisYear, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfBirths_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfLabours_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfEarlyPregnancyLoss_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfClinicalMiscarriage_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInEarlyPregnancy_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInLatePregnancy_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfTwins_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfTriplets_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfPregnancies_TreeMap)
           
protected  void output(java.lang.String title, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, java.lang.String xAxisLabel, java.lang.String yAxisLabel, java.io.File demographicsDirectory_File, GENESIS_Miscarriage miscarriage, java.lang.Long minAgeYearsForDisplays, java.lang.Long maxAgeYearsForDisplays, int decimalPlacePrecisionForCalculations, int decimalPlacePrecisionForDisplay)
           
protected  void output(java.lang.String title, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, java.lang.String xAxisLabel, java.lang.String yAxisLabel, java.io.File demographicsDirectory_File, GENESIS_Population pop, int decimalPlacePrecisionForCalculation, int significantDigits)
           
protected  void output(java.lang.String title, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, java.lang.String xAxisLabel, java.lang.String yAxisLabel, java.io.File demographicsDirectory_File, GENESIS_Population pop, java.lang.Long minAgeYearsForDisplays, java.lang.Long maxAgeYearsForDisplays, int decimalPlacePrecisionForCalculations, int significantDigits)
           
protected static void outputAgeGenderPlot(java.util.concurrent.ExecutorService executorService, java.lang.Object obj, java.lang.String title, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, java.lang.String xAxisLabel, java.lang.String yAxisLabel, java.io.File demographicsDirectory_File, GENESIS_Population a_Population, int decimalPlacePrecisionForCalculation, int decimalPlacePrecisionForDisplay)
           
protected static void outputAgeGenderPlot(java.util.concurrent.ExecutorService executorService, java.lang.Object obj, java.lang.String title, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, java.lang.String xAxisLabel, java.lang.String yAxisLabel, java.io.File demographicsDirectory_File, GENESIS_Population a_Population, java.lang.Long minAgeInYears, java.lang.Long maxAgeInYears, int decimalPlacePrecisionForCalculations, int decimalPlacePrecisionForDisplay)
           
protected static void outputAgeGenderPlot(java.util.concurrent.ExecutorService executorService, java.lang.Object obj, java.lang.String title, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, java.lang.String xAxisLabel, java.lang.String yAxisLabel, java.io.File demographicsDirectory_File, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleTheoreticalEndYearAgedPopulation_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> maleTheoreticalEndYearAgedPopulation_TreeMap, java.lang.Long minAgeInYears, java.lang.Long maxAgeInYears, int decimalPlacePrecisionForCalculations, int decimalPlacePrecisionForDisplay)
           
protected  java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> outputFertility(java.lang.String regionID, GENESIS_Fertility fertility, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, int dataWidthForScatterAndRegressionPlots, int dataHeightForScatterAndRegressionPlots, java.io.File demographicsDirectory_File, GENESIS_Population populationAliveDaysThisYear, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfBirths_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfLabours_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfTwins_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfTriplets_TreeMap, java.lang.Long minAgeYearsForFertilityDisplays, java.lang.Long maxAgeYearsForFertilityDisplays, int decimalPlacePrecisionForCalculations, int decimalPlacePrecisionForDisplay, java.math.RoundingMode roundingMode)
           
protected  java.util.HashSet<java.util.concurrent.Future> outputMiscarriage(java.lang.String regionID, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, int dataWidthForScatterAndRegressionPlots, int dataHeightForScatterAndRegressionPlots, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfClinicalMiscarriage_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInLatePregnancy_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfEarlyPregnancyLoss_TreeMap, java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInEarlyPregnancy_TreeMap, java.io.File demographicsDirectory_File, java.lang.Long minAgeYearsForFertilityDisplays, java.lang.Long maxAgeYearsForFertilityDisplays, int decimalPlacePrecisionForCalculation, int significantDigits, java.math.RoundingMode a_RoundingMode)
           
protected  void outputMortality(java.lang.String regionID, GENESIS_Mortality mortality, int dataWidthForAgeGenderPlots, int dataHeightForAgeGenderPlots, int dataWidthForScatterAndRegressionPlots, int dataHeightForScatterAndRegressionPlots, java.io.File demographicsDirectory_File, GENESIS_Population populationDaysAliveInTimePeriod, GENESIS_Population populationDeathsInTimePeriod, long minAgeYearsForAllAgesPopulationDisplays, long maxAgeYearsForAllAgesPopulationDisplays, int decimalPlacePrecisionForCalculations, int decimalPlacePrecisionForDisplay, java.math.RoundingMode a_RoundingMode)
          Calculates and exports simulated mortality rates for males and females and produces a comparison plot for these plotting the simulated (observed) rates against the input mortality rates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_GENESIS_Environment

public transient GENESIS_Environment _GENESIS_Environment

_Population

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _Population
For storing region populations. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_Mortality

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Mortality>> _Mortality
For storing region mortality probabilities. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_Deaths

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _Deaths
For storing death counts. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_Miscarriage

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Miscarriage>> _Miscarriage
For storing region miscarriage probabilities. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_ClinicalMiscarriage

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _ClinicalMiscarriage
For storing clinical miscarriage counts by age of mother. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_EarlyPregnancyLoss

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _EarlyPregnancyLoss
For storing total early pregnancy loss miscarriage counts by age of mother. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_Fertility

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Fertility>> _Fertility
For storing region fertility probabilities. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_SingleBirths

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _SingleBirths
For storing single birth counts by age of mother. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_TwinBirths

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _TwinBirths
For storing twin birth counts by age of mother. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_TripletBirths

public java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> _TripletBirths
For storing triplet birth counts by age of mother. Keys are LAD codes, value keys are either OA codes or LAD codes for LAD totals.


_Migration

public GENESIS_Migration _Migration
For storing migration probabilities by age and gender.

Constructor Detail

GENESIS_Demographics

public GENESIS_Demographics()

GENESIS_Demographics

public GENESIS_Demographics(GENESIS_Demographics a_Demographics)

GENESIS_Demographics

public GENESIS_Demographics(GENESIS_Environment a_GENESIS_Environment,
                            GENESIS_Demographics a_Demographics)

GENESIS_Demographics

public GENESIS_Demographics(GENESIS_Environment a_GENESIS_Environment)
Method Detail

aggregate

public GENESIS_Demographics aggregate(java.util.TreeMap<java.lang.String,java.lang.String> subregionToAggregateRegionLookup,
                                      java.util.TreeSet<java.lang.String> aggregateRegionIDs)

output

public java.util.HashSet<java.util.concurrent.Future> output(java.util.concurrent.ExecutorService executorService,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> regionIDs,
                                                             java.util.TreeMap<java.lang.String,java.lang.String> subregionToAggregateRegionLookup,
                                                             java.util.TreeSet<java.lang.String> aggregateRegionIDs,
                                                             int dataWidthForScatterAndRegressionPlots,
                                                             int dataHeightForScatterAndRegressionPlots,
                                                             int dataWidthForAllAgesAgeGenderPlots,
                                                             int dataHeightForAllAgesAgeGenderPlots,
                                                             int dataWidthForFertileAgesAgeGenderPlots,
                                                             int dataHeightForFertileAgesAgeGenderPlots,
                                                             int decimalPlacePrecisionForCalculation,
                                                             int decimalPlacePrecisionForDisplay,
                                                             java.math.RoundingMode roundingMode,
                                                             GENESIS_Demographics startYear_Demographics,
                                                             java.lang.Long minAgeYearsForPopulationDisplays,
                                                             java.lang.Long maxAgeYearsForPopulationDisplays,
                                                             java.lang.Long minAgeYearsForFertilityDisplays,
                                                             java.lang.Long maxAgeYearsForFertilityDisplays,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> aliveDays,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> deaths,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> labours,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> births,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> earlyPregnancyLosses,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> clinicalMiscarriages,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInEarlyPregnancy,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInLatePregnancy,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> twins,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> triplets,
                                                             java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> pregnancies)
Parameters:
executorService -
regionIDs -
subregionToAggregateRegionLookup -
aggregateRegionIDs -
dataWidthForScatterAndRegressionPlots -
dataHeightForScatterAndRegressionPlots -
dataWidthForAllAgesAgeGenderPlots -
dataHeightForAllAgesAgeGenderPlots -
dataWidthForFertileAgesAgeGenderPlots -
dataHeightForFertileAgesAgeGenderPlots -
decimalPlacePrecisionForCalculation -
decimalPlacePrecisionForDisplay -
roundingMode -
startYear_Demographics -
minAgeYearsForPopulationDisplays -
maxAgeYearsForPopulationDisplays -
minAgeYearsForFertilityDisplays -
maxAgeYearsForFertilityDisplays -
aliveDays -
deaths -
labours -
births -
earlyPregnancyLosses -
clinicalMiscarriages -
daysInEarlyPregnancy -
daysInLatePregnancy -
twins -
triplets -
pregnancies -
Returns:

aggregateSubregionResults

public java.lang.Object[] aggregateSubregionResults(java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> regionIDs,
                                                    java.util.TreeMap<java.lang.String,java.lang.String> subregionAggregateRegionLookup,
                                                    java.util.TreeSet<java.lang.String> aggregateRegionIDs,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> startYearPopulation,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> endYearPopulation,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> aliveDays,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> deaths,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> labours,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> births,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> earlyPregnancyLosses,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> clinicalMiscarriages,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInEarlyPregnancy,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> daysInLatePregnancy,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> twins,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> triplets,
                                                    java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal>>> pregnancies)
Aggregates subregion data to aggregate regions. The aggregate regions may contain subregions from more than one region.

Parameters:
regionIDs -
subregionAggregateRegionLookup -
aggregateRegionIDs -
aliveDays -
deaths -
labours -
births -
earlyPregnancyLosses -
clinicalMiscarriages -
daysInEarlyPregnancy -
daysInLatePregnancy -
twins -
triplets -
pregnancies -
Returns:

output

public java.util.HashSet<java.util.concurrent.Future> output(java.lang.String regionID,
                                                             java.io.File demographicsDirectory_File,
                                                             int dataWidthForScatterAndRegressionPlots,
                                                             int dataHeightForScatterAndRegressionPlots,
                                                             int dataWidthForAllAgesPopulationDisplays,
                                                             int dataHeightForAllAgesPopulationDisplays,
                                                             int dataWidthForFertileAgesPopulationDisplays,
                                                             int dataHeightForFertileAgesPopulationDisplays,
                                                             int decimalPlacePrecisionForCalculations,
                                                             int decimalPlacePrecisionForDisplay,
                                                             java.math.RoundingMode roundingMode,
                                                             GENESIS_Population startYearPopulation,
                                                             GENESIS_Population endYearPopulation,
                                                             GENESIS_Mortality startYear_Demographics_Mortality,
                                                             GENESIS_Fertility startYear_Demographics_Fertility,
                                                             GENESIS_Mortality endYear_Demographics_Mortality,
                                                             GENESIS_Fertility endYear_Demographics_Fertility,
                                                             java.lang.Long minAgeYearsForAllAgesPopulationDisplays,
                                                             java.lang.Long maxAgeYearsForAllAgesPopulationDisplays,
                                                             java.lang.Long minAgeYearsForFertilityAgesPopulationDisplays,
                                                             java.lang.Long maxAgeYearsForFertilityAgesPopulationDisplays,
                                                             GENESIS_Population populationAliveDaysThisYear,
                                                             GENESIS_Population populationDeathsThisYear,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfBirths_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfLabours_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfEarlyPregnancyLoss_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfClinicalMiscarriage_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInEarlyPregnancy_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInLatePregnancy_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfTwins_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfTriplets_TreeMap,
                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfPregnancies_TreeMap)
Parameters:
outputImages -
regionID -
dataWidthForScatterAndRegressionPlots -
dataHeightForScatterAndRegressionPlots -
dataWidthForAgeGenderPlots -
dataHeightForAgeGenderPlots -
decimalPlacePrecisionForCalculations -
significantDigits -
roundingMode -
startYear_Demographics -
minAgeYearsForAllAgesPopulationDisplays -
maxAgeYearsForAllAgesPopulationDisplays -
minAgeYearsForFertilityAgesPopulationDisplays -
maxAgeYearsForFertilityAgesPopulationDisplays -
populationAliveDaysThisYear -
populationDeathsThisYear -
femaleAgeInYearsCountOfBirths_TreeMap -
femaleAgeInYearsCountOfLabours_TreeMap -
femaleAgeInYearsCountOfEarlyPregnancyLoss_TreeMap -
femaleAgeInYearsCountOfClinicalMiscarriage_TreeMap -
femaleAgeInYearsCountOfDaysInEarlyPregnancy_TreeMap -
femaleAgeInYearsCountOfDaysInLatePregnancy_TreeMap -
femaleAgeInYearsCountOfTwins_TreeMap -
femaleAgeInYearsCountOfTriplets_TreeMap -
femaleAgeInYearsCountOfPregnancies_TreeMap -

outputFertility

protected java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> outputFertility(java.lang.String regionID,
                                                                                   GENESIS_Fertility fertility,
                                                                                   int dataWidthForAgeGenderPlots,
                                                                                   int dataHeightForAgeGenderPlots,
                                                                                   int dataWidthForScatterAndRegressionPlots,
                                                                                   int dataHeightForScatterAndRegressionPlots,
                                                                                   java.io.File demographicsDirectory_File,
                                                                                   GENESIS_Population populationAliveDaysThisYear,
                                                                                   java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfBirths_TreeMap,
                                                                                   java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfLabours_TreeMap,
                                                                                   java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfTwins_TreeMap,
                                                                                   java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeBoundCountOfTriplets_TreeMap,
                                                                                   java.lang.Long minAgeYearsForFertilityDisplays,
                                                                                   java.lang.Long maxAgeYearsForFertilityDisplays,
                                                                                   int decimalPlacePrecisionForCalculations,
                                                                                   int decimalPlacePrecisionForDisplay,
                                                                                   java.math.RoundingMode roundingMode)
Parameters:
title -
demographicsDirectory_File -
populationAliveDaysThisYear -
femaleAgeBoundCountOfBirths_TreeMap -
a_XMLConverter -
roundingMode -
Returns:
TreeMap<AgeBound, BigDecimal> result of annual live birth probabilities where: keys are AgeBounds; values are annual live birth fertility rates

getClinicalMiscarriageRates

protected java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> getClinicalMiscarriageRates(java.lang.String regionID,
                                                                                               java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfMiscarriage_TreeMap,
                                                                                               java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInPregnancy_TreeMap,
                                                                                               int decimalPlacePrecisionForCalculation,
                                                                                               java.math.RoundingMode a_RoundingMode)
a measure of the number of days in late pregnancy (ndlp) cm * 224 / ndlp (N.B. The simple formula: ((number of births) / (number of miscarriages)) is problematic when either the numerator or denominator are zero.)

Parameters:
femaleAgeInYearsCountOfClinicalMiscarriage_TreeMap -
femaleAgeInYearsCountOfBirths_TreeMap -
scale -
a_RoundingMode -

getEarlyPregnancyLossRates

protected java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> getEarlyPregnancyLossRates(java.lang.String regionID,
                                                                                              java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfMiscarriage_TreeMap,
                                                                                              java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInPregnancy_TreeMap,
                                                                                              int scale,
                                                                                              java.math.RoundingMode a_RoundingMode)
A measure of the number of days in early pregnancy (ndep) epl * 42 / ndep (N.B. The simple formula: ((number of births) / (number of miscarriages)) is problematic when either the numerator or denominator are zero.)

Parameters:
femaleAgeInYearsCountOfClinicalMiscarriage_TreeMap -
femaleAgeInYearsCountOfBirths_TreeMap -
scale -
a_RoundingMode -

outputMortality

protected void outputMortality(java.lang.String regionID,
                               GENESIS_Mortality mortality,
                               int dataWidthForAgeGenderPlots,
                               int dataHeightForAgeGenderPlots,
                               int dataWidthForScatterAndRegressionPlots,
                               int dataHeightForScatterAndRegressionPlots,
                               java.io.File demographicsDirectory_File,
                               GENESIS_Population populationDaysAliveInTimePeriod,
                               GENESIS_Population populationDeathsInTimePeriod,
                               long minAgeYearsForAllAgesPopulationDisplays,
                               long maxAgeYearsForAllAgesPopulationDisplays,
                               int decimalPlacePrecisionForCalculations,
                               int decimalPlacePrecisionForDisplay,
                               java.math.RoundingMode a_RoundingMode)
Calculates and exports simulated mortality rates for males and females and produces a comparison plot for these plotting the simulated (observed) rates against the input mortality rates.

Parameters:
outputImages -
regionID -
demographicsDirectory_File -
populationDaysAliveInTimePeriod -
populationDeathsInTimePeriod -
decimalPlacePrecisionForCalculations -
a_RoundingMode -

output

protected void output(java.lang.String title,
                      int dataWidthForAgeGenderPlots,
                      int dataHeightForAgeGenderPlots,
                      java.lang.String xAxisLabel,
                      java.lang.String yAxisLabel,
                      java.io.File demographicsDirectory_File,
                      GENESIS_Population pop,
                      int decimalPlacePrecisionForCalculation,
                      int significantDigits)

output

protected void output(java.lang.String title,
                      int dataWidthForAgeGenderPlots,
                      int dataHeightForAgeGenderPlots,
                      java.lang.String xAxisLabel,
                      java.lang.String yAxisLabel,
                      java.io.File demographicsDirectory_File,
                      GENESIS_Population pop,
                      java.lang.Long minAgeYearsForDisplays,
                      java.lang.Long maxAgeYearsForDisplays,
                      int decimalPlacePrecisionForCalculations,
                      int significantDigits)

output

protected void output(java.lang.String title,
                      int dataWidthForAgeGenderPlots,
                      int dataHeightForAgeGenderPlots,
                      java.lang.String xAxisLabel,
                      java.lang.String yAxisLabel,
                      java.io.File demographicsDirectory_File,
                      GENESIS_Miscarriage miscarriage,
                      java.lang.Long minAgeYearsForDisplays,
                      java.lang.Long maxAgeYearsForDisplays,
                      int decimalPlacePrecisionForCalculations,
                      int decimalPlacePrecisionForDisplay)

outputMiscarriage

protected java.util.HashSet<java.util.concurrent.Future> outputMiscarriage(java.lang.String regionID,
                                                                           int dataWidthForAgeGenderPlots,
                                                                           int dataHeightForAgeGenderPlots,
                                                                           int dataWidthForScatterAndRegressionPlots,
                                                                           int dataHeightForScatterAndRegressionPlots,
                                                                           java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfClinicalMiscarriage_TreeMap,
                                                                           java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInLatePregnancy_TreeMap,
                                                                           java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfEarlyPregnancyLoss_TreeMap,
                                                                           java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleAgeInYearsCountOfDaysInEarlyPregnancy_TreeMap,
                                                                           java.io.File demographicsDirectory_File,
                                                                           java.lang.Long minAgeYearsForFertilityDisplays,
                                                                           java.lang.Long maxAgeYearsForFertilityDisplays,
                                                                           int decimalPlacePrecisionForCalculation,
                                                                           int significantDigits,
                                                                           java.math.RoundingMode a_RoundingMode)

outputAgeGenderPlot

protected static void outputAgeGenderPlot(java.util.concurrent.ExecutorService executorService,
                                          java.lang.Object obj,
                                          java.lang.String title,
                                          int dataWidthForAgeGenderPlots,
                                          int dataHeightForAgeGenderPlots,
                                          java.lang.String xAxisLabel,
                                          java.lang.String yAxisLabel,
                                          java.io.File demographicsDirectory_File,
                                          java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleTheoreticalEndYearAgedPopulation_TreeMap,
                                          java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> maleTheoreticalEndYearAgedPopulation_TreeMap,
                                          java.lang.Long minAgeInYears,
                                          java.lang.Long maxAgeInYears,
                                          int decimalPlacePrecisionForCalculations,
                                          int decimalPlacePrecisionForDisplay)

outputAgeGenderPlot

protected static void outputAgeGenderPlot(java.util.concurrent.ExecutorService executorService,
                                          java.lang.Object obj,
                                          java.lang.String title,
                                          int dataWidthForAgeGenderPlots,
                                          int dataHeightForAgeGenderPlots,
                                          java.lang.String xAxisLabel,
                                          java.lang.String yAxisLabel,
                                          java.io.File demographicsDirectory_File,
                                          GENESIS_Population a_Population,
                                          int decimalPlacePrecisionForCalculation,
                                          int decimalPlacePrecisionForDisplay)

outputAgeGenderPlot

protected static void outputAgeGenderPlot(java.util.concurrent.ExecutorService executorService,
                                          java.lang.Object obj,
                                          java.lang.String title,
                                          int dataWidthForAgeGenderPlots,
                                          int dataHeightForAgeGenderPlots,
                                          java.lang.String xAxisLabel,
                                          java.lang.String yAxisLabel,
                                          java.io.File demographicsDirectory_File,
                                          GENESIS_Population a_Population,
                                          java.lang.Long minAgeInYears,
                                          java.lang.Long maxAgeInYears,
                                          int decimalPlacePrecisionForCalculations,
                                          int decimalPlacePrecisionForDisplay)

get_Population_Alive_Male_Female_ID_HashSet

public java.lang.Object[] get_Population_Alive_Male_Female_ID_HashSet(GENESIS_Time a_Time)

getExpectedAndSumOfSquaredDifferences

public java.lang.Object[] getExpectedAndSumOfSquaredDifferences(java.lang.String regionID,
                                                                GENESIS_Demographics input_Demographics,
                                                                java.util.HashMap<GENESIS_AgeBound,GENESIS_Demographics> output_Demographics_HashMap)
Collects the theoretically expected populations and a Sum of Squared Difference between this and the simulated output and returns these. The theoretical populations are represented with non-integer values.

Parameters:
input_Demographics - the GENESIS_Demographics input into a simulation which are to be compared with the resulting output GENESIS_Demographics from a set of simulations as represented in output_Demographics
output_Demographics_HashMap - a HashMap with values representing the Demographic outputs from a set of simulation models run from the input_Demographics.
Returns:
Object[] result where; result[0] is a HashMap with keys as in output_Demographics_HashMap and values which are the respective sum of squared errors representing the difference between the modelled population and the theoretically expected population; result[1] is a TreeMap<Integer, BigDecimal> representing the female theoretical end year population; result[2] is a TreeMap<Integer, BigDecimal> representing the male theoretical end year population; result[3] is a TreeMap<Integer, BigDecimal> representing the female theoretical population that died in the period; result[4] is a TreeMap<Integer, BigDecimal> representing the male theoretical population that died in the period; result[5] is a TreeMap<Integer, BigDecimal> of the number of births by ageBound of female (GENESIS_Fertility).

getExpectedAndSumOfSquaredDifference

public static java.lang.Object[] getExpectedAndSumOfSquaredDifference(java.lang.String regionID,
                                                                      GENESIS_Demographics startDemographics,
                                                                      GENESIS_Demographics endDemographics,
                                                                      int decimalPlacePrecisionForCalculations)
Collects the theoretically expected populations and calculates the Sum of Squared Differences between this and the simulated output population. The Sum of Squared Differences also incorporated a measure of comparing the annual fertility rates (probability corrected). (NB. The theoretical populations are represented with non-integer values.)

Parameters:
startDemographics - the GENESIS_Demographics input into a simulation which are to be compared with the resulting output GENESIS_Demographics from a set of simulations as represented in output_Demographics
endDemographics - represent the Demographic outputs from a simulation model run from the input_Demographics.
Returns:
Object[] result where; result[0] is the sum of squared errors representing the difference between the modelled population and the theoretically expected population; result[1] is a TreeMap<Integer, BigDecimal> representing the female theoretical end year population; result[2] is a TreeMap<Integer, BigDecimal> representing the male theoretical end year population; result[3] is a TreeMap<Integer, BigDecimal> representing the female theoretical population that died in the period; result[4] is a TreeMap<Integer, BigDecimal> representing the male theoretical population that died in the period; result[5] is a TreeMap<Integer, BigDecimal> of the number of births by ageBound of female (GENESIS_Fertility).

getTheoreticalEndYearPopulationsAndFertility

public static java.lang.Object[] getTheoreticalEndYearPopulationsAndFertility(GENESIS_Population population,
                                                                              GENESIS_Mortality mortality,
                                                                              GENESIS_Fertility fertility,
                                                                              int decimalPlacePrecisionForCalculations)
Applies annual mortality rates to start year populations to create end year population that have died and survived. Mid-year populations are estimated for females and fertility rates applied to this to calculate birth populations. GENESIS_Mortality rates are applied and the population counts of living and dead aggregated accordingly.

Parameters:
startYearPopulation -
mortalityRates -
Returns:
Object[] result where: result[0] is a GENESIS_Population of the survived population; result[1] is a GENESIS_Population of the dead population; result[2] is a TreeMap<GENESIS_AgeBound,BigDecimal> live births by ageBound of mother; result[3] is a TreeMap<GENESIS_AgeBound,BigDecimal> of twins by ageBound of mother; result[4] is a TreeMap<GENESIS_AgeBound,BigDecimal> of triplets by ageBound of mother;

getTheoreticalFertilityAndNewBornPopulation

public static java.lang.Object[] getTheoreticalFertilityAndNewBornPopulation(java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleStartYearPopulation,
                                                                             java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> femaleTheoreticalEndYearAgedPopulation,
                                                                             GENESIS_Mortality mortality,
                                                                             GENESIS_Fertility fertility,
                                                                             int decimalPlacePrecisionForCalculations)
Parameters:
femaleStartYearPopulation -
femaleTheoreticalEndYearAgedPopulation -
femaleFertilityRates -
Returns:
an Object[] result where: result[0] is a TreeMap<GENESIS_AgeBound,BigDecimal> live births by age of mother; result[2] is a TreeMap<GENESIS_AgeBound,BigDecimal> of twins by age of mother; result[3] is a TreeMap<GENESIS_AgeBound,BigDecimal> of triplets by ageBound of mother; result[4] is a count of surviving female babies result[5] is a count of surviving male babies result[6] is a count of dead female babies result[7] is a count of dead male babies

getTheoreticallySurvivedAndDiedPopulation

public static java.lang.Object[] getTheoreticallySurvivedAndDiedPopulation(GENESIS_Population population,
                                                                           GENESIS_Mortality mortality)
Applies annual mortality rates to start year populations to created map0Value end year population that have died and survived. This does not currently deal with fertility adding in new people ageBound 0. The survived population returned are effectively aged by 1 year.

Parameters:
startYearPopulation -
mortalityRates -
Returns:

getTreeMapWithExtremeProbabilitiesSetToOne

public static java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> getTreeMapWithExtremeProbabilitiesSetToOne(java.util.TreeMap<GENESIS_AgeBound,java.math.BigDecimal> map)
Returns a new but with identical mapping map to map except with all values greater than one set to one.

Parameters:
map -

loadInputPopulation

public static java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> loadInputPopulation(GENESIS_Environment a_GENESIS_Environment,
                                                                                                                             java.io.File directory)
This method loads Local Authority District (LAD) populations that comprise of Output Area (OA) populations.

Parameters:
a_GENESIS_Environment -
directory -
Returns:
TreeMap> result where: result keys are LAD codes, result values are maps with keys as OA codes and values being the GENESIS_Population representing the OA population. Additionally a total population for each LAD is mapped with the key being the LAD code.

loadInputDeathCount

public static java.util.TreeMap<java.lang.String,GENESIS_Population> loadInputDeathCount(GENESIS_Environment a_GENESIS_Environment,
                                                                                         int year,
                                                                                         java.io.File directory,
                                                                                         java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> _regionIDs)
This method loads Local Authority District (LAD) death count data. The result keys are LAD codes and the values are GENESIS_Populations

Parameters:
a_GENESIS_Environment -
directory -
Returns:
TreeMap result where: result keys are LAD codes, result values are GENESIS_Population representing the OA population of deaths.

loadInputBirthCount

public static java.util.TreeMap<java.lang.String,GENESIS_Population> loadInputBirthCount(GENESIS_Environment a_GENESIS_Environment,
                                                                                         int year,
                                                                                         java.io.File directory,
                                                                                         java.util.TreeMap<java.lang.String,java.util.TreeSet<java.lang.String>> _regionIDs)
This method loads Local Authority District (LAD) birth count data. The result keys are LAD codes and the values are GENESIS_Populations

Parameters:
a_GENESIS_Environment -
directory -
Returns:
TreeMap result where: result keys are LAD codes, result values are GENESIS_Population representing the OA population of births.

getInitialMortalityRate

public static java.util.TreeMap<java.lang.String,GENESIS_Mortality> getInitialMortalityRate(GENESIS_Environment a_GENESIS_Environment,
                                                                                            java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> singleYearOfAgePopulation,
                                                                                            java.util.TreeMap<java.lang.String,GENESIS_Population> inputDeathCount,
                                                                                            int decimalPlaces,
                                                                                            java.math.RoundingMode roundingMode)

getInitialFertilityRate

public static java.util.TreeMap<java.lang.String,GENESIS_Fertility> getInitialFertilityRate(GENESIS_Environment a_GENESIS_Environment,
                                                                                            java.util.TreeMap<java.lang.String,java.util.TreeMap<java.lang.String,GENESIS_Population>> singleYearOfAgePopulation,
                                                                                            java.util.TreeMap<java.lang.String,GENESIS_Population> inputBirthCount,
                                                                                            int decimalPlaces,
                                                                                            java.math.RoundingMode roundingMode)

getLogger

public static java.util.logging.Logger getLogger()