rustsim-crowd 0.0.1

Microscopic crowd and pedestrian locomotion for rustsim: 2-D and layered 3-D, with Social Force, Collision-Free Speed, Generalized Centrifugal Force, Optimal Steps, and Anticipation Velocity models
Documentation
[package]

name = "rustsim-crowd"

version = "0.0.1"

edition = "2021"

rust-version = "1.94.0"

license = "MIT"

description = "Microscopic crowd and pedestrian locomotion for rustsim: 2-D and layered 3-D, with Social Force, Collision-Free Speed, Generalized Centrifugal Force, Optimal Steps, and Anticipation Velocity models"

repository.workspace = true

keywords = ["pedestrian", "crowd", "social-force", "simulation", "abm"]

categories = ["science", "simulation"]

publish = true



[features]

# CUDA arm for rustsim-crowd. Mirrors the workspace convention: cudarc

# is optional and linked with `fallback-latest` +

# `cuda-version-from-build-system`, so the build succeeds without a

# local CUDA toolkit and the driver is dlopen'd at runtime. Modules

# gated on this feature live under `src/cuda/`.

default = []

cuda = ["dep:cudarc"]

# Optional multi-core CPU arm via rayon. Enables the `*_par` step

# variants (currently `social_force::step_scratch_par`) that

# parallelise the per-agent accel computation across a rayon thread

# pool. Bit-exact with the serial `step_scratch` because each worker

# writes only to its own `accels[i]` slot from an immutable view of

# the pedestrian slice. Kept off by default to preserve a lean

# single-threaded baseline; enable for CPU deployments above ~5 000

# agents where the serial pair loop becomes the bottleneck.

rayon = ["dep:rayon"]

# Optional SIMD acceleration via `wide`. Adds vectorised pair-force

# helpers (4-wide `f64x4` lanes) for the per-pair inner loop in the

# force-based models. See `docs/rustsim-crowd.md` P1-5 for the

# upstream-decision rationale (chose `wide` over nightly `std::simd`

# and `core::arch` intrinsics: stable today on MSRV 1.94, single

# transitive dep, portable across x86_64 / aarch64 / wasm). Off by

# default; the scalar path remains the production baseline until

# every model has both a SIMD variant and a tolerance-bounded

# regression gate.

simd = ["dep:wide"]

# Heavy-validation arm: enables long-running calibration / validation

# tests that compare model output against published curves (Weidmann

# v(ρ), Seyfried fundamental diagram). These tests run for tens of

# simulated seconds at multiple densities and are skipped in the

# default CI lane to keep PR turnaround fast. Off by default; runs

# in the workspace's nightly soak / validation lane.

full-validation = []



[dependencies]

thiserror = { workspace = true }

rustsim-core = { version = "0.0.1", path = "../../../foundation/rustsim-core" }

rustsim-geometry = { version = "0.0.1", path = "../../../foundation/rustsim-geometry" }

rustsim-broadphase = { version = "0.0.1", path = "../../../infrastructure/rustsim-broadphase" }

cudarc = { version = "0.19", optional = true, features = ["cuda-version-from-build-system", "fallback-latest"] }

rayon = { version = "1.10", optional = true }

wide = { version = "0.7", optional = true }



[dev-dependencies]

rand = "0.8"

criterion = { workspace = true }



[[bench]]

name = "crowd_scaling_bench"

harness = false



[[bench]]

name = "crowd_large_scale_bench"

harness = false