The Simulator class is the main API for the Server to interact with the simulator.
This Model class is home to the calculations supporting that API.
Each currentYear the model advances, the model applies:
- Most Policy Card Effects: Any changes in land use, fertilizer use, and world
trade penalty functions are calculated and applied.
- Changes in land use: At the start of each simulated currentYear, it is assumed that
farmers in each region of the world each adjust how they use land based on currently
enacted policies, the last currentYear's crop yields and the last currentYear's crop prices so as
to maximize individual profit while staying within any enacted laws.
- Population: In this model, each region's population is based only on data from
external population projections and a random number chosen at the start of the game.
Note that the occurrence of wide spread famine causes the game to end with all players
losing. Thus, it is not necessary to model the after effects of a famine. Random game
events such as hurricanes, typhoons, and political unrest are assumed to have
negligible effect on population.
- Sea Level: This depends only on external model data, a random value chosen at the
start of the program and the currentYear. Sea level only has two effects on the model:
higher sea level reduces costal farm productivity and increases damage probabilities
of special storm events (hurricane, and typhoons).
- Climate: In this model, climate consists of annual participation, average annual
day and night temperatures and the annual number of frost free days on a 10 km x 10 km
grid across all arable land areas of the Earth.
- Occurrence of Special Events: Each currentYear, there is a probability of each of many
random special events occurring. These include major storms, drought, floods,
unseasonable frost, a harsh winter, or out breaks of crop disease, blight, or insects.
Special events can also be positive the result in bumper crops in some areas. While
these events are random, their probabilities are largely affected by actions players
may or may not take. For example, policies encouraging improving irrigation can
mitigate the effects of drought, preemptive flood control spending can mitigate the
effects of floods and major storms and policies that encourage / discourage
monocropping can increase / decrease the probability of crop disease, blight, or
insects problems.
- Farm Product Yield: The current currentYear's yield or each crop in each region is largely
a function of the current currentYear's land use, climate and special events as already
calculated.
- Farm Product Need: This is based on each region's population, regional dietary
preferences, and required per capita caloric and nutritional needs.
- Policy Directed Food Distribution: Some player enacted policies may cause the
distribution of some foods to take place before the calculation of farm product
prices and such distributions may affect farm product prices. For example, sending
grain to very low income populations reduces the supply of that grain while not
affecting the world demand. This is because anyone who's income is below being able
to afford a product, in economic terms, has no demand for that product.
- Farm Product Demand and price: Product foodPrice on the world market and demand are
highly interdependent and therefore calculated together.
- Food Distribution: In the global market, food distribution is effected by many
economic, political, and transportation factors. The Food Trade Penalty Function
(see below) is an attempt to assign each country a single number that adjusts the
efficiency of food on the global market being traded into that country (even if it
originated in that country). The game simulation allocates food products to each
country by maximizing the number of people feed under the application of the country's
penalty function.
- Human Development Index: Each country, based on the extent to which its nutritional
needs have been met, has its malnutrition, infant mortality, and life expectancy rates
adjusted. These are then used to calculate the country's HDI.
- Player Region Income: Each player receives tax revenue calculated as a percentage
of the player's region's total net farm income with any relevant enacted policy applied.