social_force_step — DRIVE traffic op

• Data kinds: points × points × points → any

• Call: import fullseye as fs; fs.ledger.social_force_step(pos, vel, goals, *, dt: 'float', v0, tau: 'float', A: 'float', B: 'float', radius, walls=None) (to call the implementation directly, import drivetraffic; drivetraffic.social_force_step(pos, vel, goals, *, dt: 'float', v0, tau: 'float', A: 'float', B: 'float', radius, walls=None); from the registry, opsdrive.get("social_force_step"))

Usage

1 step of the social force model (per unit mass; in the form of Helbing & Molnár 1995 / Helbing, Farkas, Vicsek 2000).

> The detailed description below is the original text — the summary and the headings are translated.

dv_i/dt = (v0_i e_i − v_i)/τ + Σ_j A exp((r_ij − d_ij)/B) n_ij + Σ_W A exp((r_i − d_iW)/B) n_iW

e_i = 目標への単位ベクトル(目標に 1e-9 m 以内なら 0)、r_ij = r_i + r_j、d_ij = |x_i − x_j|、n_ij = (x_i − x_j)/d_ij。壁 W は線分 ((x0, y0), (x1, y1)) の列で、d_iW と n_iW は最近点から。

積分(指数積分): 斥力 F を刻みの間一定と置き、線形部分 (v_d − v)/τ(v_d = v0 e + τ F)を厳密に解く:

v' = v_d + (v − v_d) e^{−dt/τ}、x' = x + v_d dt + (v − v_d) τ (1 − e^{−dt/τ})。1 人で斥力が無ければ v(t) = v0(1 − e^{−t/τ}) に dt に依らず 一致する(門)。斥力がある時は 1 次の誤差。

引数: pos, vel, goals は (N, 2)。v0 と radius はスカラーか (N,)。walls は (M, 2, 2) か None。

戻り値: (pos', vel')。配置が鏡映・点対称なら結果も同じ対称性を保つ(式が対称なので。門で確かめる)。

Raises ValueError: 形の不一致、非有限、τ・B・dt ≤ 0、A < 0、半径 < 0、2 人の位置が一致。

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• (none yet)

Ops the type connects to (they accept any as input)

course_crank · course_s_curve · course_turnaround · course_slope · course_intersection · course_parallel_parking · course_crossing · course_road

Same category (traffic)

idm_accel · idm_equilibrium_gap · idm_platoon_simulate · driver_style · lateral_wobble · ou_estimate · pedestrian_crossing · occlusion_reveal_distance


*Provenance: drivetraffic.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.