public class Region extends Territory
| Modifier and Type | Field and Description |
|---|---|
int |
ethanolProducerTaxCredit |
| Constructor and Description |
|---|
Region(EnumRegion region)
Territory constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addProduction(int year,
EnumFood food,
long imports,
long exports,
long production,
long consumption,
long area) |
void |
addTerritory(Territory territory) |
void |
aggregateTerritoryData(int year)
Each region is composed of 1 or more territories.
|
boolean |
containsMapPoint(MapPoint mapPoint)
Used to link land tiles to a country.
|
void |
estimateInitialBudget(java.util.List<CropZoneData> cropData)
Estimates the initial crop budget for a all of the territoryList in the region by multiplying the territory
consumption of the crop by its cost.
|
void |
estimateInitialCropLandArea(java.util.List<CropZoneData> cropData) |
void |
estimateInitialUSYield()
Estimates the initial yield of all US states the US bookkeeping region.
|
void |
estimateInitialYield()
Estimates the initial yield of all territoryList in the region.
|
MapPoint |
getCenter() |
long |
getCropExport(int year,
EnumFood food) |
long |
getCropImport(int year,
EnumFood food) |
long |
getCropProduction(int year,
EnumFood food) |
EnumRegion |
getRegionEnum() |
int |
getRevenue() |
java.util.ArrayList<Territory> |
getTerritoryList() |
void |
setCropNeedPerCapita(EnumFood crop,
double tonPerPerson)
Method for setting crop need when already known (e.g., when copying).
|
void |
setCropNeedPerCapita(EnumFood crop,
double tonsConsumed,
double percentUndernourished)
Method for calculating and setting crop need
|
void |
updateCropNeed(int year) |
void |
updateYield(int year)
Updates the yield of all territoryList in the region and aggregates the values for
the entire region.
|
addGeographicArea, addLandTile, compareTo, getCapitolLocation, getCropBudget, getCropBudget, getGameRegion, getGeographicBoundary, getHumanDevelopmentIndex, getLandFarm, getLandTiles, getLandTotal, getName, getNetCropAvailable, getPenaltyValue, getPopulation, getTotalCropNeed, getUndernourished, setAverageConversionFactor, setCropBudget, setLandFarm, setLandTotal, setMethod, setPenaltyValue, setPopulation, setUndernourished, territoryLoader, toString, updateYieldpublic Region(EnumRegion region)
region - public void addProduction(int year,
EnumFood food,
long imports,
long exports,
long production,
long consumption,
long area)
public long getCropProduction(int year,
EnumFood food)
public long getCropImport(int year,
EnumFood food)
public long getCropExport(int year,
EnumFood food)
public void aggregateTerritoryData(int year)
public EnumRegion getRegionEnum()
public int getRevenue()
public void addTerritory(Territory territory)
territory - Territory to add to regionpublic boolean containsMapPoint(MapPoint mapPoint)
containsMapPoint in class TerritorymapPoint - mapPoint that is being testing for inclusingpublic java.util.ArrayList<Territory> getTerritoryList()
public void estimateInitialUSYield()
public void estimateInitialYield()
public void updateYield(int year)
public void updateCropNeed(int year)
public void estimateInitialBudget(java.util.List<CropZoneData> cropData)
cropData - crop data loaded from "/data/sim/CropData.csv"public void estimateInitialCropLandArea(java.util.List<CropZoneData> cropData)
public void setCropNeedPerCapita(EnumFood crop, double tonsConsumed, double percentUndernourished)
setCropNeedPerCapita in class Territorycrop - EnumFoodtonsConsumed - 2014 production + imports - exportspercentUndernourished - 2014 percent of population undernourishedpublic void setCropNeedPerCapita(EnumFood crop, double tonPerPerson)
setCropNeedPerCapita in class Territorycrop - EnumFoodtonPerPerson - 2014 ton/personpublic MapPoint getCenter()