Skip to content

About

A modern version of Raptor 7 reliability block diagram modelling (RBD) software in Python 3.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

919 Commits

Folders and files

Repository files navigation

RAPTOR Studio

An open-source reliability block diagram (RBD) simulator for Windows, macOS and Linux. Draw a diagram of parts that can fail and be repaired, run thousands of simulated futures, and read availability, reliability, maintenance, spares and cost numbers like an engineer. Then let it tell you what is driving the downtime, and which fix is worth making, tested before you spend anything.

RAPTOR Studio: draw a system, simulate it, see what drives the downtime, test a fix (animated tour of the application)

RAPTOR Studio carries on from Raptor 7, the simulator written at ARINC and released as open source by Booz Allen Hamilton. Its simulation engine was ported from Raptor 7's own source and checked, event by event, against what Raptor 7 itself writes, so the numbers are the ones reliability engineers already trust. Models made in Raptor 7 open here. Around that engine is a new application, a command line, and an AI-assistant server, and every analysis below works the same way in all three.

Like Raptor 7, it is released under the Booz Allen Public License (BAPL). Anyone may use, modify and share it, but a commercial entity may use it only for its internal business and for services to government and non-profit organisations, and nobody may charge a fee for it without Booz Allen Hamilton's permission. See Licence & credits.

Why use it

  • Numbers you can rely on. The detailed event logs and report files of hundreds of models captured from Raptor 7 are reproduced character for character, including its random-number generator. Where Raptor 7 does something surprising, the port reproduces it and says so.

  • It says why, not just how much. After a run, the Story explains in plain words what took the system down, and Drivers ranks every part by its share of the downtime, split by cause (hands-on repair, waiting for a spare, waiting for a crew, planned maintenance) and by mission phase, with its uncertainty.

  • It tests the fix before you buy it. Recommend tries a change for each part that drives the downtime and measures what each would gain. What If compares your own changes. Both run the change on the same random futures as the base model, so a small gain is a real one, and they say when the difference is still noise.

  • It catches mistakes as you build. The Advisor checks the model the way a reviewer would: a backup that depends on the unit it backs up, redundant units maintained at the same time, spares that will run out, a crew that is overloaded. Each finding says why, many come with a fix you can apply in one step, and a finding you ignore keeps your reason with the model.

  • Built for speed. Runs split across your processor cores, and the engine, layout, validation and file loading have been tuned so that models with hundreds or thousands of blocks are practical to build, open and run. raptor estimate times a few runs and tells you how long a full batch will take before you start it, and Trials to Precision keeps running until the answer is as tight as you ask.

  • Runs anywhere. One installer or pip install, on Windows, macOS and Linux.

  • Scriptable. Everything the application does is also a command (raptor run, advise, explain, whatif, recommend, sensitivity, optimise, sweep, compare, diff, render and more) with machine-readable results. It fits in a continuous-integration job, a Jupyter notebook or a shell loop.

  • Usable from an AI assistant. An MCP server with 96 tools (95 when --no-render hides the PNG diagram tool) lets an assistant build, edit, validate, simulate, explain and improve models, run long batches in the background, and draw the diagram. The MCP server guide covers install, client setup, concepts and task recipes; the generated tool reference lists every tool, parameter and return. The recording below is a real run of those tools (the numbers are the engine's; the assistant's narration is scripted):

    An assistant builds a cooling-loop model, simulates it, finds what drives its downtime and recommends a tested fix through the MCP server

  • A model file you can read and diff. .rbds is one JSON document with friendly field names, and raptor diff (or File ▸ Differences) says in words what changed between two versions of a model. .rbd files open and save exactly as before.

  • Interchange with Availability Workbench. raptor convert reads and writes Isograph AWB 5.0 .awb projects and prints a summary of the features either side cannot represent — capacity products, PM tasks, spares, cost models and the rest — so a conversion never loses something silently. See docs/AWB_FORMAT.md.

  • Documentation that ships with it. Break It Before It Breaks, a 26-chapter tutorial book with a model for each chapter that opens from the page, a field-by-field reference manual, and a formulas page. F1 opens the right section.

From "how good is it?" to "what should we do?"

