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

java.lang.Object
  extended by de.cesr.more.rs.building.MAbstractGeoRsNetworkBuilder<AgentType,EdgeType>
      extended by de.cesr.more.rs.building.MGeoRsRestoreNetworkBuilder<AgentType,EdgeType>
All Implemented Interfaces:
MoreNetworkBuilder<AgentType,EdgeType>, MoreGeoNetworkBuilder<AgentType,EdgeType>, MoreGeoRsNetworkBuilder<AgentType,EdgeType>, MoreRsNetworkBuilder<AgentType,EdgeType>

public class MGeoRsRestoreNetworkBuilder<AgentType,EdgeType extends MRepastEdge<AgentType>>
extends MAbstractGeoRsNetworkBuilder<AgentType,EdgeType>

MORe First, a new MRsContextJungNetwork is initialised according to MNetworkBuildingPa.BUILD_DIRECTED. Using the passed agent collection this network generator assigns each agent to a node defined in the GRAPHML file specified in MNetworkBuildingPa.RESTORE_NETWORK_SOURCE_FILE according to the agent id. Then, links are created as defined in the GRAPHML file. Typically, the GRAPHML file is also produced by MoRe using MoreIoUtilities.outputGraph(de.cesr.more.basic.network.MoreNetwork, java.io.File) . NOTE: Using this generator requires the agent collection to contain at least the nodes defined in the GRAPHML file. Otherwise, an IllegalStateException is thrown. Considered PmParameterDefinitions:

Date:
29.11.2011

Field Summary
protected  String name
           
 
Fields inherited from class de.cesr.more.rs.building.MAbstractGeoRsNetworkBuilder
context, edgeFac, edgeModifier, geoFactory, geography
 
Constructor Summary
MGeoRsRestoreNetworkBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac, String networkName)
           
 
Method Summary
 MoreRsNetwork<AgentType,EdgeType> buildNetwork(Collection<AgentType> agents)
          Links the given collection of agents and thus generates the network.
protected  void checkAgentCollection(Collection<AgentType> agents)
           
 String toString()
           
 
Methods inherited from class de.cesr.more.rs.building.MAbstractGeoRsNetworkBuilder
getContext, getGeography, setContext, setGeography
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
Constructor Detail

MGeoRsRestoreNetworkBuilder

public MGeoRsRestoreNetworkBuilder(MoreEdgeFactory<AgentType,EdgeType> eFac,
                                   String networkName)
Parameters:
areasGeography -
Method Detail

buildNetwork

public MoreRsNetwork<AgentType,EdgeType> buildNetwork(Collection<AgentType> agents)
Description copied from interface: MoreNetworkBuilder
Links the given collection of agents and thus generates the network.

Returns:
network

checkAgentCollection

protected void checkAgentCollection(Collection<AgentType> agents)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()