Skip to content

feat(flow): fix specific line-flow unit docs and add optional speed + classic FD - #591

Open
M-Colley wants to merge 1 commit into
PedestrianDynamics:mainfrom
M-Colley:fix/line-flow-units-and-optional-speed-fd
Open

M-Colley wants to merge 1 commit into
PedestrianDynamics:mainfrom
M-Colley:fix/line-flow-units-and-optional-speed-fd

Conversation

@M-Colley

Copy link
Copy Markdown

Summary

Fixes #579
Fixes #499

Changes

  1. Correct specific line-flow unit in compute_line_flow and plot_flow_at_line (compute_line_flow unit #579):
    • compute_line_flow sums (v_i . n_l) * (1 / A_i(t)) * (w_i(t) / w), which has physical dimensions (m/s) * (1/m^2) * (m/m) = 1/(m * s) (specific flow j, consistent with column names j_sp+1, j_sp-1).
    • Updated the Returns: docstring in compute_line_flow and default y-axis label in plot_flow_at_line from 1/s to 1/(m·s).
  2. Make individual_speed optional in compute_flow and add compute_classic_fundamental_diagram (Calculation of "classical" Fundamental Diagram #499):
    • compute_flow(..., individual_speed=None) now computes low directly from
      t and crossing_frames without requiring individual_speed (returning [flow] when omitted and [flow, mean_speed] when supplied).
    • Added compute_classic_fundamental_diagram (exported at top level in pedpy) to pair each [first_frame, last_frame] crossing-flow window with the mean classical density from compute_classic_density over that exact frame interval.

@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.67925% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.89%. Comparing base (0604d9a) to head (7a01885).

Files with missing lines Patch % Lines
pedpy/methods/flow_calculator.py 88.67% 6 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compute_line_flow unit Calculation of "classical" Fundamental Diagram

1 participant