API Docs for: 0.3
Show:

Panic Class

Extends Behavior
Module: Panic
Parent Module: CrowdSim

Helbing-Farkas,Vicsek Simulating dynamical features of escape panic

Constructor

Panic

(
  • world
  • options
)

Parameters:

  • world World

    parent

  • options Object

    for the behavior model algorithm

    • [A] Object optional

      repulsive force constant

    • [B] Object optional

      repulsive force constant

    • [kn] Object optional

      compression large constant

    • [Kv] Object optional

      friction large constant

    • [relaxationTime] Object optional

      time to simulate progressive stopping

Methods

calculateAgentForce

(
  • i
  • j
)
Vec2

Calculate the social force between two agents i,j.

Parameters:

Returns:

Vec2:

force

calculateWallForce

(
  • i
  • projection
  • width
)
Vec2

Calculate the social force between an agent and a wall.

Parameters:

  • i Agent
  • projection Vec2

    point the wall

  • width Number

    of the wall

Returns:

Vec2:

force

getAccel

(
  • agent
  • target
)
Vec2

Inherited from Behavior but overwritten in src\sim\Behavior\Panic.js:27

Return the acceleration result for a agent going to its target.

Parameters:

  • agent Agent
  • target Object

    a destination with target.pos and target.in = function => path point, point, other agent

Returns:

Vec2:

acceleration result of the model

testFun Test function to programatically create worlds

(
  • world
  • debug
)

Parameters:

Properties

One circular path and two opposite groups

Object

Object

Inherited from Behavior: src\app\Worlds.js:11

One single Group

Groups with different velocity

Object

One start context

Object

One end context

Object

Start and end context

Object

Contexts with different mobility

Object

Context that triggers stops on empty

Object

Contexts with different rates

Object

Contexts mobility and path

Object

Groups of different sizes

Object

Inherited from Behavior: src\app\Worlds.js:60

One path assigned to a group

Object

Different waypoint sizes

Object

Multiple paths

Object

One wall in the path of agents

Object

Paths that get closer

Object

Paths closer with group and path

Object

Groups, paths and contexts.

Object

Paths contexts and groups

Object

Complex scene with multiple entities.

Object

JSON exported world from testFun

Object