Backend selection#
- get_backend_info(backend=None)#
Return backend metadata without creating a network.
- Parameters:
backend -- Backend name. Use
Noneto select an available backend.- Returns:
The backend name, library path, and sparse solver name.
- class GroupCase(name, rows, skipped=<factory>)#
Store member results for one case in a group study.
- static row_json(r, header)#
One row of the SQL
deliverabilitytable: the member's weight and request, the group's answer, the member's share of it, the full-versus-partial verdict, and what bound the group.
- static upgrade_id(r)#
This study's identity columns on a row of the
upgradestable. The members share one transfer, so each drives the element in its own proportion and the shares add back up to the group's.
- static cols(header)#
Return report columns for the group-deliverability table.
- static binding_cols(header)#
The binding-case table of a case set, in this study's columns.
- class GroupMember(kind, weight, request_mw, group_mw, headroom_mw, *, bus, label, case, dc, ac=None, limit_type='unconstrained', limiter=None)#
Store one member's weighted share of group delivery.
headroom_mw = group_mw * weight.request_mwuses the same case dispatch assumption that produced the weight. Every member shares the group's DC, optional AC, and limiter results.- property verdict#
Whether the group delivers this member's whole request here.
- class CaseSetReport(header, cases, binding, stats=<factory>, timing=<factory>)#
Store interconnection-screen results for a set of cases.
casesholds the per-case records in declaration order and is never empty.bindingholds each candidate's lowest-headroom case.timingholds the run's seconds and counts per tier; the screen runs every case in one call, so the clock belongs to the set.- classmethod of(header, cases, *, timing=None, **stats)#
Build a report and derive binding rows from its case results.
- doc()#
Return the result document: the scalar header, with the column bindings for the row-tables, which live on the queryable slot and are queried in SQL.
- as_tables()#
Row-tables for the SQL query surface:
binding(one row per candidate, its worst case), the per-case table named by the screen that ran,screen,headroomordeliverability, holding every candidate in every case, andupgrades.upgradesis that same per-case set exploded over each candidate's ranked NETWORK limiters (result, never the capped answer), carrying the flow the candidate drives on each element. Grouping it byelementis proportional-impact cost allocation over a result that already exists. This requires one query and no second solve.
- column_quantities()#
Return the quantity each projected column binds, keyed by table then column.
The screen that ran owns the row schema, so it owns the bindings too: the per-case table and the binding table hold the same columns, and the upgrade table holds that screen's identity columns beside what
driver_share()writes.
- to_markdown(path=None)#
Return the case-set report as Markdown.
- class ScreenedCase(name, rows, skipped=<factory>)#
Store one case's rows and dropped contingency declarations.
The case receives screen-wide header data as an argument. A report pose supplies row serialization, upgrade identity, and column specifications.
- classmethod binding_columns()#
Return the column bindings of the
bindingtable.
- classmethod upgrade_columns()#
Return the column bindings of the
upgradestable.
- classmethod binding_json(r, header)#
Return one row of the
bindingtable.
- classmethod table_rows(r, header)#
Return the per-case table rows one screened row projects.
- classmethod upgrade_rows(r, header)#
Return one
upgradesrow per pre-existing violation and ranked network limiter.
- rendered_rows(header)#
Return the rows used by this case's Markdown table.
- classmethod rendered_binding(rows, header)#
Return the rows used by the binding Markdown table.
- section(header)#
Return this case's table and footnotes without a heading.
- class ScreenHeader(sink, contingencies, ranked, contingency_rating='normal', strength=False, scr_threshold=3.0)#
Describe the common settings for one interconnection screen.
sinkidentifies the withdrawal point.contingenciesis the declaration the screen evaluated, as written.rankedidentifies the result tier used to compare candidates.contingency_ratingidentifies the rating set applied after outages.scr_thresholddefines a weak grid.- weak(scr)#
Return the weak-grid flag, or
Nonewhen SCR is unavailable.