PhysicalPedestrian

A pedestrian's capability to experience physical forces.

Inheritors

Properties

Link copied to clipboard
abstract val comfortArea: Shape<P, A>

The comfort area of this pedestrian, it's a circle of radius Shape.radius + comfortRay.

Link copied to clipboard
abstract val comfortRay: Double

The comfort ray of this pedestrian, this is added to the radius of its Shape to obtain the comfortArea.

Link copied to clipboard
abstract val isFallen: Boolean

Whether the pedestrian has fallen and it is thus an obstacle.

Link copied to clipboard
abstract val node: Node<T>
Link copied to clipboard
abstract val rectangleOfInfluence: Shape<P, A>

Rectangle of influence. When a pedestrian enters this area, the node could experience a tangential avoidance force. See avoid.

Functions

Link copied to clipboard
abstract fun avoid(other: Node<T>): P

Computes the repulsion force caused by a node that entered the rectangleOfInfluence. This is derived from the work of Pelechano et al.

Link copied to clipboard
abstract fun avoidanceForces(): List<P>

Computes the total avoidance force this node is subject to.

Link copied to clipboard
abstract fun checkAndPossiblyFall()

Turn this node into a fallen pedestrian if it shouldFall.

Link copied to clipboard
abstract fun cloneOnNewNode(node: Node<T>): NodeProperty<T>
Link copied to clipboard

Computes the avoidance force from a fallen pedestrian.

Link copied to clipboard
abstract fun onFall(listener: (Node<T>) -> Unit)

Adds a listener to be called when node falls.

Link copied to clipboard
abstract fun physicalForces(environment: PhysicsEnvironment<T, P, A, F>): List<P>
Link copied to clipboard
abstract fun repulse(other: Node<T>): P

Computes the repulsion force caused by a node that entered the comfortArea. This is derived from the work of Pelechano et al.

Link copied to clipboard
abstract fun repulsionForces(): List<P>

Computes the total repulsion force this node is subject to.

Link copied to clipboard
abstract fun shouldFall(pushingForces: List<P>): Boolean

Determines if this pedestrian subject to pushingForces should fall. According to the work of Pelechano et al this should happen when the majority of pushing forces affecting one individual are approximately in the same direction and the sum of forces have a magnitude high enough to make it lose equilibrium.