Class ConstantSpeed
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.movestrategies.SpeedSelectionStrategy
,java.io.Serializable
public final class ConstantSpeed<T, P extends Position<P>> implements 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.
-
-
Constructor Summary
Constructors Constructor Description ConstantSpeed(Reaction<out Object> reaction, double speed)
-
Method Summary
Modifier and Type Method Description double
getNodeMovementLength(P target)
ConstantSpeed<T, P>
cloneIfNeeded(Node<T> destination, Reaction<T> reaction)
-
-
Method Detail
-
getNodeMovementLength
double getNodeMovementLength(P target)
-
cloneIfNeeded
ConstantSpeed<T, P> cloneIfNeeded(Node<T> destination, Reaction<T> reaction)
-
-
-
-