Package org.matsim.api.core.v01.network
Interface Network
-
- All Superinterfaces:
Attributable
,MatsimToplevelContainer
- All Known Subinterfaces:
RoutingNetwork
- All Known Implementing Classes:
AbstractRoutingNetwork
,ArrayRoutingNetwork
,TransitRouterNetwork
public interface Network extends MatsimToplevelContainer, Attributable
A topological network representation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLink(Link ll)
void
addNode(Node nn)
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.String
getName()
Map<Id<Node>,? extends Node>
getNodes()
Returns a set of this network's nodes.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.Node
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)
void
setName(String name)
-
Methods inherited from interface org.matsim.utils.objectattributes.attributable.Attributable
getAttributes
-
-
-
-
Method Detail
-
getFactory
NetworkFactory getFactory()
Returns the builder for network elements- Specified by:
getFactory
in interfaceMatsimToplevelContainer
-
getNodes
Map<Id<Node>,? extends Node> getNodes()
Returns a set of this network's nodes. This set might be empty, but it should not benull
.- Returns:
- a set of this network's nodes
-
getLinks
Map<Id<Link>,? extends Link> getLinks()
Returns a set of this network's links. This set might be empty, but it should not benull
.- Returns:
- a set of this network's links
-
getCapacityPeriod
double getCapacityPeriod()
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".
- Returns:
- the time period in seconds
-
getEffectiveLaneWidth
double getEffectiveLaneWidth()
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.
- Returns:
- the lane width in meters
-
removeNode
Node removeNode(Id<Node> nodeId)
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)
- Parameters:
nodeId
- node to be removed- Returns:
- the removed node, or
null
if no such node was found
-
removeLink
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. The return value corresponds to the behavior ofMap.remove(Object)
- Parameters:
linkId
- node to be removed- Returns:
- the removed link, or
null
if no such link was found
-
setCapacityPeriod
void setCapacityPeriod(double capPeriod)
-
setEffectiveCellSize
void setEffectiveCellSize(double effectiveCellSize)
-
setEffectiveLaneWidth
void setEffectiveLaneWidth(double effectiveLaneWidth)
-
getEffectiveCellSize
double getEffectiveCellSize()
-
-