TimberModel.add_interaction

TimberModel.add_interaction(a, b, interaction=None)[source]

Add an interaction between two elements of the model.

Parameters:
aElement

The first element.

bElement

The second element.

interactionInteraction, optional

The interaction object.

Returns:
tuple[int, int]

The edge of the interaction graph representing the interaction between the two elements.

Raises:
Exception

If one or both of the elements are not in the graph.