ConstantSpeed

class ConstantSpeed<T, P : Position<P>>(reaction: Reaction<*>, speed: Double) : SpeedSelectionStrategy<T, P>

This strategy makes the node move at an average constant speed, which is influenced by the it.unibo.alchemist.model.TimeDistribution of the Reaction hosting this it.unibo.alchemist.model.Action. This action tries to normalize on the Reaction rate, but if the it.unibo.alchemist.model.TimeDistribution has a high variance, the movements on the map will inherit this tract.

Parameters

reaction

the reaction used to compute movement timing

speed

the speed, in meters/second

Type Parameters

T

Concentration type

P

Position type

Constructors

Link copied to clipboard
constructor(reaction: Reaction<*>, speed: Double)

Functions

Link copied to clipboard
open override fun cloneIfNeeded(destination: Node<T>, reaction: Reaction<T>): ConstantSpeed<T, P>
Link copied to clipboard
open override fun getNodeMovementLength(target: P?): Double