InteractWithOthers

This strategy slows down nodes depending on how many "interacting" nodes are found in the surroundings. It is an attempt at modeling crowding slow-downs.

Parameters

<P>

position type

<T>

concentration type

Constructors

Link copied to clipboard
constructor(environment: Environment<T, P>, n: Node<T>, reaction: NodeReaction<T>, interactingMolecule: Molecule, speed: Double, radius: Double, interaction: Double)
Builds a new speed strategy that slows the node down when it interacts with other nodes.

Functions

Link copied to clipboard
open fun cloneIfNeeded(@Nonnull destination: Node<T>, @Nonnull reaction: NodeReaction<T>): SpeedSelectionStrategy<T, P>
Returns a clone for destination and reaction when the strategy is stateful.
Link copied to clipboard
open fun getNodeMovementLength(target: P): Double
Computes the movement length toward target.