Skip to content

fix(awb): shipped AWB examples agree — spares, PM spares, multi-mode Weibull, sidecar - #344

Merged
danyill merged 16 commits into
mainfrom
feat/awb-import-export
Nov 19, 2026
Merged

danyill merged 16 commits into
mainfrom
feat/awb-import-export

Conversation

@danyill

@danyill danyill commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Follow-up to the AWB import/export work already on main (#288, #339).

Import fixes (shipped AWB examples now agree)

  • Spare pools never run dry. A zero-stock AWB spare was imported with no ordering, so a block's first demand left it Done (No_spares) for the rest of the run. AWB level 3 is unlimited: pools now emergency-order after the level 1+2+3 delay, and stocked pools reorder one-for-one.
  • Imported PM does not wait for pooled spares. AWB's spare logistic delays hold up corrective actions only. Reported as a partial mapping.
  • Multi-mode Weibull. Bi-/tri-Weibull laws are moment-matched (mean and CV) to the competing-risk life. The bi-Weibull's unused mode-3 placeholder (8760 h) is ignored. This is an approximation, documented as such.
  • Sidecar block data restored. block_extras was keyed by RAPTOR ID but looked up by name, so it was never applied. It is now keyed by name and carries PMSpare.
  • Earlier commits on this branch: GUI reduced-model export and the inspection detection-delay approximation for dormant failures.

Shipped-example comparison (100 trials, AWB stored results)

Project AWB Am RAPTOR A
OilAndGasExample 0.9732 0.9747
SapDemo 0.6293 0.6522
Example1 0.0883 0.0959
MaximoDemo 0.6118 0.3654 (stored AWB results look stale vs its own spare data; see docs/AWB_VALIDATION.md)

Before these fixes, SapDemo, MaximoDemo and Example1 came out at about 0.5 % available.

Checks

ruff, mypy gate (0/0), engine docs check, AWB/MCP/docs/manpage/snapshot unit tests; docs/manual.html re-rendered after merging main.

Read and write AWB 5.0 .awb table stores, map RBD blocks, nodes, links, hierarchies and failure/repair laws, and print a summary of the features either side cannot represent. Adds raptor convert (with --strict and Markdown/JSON reports) and File-menu import/export entries, plus docs/AWB_FORMAT.md.
…anual

Adds the .awb file entry, the interchange capability table and the File view commands to the reference manual. The format guide remains docs/AWB_FORMAT.md.
Screens all 27 example models, compares the six exactly representable ones at 10,000 trials, and records the compatibility gaps for the rest. Adds AWB_VALIDATION.md and links it from the manual and format guide.
The comparison stays in the standalone docs/AWB_VALIDATION.md note; the manual keeps only the capability and limitation summary.
Adds optional AWB tables for scheduled maintenance, spare and resource links, phases, block phase rules and text labels; imports them back into RAPTOR as PM, spare pools, resource pools, phases and cut/linked phase states. Applies out-of-service what-ifs to the AWB copy and keeps AWB Type=-1 for untyped labour/spare rows. Updates the manual and validation notes.
Adds report categories, a hashed RAPTOR sidecar, a reduced-model normalizer, CLI/API/MCP dry-run and normalize options, a GUI preview command, and MCP export/import tools. Documents large-model risks and the CarWash1 phase and CarCare0 normalized checks.
…bull modes

AWB level 3 is an unlimited source, but a zero-stock AWB spare was imported
as a RAPTOR pool with no ordering at all, so the first demand left the block
Done (No_spares) for the rest of the run: SapDemo/MaximoDemo/Example1 came
out ~0.5 % available. Pools now always emergency-order after the summed
level 1+2+3 logistic delay, and stocked pools reorder one-for-one.

Bi-/tri-Weibull laws were reduced to the shortest-eta mode, which for a
bi-Weibull included AWB's unused 8760 h third-mode placeholder. They are now
moment-matched (mean and CV) to the competing-risk life of the modes the law
actually uses. This is an approximation, not an exact conversion.
…sidecar data

AWB spare logistic delays hold up corrective actions only (manual, Spares -
Overview), but the import linked each AWB planned task to the spare pool, so
every RAPTOR PM waited the whole level 3 -> 1 supply chain (576 h in
Example1). Imported PM no longer draws on the pool; reported as partial.

The sidecar keyed block_extras by RAPTOR ID but apply_sidecar looked blocks
up by name, so no per-block sidecar data was ever restored when the two
differed. Key by block name, and carry PMSpare so a RAPTOR model's own PM
spare setting survives the round trip.

Docs: AWB_FORMAT describes the spare supply mapping and the moment-matched
multi-mode Weibull.
# Conflicts:
#	docs/AWB_FORMAT.md
#	docs/AWB_VALIDATION.md
#	docs/MCP-reference.md
#	docs/man/raptor-convert.1
#	docs/manual.adoc
#	docs/manual.html
#	raptor/cli/cmd_info.py
#	raptor/core/fileio/awb.py
#	raptor/gui/command_table.py
#	raptor/mcp/output_schemas.json
#	raptor/mcp/tools_model.py
#	tests/unit/test_awb.py
#	tests/unit/test_mcp_tools_model.py
@danyill
danyill merged commit dd44b98 into main Nov 19, 2026
24 checks passed
@danyill
danyill deleted the feat/awb-import-export branch November 19, 2026 22:52
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.

1 participant