|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunits.Agent
public class Agent
Class representing an individual person as agent.
Field Summary | |
---|---|
static int |
ACCEPT
|
private java.util.ArrayList<Agent> |
acceptances
friends list |
private java.lang.String |
achievedEducation
default education level |
private java.util.ArrayList<Agent> |
acquaintances
List of my acquaintances |
private int |
age
age of the agent |
private int |
ageGroup
|
private boolean |
alive
|
private double |
aspirationLevel
|
private boolean |
atSchool
|
private double |
base
|
private int |
birthTick
Last Age: is drawn from a normal distribution with a mean life expectancy and standard deviation ... |
private boolean |
committed
|
private int |
courtShipDuration
|
private int |
deathTick
Last Age: is drawn from a normal distribution with a mean life expectancy and standard deviation ... |
private Household |
employer
My current empoloyer |
private int |
expectedLife
Last Age: is drawn from a normal distribution with a mean life expectancy and standard deviation ... |
private int |
fatherID
|
private int |
fatherOfMyChildID
father id for single mother's casde |
private int |
feedStatus
Initial feed status |
private int |
fertilityAgeLimit
to be replaced by a sigmoid curve |
private java.util.ArrayList<Agent> |
friends
friends list |
private int |
gender
assign 0 -> 'Female'; '1' -> 'Male' ; -1 -> 'unassigned' |
private Grant |
grant
a grant is an agent's property, though it's shared by the entire household. |
private boolean |
head
is head of the household |
private int |
healthCount
the health count |
private int |
healthStatus
health status of the agent |
private Household |
household
Household of the agent |
private int |
houseHoldID
ID of this household to this individual belongs |
private int |
id
agent's id ... |
private int |
infectedAge
Last Age: is drawn from a normal distribution with a mean life expectancy and standard deviation ... |
private int |
infectedLag
Last Age: is drawn from a normal distribution with a mean life expectancy and standard deviation ... |
private int |
infectedTick
Last Age: is drawn from a normal distribution with a mean life expectancy and standard deviation ... |
private boolean |
innovator
|
static int |
INVITE
|
static int |
INVITE2
|
private java.util.ArrayList<Agent> |
invited
friends list |
private boolean |
laborFit
is fit ofr labor |
private int |
lastMigrationTry
|
private double |
lastTryStokvel
last try for stokvel count |
private int |
lastVisit
|
private int |
lateLag
|
private int |
maritalStatus
|
private int |
maternalHouseholdID
for wives only |
private int |
maxCourtShipDuration
|
private int |
maxOutsiderWaitingMonths
|
private int |
maxSexualPartners
Max sexual partners I can have |
private boolean |
memberFuneralClub
is memebr of funeral club |
private boolean |
memberSavings
|
private int |
midLag
|
private boolean |
migrated
is migrated |
private int |
migratedTick
|
private boolean |
mineJob
|
private boolean |
mineTrained
mining stuff |
private Model |
model
|
private int |
motherID
|
private java.lang.String[] |
negativeEndorsements
|
private int[] |
negativeEndosrsementValues
|
private int |
numEndorsementClasses
|
private int |
numMigrationTries
|
private int |
numMonthsOutsiderArrival
|
private int |
numStokvelTries
number of stokvel tries |
private java.util.ArrayList<Agent> |
offSprings
My offsprings |
private boolean |
onVisit
is visiting home |
private boolean |
orphan
|
private boolean |
outsider
|
private boolean |
pieceJob
is having piecejob |
private java.lang.String[] |
positiveEndorsements
start: the following are regarding the endorsement mech to be implemented for finding partners |
private int[] |
positiveEndosrsementValues
|
private java.util.ArrayList<Agent> |
potentialFemales
Potential female sexual partners |
private Agent |
potentialPartner
|
private int |
pregnancyTick
Last Age: is drawn from a normal distribution with a mean life expectancy and standard deviation ... |
private boolean |
pregnant
is pregnant |
private java.util.ArrayList<Agent> |
proposers
Current proposers for sexual relation |
private boolean |
pullOutMembership
|
private double |
quality
the following is from my implementation of the marriage model proposed by Todd and Billari (2003), reported by Heuveline (2003) Ref: Todd, P.M. |
static int |
REJECT
|
private int |
remittance_Amount
|
private java.util.ArrayList<Agent> |
sexualPartners
Current sexual partners |
private java.util.ArrayList<Message> |
sexualPartnershipMessageInbox
|
private java.util.ArrayList<Message> |
sexualPartnershipMessageOutbox
|
private boolean |
singleMother
is single mother |
private int |
singleRemittanceLimit
|
private int |
spouseID
|
static int |
STOKVEL
|
private java.util.ArrayList<Message> |
stovelMessageInbox
|
private java.util.ArrayList<Message> |
stovelMessageOutbox
|
private int |
waitingThreshold
number of months I can wait without a partner |
private int |
waitingTime
number of months I have been waiting without a partner |
private boolean |
wouldGetChildGrant
Chance that I get a child grant, if eligible |
private boolean |
wouldGetDisabilityGrant
Chance that I get a disability grant, if eligible |
private boolean |
wouldGetPension
Chance that I get a pension grant, if eligible |
Constructor Summary | |
---|---|
Agent()
|
|
Agent(int _id)
|
|
Agent(int _id,
Household _household,
Model _model)
for Empirical Households |
|
Agent(int _id,
int _gender,
int _healthStatus,
Household _household,
Model _model)
This is for child who's born during simulation |
|
Agent(int _id,
int _gender,
int _ageGroup,
int _healthStatus,
Household _household,
Model _model)
Used for creating coarse-grained household composition |
|
Agent(int _id,
Model _model)
For outsider agents |
Method Summary | |
---|---|
void |
applyForPieceWork(int currentTick)
Apply for piecwork for this agent |
boolean |
askFood(Agent friend)
from RADAR: a hungry person would ask their neighbors (in our case, it's friends) not more than two days in a row. |
void |
assignAspiration()
Assign aspiration to the partners |
void |
assignEndorsmentValues()
|
void |
attemptMigration(int currentTick)
My attempt to migrate at this time |
boolean |
availableAtVillage()
Am I currently in village |
boolean |
birthPossible(int currenTick)
If birth possible for the female agent at this time |
double |
calculateEndorsement(Agent agent)
|
void |
checkDeath()
there could be several reasons for a person dying ... |
Agent |
chooseMaleSexualPartner()
Choose the best male partner for me |
Agent |
chooseMaleSexualPartner2()
|
void |
clearAllFriends()
Remove all agents as my friends |
void |
clearAllSexualPartners()
Remove all my sexual partners |
int |
compareTo(java.lang.Object anotherAgent)
Compare the agent based on quality |
void |
courtshipBroken(Agent partner)
Break my courtship with this partner |
void |
createStokvel()
I'm the moderator/facilitator; creating the stokvel |
void |
decNumStokvelTries()
|
void |
decreaseAspiration()
Decrease aspiration |
void |
education(int currentTick)
assigne education levels - from RM |
boolean |
endogamicRelation(Agent agent)
Check if I have an endogamic relation |
void |
fastDecayHealth(int currentTick)
Decay health based on Sigmoid function |
boolean |
feedFriend(Agent agent)
Should I feed my friend |
boolean |
fertility(int currentTick)
SJA: Aug 27, 2007 now introducing the fertility rate and declining of age into fertility with age TODO: we need to introduce a sigmoid for a gradual decline in the fertility of women Reference: www.bcm.edu/news/item.cfm?newsID=66 TODO: to get a proper reference |
Agent |
findBestEndorsedSuitor()
Find the best endorsded suitor for me. |
void |
findFuneralClub()
Find me a funeral club |
java.util.ArrayList<Agent> |
findRandomFemales()
now here, we must implement assortative mixing and age specific rules depending upon the men's preferences |
java.util.ArrayList<Agent> |
findSuitableFemalePartners(java.util.ArrayList<Agent> availableFemales)
Find suitabl femal partners for me. |
void |
flushMembership()
|
java.util.ArrayList<Agent> |
getAcceptances()
|
java.lang.String |
getAchievedEducation()
Get my achieved education status |
java.util.ArrayList<Agent> |
getAcquaintances()
Get my acquaintances list |
int |
getAge()
Get my age |
int |
getAgeGroup()
Get my age group |
double |
getAspirationLevel()
|
double |
getBase()
|
int |
getBirthTick()
Get my birth month |
int |
getCourtShipDuration()
|
int |
getDeathTick()
|
Household |
getElderSiblingOrAuntHousehold()
|
Household |
getEmployer()
|
int |
getExpectedLife()
Return my expected life |
int |
getFatherID()
Return my father id |
int |
getFatherOfMyChildID()
Get the father id of the child I have delivered |
int |
getFeedStatus()
Return feed status |
int |
getFertilityAgeLimit()
Get fertility age limit |
java.util.ArrayList<Agent> |
getFriends()
Get my friends |
int |
getGender()
Get my gender |
Household |
getGPHousehold()
Get the grandparent's household, if it exists |
Grant |
getGrant()
|
int |
getGrantValue()
Get my grant value |
int |
getHealthCount()
Get my health count |
int |
getHealthStatus()
Get my health status |
Household |
getHousehold()
Get my household |
int |
getHouseHoldID()
Get my health count |
int |
getId()
Get my Id |
int |
getInfectedLag()
Get my infected lag |
int |
getInfectedTick()
Get my infected |
int |
getLastVisit()
|
int |
getLateLag()
Return lag for Late HIV Stage |
int |
getMaritalStatus()
Return my marital status |
int |
getMaternalHouseholdID()
Get my pre-marriage household id |
int |
getMaxOutsiderWaitingMonths()
|
int |
getMaxSexualPartners()
Get my sexual partenrs list |
boolean |
getMemberFuneralClub()
Get my funeral club |
int |
getMidLag()
Get lag for mid HIV Stage |
int |
getMigratedTick()
|
int |
getMotherID()
Return my mother id |
java.lang.String[] |
getNegativeEndorsements()
|
int |
getNumEndorsementClasses()
|
int |
getNumMonthsOutsiderArrival()
|
int |
getNumStokvelTries()
|
java.util.ArrayList<Agent> |
getOffSprings()
|
void |
getPieceWork(int currentTick)
Get piecwork for this agent |
java.lang.String[] |
getPositiveEndorsements()
|
java.util.ArrayList<Agent> |
getPotentialFemales()
Get my potential female partners list |
Agent |
getPotentialPartner()
|
int |
getPregnancyTick()
Get my household |
java.util.ArrayList<Agent> |
getProposers()
|
double |
getQuality()
|
int |
getRemittance_Amount()
Return my remittance |
java.util.ArrayList<Agent> |
getSexualPartners()
Get my sexual partenrs list |
java.util.ArrayList<Message> |
getSexualPartnershipMessageInbox()
|
java.util.ArrayList<Message> |
getSexualPartnershipMessageOutbox()
|
Agent |
getSpouse()
Return my spouse if married |
int |
getSpouseID()
Return my spouse id |
protected java.util.ArrayList<Agent> |
getStokvelCandidates()
Return stokvel candidates for the new stokvel |
java.util.ArrayList<Message> |
getStovelMessageInbox()
|
java.util.ArrayList<Message> |
getStovelMessageOutbox()
|
int |
getWaitingThreshold()
|
int |
getWaitingTime()
|
void |
handleAcceptance(Message message)
handle acceptance for stokvel invitation |
void |
handleCourshipAcceptance(Message message)
handle acceptance for courtship offer |
void |
handleCourshipRejection(Message message)
handle rejection for courtship offer |
void |
handleCourtshipOffer(Message message)
handle offer for courtship |
void |
handleIntivation(Message message)
Handle stokvel invitation |
void |
handleMessage(Message message)
Handle stokvel related message |
void |
handleRejection(Message message)
handle rejection for stokvel invitation |
void |
handleSexualPartnershipMessage(Message message)
Handle messages related to formation of sexual partnerships |
boolean |
hasHIV()
Is having HIV/AIDS? |
void |
hivTreatment(int currentTick)
Add me to the clinic |
void |
incNumStokvelTries()
|
void |
increaseAspiration()
Inmcrease aspiration |
void |
incrementAge()
Increase age |
void |
initialize()
Initialize settings for village agents |
void |
initializeAgeGroup()
Initialize age groups |
void |
initializeCourtshipSettings()
from the marriage model ... |
private void |
initializeFertlityLimit()
Assign fertility age limit |
void |
initializeFriends()
friendship is dyadic (symmetric) a and there's another starting assumption that no two friends belong to the same household .. |
void |
initializeOutsider()
Initialize settings for Outsider agents |
boolean |
isAlive()
Am I alive? |
boolean |
isAspirationFit(Agent potentialPartner)
|
boolean |
isAtSchool()
Am I at school |
boolean |
isCommitted()
|
boolean |
isHead()
Am I a head |
boolean |
isInnovator()
Am I innovator |
boolean |
isLaborFit()
Am I labor fir |
boolean |
isLaborFit(int currentTick)
following meeting with Gina at Aberdeen ... |
boolean |
isMemberSavings()
|
boolean |
isMigrated()
Have I migrated |
boolean |
isMineJob()
Am I on mine job |
boolean |
isMineTrained()
Am I mine trained |
boolean |
isNuclearFamilyRelation(Agent agent)
Check if I have a nuclear family relation with this agent |
boolean |
isOnVisit()
|
boolean |
isOrphan()
Is this one an orphan |
boolean |
isOutsider()
Am I an outsider |
boolean |
isPieceJob()
Am I on piecejob |
boolean |
isPregnant()
is pregnant |
boolean |
isPullOutMembership()
Am I pulling out from stokvel |
boolean |
isSavingsPossible()
Check if I can join a stokvel |
boolean |
isSingleMother()
Am I single mother |
boolean |
isUncleOrAunty(Agent agent)
Check if this is my uncle or aunty |
boolean |
isWouldGetChildGrant()
Get my chance for child grant |
boolean |
isWouldGetDisabilityGrant()
Get my chance for disability grant |
boolean |
isWouldGetPension()
Get my chance for pension |
boolean |
isYoungestSon()
currently, it's not the youngest ... |
void |
makeFriend(Agent friend)
Make new friend |
void |
makePregnanct(int currentTick)
Set as pregnant at this step |
void |
migrate(int currentTick)
I migrate at this time |
boolean |
pregnancyPossible(int currentTick)
Is pregnancy possible |
void |
printMyCurrentProfile()
Print my current profile |
void |
processSexualPartnershipInbox()
Process my proposals and messages for forming sexual relationship |
void |
processSexualPartnershipOutbox(java.util.ArrayList<Agent> females)
Process my proposals and messages for forming sexual relationship |
void |
processStokvelInbox()
Processes stokvel messages inbox |
void |
processStokvelOutbox()
Processes stokvel messages outbox |
void |
removeFriend(Agent friend)
Remove this friend from my friendship network |
void |
resetMyCouples()
Remove all my sexual relations |
boolean |
resumeMigration(int currentTick)
break up with all current sexual partners except the spouse |
Household |
retrieveGPHousehold(Agent parent)
Get grandparent's household: maternal or paternal depending upon the parent |
Agent |
returnAcquaintanceCity()
Return an acquaintance who has already migrated |
java.util.ArrayList<Agent> |
returnFemaleAcquaintances()
Return my female acquaintances |
java.util.ArrayList<Agent> |
returnFemaleFriends()
Return my female friends |
int |
returnIndexOf(java.lang.String str,
int endorsementType)
|
int |
returnMyMineJobEarning()
Return my renumeration from mine |
int |
returnMyPieceWorkEarning()
Return my renumeration from piecework |
int |
returnMyRemittance()
again magic assumptions ... |
void |
sendAcceptance(Message message)
send acceptance for stokvel invitation |
void |
sendCourtshipAcceptnce(Agent proposer)
send offer for courtship |
void |
sendCourtShipInvitation()
Send courtship offer to suitable females |
void |
sendCourtshipRejection(Agent proposer)
send rejection for courtship offer |
void |
sendInvitation()
Send invitation to join stokvel |
void |
sendInvitation2()
|
void |
sendRejection(Message message)
send rejection for stokvel invitation |
boolean |
sendStokvelInvitation()
send invitation to join stokvel |
void |
setAcceptances(java.util.ArrayList<Agent> acceptances)
|
void |
setAchievedEducation(java.lang.String educationLevel)
Set my achieved education status |
void |
setAcquaintances(java.util.ArrayList<Agent> acquaintances)
Set my acquaintances list |
void |
setAge(int _age)
Set my age |
void |
setAgeGroup(int _ageGroup)
Set my age group |
void |
setAlive(boolean _alive)
set life status |
void |
setAspirationLevel(double aspirationLevel)
|
void |
setAtSchool(boolean atSchool)
|
void |
setBase(double base)
|
void |
setBirthTick(int birthTick)
Set my birth month |
void |
setCommitted(boolean _committed)
|
void |
setCourtShipDuration(int courtShipDuration)
|
void |
setDeathTick(int deathTick)
|
void |
setEmployer(Household employer)
|
void |
setExpectedLife(int expectedLife)
Set my expected life |
void |
setFatherID(int fatherID)
Set my father id |
void |
setFatherOfMyChildID(int fatherOfMyChildID)
Set the father id of the child I have delivered |
void |
setFeedStatus(int feedStatus)
Set feed status |
void |
setFertilityAgeLimit(int fertilityAge)
Set fertility age limit |
void |
setFriends(java.util.ArrayList<Agent> friends)
set my friends |
void |
setGender(int gender)
Set my age group |
void |
setGrant(Grant _grant)
|
void |
setGrant(int grantType)
|
void |
setHead(boolean isHead)
Make me household head |
void |
setHealthCount(int _healthCount)
Set my health count |
void |
setHealthStatus(int _healthStatus)
Set my health status |
void |
setHousehold(Household household)
Set my household |
void |
setHouseHoldID(int houseHoldID)
Set my health count |
void |
setId(int id)
Set my Id |
void |
setInfectedTick(int currentTick)
this method used for monthly scale |
void |
setInnovator(boolean isInnovator)
Make me an innovator |
void |
setIsMemberFuneralClub(boolean _isMemberFuneralClub)
|
void |
setLaborFit(boolean laborFit)
Set my fitness status |
void |
setLastVisit(int lastVisit)
|
void |
setLateLag(int lateLag)
Set lag for Late HIV Stage |
void |
setMaritalStatus(int maritalStatus)
Set my marital status |
void |
setMaternalHouseholdID(int maternalHouseholdID)
Set my pre-marriage household id |
private void |
setMaxSexualPartners()
Set Maximum sexual partners |
void |
setMaxSexualPartners(int maxSexualPartners)
Set my sexual partenrs list |
void |
setMemberSavings(boolean _isMemberSavings)
|
void |
setMidLag(int midLag)
Set lag for mid HIV Stage |
void |
setMigrated(boolean isMigrated)
Set me as migrated |
void |
setMineJob(boolean mineJob)
|
void |
setMineTrained(boolean mineTrained)
|
void |
setMotherID(int motherID)
Set my mother id |
void |
setNumEndorsementClasses(int maximumWeightForEndorsementClasses)
|
void |
setNumMonthsOutsiderArrival(int numMonthsOutsiderArrival)
|
void |
setNumStokvelTries(int n)
|
void |
setOnVisit(boolean onVisit)
|
void |
setOrphan(boolean isOrphan)
make orphan |
void |
setOutsider(boolean outsider)
Set I am an outsider |
void |
setPieceJob(boolean isPieceJob)
|
void |
setPotentialFemales(java.util.ArrayList<Agent> potentialFemales)
Set my potential female partners list |
void |
setPotentialPartner(Agent potentialPartner)
|
void |
setPregnancyTick(int pregnancyTick)
Set my household |
void |
setPregnant(boolean pregnant)
|
void |
setPullOutMembership(boolean pullOutMembership)
Set me as pulling out from stokvel |
void |
setQuality(double baseQuality)
|
void |
setRemittance_Amount(int remittance_Amount)
Set my remittance |
void |
setSavingsPool(int sum)
|
void |
setSexualPartners(java.util.ArrayList<Agent> sexualPartners)
Set my sexual partenrs list |
void |
setSexualPartnershipMessageInbox(java.util.ArrayList<Message> sexInbox)
|
void |
setSexualPartnershipMessageOutbox(java.util.ArrayList<Message> sexOutbox)
|
void |
setSingleMother(boolean singleMother)
Set single mother |
void |
setSpouseID(int spouseID)
Sets my spouse id |
void |
setStovelMessageInbox(java.util.ArrayList<Message> inbox)
|
void |
setStovelMessageOutbox(java.util.ArrayList<Message> outbox)
|
void |
setWaitingThreshold(int waitingThreshold)
|
void |
setWaitingTime(int waitingTime)
|
void |
setWouldGetChildGrant(boolean wouldGetChildGrant)
Set my chance for child grant |
void |
setWouldGetDisabilityGrant(boolean wouldGetDisabilityGrant)
Set my chance for disability grant |
void |
setWouldGetPension(boolean wouldGetPension)
Set my chance for child grant |
boolean |
shouldMigrate()
Post-Validation and Post-Fieldtrip* Decide whether should I migrate or not |
boolean |
shouldSendOffer(Agent potentialPartner)
Should send offer to this potential partner |
boolean |
shouldSendOffer2(Agent potentialPartner)
|
boolean |
shouldSendOfferOutsider(Agent potentialPartner)
Should send offer to this potential partner - called if I am an outsider agent |
void |
stokvelTries(int currentTick)
|
boolean |
stopMigration(int currentTick)
Migration stopped; returned to village. |
void |
tryBestFemale()
Find the best female potential partner |
void |
tryBestProposer()
Find the best male suitor |
void |
updateAge()
Update my age and age groups |
void |
updateAspirationLevel()
Update my aspiration level (Heuveline et al. |
void |
updateCourtshipThreshold()
Update my courtship duration with age |
void |
updateFriendshipGui()
Update my friendship network gui |
private void |
updateGrantChances()
Update my grant chances |
void |
updateHealthCount(int currentTick)
this only updates the health count of agents regardless of their age and sex and HIV ... |
void |
updateHealthStatus(int currentTick)
Update My health stauts |
void |
updateHIVHealthStatus(int currentTick)
Decay health of agents having HIV/AIDS late stages |
void |
updateOutsiderProfile(int currentTick)
Updates age and health of outsider agents |
void |
updateProfile(int currentTick)
Update agents' profile at every step; includes ageing, death, pregnancy, health status and health count |
void |
visitHome(int currentTick)
It is assumed that a migrant agent sends the remittances every month through someone. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int id
private int gender
private int houseHoldID
private int maternalHouseholdID
private int healthStatus
private int age
private Grant grant
private Model model
private Household household
private int maritalStatus
private int motherID
private int fatherID
private int spouseID
private int ageGroup
private boolean alive
private boolean orphan
private java.lang.String achievedEducation
private boolean atSchool
private int healthCount
private int feedStatus
private boolean head
private boolean singleMother
private boolean pregnant
private int fatherOfMyChildID
private int expectedLife
private int birthTick
private int deathTick
private int infectedTick
private int infectedAge
private int pregnancyTick
private int infectedLag
private boolean innovator
private boolean memberSavings
private boolean pullOutMembership
private boolean committed
private java.util.ArrayList<Agent> friends
private java.util.ArrayList<Agent> invited
private java.util.ArrayList<Agent> acceptances
private double lastTryStokvel
private int numStokvelTries
public static int INVITE
public static int INVITE2
public static int ACCEPT
public static int REJECT
public static int STOKVEL
private boolean memberFuneralClub
private int numMigrationTries
private int lastMigrationTry
private boolean laborFit
private boolean pieceJob
private boolean migrated
private int migratedTick
private int singleRemittanceLimit
private int remittance_Amount
private boolean onVisit
private int lastVisit
private int fertilityAgeLimit
private Household employer
private java.util.ArrayList<Message> stovelMessageInbox
private java.util.ArrayList<Message> stovelMessageOutbox
private java.util.ArrayList<Message> sexualPartnershipMessageInbox
private java.util.ArrayList<Message> sexualPartnershipMessageOutbox
private java.lang.String[] positiveEndorsements
private java.lang.String[] negativeEndorsements
private double base
private int numEndorsementClasses
private int[] positiveEndosrsementValues
private int[] negativeEndosrsementValues
private double quality
private double aspirationLevel
private int waitingThreshold
private int waitingTime
private int courtShipDuration
private int maxCourtShipDuration
private Agent potentialPartner
private java.util.ArrayList<Agent> proposers
private java.util.ArrayList<Agent> sexualPartners
private int maxSexualPartners
private java.util.ArrayList<Agent> potentialFemales
private java.util.ArrayList<Agent> offSprings
private boolean wouldGetChildGrant
private boolean wouldGetDisabilityGrant
private boolean wouldGetPension
private boolean mineTrained
private boolean mineJob
private boolean outsider
private int numMonthsOutsiderArrival
private int maxOutsiderWaitingMonths
private int midLag
private int lateLag
private java.util.ArrayList<Agent> acquaintances
Constructor Detail |
---|
public Agent()
public Agent(int _id)
public Agent(int _id, Household _household, Model _model)
public Agent(int _id, int _gender, int _ageGroup, int _healthStatus, Household _household, Model _model)
_id
- _gender
- _ageGroup
- _healthStatus
- _household
- _model
- public Agent(int _id, Model _model)
public Agent(int _id, int _gender, int _healthStatus, Household _household, Model _model)
Method Detail |
---|
public void initializeOutsider()
public void initialize()
private void updateGrantChances()
private void initializeFertlityLimit()
public void initializeCourtshipSettings()
private void setMaxSexualPartners()
public void initializeFriends()
public void assignEndorsmentValues()
public void incrementAge()
public void setAlive(boolean _alive)
public boolean isAlive()
public void education(int currentTick)
public void updateProfile(int currentTick)
public void updateHIVHealthStatus(int currentTick)
public void updateOutsiderProfile(int currentTick)
public boolean shouldMigrate()
public Agent returnAcquaintanceCity()
public void updateHealthCount(int currentTick)
public void updateHealthStatus(int currentTick)
public void fastDecayHealth(int currentTick)
public void updateAge()
public void checkDeath()
public Household getGPHousehold()
public Household getElderSiblingOrAuntHousehold()
public boolean fertility(int currentTick)
public Household retrieveGPHousehold(Agent parent)
parent
-
public boolean isLaborFit(int currentTick)
public boolean isYoungestSon()
public int returnMyRemittance()
public int returnMyMineJobEarning()
public int returnMyPieceWorkEarning()
public boolean askFood(Agent friend)
public boolean feedFriend(Agent agent)
public void hivTreatment(int currentTick)
public void attemptMigration(int currentTick)
public void migrate(int currentTick)
public void getPieceWork(int currentTick)
public void applyForPieceWork(int currentTick)
public void sendInvitation()
public void sendInvitation2()
protected java.util.ArrayList<Agent> getStokvelCandidates()
public void createStokvel()
public int getFatherID()
public void setFatherID(int fatherID)
public int getMotherID()
public void setMotherID(int motherID)
public int getMaritalStatus()
public void setMaritalStatus(int maritalStatus)
public boolean isOrphan()
public void setOrphan(boolean isOrphan)
public int getSpouseID()
public void setSpouseID(int spouseID)
public int getExpectedLife()
public void setExpectedLife(int expectedLife)
public void setInfectedTick(int currentTick)
public int getInfectedTick()
public int getFeedStatus()
public void setFeedStatus(int feedStatus)
public int getRemittance_Amount()
public void setRemittance_Amount(int remittance_Amount)
public boolean isInnovator()
public void setInnovator(boolean isInnovator)
public boolean isMemberSavings()
public void setMemberSavings(boolean _isMemberSavings)
public boolean isHead()
public void setHead(boolean isHead)
public java.util.ArrayList<Agent> getFriends()
public void setFriends(java.util.ArrayList<Agent> friends)
public boolean isPullOutMembership()
public void setPullOutMembership(boolean pullOutMembership)
public void setSavingsPool(int sum)
public void flushMembership()
public java.util.ArrayList<Agent> getAcceptances()
public void setAcceptances(java.util.ArrayList<Agent> acceptances)
public boolean isCommitted()
public void setCommitted(boolean _committed)
public int getNumStokvelTries()
public void setNumStokvelTries(int n)
public void incNumStokvelTries()
public void decNumStokvelTries()
public void findFuneralClub()
public boolean getMemberFuneralClub()
public void setIsMemberFuneralClub(boolean _isMemberFuneralClub)
public boolean isMigrated()
public void setMigrated(boolean isMigrated)
public int getMigratedTick()
public int getMaternalHouseholdID()
public void setMaternalHouseholdID(int maternalHouseholdID)
public Household getHousehold()
public void setHousehold(Household household)
public void makeFriend(Agent friend)
public void clearAllFriends()
public void clearAllSexualPartners()
public void updateFriendshipGui()
public int getPregnancyTick()
public void setPregnancyTick(int pregnancyTick)
public void stokvelTries(int currentTick)
public boolean isLaborFit()
public void setLaborFit(boolean laborFit)
public boolean isPieceJob()
public void setPieceJob(boolean isPieceJob)
public void setAge(int _age)
public int getAge()
public int getGrantValue()
public Grant getGrant()
public void setGrant(Grant _grant)
public void setGrant(int grantType)
public int getAgeGroup()
public void setAgeGroup(int _ageGroup)
public int getGender()
public void setGender(int gender)
public int getHealthCount()
public void setHealthCount(int _healthCount)
public void setHealthStatus(int _healthStatus)
public int getHealthStatus()
public int getHouseHoldID()
public void setHouseHoldID(int houseHoldID)
public int getId()
public void setId(int id)
public void printMyCurrentProfile()
public Household getEmployer()
public void setEmployer(Household employer)
public int getInfectedLag()
public void processStokvelInbox()
public void processStokvelOutbox()
public void processSexualPartnershipOutbox(java.util.ArrayList<Agent> females)
females
- public void sendCourtShipInvitation()
public void processSexualPartnershipInbox()
public void handleSexualPartnershipMessage(Message message)
message
- public void handleCourtshipOffer(Message message)
public void assignAspiration()
public void tryBestProposer()
public void tryBestFemale()
public void sendCourtshipAcceptnce(Agent proposer)
public void sendCourtshipRejection(Agent proposer)
public void handleCourshipAcceptance(Message message)
public void handleCourshipRejection(Message message)
public boolean sendStokvelInvitation()
public boolean isSavingsPossible()
public void handleMessage(Message message)
public void handleIntivation(Message message)
public void sendAcceptance(Message message)
public void handleAcceptance(Message message)
public boolean endogamicRelation(Agent agent)
public boolean isNuclearFamilyRelation(Agent agent)
public boolean isUncleOrAunty(Agent agent)
public void sendRejection(Message message)
public void handleRejection(Message message)
public java.util.ArrayList<Message> getStovelMessageInbox()
public void setStovelMessageInbox(java.util.ArrayList<Message> inbox)
public java.util.ArrayList<Message> getStovelMessageOutbox()
public void setStovelMessageOutbox(java.util.ArrayList<Message> outbox)
public java.lang.String getAchievedEducation()
public void setAchievedEducation(java.lang.String educationLevel)
public boolean isAtSchool()
public void setAtSchool(boolean atSchool)
public int getFertilityAgeLimit()
public void setFertilityAgeLimit(int fertilityAge)
public double getBase()
public void setBase(double base)
public int getNumEndorsementClasses()
public void setNumEndorsementClasses(int maximumWeightForEndorsementClasses)
public java.lang.String[] getNegativeEndorsements()
public java.lang.String[] getPositiveEndorsements()
public double calculateEndorsement(Agent agent)
public int returnIndexOf(java.lang.String str, int endorsementType)
public double getAspirationLevel()
public void setAspirationLevel(double aspirationLevel)
public double getQuality()
public void setQuality(double baseQuality)
public int getCourtShipDuration()
public void setCourtShipDuration(int courtShipDuration)
public int getWaitingThreshold()
public void setWaitingThreshold(int waitingThreshold)
public int getWaitingTime()
public void setWaitingTime(int waitingTime)
public Agent getPotentialPartner()
public void setPotentialPartner(Agent potentialPartner)
public java.util.ArrayList<Agent> getProposers()
public boolean isAspirationFit(Agent potentialPartner)
public boolean shouldSendOffer(Agent potentialPartner)
public boolean shouldSendOffer2(Agent potentialPartner)
public boolean shouldSendOfferOutsider(Agent potentialPartner)
public Agent findBestEndorsedSuitor()
public Agent chooseMaleSexualPartner2()
public Agent chooseMaleSexualPartner()
public void courtshipBroken(Agent partner)
public void updateCourtshipThreshold()
public void updateAspirationLevel()
public java.util.ArrayList<Agent> findSuitableFemalePartners(java.util.ArrayList<Agent> availableFemales)
public java.util.ArrayList<Agent> findRandomFemales()
public void decreaseAspiration()
public void increaseAspiration()
public int getBirthTick()
public void setBirthTick(int birthTick)
public java.util.ArrayList<Agent> getSexualPartners()
public void setSexualPartners(java.util.ArrayList<Agent> sexualPartners)
public int getMaxSexualPartners()
public void setMaxSexualPartners(int maxSexualPartners)
public boolean isMineTrained()
public void setMineTrained(boolean mineTrained)
public boolean isMineJob()
public void setMineJob(boolean mineJob)
public boolean isOutsider()
public void setOutsider(boolean outsider)
public int getNumMonthsOutsiderArrival()
public void setNumMonthsOutsiderArrival(int numMonthsOutsiderArrival)
public int getMaxOutsiderWaitingMonths()
public int compareTo(java.lang.Object anotherAgent) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable
java.lang.ClassCastException
public boolean isOnVisit()
public void setOnVisit(boolean onVisit)
public void visitHome(int currentTick)
public int getLastVisit()
public void setLastVisit(int lastVisit)
public boolean resumeMigration(int currentTick)
public boolean stopMigration(int currentTick)
public java.util.ArrayList<Agent> getOffSprings()
public boolean birthPossible(int currenTick)
currenTick
-
public Agent getSpouse()
public boolean isSingleMother()
public void setSingleMother(boolean singleMother)
public boolean isPregnant()
public void setPregnant(boolean pregnant)
public int getFatherOfMyChildID()
public void setFatherOfMyChildID(int fatherOfMyChildID)
public int getDeathTick()
public void setDeathTick(int deathTick)
public void initializeAgeGroup()
public void resetMyCouples()
public void makePregnanct(int currentTick)
public boolean pregnancyPossible(int currentTick)
public boolean hasHIV()
public int getLateLag()
public void setLateLag(int lateLag)
public int getMidLag()
public void setMidLag(int midLag)
public void removeFriend(Agent friend)
public java.util.ArrayList<Agent> returnFemaleFriends()
public java.util.ArrayList<Agent> returnFemaleAcquaintances()
public boolean availableAtVillage()
public java.util.ArrayList<Agent> getAcquaintances()
public void setAcquaintances(java.util.ArrayList<Agent> acquaintances)
public java.util.ArrayList<Message> getSexualPartnershipMessageInbox()
public void setSexualPartnershipMessageInbox(java.util.ArrayList<Message> sexInbox)
public java.util.ArrayList<Message> getSexualPartnershipMessageOutbox()
public void setSexualPartnershipMessageOutbox(java.util.ArrayList<Message> sexOutbox)
public java.util.ArrayList<Agent> getPotentialFemales()
public void setPotentialFemales(java.util.ArrayList<Agent> potentialFemales)
public boolean isWouldGetDisabilityGrant()
public void setWouldGetDisabilityGrant(boolean wouldGetDisabilityGrant)
public boolean isWouldGetChildGrant()
public void setWouldGetChildGrant(boolean wouldGetChildGrant)
public boolean isWouldGetPension()
public void setWouldGetPension(boolean wouldGetPension)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |