Package org.baseagent.behaviors.grid
Class RandomWanderBehavior
java.lang.Object
org.baseagent.behaviors.LifecycleBehavior
org.baseagent.behaviors.grid.WalkToBehavior
org.baseagent.behaviors.grid.RandomWanderBehavior
- All Implemented Interfaces:
Behavior
-
Constructor Summary
ConstructorDescriptionRandomWanderBehavior
(int distance) RandomWanderBehavior
(int distance, double speed) -
Method Summary
Modifier and TypeMethodDescriptionvoid
endWhen
(Predicate<Simulation> endCondition) void
executeBehavior
(Agent agent) void
setDistance
(int distance) void
startBehavior
(Agent agent) Methods inherited from class org.baseagent.behaviors.grid.WalkToBehavior
addDestination, getCurrentDestination, getSpeed, setSpeed
Methods inherited from class org.baseagent.behaviors.LifecycleBehavior
endBehavior, isEnded, isPaused, isStarted, pauseBehavior, restartBehavior, resumeBehavior
-
Constructor Details
-
RandomWanderBehavior
public RandomWanderBehavior() -
RandomWanderBehavior
public RandomWanderBehavior(int distance) -
RandomWanderBehavior
public RandomWanderBehavior(int distance, double speed)
-
-
Method Details
-
setDistance
public void setDistance(int distance) -
endWhen
-
startBehavior
- Overrides:
startBehavior
in classWalkToBehavior
-
executeBehavior
- Specified by:
executeBehavior
in interfaceBehavior
- Overrides:
executeBehavior
in classWalkToBehavior
-