Repository navigation
docs: describe how PyNEATS really uses AO performance inputs - #75
Merged
Merged
Conversation
The decision tree in input-prioritization.md and rules 1-5 in mrv-specification.md described exclusive cases that the code does not follow. They now describe the code: - every flight needs its type in the BADA mapping (wingspan, engines); - the BADA thrust and fuel-flow calculation is skipped only when fuel flow, engine efficiency and aircraft mass are all provided; - otherwise the mass is the AO mass, else the AO TOW, else the iterative estimate, whatever fuel flow or efficiency were provided; - fuel flow is the AO value, else derived from the AO mass decrease, else BADA; efficiency is the AO value, else from BADA thrust and fuel flow; - notes on mass with AO fuel flow, empty points, the fuel-burn check and the low-speed filter (to update when the filter work is done). Also corrects, on the same pages: the modelled take-off weight (the iterated value, not the first guess), the BADA type mapping and engine UID text, the accuracy-table notes, "missing points are filled by interpolation", and "TAS is set to 0 below 840 hPa" (the wind is set to 0). Checked by running a golden flight with each input combination. Units audit: Section 9 rows, A13 note, new item I9 (segment_duration not recomputed after the speed filter), follow-up status table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ramondalmau
added a commit
that referenced
this pull request
Oct 21, 2026
…ry; fuel-burn rejections are retried (#76) * fix(performance): a failed attempt no longer leaks columns into the retry run() passes the same preprocessed DataFrame to the first attempt and to the BADA3 retry, and the altitude fallback does the same for its two attempts. run_by_bada_version writes aircraft_mass, thrust, fuel_flow and other columns into it before the fuel-burn guardrail. After a guardrail rejection on BADA4, the BADA3 retry took those columns as AO data. With AO fuel flow and engine efficiency, it then saw "fuel flow + efficiency + mass provided", skipped BADA and returned the flight without the guardrail. Each attempt now works on its own copy of the DataFrame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs(audit): record I10, the column leak into the BADA3 retry Also points the rows of the merged docs PR to #75. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(performance): the speed filter receives a copy of the attempt DataFrame Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(performance): a fuel-burn rejection is final, with no BADA3 retry With the column leak fixed, a flight rejected by the fuel-burn guardrail on BADA4 would be computed again with BADA3 and could be accepted with BADA3 numbers. Before, that retry always failed (it reused the rejected BADA4 fuel). An impossible total fuel points to bad trajectory or AO data, not to the BADA version (maintainer decision). A failure raised with retryable=False now ends the fallback chain: no BADA3 retry in run() and none inside the altitude fallback. Besides the guardrail, only "BADA file without MTOW or OEW" and "missing initial mass" carry that flag; neither occurs with the files and data in use. Tests: the rejection is final (AO fuel flow + efficiency, no AO data, efficiency only); a retryable BADA4 failure still retries with BADA3 and the retry starts clean; same rule inside the altitude fallback. All fail on the previous code. Docs: run() docstring, user docs (fallback chain, fuel-burn check note), units audit I10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(performance): retry fuel-burn rejections with BADA3 and the altitude fallback Maintainer decision, replacing the previous commit's "rejection is final": the fuel-burn guardrail error is now retryable. A rejected flight is retried with BADA3 (now clean, see the column-leak fix), then with the altitude fallback (points below FL20 removed), and fails only if every attempt is rejected. run() and the altitude fallback keep honouring retryable=False before their BADA3 retries; on this path only two internal consistency errors carry that flag (no MTOW/OEW when the take-off mass is estimated, no initial mass), and neither occurs with the BADA files in use. Tests: a rejection is retried with BADA3 and accepted when BADA3 is plausible (no AO data, AO efficiency only); with impossible AO fuel the altitude fallback runs. All fail on the code before the fix. Docs: run() docstring, user docs (fuel-burn check note, fallback chain, mrv-specification rule 2), units audit I10 with a before/after table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: state when the FL20 retry runs; record two pre-existing retry quirks in I10 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs only, no code change.
The decision tree (input-prioritization.md) and rules 1–5 (mrv-specification.md) described
exclusive cases the code does not follow. They now describe the code:
are all provided;
efficiency = AO, else BADA thrust and BADA fuel flow;
(to update when the low-speed filter work is done).
Also corrected on the same pages: modelled take-off weight, BADA type mapping and engine UID,
accuracy-table notes, "missing points are filled by interpolation", "TAS is set to 0 below
840 hPa".
Evidence: a golden flight run with each input combination; every statement checked by
independent review against the code. Units audit updated (Section 9, A13, new item I9,
status table).