Repository navigation
Release candidate RC-4 of GridSim 2.1 (versions 2.1.072 to 2.1.073), built on the 2.1.072 post-RC-3 fixes. Windows x64,
Linux x64 and macOS arm64, self-contained, no .NET install needed. Every RC-3 command, flag, default and exit code is
unchanged, and so is its output except as listed under Changed (first of all the BREAKING CHANGEs: one at rounding level, one to solves that did not converge);
the new work is in new commands and new library entry points. Requirements, verification and known limits: RC4.md.
Added
- Study cases:
study-caseruns one immutable master with dated variations, named operation scenarios and a groups
sidecar (gridsim-groups/1: area, zone, owner, feeder and free groups, bound to the case by SHA-256 and to elements by
stable identity) as one ordered, resumable batch, with agroup-summarymode.case-diffandresult-diffcompare two
cases or two result documents by identity, reporting each change with its old value, new value and unit. - Analysis verbs:
sensitivity(OTDF, PSDF, tap, dV/dQ and dV/dP, control effectiveness),qv-curve,pv-contingency,
dc-contingencyandfault-level-n1. AC sensitivities are refused as OUT OF SCOPE for cases with tap changers, DC
links, FACTS devices, static var compensators, induction machines or flow-controlling transformers. - Seeded random foundation (
gridsim-rng/1): a counter-based generator keyed by seed, domain and stream, Gaussian
deviates, a Sobol sequence of up to 64 dimensions and a thread-count-invariant reduction. Every stochastic result is
bit-repeatable from its seed; there is no default seed. probabilistic: probabilistic load flow (DC or AC, correlated inputs) and static generation adequacy (LOLP, LOLE, EENS)
by Monte Carlo, quasi-Monte Carlo or convolution, each result stating its sampling error.reliability-network: reliability and restoration on the real network, binding failure data to groups, isolating
faults with placed devices and switches, and reporting load-point indices, SAIFI, SAIDI, CAIDI, ASAI, ENS and AENS with
AC-verified restoration paths, by enumeration or seeded Monte Carlo.line-constants: overhead line constants from conductor geometry (perfect earth or the exact earth-return integral,
Kron reduction, transposition, sequence constants, optional per-unit values).rpc: a resident endpoint (gridsim-rpc/1, JSON lines on standard input and output, or TCP on loopback) that holds
loaded cases by handle and runs any verb exactly as the command line does. The Python package gainsgridsim.Session.
The endpoint has no authentication; it is a local tool and refuses a non-loopback listener unless--allow-non-loopback
is given.- Short-circuit duty:
g74(ENA ER G74 style, with decay of machine contributions),ansi-sc(ANSI/IEEE C37.010 style
E/X breaker duty),sc-61363(ship systems),sc-dc(DC auxiliary systems) and series and simultaneous fault models in
Core.iec60909is unchanged. Items that depend on paid standard text are labelled AWAITING STANDARD TEXT in the output. - Protection: a
gridsim-devices/1file places relays (ANSI 50, 51), fuses, reclosers and breakers on branches, with IEC
60255-151 and IEEE C37.112 curve families or tabulated curves. New verbsdevices-check,fault-line,sc-traceand
protection-audit(pair margins, sensitivity, instantaneous overreach, breaker rating margins). - Declarative dynamic models: user controllers as
gridsim-model/1block diagrams, validated and compiled by
user-model listanduser-model check, and bindable to a machine in a dynamics study. Each shipped library model that the
block catalogue can express matches its coded model bit for bit; the others (AcExciter, Esst4b, IEEEG1 with rate
limits, HydroGovernor) are not expressible. - Small-signal analysis of the full model:
modal-fulllinearises machines, exciters, governors and stabilisers, with
dense and Arnoldi eigen-solvers, residual-checked eigenpairs, participation, damping and frequency. Controllers the
block catalogue cannot express are reported NOT LINEARISED. dynamics-studyadaptive integration: an optionaladaptivemember runs every row a second time with a
variable-step Dormand-Prince kernel, locating events exactly and bracketing critical clearing times without a step grid.
Overcurrent relays and fuses act inside the run, and a recloser acts for its first shot only. The adaptive rows use the reduced electromechanical swing
model, and the fixed-step rows andstatusare unchanged.- Node-breaker topology: a native substation model with a topology processor, switching scenarios and
substation-state;cgmes-export(CGMES 2.4.15 and 3.0 EQ, TP, SSH, SV),cgmes-conform(a named subset of the profile
rules (eleven checks), not a conformity certificate) andcgmes-study --archive; anddgs-importfor ASCII PowerFactory DGS
files, built from public descriptions, with unconfirmed attribute mappings refused unless--accept-unconfirmed. dist3ph-mesh: meshed unbalanced load flow in an explicit phase frame (named wires, full primitive impedance matrices,
wye, delta and line-line loads, solid, impedance and shared-grid earthing, split-phase services, SWER), three-phase
transformer banks, step-voltage regulators with line-drop compensation and quasi-static series. The shipped IEEE
4-node cases and the IEEE 123-node feeder run through the Core solver.dist3phis unchanged.emt3: three-phase electromagnetic transients on a new nodal solver, with lines from line constants (constant or
frequency dependent), faults, breakers, surge arresters, saturable inductors and transformers, and a named status
instead of a last value when Newton fails. Core entry points add power electronics (valves, two-level bridge, PWM,
average-value converter, dq controller), synchronous and induction machines, MMC and VSC HVDC stations, LCC bridges, a
partitioned parallel run bit-identical at any thread count, and an RMS-EMT co-simulation interface.emtandemt-line
are unchanged.emt3documents (gridsim-emt3/1, now with a JSON schema file and an example document) take optionalmachines
(synchronous and induction machines: no-load or phasor start, torque and field-voltage steps, induction start speed and
shaft load),dc_busesandconverters(the average-value converter and the two-level bridge with sine PWM, open-loop
modulation or the dq current controller behind a filter) andhvdc(VSC stations with two-level average, MMC
arm-average or MMC sub-module converters, LCC bridges of 6 or 12 pulses, and Bergeron DC lines) keys, all through the
existing Core classes. New output kinds:speed,torque,rotor-angle,field-current,dc-voltage-positive,
dc-voltage-negativeanddc-current; the result gainsmachinesandconverterstables. A document without these
keys gives identical output. Partitioned runs are not offered through the document (CLI reference).- Workbench on the Avalonia app (Ctrl+Shift+B, and File > Workbench...) and the web client (
/workbench/{case}): model
browser, plot kit (time-current, R-X, harmonic spectrum, eigenvalue plane, Bode, QV, PV, time series), reports and a
single-line diagram with an undoable editor whose every edit passes the case loader. Open reads v2 cases, PSS/E RAW,
UCTE and CGMES through the readers the app and the command line use; Add generator, Add load and Add branch take
typed, validated entries.reportrenders any result through agridsim-report-template/1template. - Script console panels: File > Script console... in the Avalonia app and
/consolein the web app run
GridSim.Scriptingstatements line by line, with history, check-only and run-file modes and the session recorded as
.gssand.run.json. On the web the console loads catalogue cases only, under the licence and private-model rules,
refusesEXPORT, enforces tick, size, output and time limits, needs the Analyst role forSOLVE POWERFLOW(as
POST /api/solvedoes) and the Operator role for other state-changing statements. Manual chapters 8, 9 and 35. --jsonand--csvthrough the shared result writer on ten study verbs:probabilistic,reliability-network,
flicker,filter-design,harmonic-assess,connection-assess,study-case,case-diff,result-diffand
report(their own--outis unchanged; also in the Python wrapper andrpc).corrective-sequence: the plan names the elements still over their limit after redispatch
(CorrectiveRedispatch.UnrelievedAfter), only when there are any; otherwise the output is unchanged.- GPU backends report where each Newton linear solve ran: after the convergence line a
GPU:line gives the solves on
the device and on the CPU (given up to the CPU LU, or run on the host), and thegpucheckprobe lines end with the
same counts; the run metadata carries them asgpuSolves. Counting only, no arithmetic change; the CPU backend's
output is unchanged. - UK power quality:
harmonic-assess(ENA ER G5 Issue 5 stages),flicker(ENA ER P28 Issue 2) andfilter-design
(single-tuned, high-pass and C-type filters). A missing background is reported INCOMPLETE, never a pass; the
IEC 61000-4-15 filter coefficients are AWAITING STANDARD TEXT. cable-size(IEC 60364-5-52 and BS 7671 design rule) andconnection-assess(VDE-AR-N 4105, 4110, 4120, 4130 and BDEW
rule sets). No standard table or limit is shipped: a quantity without its table is OUT OF SCOPE and every limit is
AWAITING STANDARD TEXT until the owner supplies a rule file with provenance.- Scripting: the
GridSim.Scriptinglibrary (referencesGridSim.Coreonly) and thegridsim-scriptconsole. Grammar
version 1 is a verb-first, line-oriented language in.gssfiles, frozen for all of 2.x:LOAD CASE,SOLVE POWERFLOW,
TRIP,CLOSEandSETon generators, lines and loads,FAULTandCLEAR FAULT,REPORT,EXPORT RESULT,PRINT,
SELECT ENGINE,STEP SIMandAT;FOR EACH <noun> [WHERE ...]over the elements of a case in model order;
IF / ELSE / ENDon state, results and time; named values (LET,SET name =) with unit-checked arithmetic (MW + MVARis refused at validation); and named procedures (PROC,CALL) that may not recurse, directly or indirectly. There
is noWHILEand no unbounded loop, so every script terminates. Five engines can be stepped:LIVE(now with trips and
closes of lines and generators and set-point changes reaching its network),FREQUENCY LUMPED,PROTECTION FREQUENCY,RMS CLASSICAL(classical
multi-machine) andEMT SINGLE_PHASE, plusRMS SUBTRANSIENTandRMS GOVERNED(six-state machines, with governors and exciters, from agridsim-dynamics/2file) andEMT THREE_PHASE(each requires its model word;PROTECTION FREQUENCYrefuses cases with voltage or loading stages); the last four run over a whole time range and are stepped by deterministic re-run from t = 0,
with a bit-for-bit check of the part already shown, and each takes a typedWITHsettings clause. Names are checked
against the loaded case and every number carries a unit (MW,MVAR,MVA,PU,KV,HZ,MS,S,DEG); an
error names its line and column and leaves the session as it was. A step must be a whole multiple of the integration step
and events land on step boundaries in script order. Every console session is recorded as a.gssfile, and every run
writes a record (gridsim-script-run/1) with the GridSim and grammar versions, the SHA-256 of the script (and of its
canonical form), the model and every output, the solver and engine settings, the step and event sequence, everyIF
decision, every loop and the named values. The same script gives the same record and bytes. Manual chapter 35. LiveSim.ReplaceNetwork(GridModel): replaces the network the live loop re-solves, between steps, for a topology or
dispatch change on the same case. Nothing calls it except the scripting layer; a loop that never calls it, or calls it with
the network it has, gives the same bits as before (LiveSimReplaceNetworkTests).fault-series(one or two conductors open in a branch's series element) andfault-simultaneous(solid shunt faults at
several buses at once): two verbs over the sequence networksfault --typeuses, with--jsonand--csv. Core adds
FaultAnalysis.SequencePortsandFaultAnalysis.SeriesBreak(the transfer impedances and the break Thevenin impedances;
SeriesFaultandSimultaneousFaultare unchanged). Purely additive: the existing short-circuit, IEC 60909, sequence and
dist3phtest classes give identical results before and after. Not offered: a shunt and a series fault together, and a break
whose zero-sequence network is not earthed on both sides (an infinite zero-sequence impedance). Manual chapters 12 and 19.dist3ph-meshtakesregulators(wye, open delta and closed delta, fixed taps or a line-drop-compensator tap search),
banks(three-phase transformer banks) andcapacitors(shunt banks, switched by a step'scapacitorsmember), and a
--hold-tapsswitch. A case without them is read and solved as before. Manual chapters 7 and 19.substation-statereads a CGMES exchange (a.zipor a folder of EQ, TP, SSH and SV files) as a node-breaker model through
Core'sCgmesSubstationReader, with the SSH switch states as the starting states, and takes--base-mvafor such an input.
A.jsoninput is read and projected as before. Manual chapter 19.converttakes a CIM / CGMES input (a.xmldocument, a.zipexchange or a folder of profile files) through the importers
the desktop app uses, and proves the conversion as for any input. Other inputs are unchanged. Manual chapter 19.dist3ph-mesh --from-dist3ph <feeder.json>lifts adist3phfeeder, transformers and regulators included, into the phase frame
through Core'sMultiPhaseFeederAdapter(--switch-z-pugives a closed switch its impedance). Mesh case files and every other
option are unchanged. Manual chapters 7 and 19.dist3ph-meshcase files takesplit_phase_sourcesandcentre_tap_transformers(Core's 120/240 V split-phase builders) and a
swermember (a single-wire earth-return feeder, with its line given as an impedance or from conductor data). A case without
them is read and solved as before. Manual chapters 7 and 19.substation-state --sequence <steps.json>runs Core'sSwitchingScenario(ordered open and close steps) from the starting state and
reports every step. Without the flag the verb is unchanged. Manual chapter 19.- Network models: the 36 national and regional network models (GridSim-Models, ODbL 1.0, each labelled
UnvalidatedAtScale) are linked as the optionalmodelssubmodule. Fetch them with
git submodule update --init modelsor clone with--recurse-submodules; open a case as
gridsim pf models/<case>. They are not bundled data and are not in the release archives, so the licence bus limit
applies: the eight cases above 1,500 buses need a licence (issued free of charge at present, on request).
Changed
- BREAKING CHANGE: results and determinism digests are NOT bit-identical to 2.1.071 or 2.1.072. The difference is
at rounding level: max |dVm| 9.7e-13 pu and max |dVa| 1.9e-11 deg on 66 MATPOWER cases (dynamic and EMT trajectories
within about 2e-10 normwise), with identical convergence and iteration counts, and dense and sparse Newton remain
bit-identical to each other. Any stored digests or bit-exact comparisons against those releases will fail and must be
regenerated. Two numerical changes cause this: the sparse LU column ordering is now exact minimum degree
(MinimumDegreeOrdering) instead of reverse Cuthill-McKee (one shared switch moves every LU user), and the Newton
power flow voltage floor (NewtonShell.VmFloorPu) is lowered from 0.2 to 0.01 pu. This breaches the strict
bit-for-bit contract but will not materially change your results; they remain at the floating-point rounding floor.
The determinism digests and numeric pins in this repository were re-baselined accordingly. case2848rtenow converges (it has a bus at 0.0215 pu, below the old 0.2 floor).- BREAKING CHANGE: a Newton power flow (dense or sparse) that does not converge is now retried automatically, so the
outcome of a solve that used to fail can change. The magnitude: every solve that converged before gives bit-identical
results (the retry is never reached), checked on 15 MATPOWER and PGLib cases dense and sparse up to case9241pegase.
The retry repeats the same Newton iteration with the same options and voltage magnitudes, starting the bus angles
from the DC power flow; it needs one slack bus and a DC model that forms a single island. A converged retry is
reported unless a branch carries more than 90 deg (net of any phase shift), which is not a usable operating point;
otherwise the original non-converged result is reported unchanged.PowerFlowResult.NewtonRetryand
NewtonRetryNotesay whether the retry ran and how it ended, andpfandexportprint the note.
case13659pegasenow converges from flat start (10 iterations; it used to stop at a mismatch of 63.157 pu).
The retry runs only when the failed solve stalled or diverged: its final mismatch is above 1e-3 of its mismatch at
the start (NewtonShell.RetryStallFactor). A solve stopped byMaxIterationswhile still converging is not
retried and is reportedMaxIterationsexactly as before, so the iteration cap is never exceeded by a second
attempt.PowerFlowOptions.RetryFromDcStart(defaulttrue, also in thesolverProfilekind and the script run
record) turns the retry off. - Large sparse solves are 4 to 7 times faster, measured on an EPYC 7763 server (case_ACTIVSg2000 306 -> 46 ms,
case3375wp 560 -> 83 ms). The cloud benchmark results for RC-3 and for this change are in
docs/developer/benchmarks/server-results/hyperstack-2026-11/. - GPU paths are documented as deterministic run to run but not bit-identical to the CPU contract (different algorithms
and reduction order), with the measured envelope; they are held to solver tolerance, not to the CPU cross-check gate.
gpuchecknow calls workstation NVIDIA parts (Quadro, RTX A-series, RTX Ada and RTX PRO) workstation GPUs in its FP64
note instead of consumer GPUs. - Licensing text: GridSim is source-available and requires a licence; at present licences are issued free of charge,
and a request receives a Network Operator (DNO) licence. The contact address in the licence, the documentation and
every licence message is mark@gridsimdigitaltwin.co.uk. - Wording: program output, help and user-facing strings no longer claim that an engine, path or model is validated (the
RMS footer, the experimental help and the experimental-models view say "checked against" or "standard"). emt3: an output name must be lower-case snake_case (it becomes a trace column and a summary key); any other name, and
time_s, is refused as bad input (exit 1) naming the output, instead of failing after the run. Output kinds are
hyphenated words. Output for valid documents is unchanged.ProvenanceTagis unchanged; imports that follow public format descriptions carry the separate output-only
ImportProvenanceTag.FormatFromPublicDescription.- The writer-verb registries (C# and Python) list the new verbs; existing entries are unchanged.
- Machine-independent paths: the Unity viewer launcher (
unity/GridSimViz/Launch-GridSimViz.ps1) takes the editor
from-EditororGRIDSIM_UNITY_EDITOR, its scratch folder from-Scratch,GRIDSIM_VIZ_SCRATCHor the system
temporary folder, and an optional default world file fromGRIDSIM_VIZ_WORLD; the benchmark chart scripts read
their run folders fromGRIDSIM_BENCH_ROOT(andGRIDSIM_BENCH_REHEARSAL_ROOT). - Tests: the
intl/iberiarow of the home phasor-card spread test was removed (it pinned a non-converged iterate); the
Iberia network data still ships. - Tests: the Newton retry is covered on case9 (never entered on a converging solve; a retry that also fails; a case
the retry cannot run on), on a stalled 8-bus chain (converging on the retry to the same root, dense and sparse
bit-identical), on case9, case14 and case118 capped one step short of convergence (never retried, bit-identical to the
retry switched off), onRetryFromDcStart = false, and on case13659pegase when its file is supplied
(GRIDSIM_CASE13659PEGASE). The earlier case9 test that expected a 3-iteration cap to converge on the retry was
replaced: it contradicted the iteration-cap test on identical inputs. - Documentation: benchmark results are reorganised under one landing page (
docs/developer/benchmarks/index.md) with one folder
per run and a dated history; the RC4 large-case results are added.
Removed
- The Unity viewer (
unity/GridSimViz, its launcher script and README) is no longer in the repository; it was never
a release artefact.gridsim exportstill writesgridviz.jsonfor any external visualiser.
Fixed
- Workbench: opening a case applies the same licence and bus-limit check as the app and the command line.
- Workbench: studies and Colour by result run off the UI thread, one at a time, and an error is shown in the status line
instead of reaching the crash handler; a run always returns to the caller before it completes. - Workbench: after a single-line diagram edit the project is rebuilt on the edited network (studies kept, stale results
cleared), so tables, studies, reports and the diagram describe the same network. - Web workbench: a private model the viewer may not open shows a NOT AVAILABLE card.
- Web console: a
LOAD CASEof a model the licence does not cover is reported as a refusal, not as an error, when a
whole script is run (the typed console already did so). substation-stategoes through the licence gate like every other case-loading verb.- Builds are stamped from v2 release tags only, not from the RC-2 checkpoint tag.
- On a GPU backend the
GPU:line is printed after a non-convergence message, which keeps that message next to its exit
code 3. - MATPOWER import: a generator row with PMIN above PMAX (as in the PGLib-OPF
__apicases) loads as written with a
warning note instead of refusing the whole case; a power flow does not use those OPF limits. QMIN above QMAX loads
with a warning on an out-of-service unit and is still refused on an in-service one, whose reactive limits the power
flow uses. Studies that use the active-power range refuse a crossed one themselves: DC-OPF, AC-OPF, corrective
redispatch, unit commitment and the security and transfer studies as before, and now also the distributed slack
and governor / inertia outage sharing in contingency screening.
Not in RC-4, by design: PSS/E v35 node-breaker records (incomplete), coupled harmonic power flow, harmonic state
estimation and the RoCoF filter (experimental), DNP3 and GOOSE, partitioned emt3 runs and grid-forming and
grid-following inverters (they need new numerics), PROTECTION FULL in scripting, web studies beyond POST /solve, and
any LLM integration.
Known limits: the new work is tested on small analytical, constructed and synthetic cases. Items that need paid standard
text are labelled AWAITING STANDARD TEXT, and DGS acceptance on real PowerFactory exports and the ENTSO-E conformity
bundle are awaiting files. No commercial-tool comparison has been made and no parity is claimed. Bugs to
mark@gridsimdigitaltwin.co.uk.