:py:mod:`starling_sim.basemodel.topology.empty_network` ======================================================= .. py:module:: starling_sim.basemodel.topology.empty_network Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: starling_sim.basemodel.topology.empty_network.EmptyNetwork .. py:class:: EmptyNetwork(transport_mode, weight_class=None, store_paths=False) Bases: :py:obj:`starling_sim.basemodel.topology.topology.Topology` An initially empty topology .. py:method:: init_graph() Initialise the network graph from any data source. .. py:method:: add_time_and_length(u, v, d) Set the TIME_ATTRIBUTE and LENGTH_ATTRIBUTE attributes on the graph edge. :param u: edge origin :param v: edge destination :param d: edge data .. py:method:: position_localisation(position) Return the localisation [lat, lon] of the position :param position: position in the topology :return: list [lat, lon] .. py:method:: nearest_position(localisation) Return the nearest position to given localisation (lat, lon) :param localisation: (lat, lon) tuple :return: position .. py:method:: localisations_nearest_nodes(x_coordinates, y_coordinates, return_dist=False) Return the graph nodes nearest to a list of points. This method should allow a faster computation than multiple nearest_position calls. :param x_coordinates: list of X coordinates of the localisations (lon in GPS) :param y_coordinates: list of Y coordinates of the localisations (lat in GPS) :param return_dist: optionally also return distance between points and nearest nodes :return: list of nearest nodes