-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.interfaces.Action,java.io.Serializable
public final class ConstantDistanceRandomWalk<T extends Object> extends GenericRandomWalker<T>
Moves for distance toward a uniformly random chosen direction at a constant speed, then changes direction and walks another distance, and so on.
Automatically changes direction on impact with obstacles if the environment supports them.
-
-
Constructor Summary
Constructors Constructor Description ConstantDistanceRandomWalk(Node<T> node, Reaction<T> reaction, Environment<T, Euclidean2DPosition> environment, RandomGenerator randomGenerator, Double distance, Double speed)
-
Method Summary
Modifier and Type Method Description ConstantDistanceRandomWalk<T>cloneAction(Node<T> node, Reaction<T> reaction)-
Methods inherited from class it.unibo.alchemist.model.implementations.actions.AbstractMoveNode
declareDependencyTo, getConcentration, getNode, getOutboundDependencies, nodeContains, removeConcentration, setConcentration, toString -
Methods inherited from class it.unibo.alchemist.model.implementations.actions.AbstractConfigurableMoveNode
execute, getContext, getCurrentPosition, getEnvironment, getNodePosition, isAbsolute -
Methods inherited from class it.unibo.alchemist.model.implementations.actions.AbstractEuclideanConfigurableMoveNode
getCurrentRoute, getNextPosition, getRoutingStrategy, getSpeedSelectionStrategy, getTargetPoint, getTargetSelectionStrategy, resetRoute, setTargetPoint -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ConstantDistanceRandomWalk
ConstantDistanceRandomWalk(Node<T> node, Reaction<T> reaction, Environment<T, Euclidean2DPosition> environment, RandomGenerator randomGenerator, Double distance, Double speed)
- Parameters:
node- the node to movereaction- the reaction containing this actionenvironment- environment containing the noderandomGenerator- random number generator to use for the decisionsdistance- the distance to travel before picking another onespeed- the speed
-
-
Method Detail
-
cloneAction
ConstantDistanceRandomWalk<T> cloneAction(Node<T> node, Reaction<T> reaction)
-
-
-
-