public class PopulationConsume extends Object
| Modifier and Type | Field and Description |
|---|---|
private Map<EWare,Map<EPopulationClass,Double>> |
needs
Store the amounts
|
| Constructor and Description |
|---|
PopulationConsume() |
PopulationConsume(String propFileName)
Initialize the needs structure based on a property file
|
| Modifier and Type | Method and Description |
|---|---|
int |
getBasicWeeklyConsumtion(IWare ware)
Basic need distribution for a city of 1000 people of average income.
|
double |
getNeed(IWare ware,
EPopulationClass popClass,
int popSize)
Retrieve the amount needed of a ware by a population class of the size
|
double |
getWeeklyConsumption(IWare ware,
ICity city)
Calculate the weekly overall consumption of a ware in a city.
|
private Map<EWare,Map<EPopulationClass,Double>> needs
public PopulationConsume(String propFileName)
propFileName - public PopulationConsume()
public double getNeed(IWare ware, EPopulationClass popClass, int popSize)
ware - to be requestedpopClass - population classpopSize - number of people of the classpublic double getWeeklyConsumption(IWare ware, ICity city)
ware - that's consumption should be retrievedcity - in which the consumption is checked.public int getBasicWeeklyConsumtion(IWare ware)
ware - Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.