Expand description
A model set as views, for whatever draws them: its grid at substation
level (grid, laid out by layout) and its objects as a tree
(tree), with validation’s findings counted on each. cimlsp serves
them to the VS Code extension. Runs on wasm32-unknown-unknown too.
The files themselves, as text: where each object and field is written
(index, in text’s positions), and edits to them across a set
(edit): renaming, deleting, adding objects and fields.
The views answer in JSON. Where an object is written is not in the data:
the caller says, through Locations.
Modules§
- edit
- Edits across a model set, as text edits for whoever holds the files to apply: renaming an mRID, deleting objects and adding a field a finding says is missing; and the objects a reference can name, the likeliest first; adding an object in a container. They change the files as written, keeping everything else of them, and reach every file of the set: an object’s EQ, SSH and SV elements and every reference to it.
- grid
- A model set’s grid at substation level, for a grid view:
substations (and boundary points no substation holds) as nodes, the
equipment joining two of them (lines, mostly) as edges, and each
object’s findings counted on the node or edge it belongs to. Where the
set has a Diagram Layout or Geographical Location profile, each diagram
and coordinate system is a
Layout: node positions and line routes. What each substation holds is itsInside, for the view’s drill-down. - index
- Where things are written in an RDF/XML document.
- layout
- The grid view’s automatic layout (Cytoscape’s
coseis quadratic in the nodes on every iteration: RealGrid’s 4875 substations do not finish). - refresh
- The model decoded from a set of files, brought up to date with an edit of them by decoding again only the objects the edit touched. Decoding RealGrid’s 117 MB anew takes some 0.9 s, and an edit in an editor touches a handful of objects.
- schematic
- The grid’s automatic layout as a schematic: lines only horizontal, vertical or at 45°, as transmission overview diagrams draw them.
- single_
line - A substation’s automatic layout, drawn as a single-line diagram is: busbars as horizontal bars, the bays hanging from them as vertical columns, and every line horizontal or vertical.
- state
- The state a model set’s SV profile publishes, as a power flow’s overlay of the grid: each node’s voltage, each terminal’s flow and its loading against the lowest PATL, and each grid node’s range of voltages. In the shape a solved power flow overlays the grid with, so the views draw either the same way.
- text
- Places in a document’s text and edits to it, as an editor counts them: lines from 0, and
columns in UTF-16 code units, as LSP and JavaScript strings do. They serialize as LSP’s do
(
{ "line", "character" },{ "start", "end" },{ "range", "newText" }). - topology
- Topology edits inside a substation, as text edits across a model set: opening and closing a switch, deleting equipment with what only exists for it, wiring a terminal to another node, adding equipment with its terminals and nodes, inserting a switch into a wire, and whole bays from templates. Each operation gives the edits of every file it changes together (EQ, SSH, and the diagram objects it deletes), to apply as one.
- tree
- A model set’s objects as a tree, for the extension’s model view. Its sections:
Traits§
- Locations
- Where a set’s objects are written, which only the caller of a view knows: a language server has ranges in documents, a page only file names.
Functions§
- mrid_of
- The mRID in a reference or an id as written: the text after the last
#.