Porting status
What is currently implemented, by upstream source library, for both the shared C++ core (the faithful port itself) and the R/Python packages (hecfdar / hecfdapy). “Internal” means the core carries a validated port that the packages use under the hood but that has no public wrapper of its own yet. Every “Ported” row is validated by oracle fixtures replayed against the real HEC-FDA C# libraries.
The packages provide matching workflow APIs rather than class-for-class bindings. See the version 0.2.0 parity contract for the boundary between core, package, and release parity.
Status as of 2026-09-05. Version 0.2.0 tracks HEC-FDA v2.1.0 at 2e60f22b. The current C# oracle replay reproduced 905 assertions with 0 failures.
HEC.FDA.Statistics
| Area | C++ core | Packages | Notes |
|---|---|---|---|
| Distributions (13 families) | Ported | Public (9 of 13 name-addressable) | dist_pdf/dist_cdf/dist_quantile/dist_sample reach Normal, Uniform, Triangular, Deterministic, LogNormal, TruncatedNormal, TruncatedLogNormal, LogPearsonIII, TruncatedLogPearson3 by name. Gamma, ShiftedGamma, and PearsonIII are internal helper classes, not factory members, so they have no name string; Empirical is a full distribution but is built from data, not constructed by name |
| Special functions (gamma/beta closure) | Ported | Internal | reg_incomplete_gamma, log_gamma, beta family |
| Sample statistics | Ported | Internal | including the upstream unsorted-median bug, reproduced faithfully |
| Validation subsystem | Ported | Internal | ErrorLevel + property rules |
| Convergence criteria | Ported | Internal | drives the Monte Carlo iteration bounds |
| Dynamic histograms | Ported | Internal | consequence binning + empirical conversion |
.NET System.Random |
Ported (bit-exact) | Public | rng_sequence; the foundation of cross-language reproducibility |
HEC.FDA.Model (numerical core)
| Area | C++ core | Packages | Notes |
|---|---|---|---|
| Paired-data curve algebra | Ported | Internal | compose/multiply/integrate, the faithful .NET Array.BinarySearch, graphical uncertainty |
| Structures and occupancy types | Ported | Internal (via stage_damage) |
value/ratio/first-floor-elevation uncertainty samplers, inventory |
| Stage-damage compute | Ported | Public | stage_damage(); deterministic path oracle-validated (TractableStageDamageTests) |
| EAD Monte Carlo simulation | Ported | Public | ead_simulation(); aggregate and exact Fail/Non_Fail EAD are exposed, and seeded per-curve constants reproduce the C# bit-for-bit (121194.5159789352 at 100 iterations) |
| Performance metrics (AEP, assurance, levee fragility) | Ported | Partial | ead_simulation() returns mean_aep (default-threshold AEP); assurance and levee metrics stay internal |
| Scenarios (impact-area fan-out) | Ported | Public | scenario_results() returns aggregate and exact-risk summaries |
| Alternatives (EqAD annualization) | Ported | Public | alternative_ead(), eqad(); shared HEC-FDA 2.1 analysis-year validation |
| Comparison report (with/without benefits) | Ported | Public | alternative_comparison() returns aggregate and exact-risk reductions |
Not ported (severed by design)
HEC-FDA surfaces outside the numerical core were severed from day one, not deferred: RAS-Mapper terrain and inundation reading, GIS/Spatial, RAS-grid hydraulics ingest, SQLite/DBF persistence, XML serialization, LifeLoss (LifeSim), and the WPF/MVVM application layer. Users supply already-extracted inputs (stage-frequency curves, per-frequency hydraulic stage profiles, structure inventory tables) as plain arrays and data frames.
HEC-FDA 2.1 behavior
Fail and Non_Fail are stored consequence identities. Total is a query wildcard that sums matching rows. Default totals therefore include non-failure consequences when they are present. Failure-only 0.1.1 inputs keep their prior values and schemas. R and Python append non_failure_stage_damage and the risk-specific ead_by_risk, summary_by_risk, alternative summary, and reduced_by_risk tables without reordering legacy entries.
Analysis periods must be at least two years. The future year must be later than the base year, and the inclusive base-to-future span must fit within the period. Validation occurs before a single-use scenario handle can be consumed.
The HEC-FDA 2.1 release also changed the ASCII importer, impact-area scenario editor, life-loss display text and warnings, and occupancy-type export UI. Those adapters and UI surfaces remain outside this numerical port. User-facing documentation uses EALL terminology.
HEC-FDA 2.1 whole-impact-area handling is retained. A base-year impact area absent from the future year produces the upstream diagnostic UNASSIGNED row with region 9999. An impact area present only in the future year raises the upstream unmatched-future-results error.
Release readiness
The 0.2.0 packaging includes a probed R compiler flag, portable installed header paths, local source and wheel checks, installation and testing of a wheel built from the exact Python source distribution, and CPython 3.10 through 3.14 wheel configuration for 64-bit Linux, macOS, and Windows. This GitHub source release does not publish packages to CRAN or PyPI.