LGJ: I would prefer to keep track of ages, but some people would not. The simple model is an option for people who don't want to track ages seperately.
Announcement
Collapse
No announcement yet.
Population and Demographics
Collapse
X
-
Richard,
In general I like the idea of tracking population by the 3 ages, because like u say, disease hits each differently, and this would add a nice element to the disease model. It would also have great impact on the economic model, with child-labor, and retirement age etc. But from just skimming the model it seems too detailed. Since this is a part of the game most players will be highly interested in, it needs to be quite simple to allow for quick and easy estimates by the player. I didn't read it in detail, so my concern my be unwarrented if most of it happens "behind the scenes", I'll try to give more detailed comments later.
Comment
-
I think it looks more complex than it is....espically for what the user is concerned with so adding age wouldn't confuse them too much, besides if he wanted a quick estimate of his entire population, that wouldn't be a problem...there could be a space for total population with the 3 added together.Which Love Hina Girl Are You?
Mitsumi Otohime
Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.
Comment
-
The size of the cohorts can be represented graphically so it is easy to see how many people are in each age group. It is like a bar graph; people who study population use it to quickly study a country's age structure. The characteristics of the cohorts will just be common sense; children can do less work and have higher mortality. I think that five year cohorts would be a good choice for the default game.
Comment
-
Population Model OO design:
This is my first attempt to create an object oriented model implementation. Hopefully it will help me understand the OO and Java concepts. Of course, I will need correction and feedback for this to work, so if you know about OO design please help me with this.
The Object Classes:
Population
RacialCharacteristics (optional)
Cohort
Mortality
EconomicPotential
MilitaryPotential
ReproductionAverage
MapSquarePopulation
The population object class is essentially a collection of cohort objects and general population characteristics. It should have functions that calculate the population's Economic Potential percentage and recruitment percentage data based on cohort data. It should also define how often the model is recalculated.
The Cohort object class is the central focus of the model. In addition to containing the four classes thet define population characteristics, this class stores the following data as primitive classes: cohort number and age, cohort type/gender, and cohort population.
I'm not sure, but it seems that Cohort could be a Base Class and specific types of cohort, like Male Cohort #3, could be Derived Classes.
Each cohort class must also have a Cohort Creation function that is called whenever the demographics are recalculated. This function uses data from the Mortality or RA objects from other cohorts.
The Mortality, EconomicPotential, MilitaryPotential, and ReproductionAverage object classes store and recalculate data about the Cohort objects. They all require data from the other game models. Each Cohort object needs these objects. I haven't been able to figure out the technical terms for this kind of hierarchy.
Each mapsquare has a MapSquarePopulation object associated with it. This object class stores the population of the square and the Labor available in the square as primitive objects. Te class should also have equations that determine these two numbers based on the data from the Population object.
The thing I need the most help with is the function calls. Something tells me that I'm not doung them right. Could I get some feedback on this object structure and model plan?
Comment
-
Hi, Richard:
I think it's great, you jumping into this.
It'll be easier to learn than you think. It's almost impossible to master, I still feel like I've got so much to learn. But the basics take mostly a new way of looking at things.
Anyway -- I think you're pretty close, altho if I may make a few translations into geeky 'OOA' jargon:
- [*]Population EthnicGroup
- [*]Ethnicity Culture, [*]Cohort One
- [*]Gender vals[*]Age vals[*]Number of individuals[*]Mortality[*]EconomicPotential[*]MilitaryPotential[*]ReproductionAverage[/list][*]Religion[*]Group Tendencies[*]Other Attributes[/list][/list]
The italics is what I've named those classes in my object builder. This is the object structure that the beast uses.
The only difference is I have the 'number of individuals' currently in the Population/EthnicGroup 'parent' class. But that's the beauty of this OOD componentized approach -- all I have to do is 'disassemble' this number, and reassemble it when I need it. Store the pop info in the 'cohort', and loop thru and add them all up when necessary.
Only other difference is that I store this Population/EthnicGroup object at the mapsquare level, and keep it's group's number of individuals (population integer) in the same object. But you can store it at whatever level you want.
* * *
What I'm saying is, you did a great job of doing an OOA on your Cohort ideas. The sign of a good OOD is that it can snap into any similar system -- if you don't mind, I can easily 'snap' those Cohorts into my mapsquare level Population/EthnicGroup object to test it. You can, later, only use the object only at the Civ level.
And that definition of 'Cohort' you have there is very good. With this, I can code this up in an evening or two, and be testing by next weekend.
A few terms you might like to know:
The 'Population' object 'encapsulates' population characterists, and a collection of 'Cohort' objects. Each 'instance' of a
'Cohort' in this collection will have it's own, distinct 'encapsulated' data. And the 'Cohort' object has 'dependencies' on data from several other models.
Or am I totally off my cap?
* * *
I'm not sure what you mean by 'function calls'.
The 'methods' necessary actually define themselves:
public void setThis(Object this);
or
public void addThis(Object this);
depending on which makes most sense
public This getThis();
For each object an object 'encapsulates'.
So, for Population, you'd have
public void setEthnicity(Ethnicity e);
public Ethnicity getEthnicity()
public void addCohort(Cohort c);
public Cohort getCohort(String name);
Is that what you mean?
Comment
-
F_Smith: I'll have to look over your post more carefully and compare your jargon with the terms from Thinking in Java. I thought that "function calls" are the procedures by which the program orders a function to be exectued. I think I understand object structure, but I don't yet understand how the equations fit in.
Comment
-
Hi Richard,
I've had some time now to look over the model, and I must say I like the more detailed version of the model, not simply because it is more complex (I am one to push for more complexity, after all you know ), but because it generates more accurate results of what the population can and will be. You should also look at Manurein's old social model...he had some very good equations on determining population growth (at least the few tests I ran produced promising results). I couldn't find it myself, but I'm sure it's somewhere in the archives.
Comment
-
F_Smith:
The object hierarchy in your post looks good, but it is only one of the options I had hoped to have in the model. I wanted to be able to give the player the options of running the model at either the civ or province level. I also wanted the option of not tracking the ethnic groups seperately.
So there are four possible hierarchies:
CivPopulation, Cohorts
CivPopulation, EthnicGroup, Cohorts
CivPopulation, ProvincePopulation, Cohorts
CivPopulation, ProvincePopulation, EthnicGroup, Cohorts
I know it is easy to rearrange the hierarchy during the programming process, but does Java have the ability to change this hierarchy at run-time? If not, we will have to agree on one default game setting out of these four.
I am attempting to turn the following equation into a Java method. Please don't laugh:
First Cohort, Reproduction: The modified Reproduction Average for each cohort is multiplied by the population of each cohort. The results are summed and the result is the population of the first cohort.
public int Births(CohortTwo.ReproductionAverage, CohortTwo.Population, CohortThree.ReproductionAverage, /*and so on/*){
arg1*arg2 + arg3*arg4 + /*and so on/*
}
Comment
-
I also like the complex system. I wrote the simple one to provide flexibility and account for things like low-bandwidth multiplayer games. Also, there are some people who don't like the complex model.
I'll look over the old population threads, review the Java book, and study the comments above in more detail. Then I'll post a revised version of the OO analysis.
Comment
-
Richard:
We'll be using several tricks to allow pop info to be run at one of several settings 'on the fly', at game time.
First, we'll use 'state triggers'.
The player selects the gametype they want, which sets 'triggers' that store 'gamestate' (booleans like pop_at_prov = true, usually).
We'll likely be doing this for a variety of reasons, from grafix detail to AI settings.
Then we either store all the info at the lowest level and build it up when needed (element-atom-molecule approach) or we give each level it's own 'population' objects collection and only use the one required.
* * *
I'd likely code it like this:
In the 'CohortTurnHandler' class:
Code:public int yearlyBirths(Enumeration cohorts) { int total = 0; while(cohorts.hasMoreElements()) { Cohort c = (Cohort)cohorts.nextElement(); total += c.calculateBirths(); } return total; }
Code:private int calculateBirths() { return this.getPopulation() * this.getReproductionRate(); }
The idea is, tho, that a 'collection' of 'Cohort' objects is passed to the method, and they are looped thru one at a time. Then each 'Cohort' tells you it's births (the calculations for Cohorts should always take place inside class 'Cohort').
That's not a bad question at all. I'm impressed.
[This message has been edited by F_Smith (edited August 14, 2000).]
Comment
-
You got the syntax mosly right:
Code:public int processAging(Cohort previous) { return previous.getPopulation() * previous.getMortality(); }
Comment
-
Richard:
In that case, the Cohort class would look somthing like this:
Code:public class Cohort { private int number_of_individuals; private int mortality; public Cohort(int n) { setNumberOfIndividuals(n); } private void setNumberOfIndividuals(int n) { number_of_individuals = n; } public int getNumberOfIndividuals() { return number_of_individuals; } public void setMortality(int m) { mortality = m; } public int getMortality() { return mortality; } public void doAging() { return getNumberOfIndividuals() * getMortality(); } }
Comment
Comment