Distribution
ultimodel.DistributeTraffic.TargetValues(country_layer, cn_col='cntr_code')
Determine shares of international and national transport for a country and calculate corresponding total trips and vehicle kilometers travelled (VKT)
| Parameters: |
|
|---|
targets_personal_transport(cn, target_col='car_pkm', unit=1000000.0)
Calculate VKT for the segments short and long distance (national) and international personal transport for a country
| Parameters: |
|
|---|
| Returns: |
|
|---|
targets_freight_transport(cn, target_col='freight_tkm', segments=None, shares_tkm=None, loads_t=None, seg_split=None, unit=1000000.0)
Calculate VKT and trips for the segments short and long distance (national) and international freight transport for a country
!! Long-distance and international freight transport only cover 1 segment (heavy weight transport) !! Short-distance freight transport can cover multiple segments, inlcuding the long-distance segment (heavy weight transport) !! The distribution of tkm among segments is given with the shares_tkm parameter, short-distance tkm are then further spread among these segments
| Parameters: |
|
|---|
| Returns: |
|
|---|
ultimodel.DistributeTraffic.GravityModel(cost_matrix, taz, taz_cn='cntr_code')
Create OD trip matrices for personal and freight transport using a gravity model
| Parameters: |
|
|---|
get_country_model(cn)
Get TAZ and cost matrix for country
| Parameters: |
|
|---|
| Returns: |
|
|---|
matrix_international()
Adjust cost matrix for international assignment (no inner country trips) by setting costs for inner country relations to 9.e+12
| Returns: |
|
|---|
trip_distribution_pt(target, cn=None, taz_pop='population', alpha=0.5, gamma=-2.75, unit_dis=1000, unit_tt=60, mob_rate=36.0, occ_rate=1.3)
Distribute personal transport using a gravity model and an input for total VKT Gravity model parameters are given as defaults and were estimated using the German NHTS MiD 2017
| Parameters: |
|
|---|
| Returns: |
|
|---|
trip_distribution_ft(target_trips, target_vkt=None, cn=None, beta=0.00421, unit_tt=60, unit_dis=1000, trips_key='')
Distribute freight transport using a gravity model and an input for total trips and VKT Gravity model parameters are given as defaults and were estimated using microscopic truck data for Germany
| Parameters: |
|
|---|
| Returns: |
|
|---|
ultimodel.DistributeTraffic.IntraZonal(taz, net, from_node='from_node', to_node='to_node', link_id='ultimo_id')
Distribute intrazonal trips on road network
| Parameters: |
|
|---|
road_type_weighted_single(target, weights=None, veh_types=None, taz_id='nuts_id', index='population', sub_len='length_sub', net_type='type', occ_rate=1.0)
Distribute total VKT per TAZ and assign loads to roads within this TAZ, weighted by road type
| Parameters: |
|
|---|
| Returns: |
|
|---|
road_type_weighted_multiple(target, matrix_dis, veh_types=None, weights=None, taz_id='nuts_id', taz_mx_id='id', index='index_nat', sub_len='length_sub', net_type='type', distance=55, cell_size=500, fac_cell=1.5, occ_rate=1.0)
Distribute total VKT per TAZ and assign loads to roads within this TAZ and surrounding TAZ, weighted by road type
| Parameters: |
|
|---|
| Returns: |
|
|---|
ultimodel.DistributeTraffic.pt_shares_int(a, b)
Determine shares of international transport for personal transport for a country based on area and share of land border
| Parameters: |
|
|---|
| Returns: |
|
|---|
ultimodel.DistributeTraffic.get_trip_matrix(mx_grav, taz, goal_col, taz_id='id')
Get trip matrix based on total trips per taz and gravity model matrix
| Parameters: |
|
|---|
| Returns: |
|
|---|
ultimodel.DistributeTraffic.assignment_single(net_g, net, o, d, weight, trips, from_='from_node', to_='to_node')
Performs a shortest path network assignment between two nodes on a MultiDiGraph based on a specified weight and returns a GeoDataFrame with the resulting network load
| Parameters: |
|
|---|
| Returns: |
|
|---|
ultimodel.DistributeTraffic.assignment_multiple(net_g, net, o, d, k, weight, trips, from_='from_node', to_='to_node', id_='link_id')
Performs a shortest path assignment for the k shortest paths between two nodes on a MultiDiGraph based on a specified weight and returns a GeoDataFrame with the resulting network load Paths are weighted based on the total weight per path
| Parameters: |
|
|---|
| Returns: |
|
|---|
ultimodel.DistributeTraffic.create_network_graph(net_, nodes_, node_id='node_id', node_geo='geometry', net_from='from_node', net_to='to_node', net_id='link_id')
Transform a GeoDataFrame of a network and the corresponding nodes to a MultiDiGraph Needs columns for node id in nodes, from node, to node and link id in network
| Parameters: |
|
|---|
| Returns: |
|
|---|