de.cesr.more.rs.building
Class MGroupBaselineRadiusNetworkService<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>

java.lang.Object
  extended by de.cesr.more.building.network.MNetworkService<AgentType,EdgeType>
      extended by de.cesr.more.rs.building.MRsNetworkService<AgentType,EdgeType>
          extended by de.cesr.more.rs.building.MGeoRsNetworkService<AgentType,EdgeType>
              extended by de.cesr.more.rs.building.MGeoRsBaselineRadiusNetworkService<AgentType,EdgeType>
                  extended by de.cesr.more.rs.building.MGroupBaselineRadiusNetworkService<AgentType,EdgeType>
All Implemented Interfaces:
MoreNetworkBuilder<AgentType,EdgeType>, MoreNetworkService<AgentType,EdgeType>, MoreGeoNetworkBuilder<AgentType,EdgeType>, MoreGeoNetworkService<AgentType,EdgeType>, MoreNetworkEdgeModifier<AgentType,EdgeType>, MoreNetworkModifier<AgentType,EdgeType>, MoreGeoRsNetworkBuilder<AgentType,EdgeType>, MoreGeoRsNetworkService<AgentType,EdgeType>, MoreRsNetworkBuilder<AgentType,EdgeType>, MoreRsNetworkService<AgentType,EdgeType>

public class MGroupBaselineRadiusNetworkService<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
extends MGeoRsBaselineRadiusNetworkService<AgentType,EdgeType>

MORe This network builder considers baseline homophily (McPherson2001). Additional to MGeoRsBaselineRadiusNetworkService it also completely links agent within a group context (in general, the agents parental context). Agents are linked as follows:

  1. Connect every agent with all other agents within the same group context. This may not entirely reflect the agents' preferences regarding partner milieus. However, a group is as it is and may not be altered by the focal agent. Nevertheless an agent may choose the place he or she wants to live. These choices are represented in the market cell distributions the agent initialisation is based upon.
  2. For every agent in the context
    1. Fetch all agents within a given radius (SEARCH_RADIUS) from the focal agent (do not consider area boundaries).
    2. For every potential partner that is not yet connected check according to milieu specific probability if it should be connected with focal agent. The approach to check the agents that are in the surroundings as they come considers the local milieu distribution and reflects baseline homophily. Applying milieu specific tie probabilities reflects inbreeding homophily.
    3. If the number of required neighbours is not satisfied but all fetched agents checked, request more agents from geography within an extended radius (X_SEARCH_RADIUS) until maximum radius ( MAX_SEARCH_RADIUS) is reached.
  3. Rewire: For each agent, check if every existing link should be rewired (with probability p_rewire) to a randomly chosen agent from the whole region that passes the milieu check (applying milieu tie probabilities ( p_links for every partnerMilieu). On purpose the new partner's milieu is not guaranteed to be the same as that of the original link: The partners within direct surroundings are coined by local milieu distributions (baseline homophly) and therefore do not entirely reflect the focal agent's preferences. Determining the milieu during rewiring anew may correct to milieu distributions of partners towards inbreeeding homophily and is desired.
Uses MGeographyWrapper.getSurroundingAgents(Object, double, Class) to fetch agents (all agents within the given radius of the given class). Internal: The BaselineDhhRadiusNetworkBuilder is based on DHH_ColCalc_Computer_Lifestyle.

Date:
02.12.2011

Field Summary
 
Fields inherited from class de.cesr.more.rs.building.MGeoRsBaselineRadiusNetworkService
agentList, CHECKED_NEIGHBOURS_CAPACITY_FACTOR, name, paraMap, partnerFinder, rand
 
Fields inherited from class de.cesr.more.rs.building.MGeoRsNetworkService
geoFactory, geography, geoRequestClass, pm
 
Fields inherited from class de.cesr.more.rs.building.MRsNetworkService
context
 
Fields inherited from class de.cesr.more.building.network.MNetworkService
edgeFac, edgeModifier
 
Constructor Summary
MGroupBaselineRadiusNetworkService(repast.simphony.space.gis.Geography<Object> geography, MoreEdgeFactory<AgentType,EdgeType> edgeFac, String name)
           
 
Method Summary
 MoreRsNetwork<AgentType,EdgeType> buildNetwork(Collection<AgentType> agents)
          NOTE: Agents is not used since the collection of agents is taken from context!
protected  void connectGroupContext(Collection<AgentType> agents, MoreRsNetwork<AgentType,EdgeType> network)
          Connect each agent with every other agent within the same group context.
 void rewire(Collection<AgentType> agents, MMilieuNetworkParameterMap networkParams, MoreRsNetwork<AgentType,EdgeType> network)
          NOTE: Make sure that the order of agents in agents is defined and consistent for equal random seeds!
 
Methods inherited from class de.cesr.more.rs.building.MGeoRsBaselineRadiusNetworkService
addAndLinkNode, checkParameter, connectAgent, createRadiusNetwork, getAgentList, getRandomFromContext, getRequestClass, globalLinking, toString
 
Methods inherited from class de.cesr.more.rs.building.MGeoRsNetworkService
getGeoRequestClass, logEdges, setContext, setGeography, setGeoRequestClass, shuffleCollection
 
Methods inherited from class de.cesr.more.building.network.MNetworkService
addAgents, checkAgentCollection, createEdge, getEdgeFactory, getEdgeModifier, logEdges, removeEdge, removeNode, setEdgeModifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.cesr.more.manipulate.network.MoreNetworkModifier
removeNode, setEdgeModifier
 
Methods inherited from interface de.cesr.more.manipulate.edge.MoreNetworkEdgeModifier
createEdge, getEdgeFactory, removeEdge
 

Constructor Detail

MGroupBaselineRadiusNetworkService

public MGroupBaselineRadiusNetworkService(repast.simphony.space.gis.Geography<Object> geography,
                                          MoreEdgeFactory<AgentType,EdgeType> edgeFac,
                                          String name)
Method Detail

buildNetwork

public MoreRsNetwork<AgentType,EdgeType> buildNetwork(Collection<AgentType> agents)
NOTE: Agents is not used since the collection of agents is taken from context! For each agent: For each potential neighbour in surroundings: Connect according to network parameter map. Then, rewire and finally make sure the neighbourhood is completely connected.

Specified by:
buildNetwork in interface MoreNetworkBuilder<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
Specified by:
buildNetwork in interface MoreRsNetworkBuilder<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
Overrides:
buildNetwork in class MGeoRsBaselineRadiusNetworkService<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
Returns:
network
See Also:
de.cesr.more.building.MoreNetworkBuilder#buildNetwork(java.util.Collection)

rewire

public void rewire(Collection<AgentType> agents,
                   MMilieuNetworkParameterMap networkParams,
                   MoreRsNetwork<AgentType,EdgeType> network)
NOTE: Make sure that the order of agents in agents is defined and consistent for equal random seeds!

Parameters:
network -
agents -
networkParams -

connectGroupContext

protected void connectGroupContext(Collection<AgentType> agents,
                                   MoreRsNetwork<AgentType,EdgeType> network)
Connect each agent with every other agent within the same group context.

Parameters:
agents -
network -