nrel.hive.model.roadnetwork.link
Module Contents
Classes
a directed edge on the road network from node a -> node b |
Functions
Interpolate between two geoids given a ratio from a->b |
- class nrel.hive.model.roadnetwork.link.Link[source]
Bases:
NamedTuplea directed edge on the road network from node a -> node b the LinkId is used for lookup of link attributes the o/d pair of GeoIds is the start and end locations along this link. in the case of the RoadNetwork, these are (strictly) members of the vertex set. an agent route may also use a Link to represent a partial link traversal, using an o/d pair which is within the link but not necessarily the end-points.
- Parameters:
link_id (
LinkId) – The unique link id.start (
GeoId) – The starting endpoint of the linkend (
GeoId) – The ending endpoint of the link
- property travel_time_seconds: nrel.hive.util.units.Seconds
- link_id: nrel.hive.util.typealiases.LinkId
- start: nrel.hive.util.typealiases.GeoId
- end: nrel.hive.util.typealiases.GeoId
- distance_km: nrel.hive.util.units.Kilometers
- speed_kmph: nrel.hive.util.units.Kmph
- classmethod build(link_id: nrel.hive.util.typealiases.LinkId, start: nrel.hive.util.typealiases.GeoId, end: nrel.hive.util.typealiases.GeoId, speed_kmph: nrel.hive.util.units.Kmph, distance_km: nrel.hive.util.units.Kilometers | None = None) Link[source]
- update_speed(speed_kmph: nrel.hive.util.units.Kmph) Link[source]
Update the speed of the property link
- Parameters:
speed_kmph – speed to update to
- Returns:
an updated PropertyLink
- to_link_traversal() nrel.hive.model.roadnetwork.linktraversal.LinkTraversal[source]
convert to a link traversal
- Returns:
the new link traversal
- nrel.hive.model.roadnetwork.link.interpolate_between_geoids(a: nrel.hive.util.typealiases.GeoId, b: nrel.hive.util.typealiases.GeoId, ratio: nrel.hive.util.units.Ratio) nrel.hive.util.typealiases.GeoId[source]
Interpolate between two geoids given a ratio from a->b
- Parameters:
a – The starting point
b – The ending point
ratio – The ratio from a->b
- Returns:
An interpolated GeoId