:py:mod:`starling_sim.basemodel.topology.bike_weight_osm` ========================================================= .. py:module:: starling_sim.basemodel.topology.bike_weight_osm Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: starling_sim.basemodel.topology.bike_weight_osm.BikeWeightOSM .. py:class:: BikeWeightOSM(topology) Bases: :py:obj:`starling_sim.basemodel.topology.network_weight.NetworkWeight` Improve bike routing by defining a better weight on bike networks. This weight is defined on OSM attributes. The necessary attributes are: - 'cycleway', 'cycleway:right', 'cycleway:left' - 'bridge' .. py:attribute:: DEFAULT_PARAMETERS .. py:method:: pre_process_edge(u, v, d) Add attributes to the edges before compute weight. :param u: edge origin :param v: edge destination :param d: edge data .. py:method:: compute_edge_weight(u, v, d, parameters) Compute and set edge weight using edge data and parameters. The attribute key to set is the hash of the parameters. :param u: edge origin :param v: edge destination :param d: edge data :param parameters: agent specific parameters