A simulation answers how available is the system. The questions an engineer is asked next are why not more, what should we change and is it worth it. RAPTOR Studio answers them in order:

  1. Check the model. The Advisor (View ▸ Advisor, raptor advise, MCP advise) lists likely mistakes and unwise choices, each with the element it concerns and, where there is one, a fix you can apply in one step. After a run it also reads the results: downtime spent waiting for spares or crews, planned maintenance that takes the system down, a few bad runs that drive the average.
  2. See what drives the downtime. After a run the results open on the Story: a few sentences on what happened, with links to the parts it names. Drivers ranks every block, event and hierarchy by its share of the system's downtime and of its outages, with the cause of each and an error bar. Show on Canvas colours the diagram by that share; with capacity analysis on, it draws the lost flow as the thickness of the links. On the command line raptor explain does the same; from an assistant, simulate with attribution and then downtime_drivers or run_story.
  3. Find a fix and prove it. Recommend (raptor recommend, MCP recommend_changes) tries a targeted change for each top driver, chosen from the cause of its downtime (a faster repair, a longer-lived part, one more spare or crew, maintenance half as often). It runs each against the base on paired random futures and reports the gain with its uncertainty, a verdict (clearly helps, may help; run more trials), and its cost where the model prices it. What If does the same for changes you choose, checks them against requirements such as system.ao>=0.995, and applies the one you pick as a single undo step.
  4. Know which numbers matter. Sensitivity draws a tornado of the inputs that move the answer most, so you know which failure data is worth chasing. Importance measures (Birnbaum, RAW, RRW and Vesely–Fussell, the IEC 61078 Annex D measures, each with its sampling error) rank blocks by structure.
  5. Size the support. The optimisers search for the least spare stock that meets a target, whether planned maintenance is worthwhile and at what interval, and how many crews are enough, and hand back the result as changes you can apply (raptor optimise spares|pm|resources, MCP optimise_*).

Everything above runs on a copy of the model and changes nothing until you apply it.

What is new compared with Raptor 7

