:py:mod:`starling_sim.basemodel.topology.network_weight` ======================================================== .. py:module:: starling_sim.basemodel.topology.network_weight Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: starling_sim.basemodel.topology.network_weight.NetworkWeight .. py:class:: NetworkWeight(topology) Bases: :py:obj:`abc.ABC` This class is used for computing weight on the graph edges. Paths on the graph are evaluated by minimising weight using a shortest path algorithm. .. py:attribute:: DEFAULT_PARAMETERS .. py:attribute:: get_parameters_hash .. 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) :abstractmethod: 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 .. py:method:: get_parameters_hash(parameters) :staticmethod: Get the hash of the given weight parameters. :param parameters: :return: hash of the parameters, associated to the computed weight.