Social Forces#

A monotonic decreasing function of the distance

Returns the value and gradient of the potential

Parameters:

x – The distance

Returns:

(value, gradient)

A potential of form \(V(x) = a e^{-\frac{x}{r}}\)

Constructs a new instance.

Parameters:
  • a – The amplitude

  • r – The scale

Bases: Behavior

Basic social force algorithm from

Helbing, Dirk, and Peter Molnar. “Social force model for pedestrian dynamics.” Physical review E 51.5 (1995): 4282.

Registered properties:

State: GeometricState

Constructs a new instance.

Parameters:
  • kinematics – The kinematics

  • radius – The radius

  • tau – The tau

  • step_duration – The step duration

  • phi – The phi

  • c – The weight of ‘non-in-sight’ forces

  • v – The neighbor potential. Will use default if not set.

  • u – The obstacle potential. Will use default if not set.

Overridden: computes an optimal target velocity and calls desired_velocity_towards_velocity().

Parameters:
  • point – The point

  • speed – The speed

  • time_step – The time step

Returns:

The desired velocity

Overridden: applies social forces to deviate from target velocity.

Parameters:
  • target_velocity – The target velocity

  • time_step – The time step

Returns:

The desired velocity

Overridden to define a GeometricState.

Returns:

The environment state.

The weight of ‘non-in-sight’ forces

The field of sight half-length

The duration of a step [s].

The relaxation time [s].

The obstacles potential amplitude

The obstacles potential length scale

The neighbors potential amplitude

The neighbors potential length scale