AssetGraph.add_edge#
- AssetGraph.add_edge(u_of_edge, v_of_edge, symmetric=False, strict=True, **assets)[source]
Adds an edge to the graph with the given assets.
It also checks if the assets values are consistent with their spaces.
- Parameters:
u_of_edge (str) – The source node.
v_of_edge (str) – The target node.
symmetric (bool, optional) – If True, adds the edge in both directions. Defaults to False.
strict (bool, optional) – If True, raises an error if the assets are inconsistent. If False, logs a warning. Defaults to True.
**assets – The assets of the edge.
- Raises:
ValueError – If the source or target node is not found in the graph.
ValueError – If the assets are inconsistent and strict is True.