de.cesr.more.rs.building
Class MGroupBaselineRadiusNetworkService<AgentType extends MoreMilieuAgent,EdgeType extends MRepastEdge<AgentType>>
java.lang.Object
de.cesr.more.building.network.MNetworkService<AgentType,EdgeType>
de.cesr.more.rs.building.MRsNetworkService<AgentType,EdgeType>
de.cesr.more.rs.building.MGeoRsNetworkService<AgentType,EdgeType>
de.cesr.more.rs.building.MGeoRsBaselineRadiusNetworkService<AgentType,EdgeType>
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:
- 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.
- For every agent in the context
- Fetch all agents within a given radius (
SEARCH_RADIUS
) from the focal agent (do not consider area
boundaries).
- 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.
- 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.
- 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
MGroupBaselineRadiusNetworkService
public MGroupBaselineRadiusNetworkService(repast.simphony.space.gis.Geography<Object> geography,
MoreEdgeFactory<AgentType,EdgeType> edgeFac,
String name)
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
-