bloc.boulder_plugins.kpi_summary_pane#
Summary-tab rows built from the model’s own KPI function.
Boulder’s Summary tab renders whatever rows the active summary builder
returns, and its default builder lists temperature, pressure and volume per
reactor – true, but not what an engineer reads a run for. A config that
declares export.kpi_fn already knows how to compute the numbers that
matter (yield, conversion, energy cost, specific energy), and the Calculation
Note reports exactly those. This builder claims such configs so the GUI shows
the same figures as the note, without a per-model opt-in: Boulder picks the
first compatible builder, and this one is compatible only when a KPI
function is declared.
Rows follow the curated category tables of the reactor kind, so the tab shows the same keys, labels and units as the note’s OUTPUT DATA block rather than several hundred raw species fractions.
Attributes#
Classes#
Report the model's KPIs instead of per-reactor T/P/V. |
Functions#
|
Turn a KPI dict into Summary rows, in the note's category order. |
Module Contents#
- bloc.boulder_plugins.kpi_summary_pane.logger#
- bloc.boulder_plugins.kpi_summary_pane.kpi_summary_rows(kpis, config)#
Turn a KPI dict into Summary rows, in the note’s category order.
Only keys named by the kind’s category tables are reported: the raw dict also carries a per-species mole and mass fraction, which belong in the Calculation Note’s tables, not in a summary pane.
- class bloc.boulder_plugins.kpi_summary_pane.KpiSummaryBuilder#
Bases:
boulder.summary_builder.SummaryBuilderReport the model’s KPIs instead of per-reactor T/P/V.
- property builder_id: str#
Unique identifier for this summary builder.
- property name: str#
Human-readable name for this summary builder.
- is_compatible(context)#
Return True when the config declares a KPI function and a network solved.
- build_summary(context)#
Resolve and run the configured KPI function over the solved network.
Never raises: a KPI function that fails must not cost the user their results, so the failure is reported as one row and logged.