public class HelbingMovementModule extends MovementModule
Modifier and Type | Field and Description |
---|---|
private static double |
A
Helbing constant A.
|
private static double |
accelerationTime
Helbing constant tau.
|
private static double |
B
Helbing constant B.
|
private static double |
errorTerm
An error term to prevent accumulating errors.
|
private static double |
k
Helbing constant k.
|
private static double |
kappa
Helbing constant kappa.
|
private boolean |
onlyPassengers
Specifies if only passengers are considered in the walking behavior.
|
agent, currentVelocity, desiredSpeed, observationModule
Constructor and Description |
---|
HelbingMovementModule(double desiredSpeed)
Creates a Helbing model.
|
HelbingMovementModule(double desiredSpeed,
boolean onlyPassengers)
Creates a Helbing model.
|
Modifier and Type | Method and Description |
---|---|
private Vector |
getAgentInteractionForce()
Gets the agent interaction force.
|
private Vector |
getInternalAccelerationForce()
Gets the internal acceleration force.
|
Vector |
getMove(int timeStep)
Gets the next move.
|
private Vector |
getPhysicalObstacleForce()
Gets the physical obstacle force.
|
private Vector |
getSingleAgentInteractionForce(HumanAgent other)
The agent interaction force, is a force that other
HumanAgent s
apply to us. |
private Vector |
getSinglePhysicalObstacleForce(PhysicalObject physicalObstacle)
The physicalObstacle interaction force, is a force that physicalObstacles
apply to us.
|
void |
init(AatomHumanAgent agent,
ObservationModule observationModule)
Sets the agent.
|
private boolean |
isInQueue()
Determines if the agent is queuing.
|
boundSpeed, getChair, getCurrentVelocity, getDesiredSpeed, getPosition, getStopMovingTime, getStopOrder, isSitting, setSitDown, setStopOrder, update
private static final double A
private static final double accelerationTime
private static final double B
private static final double errorTerm
private static final double k
private static final double kappa
private boolean onlyPassengers
public HelbingMovementModule(double desiredSpeed)
desiredSpeed
- The desired speed.public HelbingMovementModule(double desiredSpeed, boolean onlyPassengers)
desiredSpeed
- The desired speed.onlyPassengers
- Only passengers are considered in the walking behavior or not.private Vector getAgentInteractionForce()
private Vector getInternalAccelerationForce()
public Vector getMove(int timeStep)
MovementModule
MovementModule.currentVelocity
to the generated value.getMove
in class MovementModule
timeStep
- The time step (in milliseconds).private Vector getPhysicalObstacleForce()
private Vector getSingleAgentInteractionForce(HumanAgent other)
HumanAgent
s
apply to us.other
- The other agent.private Vector getSinglePhysicalObstacleForce(PhysicalObject physicalObstacle)
physicalObstacle
- The physicalObstacle.public void init(AatomHumanAgent agent, ObservationModule observationModule)
MovementModule
init
in class MovementModule
agent
- The agent.observationModule
- The observation module.private boolean isInQueue()