de.cesr.more.basic.agent
Class MAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>

java.lang.Object
  extended by de.cesr.more.basic.agent.MAgentNetworkComp<A,E>
      extended by de.cesr.more.basic.agent.MAgentAnalyseNetworkComp<A,E>
All Implemented Interfaces:
MoreAgentAnalyseNetworkComp<A,E>, MoreAgentNetworkComp<A,E>, MoreDistanceAttachableAgent

public class MAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
extends MAgentNetworkComp<A,E>
implements MoreAgentAnalyseNetworkComp<A,E>

MORe TODO simplify!!

Date:
16.12.2011

Field Summary
 
Fields inherited from class de.cesr.more.basic.agent.MAgentNetworkComp
agent, mainNetwork, networks
 
Constructor Summary
MAgentAnalyseNetworkComp(A agent)
           
MAgentAnalyseNetworkComp(A agent, repast.simphony.space.gis.Geography<Object> geography)
           
MAgentAnalyseNetworkComp(A agent, repast.simphony.space.gis.Geography<Object> geography, de.cesr.parma.core.PmParameterManager pm)
           
 
Method Summary
 int getBlacklistSize()
           
 int getInDegree()
          Returns the number of incoming links.
 float getNbrDispers()
          Calculates the average distance between this household and its neighbours.
 int getNetKDev()
           
 double getNetPrefDev()
           
 double getNetworkDistanceWeight(double meanDistance, double distance)
          Provides a weight regarding the given distance.
 float getNNAvgDeg()
          Returns the average in-degree of nearest neighbours (see Boguna2004)
 int getNumAmbassadors()
           
 int getOutDegree()
          Returns the number of outgoing links.
 int getXtInDegree()
          Adds 1 to prevent 0 values for sizing in GIS
 void setNumAmbassadors(int numAmbassadors)
          USed in combination with MGeoRsHomophilyDistanceFfNetworkService.
 
Methods inherited from class de.cesr.more.basic.agent.MAgentNetworkComp
getMainNetwork, getNetwork, getNetworks, setMainNetwork, setNetwork
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cesr.more.basic.agent.MoreAgentNetworkComp
getMainNetwork, getNetwork, getNetworks, setMainNetwork, setNetwork
 

Constructor Detail

MAgentAnalyseNetworkComp

public MAgentAnalyseNetworkComp(A agent)
Parameters:
agent -

MAgentAnalyseNetworkComp

public MAgentAnalyseNetworkComp(A agent,
                                repast.simphony.space.gis.Geography<Object> geography,
                                de.cesr.parma.core.PmParameterManager pm)
Parameters:
env -
name -

MAgentAnalyseNetworkComp

public MAgentAnalyseNetworkComp(A agent,
                                repast.simphony.space.gis.Geography<Object> geography)
Method Detail

getNumAmbassadors

public int getNumAmbassadors()
Specified by:
getNumAmbassadors in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:
the numAmbassadors

setNumAmbassadors

public void setNumAmbassadors(int numAmbassadors)
Description copied from interface: MoreAgentAnalyseNetworkComp
USed in combination with MGeoRsHomophilyDistanceFfNetworkService.

Specified by:
setNumAmbassadors in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Parameters:
numAmbassadors - the numAmbassadors to set

getInDegree

public int getInDegree()
Returns the number of incoming links.

Specified by:
getInDegree in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:
indegree

getXtInDegree

public int getXtInDegree()
Adds 1 to prevent 0 values for sizing in GIS

Specified by:
getXtInDegree in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:
indegree + 1

getOutDegree

public int getOutDegree()
Returns the number of outgoing links.

Specified by:
getOutDegree in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:
outdegree

getNbrDispers

public float getNbrDispers()
Calculates the average distance between this household and its neighbours.

Specified by:
getNbrDispers in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:
average distance

getNNAvgDeg

public float getNNAvgDeg()
Returns the average in-degree of nearest neighbours (see Boguna2004)

Specified by:
getNNAvgDeg in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:
average degree of nearest neighbours

getNetPrefDev

public double getNetPrefDev()
Specified by:
getNetPrefDev in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:

getNetKDev

public int getNetKDev()
Specified by:
getNetKDev in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:

getNetworkDistanceWeight

public double getNetworkDistanceWeight(double meanDistance,
                                       double distance)
Description copied from interface: MoreDistanceAttachableAgent
Provides a weight regarding the given distance. I.e., some agents might prefer distant links, others might solely like local links. High weights promote agents that are the given distance away, low weights discriminate such agents. Since such a preference may not only depend on the agent's milieu but also on its geographical embeddedness (in urban context the perception of distance is potentially different from rural contexts) the weight can be provided on an individual level instead by milieu preferences.

Specified by:
getNetworkDistanceWeight in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Specified by:
getNetworkDistanceWeight in interface MoreDistanceAttachableAgent
Parameters:
meanDistance - mean distance between all agents (by default only computed at initialisation of network service)
Returns:
meanDistance / distance
See Also:
MoreAgentAnalyseNetworkComp.getNetworkDistanceWeight(double, double)

getBlacklistSize

public int getBlacklistSize()
Specified by:
getBlacklistSize in interface MoreAgentAnalyseNetworkComp<A extends MoreNetworkAgent<A,E> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Returns:
number of agents in blacklist (with respect to DofN)
See Also:
MoreAgentAnalyseNetworkComp.getBlacklistSize()