PhysicalPedestrian2D

class PhysicalPedestrian2D<T>(randomGenerator: <Error class: unknown class>, val environment: Physics2DEnvironment<T>, val node: Node<T>) : AbstractNodeProperty<T> , PhysicalPedestrian2D<T>

Base implementation of a pedestrian's capability to experience physical interactions in a 2D space.

Constructors

Link copied to clipboard
constructor(randomGenerator: <Error class: unknown class>, environment: Physics2DEnvironment<T>, node: Node<T>)

Properties

Link copied to clipboard
open override val comfortArea: Euclidean2DShape

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

Link copied to clipboard
open override 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

The environment in which the node is moving.

Link copied to clipboard
open override var isFallen: Boolean

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

Link copied to clipboard
open override val node: Node<T>

The node to which the capability is added.

Link copied to clipboard

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

Functions

Link copied to clipboard
open override fun avoid(other: Node<T>): Euclidean2DPosition

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
open override fun avoidanceForces(): <Error class: unknown class>

Computes the total avoidance force this node is subject to.

Link copied to clipboard
open override fun checkAndPossiblyFall()

Turn this node into a fallen pedestrian if it shouldFall.

Link copied to clipboard
open override fun cloneOnNewNode(node: Node<T>): PhysicalPedestrian2D<T>

Clones this property to be added on a new node.

Link copied to clipboard
open override fun fallenAgentAvoidanceForces(): <Error class: unknown class>

Computes the avoidance force from a fallen pedestrian.

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

Adds a listener to be called when node falls.

Link copied to clipboard
open override fun repulse(other: Node<T>): Euclidean2DPosition

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

Computes the total repulsion force this node is subject to.

Link copied to clipboard
open override fun shouldFall(pushingForces: List<Euclidean2DPosition>): <Error class: unknown class>

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.

Link copied to clipboard
open override fun toString(): String