|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cfpm.caves.za.FactBaseScourer
public class FactBaseScourer
Goes through all the facts and updates agents and households accordingly. Used to outsource procedural / slow stuff from Jess to Java
Field Summary | |
---|---|
(package private) jess.Rete |
engine
reference to the Jess engine |
(package private) SouthAfricaModel |
model
reference to the model |
Constructor Summary | |
---|---|
FactBaseScourer(SouthAfricaModel model)
Creates a new fact base scourer for the given model |
Method Summary | |
---|---|
private void |
computeKinshipProportion(java.util.HashMap<NetworkNode,java.util.ArrayList<NetworkNode>> network)
internal helper method applied to the friendship network |
private void |
computeReciprocalLinkProportion(java.util.HashMap<NetworkNode,java.util.ArrayList<NetworkNode>> network)
internal helper method applied to the friendship network |
(package private) void |
evolveTags(java.util.ArrayList<jess.Fact> friendships)
evolves the tags of agents so that -- according to their tag evolution propensity -- they become more similar to their best friends |
void |
update()
Runs through the fact base and sorts facts needed for updates into several array lists: friends, endorsements, payments and employments. |
(package private) void |
updateExpectedIncome(java.util.ArrayList<jess.Fact> employments)
Update each household's expected income from the employment facts, once every month. |
(package private) void |
updateFriends(java.util.ArrayList<jess.Fact> endorsements)
Maintain the friendship network. |
(package private) void |
updateHouseholdCash(java.util.ArrayList<jess.Fact> payments)
Updates each household's cash from the payments made and received the previous tick. |
(package private) void |
updateKnownPersons(java.util.ArrayList<jess.Fact> endorsements)
updates the list of known persons for every agent by turning every endorsed agent into a known person (if they are not already known). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
SouthAfricaModel model
jess.Rete engine
Constructor Detail |
---|
public FactBaseScourer(SouthAfricaModel model)
Method Detail |
---|
public void update()
void evolveTags(java.util.ArrayList<jess.Fact> friendships)
friendships
- list of facts with "is-friend" endorsementsvoid updateKnownPersons(java.util.ArrayList<jess.Fact> endorsements)
endorsements
- list of endorsement factsvoid updateFriends(java.util.ArrayList<jess.Fact> endorsements)
endorsements
- list of "is-friend" endorsementsvoid updateHouseholdCash(java.util.ArrayList<jess.Fact> payments)
payments
- list of payment factsvoid updateExpectedIncome(java.util.ArrayList<jess.Fact> employments)
employments
- list of employment factsprivate void computeReciprocalLinkProportion(java.util.HashMap<NetworkNode,java.util.ArrayList<NetworkNode>> network)
private void computeKinshipProportion(java.util.HashMap<NetworkNode,java.util.ArrayList<NetworkNode>> network)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |