Package org.matsim.core.router.util
Class AbstractRoutingNetwork
- java.lang.Object
-
- org.matsim.core.router.util.AbstractRoutingNetwork
-
- All Implemented Interfaces:
Network
,MatsimToplevelContainer
,RoutingNetwork
,Attributable
- Direct Known Subclasses:
ArrayRoutingNetwork
public abstract class AbstractRoutingNetwork extends Object implements RoutingNetwork
-
-
Constructor Summary
Constructors Constructor Description AbstractRoutingNetwork(Network network)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLink(Link ll)
void
addNode(Node nn)
void
addNode(RoutingNetworkNode nn)
Attributes
getAttributes()
double
getCapacityPeriod()
Returns the time period over which the capacity of the given links has been measured.double
getEffectiveCellSize()
double
getEffectiveLaneWidth()
Returns the lane width of the network's links.NetworkFactory
getFactory()
Returns the builder for network elementsMap<Id<Link>,? extends Link>
getLinks()
Returns a set of this network's links.Map<Id<Node>,RoutingNetworkNode>
getNodes()
Returns a set of this network's nodes.void
initialize()
Link
removeLink(Id<Link> linkId)
Removes the link with the specified Id from the network and removes it as in- or out-Links of its to- and from-Node, but does not remove any node this link is connected to.RoutingNetworkNode
removeNode(Id<Node> nodeId)
Removes the node with the specified Id from the network, along with all links connected to that node.void
setCapacityPeriod(double capPeriod)
void
setEffectiveCellSize(double effectiveCellSize)
void
setEffectiveLaneWidth(double effectiveLaneWidth)
-
-
-
Constructor Detail
-
AbstractRoutingNetwork
public AbstractRoutingNetwork(Network network)
-
-
Method Detail
-
initialize
public void initialize()
- Specified by:
initialize
in interfaceRoutingNetwork
-
getFactory
public NetworkFactory getFactory()
Description copied from interface:Network
Returns the builder for network elements- Specified by:
getFactory
in interfaceMatsimToplevelContainer
- Specified by:
getFactory
in interfaceNetwork
-
getNodes
public Map<Id<Node>,RoutingNetworkNode> getNodes()
Description copied from interface:Network
Returns a set of this network's nodes. This set might be empty, but it should not benull
.- Specified by:
getNodes
in interfaceNetwork
- Specified by:
getNodes
in interfaceRoutingNetwork
- Returns:
- a set of this network's nodes
-
addNode
public void addNode(RoutingNetworkNode nn)
-
removeNode
public RoutingNetworkNode removeNode(Id<Node> nodeId)
Description copied from interface:Network
Removes the node with the specified Id from the network, along with all links connected to that node. The return value corresponds to the behavior ofMap.remove(Object)
- Specified by:
removeNode
in interfaceNetwork
- Parameters:
nodeId
- node to be removed- Returns:
- the removed node, or
null
if no such node was found
-
getCapacityPeriod
public double getCapacityPeriod()
Description copied from interface:Network
Returns the time period over which the capacity of the given links has been measured. The default is given in the dtd. Currently (may'11) it is 1h = 3600.0 sec. Notes:- There is no setter for this value since API-based network generation code should not use anything else but the default. The default is in the network dtd, but it is an attribute under "links", not under "network".
- Specified by:
getCapacityPeriod
in interfaceNetwork
- Returns:
- the time period in seconds
-
getEffectiveLaneWidth
public double getEffectiveLaneWidth()
Description copied from interface:Network
Returns the lane width of the network's links. The default is given in the dtd; current (may'11) it is 3.75m. Notes:- There is no setter for this value since API-based network generation code should not use anything else but the default.
- Specified by:
getEffectiveLaneWidth
in interfaceNetwork
- Returns:
- the lane width in meters
-
getLinks
public Map<Id<Link>,? extends Link> getLinks()
Description copied from interface:Network
Returns a set of this network's links. This set might be empty, but it should not benull
.
-
removeLink
public Link removeLink(Id<Link> linkId)
Description copied from interface:Network
Removes the link with the specified Id from the network and removes it as in- or out-Links of its to- and from-Node, but does not remove any node this link is connected to. The return value corresponds to the behavior ofMap.remove(Object)
- Specified by:
removeLink
in interfaceNetwork
- Parameters:
linkId
- node to be removed- Returns:
- the removed link, or
null
if no such link was found
-
setCapacityPeriod
public void setCapacityPeriod(double capPeriod)
- Specified by:
setCapacityPeriod
in interfaceNetwork
-
setEffectiveCellSize
public void setEffectiveCellSize(double effectiveCellSize)
- Specified by:
setEffectiveCellSize
in interfaceNetwork
-
setEffectiveLaneWidth
public void setEffectiveLaneWidth(double effectiveLaneWidth)
- Specified by:
setEffectiveLaneWidth
in interfaceNetwork
-
getEffectiveCellSize
public double getEffectiveCellSize()
- Specified by:
getEffectiveCellSize
in interfaceNetwork
-
getAttributes
public Attributes getAttributes()
- Specified by:
getAttributes
in interfaceAttributable
-
-