Advisor Nearly 40 checks a reviewer would make, many with a one-step fix; findings you ignore keep their reason in the model; result-aware checks after a run; badges on the canvas.
Downtime attribution Each part's share of the downtime and of the outages, by cause and by mission phase, with error bars; the Story page; the Drivers chart; lost capacity and cost broken down the same way, as charts and treemaps.
Recommend and What If Tested changes for the top drivers, and your own scenarios, compared with the base on paired runs; requirements; apply the winner as one undo step.
Sensitivity and optimisers Tornado of the most influential inputs; spare stock, maintenance interval and crew size searches against a target.
Trials to Precision Run until the answer is as tight as you ask (raptor run --precision 10%), instead of guessing a run count.
Estimate from experience No failure data? Give two or three "by this age, this fraction had failed" judgements and get a fitted life law (raptor fit, MCP fit_from_experience).
Part library and assemblies Save a block's data as a part type and keep linked blocks in step with it; save a group of elements as an assembly and insert fresh copies (raptor library).
Out of service Take a block, event or hierarchy out of service for a what-if (cut: down all run; linked: never fails) without touching its data; every result says so.
Importance measures Rank blocks by Birnbaum, RAW, RRW and Vesely–Fussell importance, with sampling error, a results tab and a canvas overlay.
Parallel batches Runs spread over your cores (-j N on the command line); results are reproducible for a given core count, and one core reproduces Raptor 7's own random sequence exactly.
Check part of a model Run one hierarchy on its own, with its input assumed available, or save it as a standalone model (raptor extract). The results are labelled as isolated.
Sweeps and comparisons Vary any field over a list of values, or run two or more models side by side. Differences shows what is different between two models, and runs nothing.
AI assistant (MCP) 96 tools (95 with --no-render) to build, edit, run, explain and improve models, over stdio or authenticated HTTP.
Stepping debugger Step a run event by event, pause on a condition, jump to the next run, and see what each step changed. Failure Effects View and the Single Point Failure file are also available headless.
Faster editing Command search finds any command by name; Quick Add repeats the selected block in series or parallel (1 of 2, 2 of 3, 1 of 3); Duplicate in Parallel adds a redundant copy with the nodes it needs; several models open at once, each with its own undo history.
Charts and reports One Charts view (availability through the run, run-to-run system state you can zoom into, downtime, cost, capacity); presentation-ready export; reports as PDF, HTML, AsciiDoc, spreadsheet, CSV or JSON (a versioned schema).
Diagram Light and dark themes, dockable panels, annotations, mini-map, key tips, a "Did you know?" tip on the Start page, and a diagram renderer for documents (raptor render, with the result layers).
Safer files Validation catches the model shapes that crash Raptor 7 on open (a node's declared path count, a stale phase header) before you save them.

Install

Windows / macOS / Linux (recommended for non-technical users)

Grab the installer for your platform from the Releases page:

File Platform Install
raptor-studio-*-windows-setup.exe Windows 10/11 (x64) Double-click, follow the wizard
raptor-studio-*-windows-portable.zip Windows 10/11 (x64) Unzip anywhere, run raptor-studio.exe
raptor-studio-*-macos-arm64.dmg macOS 13+ (Apple Silicon) Open the DMG, drag RAPTOR Studio to Applications
raptor-studio-*-macos-x64.dmg macOS 13+ (Intel) Open the DMG, drag RAPTOR Studio to Applications
raptor-studio-*-linux-amd64.deb Debian/Ubuntu (x64) Double-click or sudo apt install ./…deb
raptor-studio-*-linux-x86_64.AppImage Most Linux distros (x64) chmod +x the file, then run it

Verify the checksums against SHA256SUMS.txt in the same release. The installers carry the desktop application only; the raptor command line and the MCP server come with the pip package (below).

File types: the Windows installer, macOS app and .deb register .rbds and .rbd so a double-click opens the model in RAPTOR Studio. On a machine with Raptor 7, .rbd keeps opening Raptor 7 by default and RAPTOR Studio is added under "Open with". The AppImage cannot register file types system-wide; run raptor-studio model.rbds or use File → Open.

macOS note (unsigned build): Gatekeeper will ask for confirmation. Right-click RAPTOR Studio → Open → Open, or run xattr -cr "/Applications/RAPTOR Studio.app" once in Terminal.

Windows note (unsigned build): SmartScreen may show "Windows protected your PC" — click More info → Run anyway.

PyPI (technical users, and for the MCP server)

pip install raptor-studio              # the application and command line
pip install "raptor-studio[mcp]"       # plus the MCP server for AI assistants

or, isolated from your system Python:

pipx install "raptor-studio[mcp]"

For the assistant server alone, uvx raptor-studio-mcp --workspace ~/raptor-models runs it without an install step.

Then run raptor-studio for the application, raptor --help for the command line, or raptor-studio-mcp for the assistant server. pip puts these three commands in the environment's bin folder (Scripts on Windows), so in a virtual environment either activate it first (source .venv/bin/activate, or .venv\Scripts\activate on Windows) or give the full path, such as .venv/bin/raptor --help. pipx and uv tool install put them on your PATH for you. Requirements: Python 3.12+. The PDF export uses WeasyPrint, which needs system Pango — Linux: sudo apt install libpango-1.0-0 libpangocairo-1.0-0, macOS: brew install pango. The Windows/macOS installers bundle it.

The installers make double-clicking a .rbds or .rbd file open RAPTOR Studio. After a pip install, run raptor register-file-types once to do the same for your user (Windows and Linux; --dry-run lists the changes, --unregister undoes them). .rbd is Raptor 7's extension, so it is left alone when another program already opens it, unless you add --force.

Windows note (path too long): Qt for Python (PySide6) installs some very deeply nested files. If pip stops with OSError: [Errno 2] No such file or directory and a hint about Windows Long Path support, the install folder's path is too long for Windows' 260-character limit. It happens most with the Python from the Microsoft Store, whose package folder is already about 150 characters long. Any one of these avoids it:

  • use the Windows installer above, which needs no Python;
  • install into a virtual environment with a short path: py -m venv C:\raptor then C:\raptor\Scripts\pip install raptor-studio;
  • use uv tool install raptor-studio or pipx install raptor-studio;
  • or enable long paths in Windows (needs an administrator).

A first run from the command line

raptor validate model.rbd            # errors and warnings
raptor advise model.rbds             # what looks wrong or unwise, with fixes
raptor run model.rbd -n 200 -j 4     # 200 runs on 4 processes, summary on screen
raptor run model.rbds --precision 5%    # keep running until the answer is within 5 %
raptor explain model.rbds --story    # what drives the downtime, in words
raptor recommend model.rbds -n 200   # a tested change for each top downtime driver
raptor whatif model.rbds --change "block:Pump A.repair_params=6,1,0" -n 200   # one change against Base, paired
raptor sensitivity model.rbds --top 8 -n 100   # which inputs the answer is most sensitive to
raptor optimise spares model.rbds --target "system.ao>=0.995"   # the least spare stock that meets a target
raptor run model.rbd -n 500 --importance both   # rank the blocks by importance
raptor run model.rbd -r events -r end-of-run -o results/   # also write Raptor 7-format report files
raptor sweep model.rbd --vary "block:Pump A.repair_params[0]=12,24,48" --metric Availability
raptor diff before.rbds after.rbds   # what changed between two versions

raptor help lists every command and topic.

Learning materials

The app opens on a start page with a blank model, worked examples (from the guide's basics to a hospital's emergency power, a water-treatment works, a data centre and a phased airliner flight) and links to the built-in documentation, which the Help ribbon tab also opens:

  • User Guide — the tutorial book Break It Before It Breaks: 26 chapters, from a three-block lantern to a phased airliner flight, with companion .rbds models you can open straight from the book (the opsmodel buttons).
  • Reference Manual — field-by-field reference; F1 jumps to the section for the focused panel or dialog.
  • Formulas — every metric, the importance measures and the distribution table as equations, on one page.
  • Keyboard shortcuts — docs/KEYBOARD_SHORTCUTS.md, also under Help. Press Alt in the app to show the key tips on the commands that have one.
  • AI assistant — the MCP guide, the generated tool reference, and the book's MCP chapter.
  • File format — docs/RBDS_FORMAT.md describes the .rbds JSON format, docs/AWB_FORMAT.md describes the Availability Workbench .awb interchange, and docs/AWB_VALIDATION.md gives the example-by-example AWB comparison.
  • Analytical solver — docs/ANALYTICAL.md covers the exact static solver: scope, assumptions, CLI and API.

IEC 61078

IEC 61078:2016 defines reliability block diagrams and the methods used to evaluate them. RAPTOR Studio uses the same vocabulary (series, parallel, m-out-of-n, sub-RBDs, repaired and non-repaired blocks) but evaluates a model by Monte Carlo simulation, which lets it include repair, spares, phases, dependencies and limited resources. It is not a certified implementation of the standard, and this is a capability statement, not a compliance claim.

In short: series, parallel, mixed and m-out-of-n structures, repaired and non-repaired blocks and sub-RBDs are supported, and the standard's worked examples are regression-tested against the simulator. The Annex D importance measures are estimated by re-simulation (see above); the exact analytical solver also computes them on its static subset. Minimal cut/tie sets, PFDavg, repeated blocks, non-coherent blocks and PAND/SEQ/CCF gates are not implemented. Boolean/BDD evaluation is internal to the analytical solver, not a separate qualitative output. The full clause-by-clause table is in docs/IEC61078.md; MCP clients can read it with read_doc('iec61078').

How the fidelity is checked

The engine is tested against files written by Raptor 7 itself, captured while driving it under Wine and, for the hardest cases, while following its scheduler with a debugger.

  • tests/golden/ holds over 240 models with Raptor 7's output for each. Their event logs, report files and random-draw logs are compared exactly, and a scan of the captured event logs currently finds none of the recorded runs different.
  • The engine code names the Raptor 7 procedure each part reproduces, and the design of each part is described in docs/engine-design/.
  • More than 12,000 automated tests run on every change, including the application's own windows and dialogs and an adversarial test of the MCP server.

Development

pip install -e ".[dev,mcp]"   # `mcp` extra needed by the MCP server tests
pytest                        # unit + fast integration; add -m slow for UI sweeps

CONTRIBUTING.md describes the test tiers and the conventions for changing the engine. The docs render with Ruby asciidoctor: new_docs/tools/render_docs.sh (see new_docs/README.md).

Repository layout

Path Contents
raptor/ The application: core/ engine, api/, cli/, gui/, mcp/, render/
tests/ unit/, behaviour/, integration/ (incl. sweeps/), golden/ (Raptor 7's captured output; large captures gzipped), fixtures/ (probe models), ladder/, data/ (shared sample models)
new_docs/ User Guide (tutorial book), its models and build tools
docs/ Reference manual, engine design, MCP guide and tool reference, analytical solver, formulas, keyboard shortcuts, .rbds file format, AWB interchange and AWB validation, IEC 61078
tools/ Developer tools the tests and CI run: engine snapshot, coverage, type gate, doc generators
installer/ Packaging (PyInstaller, Inno Setup, deb/AppImage)
packaging/ raptor-studio-mcp, the small PyPI package the MCP Registry lists

Roadmap

Directions under consideration — ideas, not commitments, in no fixed order:

  • A live view of an assistant's work. Watch the model an AI assistant is building through the MCP server in a second, read-only window, redrawn on each edit.
  • More Raptor 7 parity checks. Keep comparing results with the original on new model shapes and rarely used options.
  • Further solution methods. Fault-tree solvers, minimal cut/tie sets, importance of whole hierarchies, and common-cause and dynamic gates. The bounded analytical solver for static RBDs is available now.
  • Richer maintenance and logistics. Shifts and supply chains that the model can express directly (crew sizing and spare stocking are available now).
  • Uncertainty in the inputs. Sensitivity, paired what-ifs, estimates from experience and run-to-precision are available now; carrying the uncertainty of the failure data itself through to the answer is not yet.

Licence & credits

RAPTOR was originally created at ARINC (Chuck Carter, Steve Brown, Tony Malerich, Elizabeth Grimes) and released as open source by Booz Allen Hamilton — many thanks to BAH. RAPTOR-derived material stays under the Booz Allen Public License v1.0 (LICENSE); new code in this port is licensed under the Apache License 2.0 (LICENSES/Apache-2.0.txt). See NOTICE.md for attribution details.

About

A modern version of Raptor 7 reliability block diagram modelling (RBD) software in Python 3.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages