|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunits.Household
public class Household
Class representing a household in the population.
Field Summary | |
---|---|
private java.util.ArrayList<Agent> |
adults
Adults in the household |
private java.util.ArrayList<Agent> |
applicants
Applicants for piecework jobs |
private boolean |
bereaved
this indicates that there was at least one death this month /tick we'll see how we pay for it after we get the income, support from the funeral club and if possible, from the extended family |
private java.util.ArrayList<Agent> |
children
Children in the household |
private Church |
church
Church of which the household is the members |
private int |
churchID
Church Id of which the household is the members |
private java.util.ArrayList<Couple> |
coupleList
List of married couples in the household |
private java.util.ArrayList<Agent> |
currentMembers
List of current members in the household |
private int |
currentMembersOnMigration
Households members on migration |
private int |
defaultFuneralClubCount
number of funeral club memberships |
private java.util.HashMap<java.lang.Integer,Employee> |
employees
Employees maps for this household |
private java.util.ArrayList<java.lang.Integer> |
extendedFamilyIDList
only maintains the household ID ... |
private FuneralClub |
funeralClub
Funeral club of which the household is the members |
private Agent |
head
Household head |
private boolean |
hungry
Are household members hungry? |
private int |
id
Household Id |
private boolean |
memberFuneralClub
Is member of funeral club |
private java.util.ArrayList<Agent> |
members
List of members in the household |
private Model |
model
|
private boolean |
noGuardians
Has guardians? |
private int |
numberAvailableJobs
Number of available piecework jobs |
private java.util.ArrayList<Agent> |
seniors
Seniors in the household |
private double |
wealth
Household's current wealth |
Constructor Summary | |
---|---|
Household()
Default constructor |
|
Household(int _id,
Model _model)
Create household in simulation. |
Method Summary | |
---|---|
Household |
accommodateNeighbour()
Find a neighbour .. |
void |
accommodateNewMembers(Household household)
Accommodate new members of the dissolved household |
Household |
accommodateRelative()
this is for a household who happens to be a member of an extended family... |
double |
accumulateIncome()
Accumulated incomes from the household members |
void |
addAgent(Agent agent)
Add agent to household |
void |
addCouple(Couple couple)
Add couple to this household |
void |
addFuneralWealth(double money)
Add money from funeral contributions |
void |
addWealth(double money)
Add money to the household wealth |
void |
allocateJob()
Allocate jobs to applicants. |
boolean |
announceJobs()
Announce piecework jobs |
void |
borrowFood()
the underlying assumption is that there is at least one person in the household who has gone hungry ... |
void |
borrowFuneralCost(int cost)
Borrow money for the funeral. |
Household |
chooseExtendedFamilyHousehold()
according to the Oct 2007 validation trip by Gina and Tak, the women said that children are accommodated/taken care of by the family on the fathers' side - as they belong to the father's moiety. |
void |
deductClubsFee()
Deducts (or supposed to deduct)the fee for the funeral club or savings club, the household is member of ... |
void |
deductEducationFee()
FANRPAN Working Document: Series Ref. |
void |
deductFuneralCost()
Deduct the expenditure for the funeral |
void |
deductHealthExpenditure()
Deduct health expenditure |
void |
deductWealth(double money)
deduct money from wealth |
void |
feed(int childFeedStatus,
int seniorFeedStatus,
int adultFeedStatus,
java.util.ArrayList<Agent> adults)
Feed the household members based on the decision to feed children, adults and seniors |
int |
feedHousehold()
there's an underlying assumption, which is lightly supported by anecdotal accounts those members of the households on migration are not included in feeding ... |
int |
feedHouseholdWithoutFAO()
Feed household members without the FAO recommendations |
int |
feedWithoutFarm()
Feed household members without the farming |
FuneralClub |
findFuneralClub()
now once decided to join a funeral club, we choose which one to join |
java.util.ArrayList<Agent> |
getAaplicants()
Get applicants list for piecwork |
java.util.ArrayList<Agent> |
getAdults()
Get household adults |
java.util.ArrayList<Agent> |
getChildren()
Get household children |
Church |
getChurch()
Get my church |
int |
getChurchID()
Get my church Id |
java.util.ArrayList<Couple> |
getCoupleList()
Get the couples list |
int |
getCurrentAdultMales()
Get current adult members |
java.util.ArrayList<Agent> |
getCurrentMembers()
Get my current members |
int |
getCurrentMembersOnLabor()
Get current members on job/labor |
int |
getDefaultFuneralClubCount()
|
java.util.HashMap<java.lang.Integer,Employee> |
getEmployee()
|
java.util.ArrayList<java.lang.Integer> |
getExtendedFamilyIDList()
Get list of extended family households Ids |
FuneralClub |
getFuneralClub()
Get funeral club |
Agent |
getHead()
Get household head |
int |
getId()
Get Id |
java.util.ArrayList<Agent> |
getMembers()
Get household members |
boolean |
getNoGuardians()
Update the status that there are no guardians |
int |
getNumberAvailableJobs()
Get number of available piecework jobs |
java.util.ArrayList<Agent> |
getSeniors()
Get household seniors |
int |
getSize()
Get household size |
double |
getWealth()
Get household wealth |
boolean |
hasLebola()
Can the household has the lobola |
void |
initialize()
This an important method that assigns head, roles, wealth and other attributes ... |
boolean |
isBereaved()
Am I bereaved |
boolean |
isHungry()
Am I hungry |
boolean |
isKin(Agent agent)
Is agent a kin to my household |
boolean |
isMemberFuneralClub()
Is member of a funeral club |
boolean |
isNeighbour(Household relativeHousehold)
Check if this is neighbor |
boolean |
isReliable(Agent agent)
TODO: ... |
void |
makeChildrenOrphan(Agent agent)
orphan means 'single OR double orphan' |
void |
populateExtendedFamily(Household husbandHousehold,
Household wifeHousehold)
We give this new hh its relatives following the Union of both husband and wife |
void |
printhouseholdComposition()
Print my household composition |
void |
recruitEmployee(Agent agent)
TODO: We could also increase some pay for those working for us regularly?? |
void |
removeAgent(Agent agent)
Removes the agent from the household |
void |
removeCouple(Agent agent)
Removes the couple for this agent from the household |
void |
removeCouple(Couple couple)
Remove couple from this household |
Household |
returnAccommodator()
Return the best accommodator for my dissolved household |
HouseholdNode |
returnHouseholdNode()
Return my node from the network GUI |
int |
returnRequirementFAO(Agent agent)
Return the FAO Adult equivalence nutrition requirement for agent |
int |
returnRequirementFermi(Agent agent)
Using a non-linear Fermi equation ... |
void |
setBereaved(boolean isBereaved)
Set my bereaved flag |
void |
setChurch(Church church)
Set my church |
void |
setChurchID(int churchID)
Set my church ID |
void |
setCoupleList(java.util.ArrayList<Couple> coupleList)
Set the couples list |
void |
setCurrentMembers(java.util.ArrayList<Agent> currentMembers)
Set my current members |
void |
setDefaultFuneralClubCount(int defaultFuneralClubCount)
|
void |
setExtendedFamilyIDList(java.util.ArrayList<java.lang.Integer> extendedFamilyID)
|
void |
setFuneralClub(FuneralClub funeralClub)
Set funeral club |
void |
setHead(Agent _head)
Set household members |
void |
setHungry(boolean hungry)
Set flag for hungry |
void |
setMemberFuneralClub(boolean _isMemberFuneralClub)
Set if member of a funeral club |
void |
setWealth(double _wealth)
Set household members |
void |
step()
Main step for the household: accumulate income, feeds members and deducts expenditure |
void |
updateAgentAgeGroup(Agent agent,
int ageGroup)
Update members when age groups change |
boolean |
updateHead(Agent agent)
Update household head |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int id
private Agent head
private java.util.ArrayList<Agent> children
private java.util.ArrayList<Agent> adults
private java.util.ArrayList<Agent> seniors
private java.util.ArrayList<Agent> members
private java.util.ArrayList<java.lang.Integer> extendedFamilyIDList
private java.util.ArrayList<Couple> coupleList
private java.util.ArrayList<Agent> currentMembers
private Model model
private FuneralClub funeralClub
private Church church
private int churchID
private boolean noGuardians
private int currentMembersOnMigration
private boolean memberFuneralClub
private int defaultFuneralClubCount
private double wealth
private java.util.HashMap<java.lang.Integer,Employee> employees
private java.util.ArrayList<Agent> applicants
private int numberAvailableJobs
private boolean bereaved
private boolean hungry
Constructor Detail |
---|
public Household()
public Household(int _id, Model _model)
Method Detail |
---|
public int getId()
public void initialize()
public void addAgent(Agent agent)
public void removeAgent(Agent agent)
public void removeCouple(Agent agent)
public void deductFuneralCost()
public void borrowFuneralCost(int cost)
cost
- public void makeChildrenOrphan(Agent agent)
public void updateAgentAgeGroup(Agent agent, int ageGroup)
public java.util.ArrayList<Agent> getMembers()
public int getSize()
public double getWealth()
public void setWealth(double _wealth)
_wealth
- public java.util.ArrayList<Agent> getChildren()
public java.util.ArrayList<Agent> getAdults()
public java.util.ArrayList<Agent> getSeniors()
public Agent getHead()
public void setHead(Agent _head)
_head
- public void step()
public void deductEducationFee()
public void deductHealthExpenditure()
public int feedHouseholdWithoutFAO()
public int feedWithoutFarm()
public int feedHousehold()
public void feed(int childFeedStatus, int seniorFeedStatus, int adultFeedStatus, java.util.ArrayList<Agent> adults)
childFeedStatus
- seniorFeedStatus
- adultFeedStatus
- adults
- public int returnRequirementFAO(Agent agent)
agent
-
public void deductClubsFee()
public double accumulateIncome()
public boolean updateHead(Agent agent)
public boolean getNoGuardians()
public void addFuneralWealth(double money)
money
- public void addWealth(double money)
money
- public void deductWealth(double money)
money
- public Household accommodateNeighbour()
public FuneralClub getFuneralClub()
public void setFuneralClub(FuneralClub funeralClub)
public boolean isMemberFuneralClub()
public void setMemberFuneralClub(boolean _isMemberFuneralClub)
public FuneralClub findFuneralClub()
public int getDefaultFuneralClubCount()
public void setDefaultFuneralClubCount(int defaultFuneralClubCount)
public int getCurrentMembersOnLabor()
public int getCurrentAdultMales()
public void accommodateNewMembers(Household household)
household
- public void addCouple(Couple couple)
couple
- public void removeCouple(Couple couple)
couple
- public java.util.ArrayList<Couple> getCoupleList()
public void setCoupleList(java.util.ArrayList<Couple> coupleList)
coupleList
- public java.util.ArrayList<java.lang.Integer> getExtendedFamilyIDList()
public Household accommodateRelative()
public Household chooseExtendedFamilyHousehold()
public boolean isNeighbour(Household relativeHousehold)
relativeHousehold
-
public void populateExtendedFamily(Household husbandHousehold, Household wifeHousehold)
husbandHousehold
- wifeHousehold
- public void setExtendedFamilyIDList(java.util.ArrayList<java.lang.Integer> extendedFamilyID)
public int returnRequirementFermi(Agent agent)
public Household returnAccommodator()
public void printhouseholdComposition()
public boolean isBereaved()
public void setBereaved(boolean isBereaved)
isBereaved
- public HouseholdNode returnHouseholdNode()
public boolean hasLebola()
public Church getChurch()
public void setChurch(Church church)
church
- public boolean announceJobs()
public java.util.ArrayList<Agent> getAaplicants()
public int getNumberAvailableJobs()
public void allocateJob()
public boolean isKin(Agent agent)
agent
-
public boolean isReliable(Agent agent)
public void recruitEmployee(Agent agent)
public void borrowFood()
public java.util.HashMap<java.lang.Integer,Employee> getEmployee()
public boolean isHungry()
public void setHungry(boolean hungry)
hungry
- public java.util.ArrayList<Agent> getCurrentMembers()
public void setCurrentMembers(java.util.ArrayList<Agent> currentMembers)
currentMembers
- public int getChurchID()
public void setChurchID(int churchID)
churchID
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |