Package org.matsim.api.core.v01.network
Interface Link
-
- All Superinterfaces:
Attributable
,BasicLocation
,Identifiable<Link>
- All Known Subinterfaces:
RoutingNetworkLink
- All Known Implementing Classes:
AbstractRoutingNetworkLink
,ArrayRoutingNetworkLink
,TransitRouterNetwork.TransitRouterNetworkLink
public interface Link extends BasicLocation, Attributable, Identifiable<Link>
This interface deliberately does NOT have a back pointer ... ... since, at this level, one should be able to get the relevant container from the context. (This becomes clear if you think about a nodeId/linkId given by person.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>
getAllowedModes()
double
getCapacity()
This method returns the capacity as set in the xml defining the network.double
getCapacity(double time)
This method returns the capacity as set in the xml defining the network.double
getFlowCapacityPerSec()
double
getFlowCapacityPerSec(double time)
double
getFreespeed()
double
getFreespeed(double time)
Node
getFromNode()
double
getLength()
double
getNumberOfLanes()
double
getNumberOfLanes(double time)
Node
getToNode()
void
setAllowedModes(Set<String> modes)
void
setCapacity(double capacity)
void
setFreespeed(double freespeed)
boolean
setFromNode(Node node)
Sets this link's non-null
upstream node.void
setLength(double length)
void
setNumberOfLanes(double lanes)
boolean
setToNode(Node node)
Sets this link's non-null
downstream node.-
Methods inherited from interface org.matsim.utils.objectattributes.attributable.Attributable
getAttributes
-
Methods inherited from interface org.matsim.api.core.v01.BasicLocation
getCoord
-
Methods inherited from interface org.matsim.api.core.v01.Identifiable
getId
-
-
-
-
Method Detail
-
setFromNode
boolean setFromNode(Node node)
Sets this link's non-null
upstream node.- Parameters:
node
- theBasicNodeI
to be set- Returns:
if node
has been set andfalse
otherwise- Throws:
IllegalArgumentException
- ifnode
isnull
-
setToNode
boolean setToNode(Node node)
Sets this link's non-null
downstream node.- Parameters:
node
- theBasicNodeI
to be set- Returns:
true
ifnode
has been set andfalse
otherwise- Throws:
IllegalArgumentException
- ifnode
isnull
-
getFromNode
Node getFromNode()
- Returns:
- this link's upstream node
-
getLength
double getLength()
-
getNumberOfLanes
double getNumberOfLanes()
-
getNumberOfLanes
double getNumberOfLanes(double time)
-
getFreespeed
double getFreespeed()
-
getFreespeed
double getFreespeed(double time)
-
getCapacity
double getCapacity()
This method returns the capacity as set in the xml defining the network. Be aware that this capacity is not normalized in time, it depends on the period set in the network file (the capperiod attribute).- Returns:
- the capacity per network's capperiod timestep
- See Also:
Network.getCapacityPeriod()
-
getCapacity
double getCapacity(double time)
This method returns the capacity as set in the xml defining the network. Be aware that this capacity is not normalized in time, it depends on the period set in the network file (the capperiod attribute).- Parameters:
time
- the time at which the capacity is requested. UseDouble.NEGATIVE_INFINITY
to get the default value.- Returns:
- the capacity per network's capperiod timestep
- See Also:
Network.getCapacityPeriod()
-
setFreespeed
void setFreespeed(double freespeed)
-
setLength
void setLength(double length)
-
setNumberOfLanes
void setNumberOfLanes(double lanes)
-
setCapacity
void setCapacity(double capacity)
-
setAllowedModes
void setAllowedModes(Set<String> modes)
-
getAllowedModes
Set<String> getAllowedModes()
- Returns:
- an immutable set containing all transport modes that are allowed on that link.
-
getFlowCapacityPerSec
double getFlowCapacityPerSec()
-
getFlowCapacityPerSec
double getFlowCapacityPerSec(double time)
-
-