DynamicInteractions

class narupatools.imd.feature.DynamicInteractions(imd: narupatools.imd.feature.InteractionFeature, source: narupatools.imd.interaction_source.InteractionsSource)

Polls a source of interactions before each simulation step.

This is a wrapper around an interaction source , which is checked before each step to add/remove interactions that have appeared or disappeared since the last check.

Inheritance

Inheritance diagram of DynamicInteractions

Methods

__init__

Initialize self.

update

Update the interactions based on the current state of the source.

__init__(imd: narupatools.imd.feature.InteractionFeature, source: narupatools.imd.interaction_source.InteractionsSource)

Initialize self. See help(type(self)) for accurate signature.

update(has_reset: bool)None

Update the interactions based on the current state of the source.