uk.ac.leeds.ccg.andyt.projects.genesis.process
Class GenerateSociety

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.genesis.utilities.ErrorHandler
      extended by uk.ac.leeds.ccg.andyt.projects.genesis.process.GenerateSociety
All Implemented Interfaces:
java.io.Serializable

public class GenerateSociety
extends ErrorHandler

A class to generate a society.

See Also:
Serialized Form

Field Summary
 boolean _HandleOutOfMemoryError
           
 uk.ac.leeds.ccg.andyt.grids.exchange.ImageExporter _ImageExporter
           
 java.lang.String _Type
           
 
Constructor Summary
GenerateSociety()
           
 
Method Summary
 void _Initialise_Population_Year_0(Environment _Environment, Time _Time)
          This society has: 200 families with 2 parents of different gender: These have upto 5 (chosen randomly) children of random gender and age less than 16.
 void _Initialise_Population0(Environment _Environment, Time _Time)
          Initialises the people in a simple hunter gatherer society.
 void _Initialise_Population1(Environment _Environment, Time _Time)
          Initialises the people in a simple hunter gatherer society.
 void _Map_Population(java.io.File _File, java.lang.String _Type, uk.ac.leeds.ccg.andyt.grids.exchange.ImageExporter _ImageExporter)
          Map locations with living population.
static java.awt.image.BufferedImage[] _OutputImage(org.jfree.chart.JFreeChart[] tJFreeCharts, int width, int height, java.lang.String directory, java.lang.String outputImageFileNamePrefix, java.lang.String type)
           
 void _Simulate(Demographics _Demographics, int _Years)
          Dynamically simulates a population over time.
 int _SimulateBirth()
           
 int _SimulateDeath(Mortality _Mortality)
           
 int _SimulateMiscarriage(java.util.HashSet _PregnantFemales)
           
 void _SimulateMovement()
          need to get agents moving about...
 int _SimulatePregnancy(java.util.HashSet _PregnantFemales, Fertility _Fertility)
           
 Time get_Random_DateOfBirth_Date(Time _Time, int _MaxYear)
           
 java.util.HashSet getMales(java.lang.Object _Location)
          Returns all males at _Location
 long[] getNewLocation(long[] _Location, int _Movement)
          0 1 2 3 4 5 6 7 8
static void main(java.lang.String[] args)
           
 void run0()
          Example run producing age/gender charts at each yearly time step
 void run1()
          Example run producing a map of locations at each day time step.
 void run2()
          Example run producing: age/gender plots at each year a map of locations at each day time step an aggregate location map for each year information about how related society is need to model who fathers which children people now have fertility and mortality rates conditioned by their resource level.
 
Methods inherited from class uk.ac.leeds.ccg.andyt.projects.genesis.utilities.ErrorHandler
clearMemoryReserve, getDirectory, getMemoryReserve, getNumberOfCachesSwappedAsFilesHashMap, initMemoryReserve, initMemoryReserve, loadObject, loadObject, setDirectory, setMemoryReserve, setNumberOfCachesSwappedAsFilesHashMap, swapToFile, swapToFile, writeToFile, writeToFile, writeToFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_HandleOutOfMemoryError

public boolean _HandleOutOfMemoryError

_ImageExporter

public uk.ac.leeds.ccg.andyt.grids.exchange.ImageExporter _ImageExporter

_Type

public java.lang.String _Type
Constructor Detail

GenerateSociety

public GenerateSociety()
Method Detail

main

public static void main(java.lang.String[] args)

run0

public void run0()
Example run producing age/gender charts at each yearly time step


run1

public void run1()
Example run producing a map of locations at each day time step.


run2

public void run2()
Example run producing: age/gender plots at each year a map of locations at each day time step an aggregate location map for each year information about how related society is need to model who fathers which children people now have fertility and mortality rates conditioned by their resource level. people move about the landscape getting resource people need a memory of where they have gone and what resource is available there people have social networks forming now they move about in space coming into contact with people from other households


get_Random_DateOfBirth_Date

public Time get_Random_DateOfBirth_Date(Time _Time,
                                        int _MaxYear)

_Initialise_Population0

public void _Initialise_Population0(Environment _Environment,
                                    Time _Time)
Initialises the people in a simple hunter gatherer society. In this case there are 10 groups/bands/tribes/communities of hunter gatherers. Each group consists of: 0 Elders 10 Males aged 15 10 Females aged 15 0 Children


_Initialise_Population1

public void _Initialise_Population1(Environment _Environment,
                                    Time _Time)
Initialises the people in a simple hunter gatherer society. In this case there are 10 groups/bands/tribes/communities of hunter gatherers. Each group consists of: 0 Elders 10 Males aged 15 10 Females aged 15 0 Children These people are spatially located within the Environment


_Initialise_Population_Year_0

public void _Initialise_Population_Year_0(Environment _Environment,
                                          Time _Time)
This society has: 200 families with 2 parents of different gender: These have upto 5 (chosen randomly) children of random gender and age less than 16. These have upto 4 (chosen randomly) grandparents Government 1 _Mayor 1 _DeputyMayor Entertainment 2 bars/cafe 8 staff Business Organisations 2 barber/hairdresser/beautitions Food 2 Grocers 2 owners 10 employees Service Industry 1 dump 5 cleaners 1 hospital 5 doctors 15 nurses 2 administrators 1 school 5 teachers 50 farms 50 farm owners ? farmhands 10 factories 10 factory owners 100 factory workers Utilities are all provided 1 Power plant 1 Water power plant 1 sewage works Police/Law Enforcement 1 Jail 2 senior police officers 5 junior police officers The fire service is non existant There are 100 single men age 16 to 30. There are 100 single women age 16 to 30. Incomplete Stub


_OutputImage

public static java.awt.image.BufferedImage[] _OutputImage(org.jfree.chart.JFreeChart[] tJFreeCharts,
                                                          int width,
                                                          int height,
                                                          java.lang.String directory,
                                                          java.lang.String outputImageFileNamePrefix,
                                                          java.lang.String type)
                                                   throws java.io.IOException
Throws:
java.io.IOException

_Simulate

public void _Simulate(Demographics _Demographics,
                      int _Years)
Dynamically simulates a population over time.

Parameters:
_Demographics -
_Years - The number of years over which the simulation occurs

_SimulateDeath

public int _SimulateDeath(Mortality _Mortality)

_SimulateBirth

public int _SimulateBirth()
Returns:
Total number of births

getMales

public java.util.HashSet getMales(java.lang.Object _Location)
Returns all males at _Location

Parameters:
_Location -

_SimulatePregnancy

public int _SimulatePregnancy(java.util.HashSet _PregnantFemales,
                              Fertility _Fertility)

_SimulateMiscarriage

public int _SimulateMiscarriage(java.util.HashSet _PregnantFemales)
Parameters:
_PregnantFemales -

getNewLocation

public long[] getNewLocation(long[] _Location,
                             int _Movement)
0 1 2 3 4 5 6 7 8

Parameters:
_Location -
_Movement -
Returns:
A new long[] giving a row and column location relative to _Movement

_SimulateMovement

public void _SimulateMovement()
need to get agents moving about... Each agent can move to any position in a 1 cell radius of their current location.


_Map_Population

public void _Map_Population(java.io.File _File,
                            java.lang.String _Type,
                            uk.ac.leeds.ccg.andyt.grids.exchange.ImageExporter _ImageExporter)
Map locations with living population.

Parameters:
_File -
_Type -
_ImageExporter -