Class Pedestrian
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.NodeProperty
,it.unibo.alchemist.model.cognitive.PedestrianProperty
,it.unibo.alchemist.model.cognitive.RunningPedestrianProperty
,it.unibo.alchemist.model.cognitive.WalkingPedestrianProperty
,java.io.Serializable
public class Pedestrian<T extends Object> extends AbstractNodeProperty<T> implements PedestrianProperty<T>, WalkingPedestrianProperty<T>, RunningPedestrianProperty<T>
Implementation of a basic PedestrianProperty.
-
-
Field Summary
Fields Modifier and Type Field Description private final Node<T>
node
private final Double
walkingSpeed
private final Double
runningSpeed
-
Constructor Summary
Constructors Constructor Description Pedestrian(RandomGenerator randomGenerator, Node<T> node, Double walkingSpeed, Double runningSpeed)
Pedestrian(RandomGenerator randomGenerator, Node<T> node, Double walkingSpeed)
Pedestrian(RandomGenerator randomGenerator, Node<T> node)
-
Method Summary
Modifier and Type Method Description Node<T>
getNode()
Double
getWalkingSpeed()
The node's walking speed. Double
getRunningSpeed()
The node's running speed. Double
speed()
The speed at which the pedestrian is moving. Pedestrian<T>
cloneOnNewNode(Node<T> node)
String
toString()
-
-
Method Detail
-
getWalkingSpeed
Double getWalkingSpeed()
The node's walking speed.
-
getRunningSpeed
Double getRunningSpeed()
The node's running speed.
-
cloneOnNewNode
Pedestrian<T> cloneOnNewNode(Node<T> node)
-
-
-
-