de.cesr.more.manipulate.agent
Class MBlacklistThresholdLinkProcessor<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,E extends MoreEdge<? super A>>

java.lang.Object
  extended by de.cesr.more.manipulate.agent.MThresholdLinkProcessor<A,E>
      extended by de.cesr.more.manipulate.agent.MBlacklistThresholdLinkProcessor<A,E>
All Implemented Interfaces:
MoreEgoNetworkProcessor<A,E>

public class MBlacklistThresholdLinkProcessor<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,E extends MoreEdge<? super A>>
extends MThresholdLinkProcessor<A,E>

MORe I assumes that agents have a static GIS location and do not move and caches agent's local potential interaction partners. NOTE: In order to investigate the number of new transitive/reciprocal/local links the logger de.cesr.more.manipulate.agent.MBlacklistThresholdLinkProcessor.links must be at least INFO-enabled (but messages are passed to de.cesr.more.manipulate.agent.MBlacklistThresholdLinkProcessor.links anyway in order to enable investigation of links without logging)!

Date:
05.06.2012

Nested Class Summary
protected  class MBlacklistThresholdLinkProcessor.TieCounter
           
 
Field Summary
protected  MoreNetwork<A,MoreEdge<A>> blacklistNetwork
           
protected  MoreNetworkEdgeModifier<A,E> edgeMan
           
protected  MGeographyWrapper<Object> geoWrapper
           
protected static Logger linkLogger
           
protected  Map<A,Collection<A>> locals
           
protected static Logger logger
          Logger
protected  MMilieuNetworkParameterMap netParams
           
protected  MorePartnerFinder<A,E> partnerFinder
           
protected  cern.jet.random.Uniform rand
           
protected static String RANDOM_DIST_PROBABILISTIC_EDGE_CREATION
           
protected static String RANDOM_GENERATOR_PROBABILISTIC_EDGE_CREATION
           
 
Constructor Summary
MBlacklistThresholdLinkProcessor(MoreNetworkEdgeModifier<A,E> edgeMan)
           
MBlacklistThresholdLinkProcessor(MoreNetworkEdgeModifier<A,E> edgeMan, repast.simphony.space.gis.Geography<Object> geography)
           
 
Method Summary
protected  int createNewLinks(int numNewConnections, A agent, MoreNetwork<A,E> net, Map<Double,Set<A>> potPartners, MBlacklistThresholdLinkProcessor.TieCounter tieCounter, ArrayList<A> transitiveAgents, ArrayList<A> reciprocalAgents, ArrayList<A> localAgents)
           
protected  MoreNetwork<A,MoreEdge<A>> getBlacklistNetwork()
           
 void makeNewConnections(int numNewConnections, A agent, MoreNetwork<A,E> net)
           
protected  void potentiallyAddGlobalLink(A agent, Map<Double,Set<A>> potPartners, MoreNetwork<A,E> net)
          For each transitive/reciprocal/local link a global one is added with probability MNetManipulatePa.DYN_PROP_GLOBAL.
 void process(A agent, MoreNetwork<A,E> network)
          Checks whether edge weights are equal/below zero, deletes these edges and add them to the blacklist network.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static Logger logger
Logger


linkLogger

protected static Logger linkLogger

RANDOM_GENERATOR_PROBABILISTIC_EDGE_CREATION

protected static final String RANDOM_GENERATOR_PROBABILISTIC_EDGE_CREATION
See Also:
Constant Field Values

RANDOM_DIST_PROBABILISTIC_EDGE_CREATION

protected static final String RANDOM_DIST_PROBABILISTIC_EDGE_CREATION
See Also:
Constant Field Values

edgeMan

protected MoreNetworkEdgeModifier<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,E extends MoreEdge<? super A>> edgeMan

rand

protected cern.jet.random.Uniform rand

blacklistNetwork

protected MoreNetwork<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,MoreEdge<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent>> blacklistNetwork

netParams

protected MMilieuNetworkParameterMap netParams

partnerFinder

protected MorePartnerFinder<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,E extends MoreEdge<? super A>> partnerFinder

geoWrapper

protected MGeographyWrapper<Object> geoWrapper

locals

protected Map<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,Collection<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent>> locals
Constructor Detail

MBlacklistThresholdLinkProcessor

public MBlacklistThresholdLinkProcessor(MoreNetworkEdgeModifier<A,E> edgeMan,
                                        repast.simphony.space.gis.Geography<Object> geography)

MBlacklistThresholdLinkProcessor

public MBlacklistThresholdLinkProcessor(MoreNetworkEdgeModifier<A,E> edgeMan)
Method Detail

getBlacklistNetwork

protected MoreNetwork<A,MoreEdge<A>> getBlacklistNetwork()

process

public void process(A agent,
                    MoreNetwork<A,E> network)
Checks whether edge weights are equal/below zero, deletes these edges and add them to the blacklist network. Furthermore, the same amount of deleted edges is created anew.

Specified by:
process in interface MoreEgoNetworkProcessor<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Overrides:
process in class MThresholdLinkProcessor<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,E extends MoreEdge<? super A>>
See Also:
MThresholdLinkProcessor.process(de.cesr.more.manipulate.agent.MoreLinkManipulatableAgent, de.cesr.more.basic.network.MoreNetwork)

makeNewConnections

public void makeNewConnections(int numNewConnections,
                               A agent,
                               MoreNetwork<A,E> net)
Overrides:
makeNewConnections in class MThresholdLinkProcessor<A extends MoreLinkManipulatableAgent<A> & MoreMilieuAgent,E extends MoreEdge<? super A>>
Parameters:
numNewConnections -

createNewLinks

protected int createNewLinks(int numNewConnections,
                             A agent,
                             MoreNetwork<A,E> net,
                             Map<Double,Set<A>> potPartners,
                             MBlacklistThresholdLinkProcessor.TieCounter tieCounter,
                             ArrayList<A> transitiveAgents,
                             ArrayList<A> reciprocalAgents,
                             ArrayList<A> localAgents)
Parameters:
numNewConnections -
agent -
net -
potPartners - order matters (use TreeMap)
tieCounter -
transitiveAgents -
reciprocalAgents -
Returns:

potentiallyAddGlobalLink

protected void potentiallyAddGlobalLink(A agent,
                                        Map<Double,Set<A>> potPartners,
                                        MoreNetwork<A,E> net)
For each transitive/reciprocal/local link a global one is added with probability MNetManipulatePa.DYN_PROP_GLOBAL.

Parameters:
agent -
potPartners -
net -