Class DynamicallyPursue
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.cognitive.NavigationStrategy
public class DynamicallyPursue<T extends Object, L extends ConvexShape<Euclidean2DPosition, Euclidean2DTransformation>, R extends Object> extends Pursue<T, L, R>
Pursue strategy allowing to dynamically change destination.
-
-
Field Summary
Fields Modifier and Type Field Description private Euclidean2DPosition
destination
private final NavigationAction<T, Euclidean2DPosition, Euclidean2DTransformation, L, R, ConvexPolygon, Euclidean2DPassage>
action
private final OrientingProperty<T, Euclidean2DPosition, Euclidean2DTransformation, L, ConvexPolygon, Euclidean2DPassage>
orientingCapability
-
Constructor Summary
Constructors Constructor Description DynamicallyPursue(NavigationAction<T, Euclidean2DPosition, Euclidean2DTransformation, L, R, ConvexPolygon, Euclidean2DPassage> action, Euclidean2DPosition destination)
-
Method Summary
Modifier and Type Method Description Unit
setDestination(Euclidean2DPosition destination)
The destination to pursue. final Unit
setDestination(Euclidean2DPosition newDestination, Boolean voidVolatileMemory)
Changes the destination of the strategy. -
Methods inherited from class it.unibo.alchemist.model.cognitive.navigation.Explore
getAction
-
Methods inherited from class it.unibo.alchemist.model.cognitive.NavigationStrategy
getOrientingCapability, inUnexpectedNewRoom
-
Methods inherited from class it.unibo.alchemist.model.cognitive.navigation.Pursue
inNewRoom
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
DynamicallyPursue
DynamicallyPursue(NavigationAction<T, Euclidean2DPosition, Euclidean2DTransformation, L, R, ConvexPolygon, Euclidean2DPassage> action, Euclidean2DPosition destination)
-
-
Method Detail
-
setDestination
Unit setDestination(Euclidean2DPosition destination)
The destination to pursue.
-
setDestination
final Unit setDestination(Euclidean2DPosition newDestination, Boolean voidVolatileMemory)
Changes the destination of the strategy. If voidVolatileMemory is true, the node's volatile memory is set to zero. This has two effects:
known impasses remain stored (hence the node will keep avoiding them)
rooms visited while pursuing the previous destination won't be penalised (= won't be avoided) Defaults to false.
-
-
-
-