Skip to content

API models

The request and response bodies of the API routes, one section per model. A field marked yes under Required must be sent (or is always present in a response); an optional field that is left out takes the default named in its description.

AbortResponse

Response body for POST /sessions/{id}/abort.

The endpoint is fire-and-forget at the wire level - it sets the session's abort event and returns immediately. The actual TDS exit happens cooperatively at the next callpert tick on the worker (typically within a few milliseconds for IEEE 14, longer for larger cases). The streaming WebSocket emits the terminal done message with final_t < tf once the integration loop exits.

There is no aborted flag on the WS done payload - the UI infers user-initiated abort from local state (it set the abort itself) vs. numerical instability (a done with final_t < tf arrived without a local abort).

Field Type Required Description
aborted True no Always true on a successful response. The signal has been delivered to the worker; the actual TDS exit is cooperative and lands on the next per-step callpert tick. No-op when no TDS is currently running on the session (the abort event is set but never consumed). Default true.

AddDisturbancesRequest

Request body for POST /sessions/{id}/disturbances.

Accepts a list so a caller can register multiple disturbances in one request - useful for the v0.2 timeline editor that wants to commit a full study scenario at once. ANDES rejects all post-setup add() calls, so this endpoint is gated on pre-setup state (returns 409 otherwise with a hint to call /reload).

Field Type Required Description
disturbances array of FaultSpec or ToggleSpec or AlterSpec yes List of disturbance specifications. Discriminated by the kind field (fault, toggle, alter). Limits: min items 1.

AddDisturbancesResponse

Response body for POST /sessions/{id}/disturbances.

Field Type Required Description
accepted array of DisturbanceAck yes One ack entry per accepted disturbance, in input order.
job_id string or null no Job-registry id mirroring the disturbance-commit routine (kind disturbance-commit). One job covers the whole batch; null on legacy responses.

AddElementRequest

Request body for POST /sessions/{id}/elements.

Adds a single topology element (Bus, Line, generator, load, shunt) to a pre-setup System. The wrapper validates the model name + param keys against an internal whitelist BEFORE invoking ANDES; unknown keys surface as 422 ProblemDetails listing both the rejected and the allowed sets.

Field Type Required Description
model string yes ANDES model class name. It must be one of the buildable models listed by GET /api/topology/schema (buses, lines, generators, loads, shunts, exciters, governors, the ESD1 battery, and other controllers). Unknown models are rejected with 422. Limits: min length 1.
params object (names to number or integer or string or boolean) yes Flat dict of model parameters. Keys are validated against the per-model whitelist; values pass through to ss.add(). A reference to another device (bus, gen, syn) may be sent as text or as a number: it is matched to the idx the case holds. A request that leaves out a parameter ANDES has no default for is rejected with 422 and adds nothing. Required keys vary per model - query GET /api/topology/schema for the live form metadata.

AddPmuRequest

Request body for POST /sessions/{id}/pmu.

bus_idx accepts a string (which the substrate forwards as-is to ANDES - ss.add('PMU', dict(bus=...))). Bus idx values can be integers (PSS/E .raw cases) or strings (.xlsx cases); the substrate coerces both via string-equality so the API surface stays uniform.

Ta / Tv (optional) are the angle / voltage low-pass filter time constants in seconds. The defaults are an empirical sweet spot (0.05 s): small enough to track a 60 Hz swing, large enough to suppress integration noise on stiff cases. ANDES's own defaults are 0.1 s.

Field Type Required Description
bus_idx string yes Bus idx the PMU attaches to. Must reference a Bus that exists on the loaded System. Integer-typed bus idxes (from PSS/E .raw cases) are accepted as their string representation. Limits: min length 1.
Ta number or null no Angle filter time constant in seconds. Defaults to 0.05 s when omitted (the substrate's recommended sweet spot). Limits: above 0.
Tv number or null no Voltage filter time constant in seconds. Defaults to 0.05 s when omitted. Limits: above 0.

AddProfileRequest

Request body for POST /sessions/{id}/profiles.

Mirrors the ss.add('TimeSeries', ...) parameter surface from andes/models/timeseries.py:38-72. profile_path is the absolute path returned by the prior POST /profiles/upload.

Field Type Required Description
profile_path string yes Absolute path of the on-disk profile xlsx - the value returned by POST /profiles/upload. The file must exist before this call (ANDES reads it during setup). Limits: min length 1.
sheet string yes XLSX sheet name to read. CSV uploads are transcoded to a single sheet named profile; XLSX uploads keep their original sheet names. Limits: min length 1.
fields string yes Comma-separated column names from the source sheet providing the time series of values (e.g., p0, p0,q0). Each entry must match an existing column in the sheet. Limits: min length 1.
model string yes ANDES model class name of the target device (e.g., PQ, PV, Slack). Must reference a model present on the loaded System. Limits: min length 1.
dev string yes Idx of the target device within model (e.g., PQ_5). The substrate validates existence before the underlying ss.add so the user gets a clean 422 instead of an ANDES-internal error. Limits: min length 1.
dests string yes Comma-separated parameter names on the target device that receive the profile values (e.g., p0, p0,q0). Must align with fields (one destination per source column). Limits: min length 1.
tkey string no Source column carrying the timestamp (in seconds). Defaults to t - the convention shipped by ANDES's bundled examples. Limits: min length 1. Default "t".
mode integer no Application mode. 1 (exact) applies values at exact step times. 2 (interpolated) raises NotImplementedError in ANDES, so the substrate rejects mode=2 with 422; default to mode=1. Limits: min 1, max 2. Default 1.

AddedExample

Response shape for POST /examples/{example_id}/add.

Field Type Required Description
id string yes The id of the example case that was added.
primary string yes Name of the case file to open (the first of files).
files array of AddedExampleFile yes Every file written, the case file first.
warnings array of string yes Things to know about what was added: an ANDES file that is not the one the catalog was written against, or a sources file that could not be updated.
sources_file string yes Name of the file in the workspace root that records the source, citations and licence of every example added.

AddedExampleFile

One file POST /examples/{example_id}/add wrote.

Field Type Required Description
name string yes The file name in the workspace root.
size_bytes integer yes Size of the file in bytes. Limits: min 0.
replaced boolean yes Whether the file replaced one of the same name (overwrite was set).

AlterSpec

Parameter alteration at a scheduled time - used for load steps, parameter ramps, set-point changes, etc.

Maps to ss.add('Alter', model=..., dev=..., src=..., t=..., method=..., amount=...). ANDES's Alter model has NO value parameter - the new value is v_new = v_current <method> amount where method is one of + - * / = and amount is the operand (verified against ANDES 2.0.0; method is MANDATORY - omitting it raises "Mandatory parameter method missing"). Examples:

  • set absolute: method='=', amount=1.2
  • step up by 0.2 pu: method='+', amount=0.2
  • scale (e.g. +20% load): method='*', amount=1.2

NOTE for load increases: ANDES applies time-domain alterations to Ppf / Qpf on PQ loads, not p0 / q0 (the latter only feed power flow and are no-ops in TDS) - pick Ppf/Qpf as src for a load change that actually moves the simulation.

Field Type Required Description
kind "alter" no Discriminator: this spec creates an ANDES Alter device. Default "alter".
model string yes ANDES model class name containing the parameter.
dev_idx integer or string yes ANDES idx of the device within model.
src string yes Source parameter name on the model (e.g., 'Ppf' for a PQ load's time-domain active power, or a generator set-point).
t number yes Time the parameter change applies, in seconds.
method string no How amount is combined with the parameter's current value: '=' set, '+' add, '-' subtract, '*' multiply, '/' divide. Mandatory in ANDES; defaults to '=' (absolute set). One of +, -, *, /, =. Default "=".
amount number yes Operand applied via method (the absolute value when method='=', the delta/factor otherwise).

AlterableParamsResponse

Response body for GET /sessions/{id}/topology/models/{model}/alterable_params.

Returns the ordered list of parameter names that ANDES will accept as src for the Alter disturbance on the given model. The UI uses this to populate the AlterSpec form's parameter dropdown.

The introspection rule (mirrors ANDES's own alter() contract): a parameter is alterable iff it is a NumParam and not an ExtParam (which is a derived/external param read off another model). This excludes topology refs (IdxParam: bus, bus1, bus2, area, zone, owner, coi, etc.) and string identifiers (DataParam: idx, name).

Field Type Required Description
model string yes ANDES model class name the params belong to (echoed back from the path). Example: Bus, PQ, GENROU.
params array of string yes Ordered list of parameter names that ss.<model>.alter(src=...) will accept. Order matches ANDES's internal declaration order on the model class. Empty when the model has no alterable params.

BlankSystemResponse

Response body for POST /sessions/{id}/blank (201).

Returns the empty topology so the client immediately switches to the blank-system rendering path (centered Add your first bus prompt).

Field Type Required Description
topology TopologySummary yes Empty topology snapshot for the freshly-created blank System. All buckets are empty; state is pre-setup.

Body_importBundle

Field Type Required Description
file string yes Reproducibility bundle .zip (the same format produced by POST /api/sessions/{id}/bundle/export).
force_resolve boolean no When False (default), the substrate validates the bundle and returns status=plan if any conflict is detected (sha mismatch, version mismatch, missing addfile). When True, the substrate proceeds with the extraction + replay honouring use_bundle_case / accept_version_mismatch. Default false.
use_bundle_case boolean no Sha-mismatch resolution. True (default) overwrites the workspace's copy of the case file with the bundle's; False preserves the workspace file and writes the bundle's to a sibling <filename>.from-bundle for offline diff. Default true.
accept_version_mismatch boolean no When True (default), the substrate proceeds even when the bundle's ANDES major.minor differs from the installed version (the warning surfaces in the response's plan). Default true.

Body_uploadProfile

Field Type Required Description
file string yes CSV or XLSX file. CSV inputs are transcoded to xlsx (single sheet named profile) for uniformity with ANDES's preferred input format.

BundleConflictModel

One conflict surfaced by validate_bundle.

Field Type Required Description
kind string yes Conflict category detected while validating the bundle. One of andes-version, addfile-missing, sha-mismatch.
severity string yes warning conflicts can be overridden with force_resolve; blocker conflicts prevent the import entirely. One of warning, blocker.
message string yes Human-readable explanation of the conflict.
filename string or null no Workspace-relative case filename the conflict refers to, when applicable.
bundle_meta object or null no Side-by-side metadata for the bundle's copy of the case file. Populated for sha-mismatch.
workspace_meta object or null no Side-by-side metadata for the workspace's copy of the case file. Populated for sha-mismatch.
bundle_andes_version string or null no ANDES version recorded in the bundle manifest. Populated for andes-version.
current_andes_version string or null no ANDES version installed on this server. Populated for andes-version.

BundleExportRequest

Request body for POST /sessions/{id}/bundle/export.

All fields are optional - the substrate happily exports a minimal bundle (case + manifest only) when none are present. The substrate contributes the case file, the ANDES + tensa versions, and the manifest; this body carries the substrate-external state that lives in the frontend's runs / disturbance / ui slices today.

Field Type Required Description
disturbances array of FaultSpec or ToggleSpec or AlterSpec no Disturbance specs (the discriminated union) the user composed in the timeline editor. Empty list when no disturbances were registered; disturbances.json is omitted from the bundle in that case.
sim_params BundleSimParams or null no Last TDS run's sim params. null when no run has fired yet; sim_params.json is omitted from the bundle in that case.
results_csv string or null no Last TDS run's results as a long-form CSV body. null when no run has fired yet OR the caller chose not to ship the body. When omitted, results.csv is absent from the bundle but the run is still reproducible from case + disturbances + sim_params.
run_id string or null no Run id of the most recent TDS run. Surfaced in the manifest for cross-referencing with run-history exports.
layout SidecarLayout or null no The diagram's layout as the client shows it, written to the bundle as layout.json so an import opens with the same picture. null uses the layout saved beside the case file; with neither, the bundle holds no layout.json. One over the cap PUT /workspace/layout holds a layout to is refused (413).

BundleImportPlanModel

BundleImportPlan shape echoed in both plan and committed responses.

Field Type Required Description
manifest object yes Parsed manifest.json from the bundle, echoed verbatim.
case_files array of string yes Case filenames contained in the bundle (workspace-relative).
engine string no Engine that wrote the bundle. andes for a bundle written before the stamp existed. Default "andes".
conflicts array of BundleConflictModel no Conflicts detected between the bundle and this server/workspace.
blocked boolean yes true if any conflict has blocker severity - the import cannot proceed.
has_conflicts boolean yes true if conflicts is non-empty.

BundleImportResponse

Response body for POST /sessions/{id}/bundle/import.

Field Type Required Description
status string yes plan = conflicts present, nothing committed; the user resolves them and re-issues with force_resolve=true. committed = case loaded and disturbances replayed. One of plan, committed.
plan BundleImportPlanModel yes The validation plan (conflicts, case files, manifest).
warnings array of string no Non-blocking warnings emitted during commit (e.g. overridden conflicts).
case_filename string or null no Basename of the case file the substrate loaded. Populated on status=committed; null on status=plan.
addfile_filenames array of string no Basenames of any addfiles the substrate extracted alongside the primary case (e.g., ieee14.dyr for a PSS/E .raw + .dyr bundle). Empty on status=plan.
disturbances_replayed integer no Count of disturbance specs successfully re-applied to the newly-loaded System. Zero on status=plan. Default 0.
layout_restored boolean no true when the bundle held the diagram's layout (layout.json) and it is now saved beside the imported case, replacing any layout that was there. false on status=plan, for a bundle with no layout, and when the workspace's own case file was kept. Default false.
job_id string or null no Job-registry id mirroring the bundle-import routine (kind bundle-import). Recorded in the manager-wide global registry so it survives the session being replaced on a committed import. Present on both the committed (200) body and the plan (409) body. null on legacy responses.

BundleSimParams

Sim-params subset embedded in sim_params.json of the bundle.

Mirrors the fields the RunStream start-tds message ships. All fields are optional so a partially-populated client (e.g., a pre-Unit-7 session) can still produce a bundle.

Field Type Required Description
tf number or null no Final sim time of the last TDS run, in seconds.
h number or null no Fixed integration step of the last TDS run, in seconds. null when the substrate's adaptive integrator was used.
vars array of string or null no Variable groups streamed during the last run (e.g., ["bus_v", "gen_state"]).
decimation string or null no Decimation mode used during streaming (none or mean).
max_rate_hz number or null no Output-rate clamp (Hz) the UI applied to the stream.

BusCoord

One position on the diagram.

Coordinates are in arbitrary canvas units; the UI rescales them at render time. Infinity / NaN are rejected at validation time.

Field Type Required Description
x number yes X coordinate, finite (no NaN/Inf).
y number yes Y coordinate, finite (no NaN/Inf).

BusRecord

One bus of the case.

Field Type Required Description
key string yes The bus's TENSA key, as GET /sessions/{id}/keys lists it.
number integer yes The bus number of the case.
name string or null no The bus's name in the case.
vn_kv number or null no The base voltage, in kV.
type string yes The bus type: pq, pv, ref (the angle reference) or isolated. One of pq, pv, ref, isolated.
v_pu number or null no The voltage magnitude the case stores, per unit of vn_kv.
angle_deg number or null no The voltage angle the case stores, in degrees.
area integer or null no The area number, when the case has one.
zone integer or null no The zone number, when the case has one.
area_slack boolean or null no True for a bus the case names as its area's interchange slack; null when not known.
in_service boolean no Whether the bus is in service. Default true.

CaseDocument

The neutral case document, version 1.

Field Type Required Description
tensa_case 1 no The version of the document's form. Default 1.
name string yes The case's name, its file's name without the extension.
base_mva number or null no The system MVA base.
freq_hz number or null no The system frequency, in Hz.
source CaseSource or null no Where the case came from; null for a case built in the session.
buses array of BusRecord no The buses, in the case's order.
lines array of LineRecord no The branches that are not transformers.
transformers array of TransformerRecord no The two-winding transformers.
generators array of GeneratorRecord no The static generators.
loads array of LoadRecord no The loads.
shunts array of ShuntRecord no The fixed shunts.
dynamics array of DynamicRecord no The dynamic models of the generating units.
series CaseSeries or null no The time series the case carries; null when it carries none.
events array of object no What the case file says happens in time, as neutral events.
notes array of string no What the document leaves out or holds only in part, and why.
ext object no What only one engine holds, under that engine's name.

CaseEvent

A timed event the next time-domain run applies that the client did not schedule: one the case's files define, or one a bundle import or a snapshot restore replayed.

Field Type Required Description
source string yes case: a Fault, Toggle or Alter device the case file or one of its add-on files defines. restored: a disturbance a bundle import or a snapshot restore replayed onto the system. One of case, restored.
kind string yes Which ANDES event model it is. One of fault, toggle, alter.
t number yes Time the event starts, in seconds: a fault's tf, otherwise the time the toggle or alteration fires.
name string or null no The device's name in the case file. null for a restored disturbance, which has none.
tc number or null no Fault only: time the fault is cleared, in seconds. null when the case gives none, which leaves the fault on.
model string or null no ANDES model of the device the event acts on: Bus for a fault, the toggled or altered model otherwise (a group name is possible in a case file).
dev_idx integer or string or null no ANDES idx of the device within model (the bus, for a fault).
src string or null no Alter only: the parameter the event changes.
method string or null no Alter only: how amount is combined with the parameter's current value (=, +, -, * or /).
amount number or null no Alter only: the operand applied via method.

CaseSeries

The time series of a case or a study: load profiles over one horizon. The horizon's length is the longest profile's; a shorter profile's last factor holds to the end.

Field Type Required Description
start string or null no The horizon's start as an ISO 8601 date-time; null means the engine's default (the Sienna adapter uses 2026-01-01T00:00:00, the date its dispatch already uses).
load array of SeriesProfile no The load profiles; at most one with applies_to "*".

CaseSize

Field Type Required Description
buses integer yes Number of buses. Limits: min 1.
generators integer yes Number of generators (static generators, slack included). Limits: min 0.

CaseSource

Where the case came from: its format, its files and their digests.

Field Type Required Description
format string yes The format of the case file: psse-raw, matpower, xlsx or the like.
files array of string yes The names of the files the case was read from, the case file first.
sha256 array of string or null no The SHA-256 of each file, in the order of files; null when one could not be read.

ChiSquaredTest

The chi-squared bad-data test on the SE objective J (WLS only).

Field Type Required Description
passed boolean yes True when J is below the threshold: no bad data detected at this confidence.
J number yes The WLS objective sum(r_i^2 / sigma_i^2) the test ran on (equal to mismatch).
threshold number yes The chi-squared quantile at confidence with dof degrees of freedom; J is compared against it.
dof integer yes Degrees of freedom, measurement_count - 2 * <bus count>; measurement_count includes the angle-reference pseudo-measurement, which stands in for the one state it fixes.
confidence number yes The confidence level the threshold was taken at (0.95).

Citation

Field Type Required Description
role string yes What the reference is: system (the publication that defines the test system), data (the dataset, archive or library the file comes from, or was checked against), software (the program the case is run with or was made for) or model (the documentation of a dynamic model the case uses). One of system, data, software, model.
text string yes The reference as plain text. Limits: max length 1200.
bibtex string yes The same reference as a BibTeX entry. Limits: max length 2000.
doi string or null no The DOI, where the work has one. Limits: max length 200. Pattern ^10\.\d{4,9}/\S+$.
url string or null no Where the work can be read or found. Limits: max length 500. Pattern ^https?://\S+$.

CloneDiffPair

One changed param's original-vs-current file values.

Field Type Required Description
original number or integer or string or boolean or null no The param value in the ORIGINAL case file (pre-setup read). null when the param is absent on the original device.
current number or integer or string or boolean or null no The param value in the CLONE case file (pre-setup read). null when the param is absent on the clone device.

CloneDiffResponse

Response body for GET /sessions/{id}/case/clone/diff/{model}/{idx}.

Maps each whitelisted controller param whose clone-file value differs from the original-file value to its {original, current} pair. An empty params means no edits relative to the original (or no clone yet).

Field Type Required Description
params object (names to CloneDiffPair) no Changed params keyed by name; unchanged / unedited params are absent. Empty when no clone is initialised.

CloneEditRequest

Request body for PUT /sessions/{id}/case/clone/params/{model}/{idx}/{param}.

Carries only the new value - model / idx / param are path parameters, whitelist-validated by the route BEFORE any clone work. The edit modifies the cloned case file (never the original), then re-loads + re-setups the System so runs reflect the new value.

Field Type Required Description
value number or integer or string or boolean yes New value for the parameter. Written to the clone case file; ANDES re-reads it on the subsequent load(setup=False) → setup() cycle. Some params are per-unit-normalised at setup, so the read-back live value may differ from the file value.

CloneEditResponse

Response body for the clone edit / undo / redo routes.

Returns the post-setup live value plus the current undo / redo stack depths so the inspector can enable / disable its undo / redo affordances.

Field Type Required Description
model string yes ANDES model class of the edited device (echoed from the path). Empty string on undo / redo responses (the stack entry, not a single field, is the unit of work).
idx string yes Device idx of the edited element (empty on undo / redo).
param string yes Edited parameter name (empty on undo / redo).
new_value number or integer or string or boolean or null no The parameter value read back from the re-setup System (ss.<model>.<param>.v[i]). null on undo / redo.
undo_depth integer yes Number of edits currently recoverable via undo (0-50).
redo_depth integer yes Number of undone edits currently re-appliable via redo.
job_id string or null no Job-registry id mirroring the clone routine (kinds clone-edit / clone-undo / clone-redo). null on legacy responses.

CloneInitResponse

Response body for POST /sessions/{id}/case/clone (clone init).

Field Type Required Description
clone_dir string yes Absolute path of the per-session clone scratch directory.
clone_files array of string no Absolute paths of the cloned case files (case + addfiles).
already_initialized boolean yes true when the clone already existed (idempotent re-init - no re-copy, so pending edits are preserved).
job_id string or null no Job-registry id for the clone-init routine.

CloneResetResponse

Response body for POST /sessions/{id}/case/clone/reset.

Field Type Required Description
reset boolean yes Always true - the clone dir was discarded and the session reverted to the original case files.
job_id string or null no Job-registry id for the clone-reset routine.

CloneSaveAsRequest

Request body for POST /sessions/{id}/case/clone/save-as.

Field Type Required Description
name string yes Workspace-relative case name (stem only - no extension, no path separators or traversal). The clone's files are written as <name>.<ext> for each cloned format.
overwrite boolean no When false (the default), save-as REFUSES to overwrite an existing workspace file (a 422) - this protects the loaded original case, which lives in the same workspace, from being silently clobbered. Pass true to intentionally overwrite an existing case. Default false.

CloneSaveAsResponse

Response body for POST /sessions/{id}/case/clone/save-as (201).

Field Type Required Description
name string yes The saved case name (stem).
files array of string no Absolute paths of the written workspace files.
job_id string or null no Job-registry id for the clone-save-as routine.

CompareRequest

Request body for POST /compare.

Field Type Required Description
reference ResultsDocument yes The reference results document: differences are comparison minus reference, and the swing is the reference series'.
comparison ResultsDocument yes The results document compared against the reference.
tolerances Tolerances no The tolerances; defaults are in engines/compare.py.

CompareResponse

Response body for POST /compare: power flow first, then series, then eigenvalues.

Field Type Required Description
engine_reference EngineBlock yes The reference document's engine block.
engine_comparison EngineBlock yes The comparison document's engine block.
operating_point_differs boolean yes True when the power flow comparison is outside its tolerance: a dynamic difference that starts from a different operating point must be read as that.
power_flow PflowComparisonOut or null yes The power flow comparison; null unless both documents carry one.
series array of SeriesDifferenceOut yes One entry per compared pair of series.
not_comparable array of NotComparableOut yes Pairs that cannot be compared, each with the reason.
unmatched_series_reference array of string yes quantity\|key of series only the reference has.
unmatched_series_comparison array of string yes quantity\|key of series only the comparison has.
eigenvalues array of EigenvaluePairOut yes The matched modes, sorted by the reference frequency.
unmatched_eigenvalues_reference array of integer yes Indices of reference eigenvalues with no match.
unmatched_eigenvalues_comparison array of integer yes Indices of comparison eigenvalues with no match.
errors array of string yes Per-series problems (times that run backwards, too few samples, no overlap); one bad series does not fail the request.

ComplexNumberModel

JSON-friendly complex number {real, imag}.

Field Type Required Description
real number yes Real part of the eigenvalue.
imag number yes Imaginary part of the eigenvalue.

ComtradeChannelSeries

One signal of a COMTRADE export. A batch run's traces.variables entries have this shape.

Field Type Required Description
name string yes What the signal is called; it becomes the channel's identifier, reduced to ASCII without commas and cut to 64 characters. Limits: min length 1, max length 200.
unit string or null no The unit the values are in (pu, MW, rad), reduced to ASCII and cut to 32 characters. A channel given none is written with the unit NONE, since the field cannot be empty. Limits: max length 200.
values array of number or null yes The signal's value at each time in t. null marks a missing value (a diverged step), which the data file holds as 99999.

ComtradeExportRequest

Request body for POST /comtrade.

Field Type Required Description
t array of number yes Sample times in seconds, not decreasing, at least one. Times need not be evenly spaced: the record carries a time stamp per sample.
channels array of ComtradeChannelSeries yes The signals, each with one value per time in t. At most 5000000 values in all (channels times samples). Limits: min items 1.
name string no File name the record's two files share: the archive holds <name>.cfg and <name>.dat. 1-64 chars of [A-Za-z0-9._-] starting with an alphanumeric, not ending in a dot, and not a Windows device name (CON, NUL, COM1, ...). Default "tensa".
station string no The record's station name, for instance the case the run was made on. Reduced to ASCII without commas and cut to 64 characters. Limits: max length 200. Default "".
device string or null no The record's recording device, for instance a name for the run. Reduced as station is. Defaults to TENSA and its version. Limits: max length 200.
frequency_hz number no The system's nominal frequency in Hz, the record's line frequency. Limits: above 0. Default 60.0.
start_time string (date-time) or null no The date and time simulated time zero stands for (ISO 8601). The record's first date line is this plus the first time in t. The format carries no time zone, so the clock reading is written as given. Defaults to the server's local time when the request arrives.
trigger_t number or null no Simulated time of the trigger point in seconds, for instance when a fault is applied; it must lie inside the record. Defaults to the first time in t.

ConnectivityResponse

Wire shape of GET /sessions/{id}/connectivity.

Mirrors tensa.core.connectivity_result.ConnectivityResult 1:1. Bus idxes are stringified for stable JSON keying - case-file formats may carry int or str idx values, but the SLD always stringifies when keying nodes, so the wire payload normalises here.

Field Type Required Description
island_count integer yes Total number of islands, including singleton 'islands' of one degree-zero bus. Equals len(Bus.islands). A fully-interconnected case yields 1; tripping a critical line yields >= 2.
islands array of array of string yes List of lists of bus idx values. Each inner list is one island's bus membership. Index-aligned with Bus.islands so the first entries are singleton islands for any degree-zero buses; the larger connected components follow.
islanded_bus_idxes array of string yes Convenience: just the degree-zero (lone) bus idxes. Each appears as its own singleton in islands too. The SLD uses this for the primary 'grey out' trigger.

ConvertResultRequest

Request body for POST /results/convert: one engine result, answered as a neutral results document (section 6.5).

Field Type Required Description
kind string yes Which builder the result goes through. One of pflow, tds, eig, dispatch.
engine string yes The engine that produced the result (andes, sienna).
versions object (names to string) no The package versions the engine ran with; carried into the document as given.
study object or null no The study as run; stored in the document verbatim.
result object yes The engine's own result as JSON: for pflow the fields of the power flow result, for tds a traces object (t, variables, truncated), for eig the eigenvalue result.
keys array of KeyEntrySchema no The session's keys as GET /sessions/{id}/keys lists them (its keys list: key, bucket, model, idx, source). Used to map ANDES time-domain column names, a machine's through its own entry (gen:1-1/machine); ignored for sienna and for pflow (whose result carries its own keys).
status string no How the run ended; carried into the document. One of completed, aborted, failed. Default "completed".

ConvertResultResponse

Answer of POST /results/convert: the document, and what is not in it.

Field Type Required Description
document ResultsDocument yes The neutral results document.
skipped array of SkippedSeries no Every column of the result that is not part of the document, and why.
notes array of string no What the answer does not say in the document, such as a truncated result.

CostCurveRecord

One generator's variable cost, as the case file gives it.

A MATPOWER gencost model 2 row is a polynomial; model 1 is a piecewise linear curve. The numbers are the file's own, in $/MW^n h and $/h on the system MVA base, never converted: PowerSystems reads them labelled DEVICE_BASE and the dispatch relabels them NATURAL_UNITS, so the document holds what the file holds.

Field Type Required Description
kind string yes polynomial for a MATPOWER gencost model 2 row, piecewise for model 1. One of polynomial, piecewise.
coefficients array of number or null no For polynomial: the coefficients highest degree first, as the gencost row lists them (a, b, c for a quadratic aP^2 + bP + c, in $/MW^2h, $/MWh, $/h).
points array of array of number or null no For piecewise: the (MW, $/h) points in the row's order, each a two-element list.
startup_usd number or null no The start-up cost, in $ (the gencost row's second column).
shutdown_usd number or null no The shut-down cost, in $ (the gencost row's third column).

CpfGeneratorIncrease

What one PV generator gains for each unit of lambda in a custom direction.

Field Type Required Description
idx integer or string yes The generator's PV idx. The slack generator cannot be named: it supplies whatever the rest of the direction leaves.
p number yes Active power added per unit of lambda, in MW.

CpfGeneratorTraceSchema

One PV or slack generator along the path. Mirrors tensa.core.cpf_result.CpfGeneratorTrace.

Field Type Required Description
idx string yes The generator's idx.
model string yes Its ANDES model. One of PV, Slack.
bus string yes The idx of the bus it sits on.
q array of number yes Reactive output in MVAr at every step, index-aligned with lambdas.
q_min number or null no Lower reactive limit in MVAr; null when not finite.
q_max number or null no Upper reactive limit in MVAr; null when not finite.

CpfLimitEventSchema

The first step at which a generator is held at a reactive limit. Mirrors tensa.core.cpf_result.CpfLimitEvent.

Field Type Required Description
step integer yes Index into lambdas. 0 means the power flow the continuation started from already held the generator there.
lam number yes The value of lambdas at that step.
idx string yes The generator's idx.
model string yes Its ANDES model. One of PV, Slack.
bus string yes The idx of the bus it sits on.
limit string yes The limit it is held at. One of qmax, qmin.
at_nose boolean no true when the nose is where this generator switched: lambda turned at the switch or in the step after it, or the path could not get past the switch at all. The loadability then ends because the generator ran out of reactive power (a limit-induced collapse), not at a smooth fold. Default false.
would_release_step integer or null no The first step, from step on, at which the generator's terminal voltage is back across its set-point (above it for qmax, below for qmin), where a real exciter would take the voltage up again and leave the limit. ANDES keeps a generator at a limit once it is there, so from that step the curve is the one for a generator pinned at its limit. null when it does not happen.

CpfLoadIncrease

What one PQ load gains for each unit of lambda in a custom direction.

Field Type Required Description
idx integer or string yes The load's PQ idx.
p number no Active power added per unit of lambda, in MW. Negative takes load off. Default 0.0.
q number no Reactive power added per unit of lambda, in MVAr. Default 0.0.

CpfQvRunRequest

Request body for POST /sessions/{id}/cpf/qv.

Field Type Required Description
bus_idx string yes Bus idx to draw the QV-curve at. Must match an entry in the loaded case's Bus.idx; ANDES requires at least one PQ device at this bus (raises ValueError otherwise, surfaced as 422 here). Limits: min length 1.
q_range number or null no Reactive-power range for the QV continuation. Default matches ANDES's own q_range=5.0. Limits: above 0.
enforce_q_limits boolean or null no Hold generators to their reactive limits along the curve, as enforce_q_limits of POST /sessions/{id}/cpf does.

CpfResultResponse

Wire shape of POST /sessions/{id}/cpf and POST /sessions/{id}/cpf/qv.

Field semantics mirror tensa.core.cpf_result.CpfResult 1:1; see that class for prose.

Field Type Required Description
lambdas array of number yes Per-step continuation parameter values. For PV-curve runs this is CPF.lam (lambda); for QV-curve runs it is CPF.qv_q (reactive injection). The mode field tells the UI which axis label to use.
voltages_per_bus object (names to array of number) yes Per-bus voltage trace, index-aligned with lambdas. PV runs include every bus in the loaded case; QV runs include only the requested bus_idx.
bus_idxes array of string yes Ordered list of bus idxes (stringified) matching the row order of CPF.V. Surfaced separately so the UI can render in canonical order without dict-key iteration ambiguity.
nose_idx integer yes Index into lambdas of the nose point (the voltage-collapse margin): the point after which lambda first goes down. -1 when the run was truncated before reaching the nose. On a full curve the steps after it are the lower branch.
max_lam number yes Lambda at the nose, which is the largest value reached on the way up. Without a nose, the largest value reached. For a QV curve, the largest reactive power at the bus (the axis lambdas is on). Always populated, even on truncation.
truncated boolean yes True when the run terminated without finding a nose point (e.g. hit max_steps or did not branch-switch to a NOSE event). When True, nose_idx == -1 and the UI shows the truncation note from done_msg.
done_msg string yes ANDES's terminal status string (e.g., "Nose point at lambda=3.258046", "Reached max steps (5)"). Used by the UI to label the truncation banner.
mode string yes Discriminator: "pv" for the full PV-curve sweep (CPF.run) or "qv" for a single-bus QV-curve (CPF.run_qv). The wire shape is the same; the UI uses mode to label the X-axis (lambda vs Q). Pattern ^(pv\\|qv)$.
generators array of CpfGeneratorTraceSchema no Every in-service PV and slack generator's reactive output along the path, with its limits. Empty only when the readings could not be matched to the steps.
limit_events array of CpfLimitEventSchema no The generators held at a reactive limit, each with the first step at which it is, in step order. Those at step 0 are held by the power flow the run started from. A generator has at most one entry: one that is held stays held for the rest of the path.
q_limits_enforced boolean no Whether generators were switched to PQ at their reactive limits along the path. When false only the generators the base power flow held are held. Default false.
stop_at string no What the run was asked to trace: up to the nose, or the full curve. A run given a target lambda has 'nose' here and the target in stop_at_lambda. One of nose, full. Default "nose".
complete boolean no Whether the run ended the way stop_at asked. false with truncated: false is a full curve whose lower branch broke off, or a run whose nose came before its target lambda; done_msg says where. A run that reached its target lambda is complete, with truncated: true since it found no nose. Default true.
direction string or null no The direction of the increase a PV run was asked for; null for a QV curve. One of load, load-only, gen, custom.
angles_per_bus object (names to array of number) no Bus voltage angles in radians at every step (CPF.theta), keyed by bus idx and index-aligned with lambdas and that bus's voltages_per_bus row. Empty for a QV curve, and when ANDES's angles could not be aligned with the points kept.
parameterization string or null no The parameterization the run used, as the request gave it; null where the case's own setting was kept. One of natural, arclength, pseudo_arclength.
tol number or null no The corrector tolerance the run used, as the request gave it; null where the case's own setting was kept.
corrector_max_iter integer or null no The corrector's Newton iterations per step the run used, as the request gave them; null where the case's own setting was kept.
step_min number or null no The smallest step the run used, as the request gave it; null where the case's own setting was kept.
step_max number or null no The largest step the run used, as the request gave it; null where the case's own setting was kept.
stop_at_lambda number or null no The target lambda the run was given in stop_at; null when stop_at was 'nose' or 'full'.
job_id string or null no Job-registry id mirroring this CPF routine (kind cpf for the PV sweep, cpf-qv for the QV curve). GET /sessions/{id}/jobs/{job_id} returns the matching record; null on legacy responses.

CpfRunRequest

Request body for POST /sessions/{id}/cpf.

All fields are optional, and each applies to this run only. direction says what lambda increases, enforce_q_limits holds generators to their reactive limits along the path, stop_at asks for the lower branch as well or names a target lambda, step and max_iter set ss.CPF.config.step and max_steps for the run, and parameterization, tol, corrector_max_iter, step_min and step_max the routine's settings of those names (ANDES calls corrector_max_iter max_iter).

Field Type Required Description
direction string no What lambda increases. 'load' (default) scales every load and every PV generator's output in proportion to its base value (CPF.run(load_scale=2.0)). 'load-only' scales the loads and leaves the PV generators where they are, so the slack generator supplies the increase. 'gen' scales the PV generators and leaves the loads. With these three, lambda = 1 is twice the base value. 'custom' moves the devices named in load_increase and generator_increase by the amounts given there, and lambda counts multiples of them. The slack generator is never part of a direction, and only PQ loads and PV generators move: ANDES's routine leaves every other load model as it is. One of load, load-only, gen, custom. Default "load".
load_increase array of CpfLoadIncrease or null no For direction: 'custom': the MW and MVAr each named PQ load gains per unit of lambda. A load left out does not move. Limits: max items 100000.
generator_increase array of CpfGeneratorIncrease or null no For direction: 'custom': the MW each named PV generator gains per unit of lambda. A generator left out does not move, and what the loads gain beyond the generators is supplied by the slack. Limits: max items 100000.
enforce_q_limits boolean or null no Switch a PV or slack generator to a PQ bus held at qmin or qmax when its reactive output reaches one along the path. Left out, the case's own setting stands (off unless the case file turns pv2pq on). The continuation starts from the power flow as solved, so run that with enforce_q_limits as well: the request is refused with 409 when the solved power flow leaves a generator past a limit. Without it, the generators the power flow holds at a limit stay held and no other switches. A generator held at a limit stays held for the rest of the path (ANDES's limiter does not let go); would_release_step of its entry in limit_events says from where a real exciter would have.
stop_at string or number no 'nose' (default) stops at the nose. 'full' turns there and follows the lower-voltage solutions back to lambda = 0 (CPF.config.stop_at = 'FULL'); the steps after nose_idx are that lower branch. A number above zero is a target lambda: the routine shortens the step that would cross it and lands on it, and the run ends there (complete true, with no nose, so truncated true). A target past the nose is never crossed: the run ends at the nose (complete false, done_msg naming the target), where ANDES alone would go on down the lower branch. Not with parameterization: 'natural' and 'full' together. One of nose, full. Limits: above 0. Default "nose".
parameterization string or null no The equation that fixes the length of a step in the corrector (CPF.config.parameterization). 'pseudo_arclength' is ANDES's default and the most robust at the nose; 'arclength' also goes round it. 'natural' fixes lambda, which is singular at the nose: the routine finds the nose by halving the step until it fails, with about twice the points and none past it, and it cannot trace the lower branch, so it is refused with stop_at: 'full'. Left out, the case's setting stands. One of natural, arclength, pseudo_arclength.
tol number or null no The corrector's tolerance on the mismatch, in pu (CPF.config.tol; ANDES's default 1e-6). At most 1e-4: the nose and the switches of reactive limits are found from the points the corrector solves. Left out, the case's setting stands. Limits: above 0, max 0.0001.
corrector_max_iter integer or null no The Newton iterations the corrector takes per continuation step (ANDES's own CPF.config.max_iter; its default 20). Not the cap on continuation steps, which is what max_iter sets. A step whose corrector runs out of iterations fails, and the routine calls the nose where failures pile up, so a low cap can call it early; at least 2. Left out, the case's setting stands. Limits: min 2.
step_min number or null no The smallest continuation step (CPF.config.step_min; ANDES's default 1e-4). A failed step is halved, and once it is below this the routine calls the nose, so a larger value ends the search for it sooner. Not above step_max (the request's or the case's). Left out, the case's setting stands. Limits: above 0.
step_max number or null no The largest step the routine grows its adaptive step to (CPF.config.step_max; ANDES's default 0.5): smaller draws the curve with more points. Left out, the case's setting stands. Limits: above 0.
step number or null no Optional initial continuation step size for lambda (ss.CPF.config.step for this run). Default uses ANDES's own default (0.1). Limits: above 0.
max_iter integer or null no Optional cap on the number of continuation steps (ss.CPF.config.max_steps for this run). This maps the user-facing parameter name onto ANDES's max_steps field, which actually controls truncation; ANDES's own max_iter config is the Newton corrector iterations per step. Default uses ANDES's own default (500). Limits: min 1.

DaeVariableInfo

One ANDES variable of one device of the loaded case.

Field Type Required Description
name string yes <variable> <Model> <idx> as ANDES spells it in dae.x_name / dae.y_name (omega GENROU 1): what dae_vars asks for it by, and the name of its column in a stream.
kind string yes x for a state variable, y for an algebraic one. One of x, y.
model string yes ANDES model the device belongs to.
var string yes The variable's name within the model.
idx integer or string yes The device's idx.
unit string or null no ANDES's unit for the variable; null where it gives none.
info string or null no ANDES's description of the variable; null where it gives none.

DaeVariableList

A page of the ANDES variables of the loaded case.

Field Type Required Description
total integer yes How many variables match the filters, across all pages. Limits: min 0.
items array of DaeVariableInfo yes The requested page, in the models' own order.

DampingEstimate

The oscillation of a signal, from the log decrement of its swings.

Field Type Required Description
ratio number yes Damping ratio, d / sqrt(pi**2 + d**2) for the half-cycle log decrement d. Negative for a swing that grows.
frequency_hz number yes Frequency of the oscillation, in hertz.
extrema integer yes How many extremes of the signal the estimate rests on.

DeleteBlockedResponse

Response body for DELETE /sessions/{id}/elements/{model}/{idx} when the element cannot be deleted alone (HTTP 422): other elements depend on it, or disturbances act on it or on one of those.

Sending the delete again with cascade=true deletes them all with it. Each list is capped at 25 entries; total and disturbances_total report the full counts so the UI can render a "Showing 25 of N" footer when truncated.

Field Type Required Description
dependents array of TopologyEntry yes Up to 25 of the elements that cannot stay without the target: the ones that name it (the lines and generators on a bus, the machine on a static generator), the ones that name those, and so on. The nearest come first. Empty when only disturbances stand in the way. Limits: max items 25.
total integer yes Full count of dependent elements. Equals len(dependents) when total <= 25; greater when the list was truncated. Limits: min 0.
disturbances array of DeletedDisturbance no Up to 25 of the disturbances that act on the target or on one of its dependents, and would be removed with them. Limits: max items 25.
disturbances_total integer no Full count of those disturbances. Limits: min 0. Default 0.
detail string or null no The refusal in one sentence, with the way out.

DeleteElementResponse

Response body for DELETE /sessions/{id}/elements/{model}/{idx}: the topology after the delete, with what the delete removed.

Field Type Required Description
state string yes pre-setup if disturbances can still be added; committed after PF or TDS has triggered ss.setup(). Once committed, callers must POST /sessions/{id}/reload to add more disturbances. One of pre-setup, committed.
buses array of TopologyEntry yes Bus elements.
lines array of TopologyEntry yes Line elements.
transformers array of TopologyEntry yes Transformer elements split out from the ANDES Line bucket: a branch with tap != 1.0 or phi != 0.0, one the case flags as a transformer (trans) and one whose two ends are rated at different voltages (Vn1 and Vn2). Pure transmission lines remain in lines.
generators array of TopologyEntry yes Generator elements (PV, Slack, GENROU, GENCLS, etc.).
loads array of TopologyEntry yes Load elements - both static (PQ) and dynamic (ZIP).
shunts array of TopologyEntry no Shunt elements (capacitors and reactors). Modeled as ANDES Shunt devices; rendered with the IEC 60617 shunt-cap or shunt-reactor icon depending on the sign of b.
controllers array of TopologyEntry no Dynamic controller devices: exciters (IEEEX1, ESDC2A, SEXS), governors (IEEEG1, TGOV1), the IEEEST PSS, and the REGCA1 renewable-converter model. Surfaces the seven Unit-8 whitelist additions so the disturbance editor can populate device pickers when the case includes them. An ESD1 battery is listed here as well: like REGCA1 it takes over a static generator (its gen) in a time-domain run. Empty for cases that carry no dynamics addfile (stock IEEE 14 .raw alone).
freq_hz number or null no System nominal frequency in Hz, as the case sets it: the header of a PSS/E RAW file, or the _config section of an xlsx or json file. A MATPOWER file, and any other case that sets none, keeps ANDES's default of 60. A per-unit rotor speed omega times this is the speed in Hz. null when the configuration has no usable value.
base_mva number or null no System MVA base, as the case sets it: the header of a PSS/E RAW file, baseMVA of a MATPOWER file, or the _config section of an xlsx or json file. Any other case, and a blank system, keeps ANDES's default of 100. A power in per unit on the system base times this is the power in MW or MVAr. A device with its own rating Sn gives some values per unit of that instead; an ESD1 battery reads alike on both only when its Sn equals this. null when the configuration has no usable value.
buses_without_vn array of integer or string no Idx of the buses whose rated voltage (Vn in the bus's params) the case file does not give: it is absent, blank or zero there, and ANDES fills in 110 kV. That 110 is not the bus's voltage base, so a client must not use it to turn a per-unit voltage into kV. Empty when every bus has a rated voltage. A bus whose Vn has been edited since the case was loaded is no longer listed.
events array of CaseEvent no Timed events the next time-domain run applies besides the disturbances a client commits through POST /sessions/{id}/disturbances: the Fault, Toggle and Alter devices the case's files define (the bundled kundur_full.xlsx trips Line_8 at 2 s), and the disturbances a bundle import or snapshot restore replayed. A client that says what a run will do must count these. A device that cannot act (switched off with u = 0, or a time below zero) is not listed. Empty when there are none.
undo EditStep or null no The edit POST /sessions/{id}/undo-last-edit would take back: the last element added, changed or deleted since the case was loaded. null when there is none. Edits are taken back while state is pre-setup.
redo EditStep or null no The edit POST /sessions/{id}/redo-edit would put back: the one taken back last. null when there is none, which is the case after any new edit.
has_dynamics boolean or null no Whether the case carries dynamic models (a synchronous machine, an exciter, a governor, ...), so a client need not infer it from the model names in generators and controllers. This server always sends true or false; null only means a server that does not report it.
job_id string or null no Job-registry id mirroring the routine that produced this topology snapshot: case load / reload, element delete / undo / redo, or blank-system create. null when the summary is a plain read (GET /topology).
deleted array of TopologyEntry no Every element the delete removed, as it was: the dependents a cascade took, then the element asked for, last.
disturbances array of DeletedDisturbance no Every disturbance the delete removed because it acted on one of deleted. A client that keeps its own list of disturbances to commit should drop the matching ones too.

DeletedDisturbance

A disturbance that acts on an element a delete removes, or would remove.

Field Type Required Description
source string yes case: a Fault, Toggle or Alter device the case's files define. restored: one a bundle import or a snapshot restore replayed. committed: one a client committed through POST /sessions/{id}/disturbances. One of case, restored, committed.
kind string yes Which ANDES event model it is. One of fault, toggle, alter.
model string or null no ANDES model of the device it acts on: Bus for a fault.
dev_idx integer or string or null no Idx of the device it acts on.
t number or null no Time it starts, in seconds: a fault's tf. null for a device of the case that never fires (switched off, or a time below zero); it names the element all the same, so it goes too.
name string or null no The device's name in the case file, for a case one.

DispatchBranchSchema

One branch of an AC dispatch: flows at both ends and the losses.

Field Type Required Description
from_bus integer yes The number of the from bus.
to_bus integer yes The number of the to bus.
ckt string yes The branch's circuit id, from its key.
p_from_mw number yes Active power into the branch at its from end, in MW.
q_from_mvar number yes Reactive power into the branch at its from end, in MVAr.
p_to_mw number yes Active power into the branch at its to end, in MW.
q_to_mvar number yes Reactive power into the branch at its to end, in MVAr.
losses_mw number yes The branch's active losses, p_from_mw + p_to_mw, in MW.
losses_mvar number yes The branch's reactive losses, q_from_mvar + q_to_mvar, in MVAr.
idx string yes The PowerSystems component name of the branch (the engine's handle).

DispatchBusSchema

One bus of an AC dispatch.

Field Type Required Description
v_pu number yes The bus voltage magnitude, in per unit.
bus integer yes The bus number.
angle_rad number yes The bus voltage angle, in radians.
idx string yes The PowerSystems component name of the bus (the engine's handle).

DispatchDualRowSchema

One row of a dual variable.

Field Type Required Description
element string yes The element the row is for, as PowerSimulations names it.
value number yes The dual value of the row.

DispatchDualSchema

One dual variable of the dispatch, read back when duals was true.

Field Type Required Description
name string yes The dual variable's name, as PowerSimulations names it.
rows array of DispatchDualRowSchema yes The dual's rows.

DispatchGeneratorSchema

One dispatched generator.

Field Type Required Description
p_mw number yes The dispatched active power, in MW.
bus integer yes The number of the bus the generator is on.
id string yes The generator's id on its bus, from its key; for a generator the key book does not hold, the one the engine reads off its name.
idx string yes The PowerSystems component name of the generator (the engine's handle).
q_mvar number or null no The dispatched reactive power, in MVAr; present only for the ac network model.

DispatchRequest

The body of POST /sessions/{id}/dispatch.

Field Type Required Description
network_model string yes The network model of the dispatch: copper_plate (no network), dc, ptdf or ac (the full AC power flow equations, solved with Ipopt). One of copper_plate, dc, ptdf, ac.
duals boolean no Read the dual variables back and list them in the answer. The copper plate model has none; dc and ptdf may. Default false.

DispatchResponse

The result of a one-period economic dispatch of a Sienna session.

Field Type Required Description
status string yes completed when the dispatch solved.
engine string yes The engine that ran the dispatch: sienna.
network_model string yes The network model the dispatch used.
objective_per_h number yes The solver's objective, in $/h: the cost curves are labelled as natural units before the model is built, so the objective is the cost of the dispatch with power in MW. It has no gencost constant term: PowerSystems keeps that term apart from the curve and PowerSimulations' dispatch does not charge it, so objective_per_h + fixed_per_h = objective_check_per_h.
objective_check_per_h number yes The cost of the dispatch as MATPOWER counts it, in $/h: aP^2 + bP + c0 of every dispatched generator, recomputed from the dispatch in MW and the case file's own gencost coefficients, the constant term c0 included for every unit (every available unit is on in a dispatch).
fixed_per_h number yes The sum of the gencost constant terms c0 of the dispatched generators, in $/h: what objective_check_per_h holds and objective_per_h does not.
base_mva number yes The system MVA base.
total_load_mw number yes The total load of the case, in MW.
total_dispatch_mw number yes The sum of the dispatched generator powers, in MW.
generators object (names to DispatchGeneratorSchema) yes The dispatched generators, keyed by the neutral key (gen:<bus>-<id>), each with its MW, bus, id and idx, and its MVAr for the ac network model.
buses object (names to DispatchBusSchema) no The bus voltages and angles, keyed by the neutral key (bus:<number>); present only for the ac network model.
branches object (names to DispatchBranchSchema) no The branch flows at both ends and the losses, keyed by the neutral key (branch:<from>-<to>-<ckt>); present only for the ac network model.
total_losses_mw number or null no The total active losses, in MW; present only for the ac network model.
duals array of DispatchDualSchema yes The dual variables, when the request asked for them; empty otherwise.
slacks array of DispatchSlackSchema yes Every slack variable whose value is past 1e-6 MW; empty when all are zero.
parameters array of string yes The parameter names of the optimization model, as PowerSimulations names them.
expressions array of string yes The expression names of the optimization model, as PowerSimulations names them.
keys object (names to object (names to string)) yes The keys lookup: under "generator", "bus" and "branch", the PowerSystems component name of each element of the answer mapped to its neutral key.
notes array of string yes What the Julia side logged at warning level and above while the dispatch ran.
extra object or null no Reserved; absent.

DispatchSlackSchema

One slack variable whose value is not zero (past 1e-6 MW).

Field Type Required Description
variable string yes The slack variable's name, as PowerSimulations names it.
element string yes The element the slack is on, as PowerSimulations names it.
value number yes The slack's value, in MW.

Disturbance

One disturbance of a study (section 6.4).

Field Type Required Description
kind string yes What happens. One of branch_trip, branch_close, bus_fault, gen_trip, load_step, setpoint, set.
target string or null no The key it acts on; bus_fault uses bus.
bus string or null no The bus key of a bus_fault.
t number or null no When it happens, in seconds. Limits: min 0.
t_on number or null no When a fault is applied, in seconds. Limits: min 0.
t_clear number or null no When a fault is cleared, in seconds. Limits: min 0.
r_pu number or null no Fault resistance, per unit. Limits: min 0.
x_pu number or null no Fault reactance, per unit. Limits: min 0.
p_mw number or null no Active power of a load step, in MW.
q_mvar number or null no Reactive power of a load step, in MVAr.
signal string or null no The reference a setpoint changes. One of p_ref, v_ref, q_ref, omega_ref.
param string or null no The parameter a set changes. Limits: max length 100.
value number or null no The value a setpoint or a set takes.

DisturbanceAck

One entry in the response to POST /sessions/{id}/disturbances.

Field Type Required Description
kind string yes Discriminator from the original spec. One of fault, toggle, alter.
idx integer or string yes ANDES idx assigned to the created disturbance device. Use this to reference the disturbance in subsequent operations.

DroopController

Frequency droop: power in proportion to the frequency deviation beyond a dead band, positive (discharging) when the frequency is below nominal.

Field Type Required Description
model string yes ANDES model of the device the controller commands: one of the distributed generation models (ESD1, PVD1, EV1, EV2). GET /sessions/{id}/tds/controllers lists the devices of the loaded case that can be named. Limits: min length 1, max length 64.
idx integer or string yes The device's idx. 5 and "5" name the same device.
frequency string no The frequency the controller reads. coi: the centre-of-inertia frequency, the inertia-weighted mean speed of the synchronous machines in service times the system's nominal frequency. bus: the frequency the device measures at its own bus (its fHz), which jumps during a fault. One of coi, bus. Default "coi".
period number no Seconds between two samples. The controller reads the frequency and sets its command once a period and holds it in between. A period shorter than the integration step samples at every step. Limits: min 0.001, max 60. Default 0.1.
t_start number no Simulation time, in seconds, before which the controller commands nothing. Limits: min 0. Default 0.0.
ramp number or null no The most the command may change, in MW per second. null lets it jump from one sample to the next. Limits: above 0.
type "droop" yes Discriminator: a frequency droop.
gain number yes MW commanded per Hz of deviation beyond the dead band. Limits: above 0.
deadband number no Deviation from nominal, in Hz either way, the controller ignores. Limits: min 0. Default 0.0.
p_max number or null no The largest command, in MW, discharging or charging. null uses the device's own limit: the smaller of its power limit pmx and its current limit ialim. Limits: above 0.

DynamicBranchSpec

One branch to simulate dynamically (PSID's DynamicBranch).

Field Type Required Description
target string yes A branch key, branch:<from>-<to>-<ckt>.

DynamicRecord

One dynamic model of a generating unit.

values and names are null in this version of the document (the positional parameter tables are a later unit); the document's notes say so.

Field Type Required Description
key string yes The model's TENSA key, the unit's key and its role.
unit string yes The key of the generator the model belongs to.
role string yes What the model does in the unit: machine, exciter, governor, ...
model string yes The model's name, as its dynamic data file names it.
values array of number or null no The parameters in the order of the model's PSS/E record; null in this version.
names array of string or null no The names of values, for people; never read back.
vocabulary string no Whose parameter names the record uses: psse (values by position) or an engine's (params). One of psse, andes, sienna. Default "psse".
params object (names to number) or null no The parameters by the engine's own names, for a model with no PSS/E record.

EditElementRequest

Request body for PUT /sessions/{id}/elements/{model}/{idx}.

Updates one or more parameters on an existing element. The same pre-setup gate + whitelist as AddElementRequest apply. idx and name cannot be edited (they would desync ANDES's internal indexes); create a new element if you need to reassign topology references.

Field Type Required Description
params object (names to number or integer or string or boolean) yes Subset of model parameters to overwrite. Each key must be in the per-model whitelist; idx / name are explicitly rejected (create a new element instead).

EditStep

One edit to the system made before a run: an element added, changed or deleted. What undo and redo of a topology summary name.

Field Type Required Description
op string yes What the edit did to the element. One of add, edit, delete.
model string yes ANDES model of the element.
idx integer or string or null no The element's idx.
params array of string no edit only: the params whose values it changed.
also integer no delete only: how many more devices went with the element because they depended on it. Limits: min 0. Default 0.

EigParticipationResponse

Wire shape of GET /sessions/{id}/eig/modes/{mode_idx}/participation.

Field Type Required Description
mode_idx integer yes Echo of the requested mode index. Limits: min 0.
participation array of ParticipationFactorModel yes Per-state participation factor row for the requested mode. Length equals the EIG result's state_count.

EigResultResponse

Wire shape of POST /sessions/{id}/eig.

The state matrix itself (As) is intentionally omitted from this response - for NPCC 140-bus it would be ~110k entries. The UI fetches the matrix on demand via GET /eig/state-matrix.mat.

Field Type Required Description
eigenvalues array of ComplexNumberModel yes Eigenvalues of EIG.As (the system's reduced state matrix). Length equals mode_count. Each entry is {real, imag} so the JSON payload doesn't carry an out-of-band complex encoding. An eigenvalue ANDES counts as zero (magnitude within EIG.config.tol, 1e-6 by default) is exactly {0, 0}: what the solver returns for it is rounding noise whose sign differs between machines.
damping_ratios array of number yes Per-mode damping ratio -Re(z) / \|z\|. Index-aligned with eigenvalues. A zero eigenvalue, which neither oscillates nor grows, has 1.0. NaN-collapsed to 0.0 so the wire payload never carries non-finite floats.
frequencies_hz array of number yes Per-mode oscillation frequency \|Im(z)\| / (2*pi) in Hz. 0 for purely-real eigenvalues.
mode_count integer yes Number of eigenvalues == len(EIG.mu) (the reduced state count post fold/elimination). Stock IEEE 14 (no dyn models) → 0; full IEEE 14 + dyr → 62; kundur_full → 52.
state_count integer yes Same value as mode_count - surfaced as a separate field for clarity in the UI (the state matrix shape is [state_count, state_count]).
state_names array of string yes Reduced-state names indexed identically to participation factor rows. Falls back to state_<i> labels when the reduced count differs from ss.dae.x_name.
tds_initialized boolean yes Always true after a successful EIG.run. ANDES's EIG._pre_check calls TDS.init() + TDS.itm_step() if not already initialised - the substrate surfaces this so the UI can warn that subsequent TDS / re-run PF will start from this initialised dae.
load_model string or null no The load model the analysis used (impedance, power or as-case). Set by the Sienna engine; null for ANDES, whose loads behave as the case and its own defaults leave them.
notes array of string no Standing notes on the result. A Sienna result carries the note that PSID's small-signal results are work in progress in validation, by PSID's own documentation (spec section 13). Empty for ANDES.
job_id string or null no Job-registry id mirroring this EIG routine (kind eig). GET /sessions/{id}/jobs/{job_id} returns the matching record; null on legacy responses.

EigRunRequest

Request body for POST /sessions/{id}/eig.

Empty body - ANDES's EIG.run() takes no public arguments. Kept as a model (rather than None) so the route can declare a model_config extra="forbid" and reject typos in the forward-compatible way.

Field Type Required Description
load_model string or null no How loads behave in the analysis: impedance (the default), power or as-case. A Sienna session takes all three; an ANDES session takes it left out or impedance, which is what ANDES does, and refuses the other two with 422. One of impedance, power, as-case.

EigSweepPointModel

The eigenvalues at one value of the swept parameter.

Field Type Required Description
value number yes The parameter value of this point: points[i] is at values[i] of the request.
eigenvalues array of ComplexNumberModel yes Eigenvalues of the reduced state matrix at this value, each {real, imag}, as POST /sessions/{id}/eig gives them for a case opened with the value (an eigenvalue ANDES counts as zero is exactly {0, 0}). The order is not comparable across points, since ANDES does not keep one: each point is a list of its own and no mode is followed through the sweep, so a client drawing root loci matches the modes itself.
damping_ratios array of number yes Per-mode damping ratio -Re(z) / \|z\| at this value, index-aligned with eigenvalues; 1.0 for a zero eigenvalue.
frequencies_hz array of number yes Per-mode oscillation frequency \|Im(z)\| / (2*pi) in Hz at this value, index-aligned with eigenvalues.

EigSweepRequest

Request body for POST /sessions/{id}/eig/sweep: one parameter of one device and the values to take the eigenvalues at.

Field Type Required Description
model string yes ANDES model name, e.g. 'GENROU'.
idx string yes idx of the device within the model, as a string, e.g. '1'.
param string yes Parameter name as ANDES names it, e.g. 'M': a numeric parameter of the model that is not copied from another model, the ones GET /sessions/{id}/topology/models/{model}/alterable_params lists before its services.
values array of number yes The values to take the eigenvalues at, in order: 1 to 200 finite numbers. A value is on the base the case file and an edit of the element use, which for a per-unit parameter is the device's own base (ANDES's vin). Each value costs a read, a setup, a power flow and an eigenvalue analysis of the case. Limits: min items 1, max items 200.

EigSweepResponse

Wire shape of POST /sessions/{id}/eig/sweep.

Field Type Required Description
model string yes The model of the swept parameter, as requested.
idx string yes The device of the swept parameter, as requested.
param string yes The swept parameter, as requested.
points array of EigSweepPointModel yes One point per requested value, in the request's order. Each is an eigenvalue analysis of a system of its own: the case with the session's edits and the parameter at the value, its power flow solved with the settings of the session's last one. The session's own system is not changed by the sweep.
mode_count integer yes Number of eigenvalues at every point. A sweep whose points differ in it is refused (422), not answered with lists of different lengths.
tds_initialized boolean yes Whether the session's dynamic state is initialised, which the sweep does not change: false unless an eigenvalue analysis or a time-domain run of the session initialised it, so a power flow can still run after a sweep that followed one.
job_id string or null no Job-registry id mirroring this sweep (kind eig). GET /sessions/{id}/jobs/{job_id} returns the matching record.

EigenvaluePairOut

Two eigenvalues matched as one mode.

Field Type Required Description
index_ref integer yes Its index in the reference table.
index_new integer yes Its index in the comparison table.
eigenvalue_ref_re number yes Real part of the reference eigenvalue, 1/s.
eigenvalue_ref_im number yes Imaginary part of the reference eigenvalue, 1/s.
eigenvalue_new_re number yes Real part of the comparison eigenvalue, 1/s.
eigenvalue_new_im number yes Imaginary part of the comparison eigenvalue, 1/s.
distance number yes Distance in the complex plane, 1/s.
frequency_hz_ref number yes Frequency of the reference mode, hertz.
frequency_hz_new number yes Frequency of the comparison mode, hertz.
damping_ratio_ref number yes Damping ratio of the reference mode.
damping_ratio_new number yes Damping ratio of the comparison mode.
within_tolerance boolean yes Whether frequency and damping are both within their tolerances.

EigenvalueRow

One mode of an eigenvalue table.

Field Type Required Description
re number yes Real part of the eigenvalue, in 1/s.
im number yes Imaginary part of the eigenvalue, in 1/s.
frequency_hz number yes Oscillation frequency, in hertz.
damping_ratio number yes Damping ratio; 1.0 for a zero eigenvalue.

EigenvalueTable

The eigenvalue table of a results document, one row per mode.

Field Type Required Description
eigenvalues array of EigenvalueRow no One row per mode, index-aligned with the source result.

ElementCreated

Response body for POST /sessions/{id}/elements (201).

Carries the newly-built TopologyEntry so the client can update its cache without re-fetching the full topology. Web-side mutation hooks use this to optimistically update bus dropdowns before the topology re-fetch resolves.

Field Type Required Description
element TopologyEntry yes The element that was just added, with its assigned idx + the parameters as ANDES read them back.
job_id string or null no Job-registry id mirroring the element-add routine (kind element-add). null on legacy responses.

EngineBlock

The engine that produced the result and the versions it ran with.

Field Type Required Description
name string yes The engine's registry name: andes or sienna.
versions object (names to string) no The package versions the engine ran with, caller-supplied. Empty until the adapter reports them; the builders never invent one.

EngineCapabilities

What one engine can do, as GET /engines reports it (spec section 7).

Field Type Required Description
name string yes The engine's name (andes, sienna).
available boolean yes Whether this build can start a session for the engine.
unavailable_reason string or null yes Why the engine cannot start a session, or null when it can.
versions object (names to string) yes The versions the engine runs with, by package (andes for the ANDES engine). Empty for an engine that is not available.
formats EngineFormats yes The case file formats the engine reads and writes.
routines array of string yes The routines the engine runs (pflow, tds, eig, cpf, se). A routine an engine lacks is absent here and refused with a 409 that names the engines that have it.
routine_options object (names to object) no Per routine, what the engine takes where it differs from the ANDES engine, so a client offers only that: for tds, whether runs stream (streaming) and can be aborted (abort), the disturbance kinds it takes (disturbances: branch_trip, bus_fault, gen_trip) and its options with their values (options: load_model). Empty for an engine that takes everything the routine has (ANDES) and for one that is not available.
ops array of string yes Every worker op the engine answers, sorted. Empty for an engine that is not available.
editing boolean yes Whether the engine edits a case (add, edit and delete elements).

EngineFormats

The case file formats an engine reads and writes.

Field Type Required Description
read array of string yes The formats the engine loads a case from (xlsx, json, psse-raw, psse-dyr, matpower). Empty for an engine that is not available.
write array of string yes The formats the engine saves a case as. Empty for an engine that is not available.

EngineList

Response shape for GET /engines.

Field Type Required Description
engines array of EngineCapabilities yes Every engine the server knows, available or not, in a fixed order.

EngineStudyOutcome

What one engine did with the study: its results document, or the problem document of its refusal.

Field Type Required Description
engine string yes The engine's registry name.
ran boolean yes Whether the engine ran the study.
document ResultsDocument or null no The results document; null when refused.
problem object or null no The problem document of the refusal (status 409, category engine_unsupported); null when run.
raw object or null no The engine's own answer for a routine the results document has no table for yet (matrices, dispatch).

ExampleList

Response shape for GET /examples.

Field Type Required Description
examples array of ExampleListEntry yes Every example case, in the order the catalog gives.

ExampleListEntry

One example case, as the catalog describes it, with its state on this machine.

Field Type Required Description
id string yes Short name of the case, used by every command and route. Limits: max length 40. Pattern ^[a-z0-9][a-z0-9_-]*$.
title string yes The case's name as it is shown. Limits: max length 120.
summary string yes What the case is for, in a sentence or two.
category string yes dynamic cases carry machine models and can be simulated in the time domain; steady-state cases hold a network and its loading only. One of dynamic, steady-state.
tags array of string no Words the case is found by.
size CaseSize or null no Buses and generators. Required for an entry that has a file.
analyses array of string no What the case supports: pf power flow, tds time domain, eig eigenvalues.
default boolean no Whether the case is put in an empty workspace when the server starts. Default false.
provenance Provenance yes Where the file comes from.
extra_files array of ExtraFile no Files the case is loaded with, besides the primary.
citations array of Citation no The publications of the system and of the dataset the file comes from.
licence Licence yes The terms the data is distributed under.
modifications array of string no Every change made to the data of the source.
caveats array of string no What a user should know before relying on the case.
verification Verification or null no How the case's results were checked, where that has been done.
links array of Link no Where to get the data of an external entry.
in_workspace boolean yes Whether the case's primary file is already in the workspace (a regular file of that name, which may be one the user wrote). Always false for a case with no file.
differs boolean yes Whether the file in the workspace is not the one this TENSA ships for the case: a workspace made by an earlier release holds the file that release put under the name, or the user edited it. Only ever true for a case TENSA bundles (provenance.kind bundled) that is in the workspace. Add with overwrite puts the shipped file in its place.
available boolean yes Whether every file the case copies can be found: in the installed ANDES, or in this package. false for a case that has no file (external), and for an ANDES case the installed release does not hold.

ExternalResultsResponse

Response body for POST /external-results.

Field Type Required Description
source string yes The format the file was read as. One of tsat, psse.
series array of ExternalSeries yes One series per signal column of the export, in the order the tool wrote them, all on the same t. Feed them to POST /response-metrics as they are (at most 64 series a request), or plot them against a run's traces.
samples integer yes The length of every series' t and y.

ExternalSeries

One signal of an imported export, in the wire shape of MetricsSeries.

Field Type Required Description
name string yes What the series is called. The export format carries no signal names ANDES reads, so the import names them by position: column 1, column 2, ... in the order the tool wrote them.
t array of number yes Sample times in seconds, in the order the export gives them (not sorted); a row whose time is not a finite number is left out.
y array of number or null yes The signal's value at each time. A value the export did not carry as a finite number (text, a date, an empty cell, an Excel error) is null.

ExtraFile

Field Type Required Description
path string yes A file the case is loaded with (a .dyr beside a .raw), relative to the same folder as the primary file.
sha256 string yes SHA-256 of the file. Pattern ^[0-9a-f]{64}$.
role string yes What the file adds, such as dynamic data. Limits: max length 120.

FaultSpec

3-phase-to-ground fault on a bus.

Maps to ss.add('Fault', bus=..., tf=..., tc=..., xf=..., rf=...). Single-phase faults are not natively supported by ANDES and are not supported here either.

Field Type Required Description
kind "fault" no Discriminator: this spec creates an ANDES Fault device. Default "fault".
bus_idx integer or string yes ANDES idx of the bus where the fault is applied.
tf number yes Time the fault is applied, in seconds.
tc number yes Time the fault is cleared, in seconds. Must be > tf.
xf number no Fault reactance in pu. Default 0.0001.
rf number no Fault resistance in pu. Default 0.0.

FfrController

Fast frequency response: a fixed power, delivered once for a set time when the frequency leaves a threshold or moves too fast.

Field Type Required Description
model string yes ANDES model of the device the controller commands: one of the distributed generation models (ESD1, PVD1, EV1, EV2). GET /sessions/{id}/tds/controllers lists the devices of the loaded case that can be named. Limits: min length 1, max length 64.
idx integer or string yes The device's idx. 5 and "5" name the same device.
frequency string no The frequency the controller reads. coi: the centre-of-inertia frequency, the inertia-weighted mean speed of the synchronous machines in service times the system's nominal frequency. bus: the frequency the device measures at its own bus (its fHz), which jumps during a fault. One of coi, bus. Default "coi".
period number no Seconds between two samples. The controller reads the frequency and sets its command once a period and holds it in between. A period shorter than the integration step samples at every step. Limits: min 0.001, max 60. Default 0.1.
t_start number no Simulation time, in seconds, before which the controller commands nothing. Limits: min 0. Default 0.0.
ramp number or null no The most the command may change, in MW per second. null lets it jump from one sample to the next. Limits: above 0.
type "ffr" yes Discriminator: a fast frequency response.
power number yes MW commanded once triggered. Positive discharges and answers a low frequency; negative absorbs and answers a high one. Not zero.
trigger_deviation number or null no Triggers when the frequency is this many Hz below nominal (above, for a negative power). null leaves the deviation out. Limits: above 0.
trigger_rocof number or null no Triggers when the frequency falls this many Hz per second or faster (rises, for a negative power), measured between two samples. null leaves the rate out. At least one of the two triggers must be given. Limits: above 0.
hold number no Seconds the power is held before the controller lets go. Limits: above 0. Default 10.0.

FidelityEntry

One element of the loaded case whose fidelity is not exact.

Field Type Required Description
key string yes The element's key, as GET /sessions/{id}/keys gives it.
model string yes The TENSA kind of the dynamic model, e.g. TGOV1.
state string yes The fidelity state: known-difference:<id>, unverified or unsupported. Elements that are exact are not listed.
handling string or null no Only on an unsupported entry: what the adapter did, dropped.
reason string or null no Only on an unsupported entry: why the engine cannot hold the model.
detail string or null no Only on a known-difference entry: the register entry's summary.

FidelityReport

The elements of the loaded case whose fidelity is not exact.

Field Type Required Description
session_id string yes The session this report is for.
engine string yes The engine the session runs.
entries array of FidelityEntry yes One entry per element that is not exact, sorted by key.

GeneratorOp

The operations data of one generator: what dispatch, unit commitment and simulation read. Null where the case gives nothing; a PSS/E .raw has none of these fields and its generators carry no op block at all.

Field Type Required Description
p_min_mw number or null no The lower active power limit, in MW (MATPOWER PMIN, column 10).
p_max_mw number or null no The upper active power limit, in MW (MATPOWER PMAX, column 9).
ramp_up_mw_per_min number or null no The ramp-up limit, in MW per minute: MATPOWER's RAMP_AGC (MW/min) where it is non-zero, else RAMP_10 (MW in 10 minutes) divided by 10; null where both are 0 (the file gives no ramp data, and 0 must never become a limit). It is the limit the Sienna engine's unit commitment and simulation enforce.
ramp_down_mw_per_min number or null no The ramp-down limit, in MW per minute, same rule as ramp_up_mw_per_min.
min_up_h number or null no The minimum up time, in hours; null where the case gives none.
min_down_h number or null no The minimum down time, in hours; null where the case gives none.
cost CostCurveRecord or null no The variable cost curve; null where the case has no cost data.
initial_p_mw number or null no The output the unit commitment starts from, in MW; the case's PG.
initial_status string or null no Whether the unit is committed at the start of the horizon; null where the case does not say (a MATPOWER case: on when in service). One of on, off.

GeneratorOutput

Per-generator PF output. Active + reactive injection at the generator's terminal bus, plus the terminal voltage (pu). A generator that is switched off injects nothing: p and q are 0.

Field Type Required Description
p number yes Active power generated at the terminal bus, in MW.
q number or null yes Reactive power generated at the terminal bus, in MVAr. null for a DC power flow, which computes no reactive power.
v number yes Terminal bus voltage magnitude (pu).
bus integer or string yes Terminal bus idx.
q_min number or null no Lower reactive power limit the case sets (qmin), in MVAr. Power flow does not enforce it unless the run asked for enforce_q_limits, so q can lie below it. null for a generator that is switched off.
q_max number or null no Upper reactive power limit the case sets (qmax), in MVAr. Power flow does not enforce it unless the run asked for enforce_q_limits, so q can lie above it. null for a generator that is switched off.

GeneratorRecord

One static generator.

Field Type Required Description
key string yes The generating unit's TENSA key.
bus integer yes The number of the bus the generator is on.
id string yes The generator's id on its bus.
p_mw number or null no The scheduled active power, in MW.
q_mvar number or null no The reactive power the case stores, in MVAr.
v_set_pu number or null no The voltage setpoint, per unit of the bus's base voltage.
q_min_mvar number or null no The lower reactive limit, in MVAr.
q_max_mvar number or null no The upper reactive limit, in MVAr.
mbase_mva number or null no The machine's MVA rating, the base of its dynamic parameters.
op GeneratorOp or null no The operations data (limits, ramps, cost, initial state); null for a case that has none, which is every PSS/E .raw case.
in_service boolean no Whether the generator is in service. Default true.

HTTPValidationError

Field Type Required Description
detail array of ValidationError no

HealthCache

State of ANDES's generated code (~/.andes/pycode), which a case load needs.

Field Type Required Description
state string yes ready: generated and checked against the installed ANDES. unchecked: there is code, but nothing has checked it against this ANDES (it was upgraded, or another ANDES regenerated the code). missing: ANDES has generated nothing yet. One of ready, unchecked, missing.
warm boolean yes True when state is ready: the next case load does not generate code.
generating boolean yes True while the server's background process is generating the code. A case loaded meanwhile waits for it.

HealthResponse

Response shape for GET /health.

Field Type Required Description
status "ok" yes Always ok: a server that cannot answer sends no response.
version string yes Installed tensa version.
andes_version string yes Installed ANDES version, or unknown when its package metadata is missing.
sessions HealthSessions yes How many sessions are open, against the cap on them.
cache HealthCache yes Whether ANDES's generated code is ready, so that a case load does not wait for it.

HealthSessions

How full the server is.

Field Type Required Description
active integer yes Sessions open now, each with its own worker process.
max integer yes Cap on open sessions (--max-sessions). Creating one past it answers 429.

InverterSpec

A PSID inverter attached to a generator that has no .dyr record.

Field Type Required Description
target string yes A generator key, gen:<bus>-<id>.
parameter_set string yes An id of INVERTER_PARAMETER_SETS.

JobRecordSchema

HTTP-visible shape of a _JobRegistry record.

Returned by GET /sessions/{id}/jobs and GET /sessions/{id}/jobs/{job_id}. Every routine response also embeds a job_id that resolves to one of these records.

Field Type Required Description
id string yes Server-generated UUID identifier for the job.
kind string yes Discriminator for the routine kind (pflow, tds-stream, eig, cpf, cpf-qv, se, sweep, snapshot-*, bundle-*, element-*, clone-*, etc.). The full enum lives in tensa.core.jobs.JobKind. One of pflow, tds-batch, tds-stream, eig, cpf, cpf-qv, se, se-measurements, sweep, snapshot-save, snapshot-restore, snapshot-delete, bundle-export, bundle-import, case-load, case-reload, case-save, element-add, element-edit, element-delete, element-undo, element-redo, disturbance-commit, pmu-add, pmu-delete, profile-upload, profile-add, profile-delete, clone-init, clone-edit, clone-undo, clone-redo, clone-save-as, clone-reset.
status string yes Lifecycle state: pending (registered), running (worker actively executing), done (completed successfully), failed (worker raised; problem populated), or cancelled (cooperative-abort succeeded). One of pending, running, done, failed, cancelled.
started_at number yes Monotonic clock seconds when the job was registered. Use differences between started_at / updated_at / ended_at for elapsed-time display.
updated_at number yes Monotonic clock seconds at the most recent state mutation.
ended_at number or null no Monotonic clock seconds at terminal transition (done/failed/cancelled). None while in-flight.
can_cancel boolean yes True if the job exposes a cooperative-abort path (TDS streaming, sweep, clone reload-replay). Synchronous routines like PF/EIG/CPF/SE are not cancellable; the UI must NOT render a cancel button for can_cancel: false records.
progress number or null no Fractional progress in [0.0, 1.0] when the job emits per-step progress (sweep iterations, clone reload-replay phases). None means indeterminate.
request_summary object no Serializable subset of the original request body. Used by the Activity panel's Retry affordance to re-fire the same mutation variables. Must NOT carry credentials or large blobs (R16: this field is in-memory only and excluded from any Zustand persist whitelist on the web side).
result_ref string or null no Opaque reference to the job's result, populated on done. For TDS this is the run_id; for sweep, the sweep_id; for clone edits, the new param value reference.
problem ProblemDetails or null no Populated on failed with the full ProblemDetails envelope (includes the typed recovery axes). Drives the Activity panel's per-job <ProblemDetailsErrorSurface>.
repeated_count integer no Number of identical-signature failures that coalesced into this record, which keeps the first of them. For done and in-flight jobs this is always 0. Default 0.

KeyEntrySchema

One element of the loaded case and the key it was given.

Field Type Required Description
key string yes The element's key: a string that names it the same way in every engine that loads the case (bus:7, branch:7-8-1, gen:1-1, gen:1-1/exciter), built from the case by the rule of section 4 of design/multiengine/spec.md.
bucket string yes The part of the case the element belongs to: bus, line, transformer, generator, load, shunt, dynamic or other.
model string yes The engine's model of the element (an ANDES model class name).
idx integer or string yes The engine's own handle of the element within model.
source string yes Where the id in the key came from: file for one read from the case file, engine for one the engine holds, ordinal for one made up from order.

KeyList

Every key of the loaded case, in assignment order, with the problems the assignment noted.

Field Type Required Description
keys array of KeyEntrySchema no One entry per element of the loaded case, in the order the keys were assigned. Empty when no case is loaded.
problems array of string no What assigning the keys found worth saying (a collision, an element the file does not name, ...). Empty when there is nothing to say.

LayoutBranchRoute

How one line or transformer is drawn between its two buses.

Field Type Required Description
routing string no auto: the branch is drawn from where its two buses are now, and bend_points is not used. polyline: it is drawn through bend_points as they are stored, a route the diagram made. manual: it is drawn through bend_points too, and the route was drawn by hand: tidying the diagram leaves it as it is, and it is brought along when one of its buses is moved. One of auto, polyline, manual. Default "auto".
bend_points array of BusCoord no The points of a polyline or manual route in order: where it leaves the first bus, each bend, and where it reaches the second bus. A polyline route is only drawn while both ends still sit on their buses, so moving a bus sends its branches back to auto; a manual one follows its buses. Limits: max items 256.
bus1 string or null no idx of the bus the route starts at, with bus2 what the route is anchored to: a reader draws it only for a branch between those two buses. null: not recorded.
bus2 string or null no idx of the bus the route ends at. null: not recorded.
source_face string or null no Face of the first bus (bus1) the branch leaves from, when it was chosen. null lets the renderer pick the face that points at the other bus. One of north, east, south, west.
target_face string or null no Face of the second bus (bus2) the branch arrives on, when it was chosen. null lets the renderer pick. One of north, east, south, west.

LayoutBusbar

The bar a bus is drawn as.

Field Type Required Description
length number or null no Length of the bar in canvas units. null leaves it to the renderer, which sizes the bar to what connects to it. A bar with a length set is still drawn longer when its connections need more room than that. Limits: above 0.
orientation string no Whether the bar lies across the diagram or stands upright. One of horizontal, vertical. Default "horizontal".

LayoutConnection

Where the connector between a device and its bus attaches.

Field Type Required Description
device_face string or null no Face of the device symbol the connector leaves from, when it was chosen. null lets the renderer use the face that points at the bus. One of north, east, south, west.
bus_face string or null no Face of the bus the connector lands on, when it was chosen. null lets the renderer pick. One of north, east, south, west.
bend_points array of BusCoord no The points of a connector that was drawn by hand, in order: where it leaves the device, each bend, and where it lands on the bar of the bus. They are for the device and the bus where this layout has them, and the connector is brought along when either is moved. Empty: the connector is worked out from where the two stand. Limits: max items 256.
bus string or null no idx of the bus the connector ran to when it was drawn. A reader uses bend_points only for a device on that bus, as it uses the position of a device. null: not recorded.

LayoutDeviceCoord

Where a generator, load or shunt is drawn, and the bus it hangs off.

Field Type Required Description
x number yes X coordinate, finite (no NaN/Inf).
y number yes Y coordinate, finite (no NaN/Inf).
bus string or null no idx of the bus the device was connected to when it was placed. A reader uses the position only for a device on that bus, so an idx that has come to name another element (a .raw file numbers its devices afresh) does not put it somewhere it never was. null: not recorded (a version 1 document); the idx alone is trusted.

LayoutLabelOffset

How far a label sits from where the renderer would put it.

Field Type Required Description
dx number yes Shift to the right, in canvas units.
dy number yes Shift downwards, in canvas units.

LayoutUnit

How one generating unit is drawn.

Field Type Required Description
expanded boolean no true when the unit's control chain (exciter, governor, stabiliser) is drawn out; false when the unit is collapsed to its machine symbol. Default false.
bus string or null no idx of the bus the unit was on when this was chosen. A reader uses the entry only for a unit on that bus, so an idx that has come to name another generator does not draw the chain of that one out. null: not recorded; the idx alone is trusted.

Licence

Field Type Required Description
name string yes The licence, as its own text names it. Limits: max length 200.
url string or null no Where the licence text is. Limits: max length 500. Pattern ^https?://\S+$.
attribution string or null no The credit the licence asks a user of the data to give. Limits: max length 1200.
notice string or null no A notice the licence says must appear, whole, in every copy of the data. TENSA repeats it in its own NOTICE.md, in a file beside the bundled data and in the EXAMPLE-SOURCES.md it writes next to the case in a workspace. Limits: max length 4000.

LineFlow

Per-line active and reactive power flow at both terminals: p / q at terminal 1 (bus1) and p_to / q_to at terminal 2 (bus2), each flowing from the bus INTO the line, plus the line's loss and its loading against its rating.

Sign convention: positive p means real power flowing FROM bus1 INTO the line; positive q means reactive power flowing FROM bus1 INTO the line, and the same at terminal 2 for p_to / q_to. On a line that carries power from bus1 to bus2, p is positive and p_to negative, and the two sum to the loss. The SLD overlay uses the sign of p to render directional arrows along each branch.

Field Type Required Description
p number yes Active power leaving bus1 into the line, in MW (i.e., computed in pu and multiplied by the system base MVA).
q number or null yes Reactive power leaving bus1 into the line, in MVAr. null for a DC power flow, which computes no reactive power.
from_idx integer or string yes ANDES idx of the bus1 terminal (the from-side bus).
to_idx integer or string yes ANDES idx of the bus2 terminal (the to-side bus).
p_to number yes Active power leaving bus2 into the line, in MW. Negative when the line delivers power to bus2.
q_to number or null yes Reactive power leaving bus2 into the line, in MVAr. null for a DC power flow, which computes no reactive power.
loss number yes Active power the line dissipates, in MW: p + p_to.
rate_a number or null no The line's long-term rating (the case's rate_a), in MVA. null when the case gives none (a rate_a of zero), in which case the line has no loading either.
loading_pct number or null no The larger of the apparent powers at the two terminals, sqrt(p^2 + q^2) and sqrt(p_to^2 + q_to^2), as a percentage of rate_a. Above 100 is an overload. null when the line has no rating.

LineRecord

One non-transformer branch; impedances per unit on base_mva.

Field Type Required Description
key string yes The branch's TENSA key.
from integer yes The number of the bus the branch leaves.
to integer yes The number of the bus the branch reaches.
ckt string yes The circuit id that tells parallel branches apart.
r_pu number or null no The series resistance, per unit on base_mva and the bus voltage.
x_pu number or null no The series reactance, per unit on base_mva and the bus voltage.
b_pu number or null no The total line charging susceptance, per unit on base_mva and the bus voltage.
rate_a_mva number or null no The long-term flow limit, in MVA; 0 where the case gives none.
in_service boolean no Whether the branch is in service. Default true.
Field Type Required Description
title string yes What the link points at. Limits: max length 200.
url string yes The address. Limits: max length 500. Pattern ^https?://\S+$.
note string or null no What to know before following it.

ListDisturbancesResponse

Wire shape of GET /sessions/{id}/disturbances.

Mirrors the substrate's Wrapper.list_disturbances() - the discriminated union over Fault / Toggle / Alter, in the order the specs were accepted. Empty list when no disturbances are pending.

Field Type Required Description
disturbances array of FaultSpec or ToggleSpec or AlterSpec yes Currently-recorded disturbance specs. Same shape as the POST /sessions/{id}/disturbances request body's disturbances field.

ListPmusResponse

Wire shape of GET /sessions/{id}/pmu.

Mirrors a slice of TopologySummary.controllers filtered to the PMU model class - surfaced as a dedicated route so the placement dialog doesn't have to load the full topology snapshot just to read the PMU list.

Field Type Required Description
pmus array of TopologyEntry yes Currently-placed PMU instances. Each entry's params carries bus / Ta / Tv. Empty list when no PMUs have been placed.

ListProfilesResponse

Wire shape of GET /sessions/{id}/profiles.

Field Type Required Description
profiles array of TopologyEntry yes Currently-staged TimeSeries devices. Each entry's params carries path, sheet, fields, model, dev, dests, tkey, mode. Empty list when none have been added.

ListSnapshotsResponse

Response body for GET /sessions/{id}/snapshots.

Field Type Required Description
snapshots array of SnapshotListEntry no Saved snapshots for this session's case, newest first.

LoadCaseRequest

Request body for POST /sessions/{id}/case. All paths are workspace-relative; the substrate canonicalizes them with O_NOFOLLOW before passing to ANDES.

Field Type Required Description
primary_path string yes Workspace-relative path to the primary case file. Supported formats: xlsx, raw, dyr, json, m. The substrate routes through ANDES's native readers; format is detected from the extension. Limits: min length 1.
addfiles array of string or null no Optional list of workspace-relative addfile paths. PSS/E .raw (steady-state) and .dyr (dynamics) are paired via this mechanism; pass [.dyr path] when loading a .raw.
on_unsupported string or null no What the Sienna engine does with a dynamic record it does not support: refuse (the default) fails the load and names every such record; drop loads the case without them and logs a warning for each. The ANDES engine ignores this. One of refuse, drop.

LoadConsumption

Per-load PF consumption at the converged voltage. A load that is switched off draws nothing: p and q are 0.

Field Type Required Description
p number yes Active power drawn, in MW.
q number or null yes Reactive power drawn, in MVAr. null for a DC power flow, which computes no reactive power.
bus integer or string yes Terminal bus idx.

LoadRecord

One load.

Field Type Required Description
key string yes The load's TENSA key.
bus integer yes The number of the bus the load is on.
id string yes The load's id on its bus.
p_mw number or null no The active power at 1.0 pu voltage, in MW.
q_mvar number or null no The reactive power at 1.0 pu voltage, in MVAr.
zip ZipFractions or null no How the power varies with the voltage; null when the engine does not hold it.
in_service boolean no Whether the load is in service. Default true.

MetricExtremum

A value of the signal and when it is reached.

Field Type Required Description
value number yes The value, in the signal's unit.
t number yes The time it is reached, in seconds.

MetricsSeries

One signal to describe.

Field Type Required Description
name string yes What the signal is called; echoed back on its result. Limits: min length 1, max length 200.
t array of number yes Sample times in seconds, not decreasing. Samples at one time count as one, the last of them. Limits: max items 200000.
y array of number or null yes The signal's value at each time, in whatever unit the caller reads it in. null marks a missing value (a diverged step); that sample is left out. Limits: max items 200000.

ModelDoc

ANDES's own documentation of one model.

Field Type Required Description
model string yes The ANDES model class name the documentation is for.
doc string yes The text ANDES prints for the model (andes doc <model>), verbatim: plain text with tables 78 columns wide of its parameters, variables and equations, to be read in a fixed-width font.

NetworkMatrixArcSchema

One arc of a matrix axis, with the keys of its branches.

Field Type Required Description
from integer yes Bus number of the arc's from end.
to integer yes Bus number of the arc's to end.
keys array of string yes The key of every branch on this arc, as GET /sessions/{id}/keys gives them; parallel circuits share an arc.

NetworkMatrixBusSchema

One bus of a matrix axis, with its key.

Field Type Required Description
bus integer yes Bus number.
key string yes The bus's key, as GET /sessions/{id}/keys gives it.

NetworkMatrixEntrySchema

One nonzero of a complex matrix (ybus), as the ANDES ybus entry.

Field Type Required Description
row integer yes Row of the entry, from 0.
col integer yes Column of the entry, from 0.
re number yes Real part, in per unit on the system base.
im number yes Imaginary part, in per unit on the system base.

NetworkMatrixResponse

One network matrix of the loaded case, built by PowerNetworkMatrices.

Field Type Required Description
kind string yes ptdf, lodf, ybus or incidence.
n_rows integer yes Number of rows of the matrix.
n_cols integer yes Number of columns of the matrix.
n_entries integer yes n_rows times n_cols for a dense matrix; the nonzero count for ybus.
complex boolean yes True for ybus, which is complex.
base_mva number yes The system MVA base the per-unit values are on.
rows array of NetworkMatrixBusSchema or array of NetworkMatrixArcSchema yes Row axis: bus entries for ybus, arc entries for ptdf, lodf, incidence.
cols array of NetworkMatrixBusSchema or array of NetworkMatrixArcSchema yes Column axis: bus entries for ptdf, ybus, incidence; arc entries for lodf.
ref_buses array of string or null no Keys of the reference buses the matrix was built against; absent for ybus.
distributed_slack boolean yes Always false; no distributed slack is applied.
values array of array of number or null no The matrix, row by row, for ptdf, lodf and incidence; absent for ybus.
entries array of NetworkMatrixEntrySchema or null no The nonzero entries for ybus; absent for the dense kinds.

NotComparableOut

A pair of series that cannot be compared, with the reason.

Field Type Required Description
quantity string yes The quantity.
key string yes The element key.
reason string yes Why the pair cannot be compared.

OptimizationDualTable

One dual variable of the model.

Field Type Required Description
name string yes The dual's name as PowerSimulations names it.
unit string yes The unit the values are in, $/MWh for a balance dual.
rows array of OptimizationRow no One row per element.

OptimizationExpressionTable

One expression of the model (a derived quantity, such as production cost).

Field Type Required Description
name string yes The expression's name as PowerSimulations names it.
unit string yes The unit the values are in.
rows array of OptimizationRow no One row per element.

OptimizationParameterTable

One parameter of the model (a time series the model read).

Field Type Required Description
name string yes The parameter's name as PowerSimulations names it.
unit string yes The unit the values are in.
rows array of OptimizationRow no One row per element.

OptimizationRow

One row of an optimization table: an element's value at one time step.

Field Type Required Description
element string yes What the row is for: a key (gen:1-1, load:7-1) where the row is an element of the case, or the PowerSimulations name where it is not (a system-wide slack or balance).
t array of number yes The time steps of the horizon, in hours from its start.
y array of number or null yes The value at each step; null is a gap.

OptimizationSlackRow

One slack variable whose value is past 1e-6 at some step (spec section 13: slack variables always read back and reported when non-zero).

Field Type Required Description
variable string yes The slack variable's name as PowerSimulations names it.
element string yes The element the slack is on, as PowerSimulations names it.
t array of number yes The time steps where the slack is non-zero, in hours.
y array of number yes The slack's value at each of those steps, in MW.

OptimizationTable

The optimization table of a results document: what the model held and what it decided. The template is recorded verbatim (spec section 13).

Field Type Required Description
routine string yes The operations routine that ran. One of dispatch, uc, sim.
template object yes The template as run: its name (economic_dispatch, unit_commitment) or the explicit device formulations, the network model, horizon and resolution, stored verbatim.
status string yes The solver's termination status as PowerSimulations reports it.
objective_usd number or null no The objective value, in $ for the whole horizon.
variables array of OptimizationVariableTable no The decision variables read back.
duals array of OptimizationDualTable no The duals read back; empty when none were asked for.
parameters array of OptimizationParameterTable no The parameters (time series) the model read.
expressions array of OptimizationExpressionTable no The expressions read back.
slacks array of OptimizationSlackRow no Every slack variable past 1e-6 at some step; empty when all are zero.

OptimizationVariableTable

One decision variable of the model, one row per element.

Field Type Required Description
name string yes The variable's name as PowerSimulations names it (ActivePowerVariable__ThermalStandard).
unit string yes The unit the values are in: MW, MVA, $/h or 1 (a commitment state).
rows array of OptimizationRow no One row per element.

ParticipationFactorModel

One per-state participation factor row entry.

Field Type Required Description
state_name string yes Reduced-state label.
factor number yes Participation factor magnitude. By ANDES convention (calc_pfactor in routines/eig.py) these are real-valued.

PflowBranchRow

One branch of a power flow table, flows at both ends.

Field Type Required Description
key string yes The branch's key (branch:7-8-1).
p_from_mw number yes Active power into the branch at its from end, in MW.
q_from_mvar number or null no Reactive power into the branch at its from end, in MVAr.
p_to_mw number or null no Active power into the branch at its to end, in MW.
q_to_mvar number or null no Reactive power into the branch at its to end, in MVAr.

PflowBusRow

One bus of a power flow table.

Field Type Required Description
key string yes The bus's key (bus:7).
v_pu number yes Voltage magnitude, per unit.
angle_rad number yes Voltage angle, in radians.

PflowComparisonOut

The power flow comparison, always shown first.

Field Type Required Description
converged_reference boolean yes Whether the reference power flow converged.
converged_comparison boolean yes Whether the comparison power flow converged.
rows array of TableRowDifferenceOut yes One row per compared value.
unmatched UnmatchedKeysOut yes Keys present on one side only.

PflowGeneratorRow

One generator of a power flow table.

Field Type Required Description
key string yes The generator's key (gen:1-1).
p_mw number yes Active power injected, in MW.
q_mvar number or null no Reactive power injected, in MVAr.

PflowLoadRow

One load of a power flow table.

Field Type Required Description
key string yes The load's key (load:7-1).
p_mw number yes Active power absorbed, in MW.
q_mvar number or null no Reactive power absorbed, in MVAr.

PflowResult

Power-flow run result. Bus voltages and angles are keyed by ANDES idx.

Field Type Required Description
run_id string yes Server-generated identifier for this PF run. Results are not stored under it: read the solved state again with GET /sessions/{id}/operating-point.
converged boolean yes true if PF converged within the iteration limit. Non-convergence is NOT a server error; it is a valid power-system outcome the caller must handle.
iterations integer yes Number of Newton-Raphson iterations executed. 0 for a run with method NK, whose SciPy solver keeps no count ANDES reads.
mismatch number yes Final mismatch (max element of the residual vector) at the converged solution. For non-converged runs this is the last iteration's mismatch.
bus_voltages object (names to number) yes Bus voltage magnitudes (pu) keyed by ANDES idx (stringified). JSON object keys must be strings; the ANDES idx is converted at the boundary.
bus_angles object (names to number) yes Bus voltage angles (radians) keyed by ANDES idx (stringified).
line_flows object (names to LineFlow) no Per-line P/Q flow at both terminals, with the line's loss and its loading against rate_a, keyed by line idx (stringified). Empty if the wrapper could not extract line flows from the post-PF System (e.g., on an unexpected ANDES API change). Populated by computing the standard pi-equivalent line injection at each end from the converged v1/a1/v2/a2 algebraic variables and the line's series + shunt admittances.
generator_outputs object (names to GeneratorOutput) no Per-generator P / Q output, terminal voltage and reactive limits, keyed by generator idx (stringified). Covers the static generators (PV and Slack). A dynamic machine (GENROU, GENCLS) has no entry of its own: read the entry of the static generator named by its gen parameter. Empty when PF did not converge.
load_consumption object (names to LoadConsumption) no Per-load P / Q consumption at the converged voltage, keyed by load idx (stringified). Covers PQ and ZIP. Empty when PF did not converge.
settings PflowSettings or null no The settings this run used, whether or not it converged. null on GET /sessions/{id}/operating-point, which runs nothing.
summary PflowSummary or null no System totals: generation, load, bus shunts, line losses and the slack output. null when the run did not converge, and on GET /sessions/{id}/operating-point.
keys object (names to object (names to string)) no The key of every element the result names, per kind: keys["bus"] maps the stringified idx of every bus in bus_voltages to its key, and line, generator and load do the same for line_flows, generator_outputs and load_consumption. A key names an element the same way in every engine (section 4 of design/multiengine/spec.md). An idx with no key is left out.
job_id string or null no Job-registry id mirroring this routine invocation. Additive: GET /sessions/{id}/jobs/{job_id} returns the matching JobRecord (kind pflow). null only on legacy responses synthesised outside the job lifecycle.

PflowRunRequest

Request body for POST /sessions/{id}/pflow. Every field is optional: one that is left out keeps the case's own setting (ANDES's default unless the case file's _config section says otherwise). The settings apply to this run only; the next request starts from the case's settings again.

Field Type Required Description
tolerance number or null no Convergence tolerance: the solver stops once the largest residual (mismatch), in pu, is below it. From 1e-12 to 0.01. ANDES's default is 1e-6. Limits: min 1e-12, max 0.01.
max_iterations integer or null no Iteration limit. ANDES gives up once the count passes it. From 1 to 1000. ANDES's default is 25. Limits: min 1, max 1000.
flat_start boolean or null no Start from 1 pu at angle 0 on every bus instead of the voltages and angles in the case. A bus with a generator holding its voltage still starts at that setpoint. Helps when the case's own starting point is far from the solution. Left out, the case's own setting stands; false turns off a flat start the case file asks for.
enforce_q_limits boolean or null no Hold a PV or slack generator at qmin or qmax when its reactive power goes past one (PV to PQ switching). Without it the limits are reported and not enforced. Left out, the case's own setting stands; false turns off enforcement the case file asks for.
method string or null no The solver the session's engine runs. An ANDES session takes "NR" Newton-Raphson (the default), "dishonest" the same but reusing the Jacobian after the first n_factorize iterations, "NK" Newton-Krylov from SciPy; one of those three, case-sensitively. NK stops by SciPy's own rule, so tolerance, max_iterations and linesearch do not apply to it, and its result reports iterations as 0. A Sienna session takes "ac" (the default), "dc" or "ptdf-dc"; a DC method takes neither tolerance nor max_iterations. Left out, the case's own setting stands.
n_factorize integer or null no The first N iterations of the dishonest method that refactorize the Jacobian; ignored by NR and NK; ANDES's default is 4. Left out, the case's own setting stands. Limits: min 1, max 100.
linesearch boolean or null no The nonmonotone backtracking line search on the Newton step, which shortens a step whose residual would grow and can pull a run that overshoots back to convergence; read only by the NR and dishonest solvers, so without effect under NK; ANDES's default is on. Left out, the case's own setting stands.

PflowSettings

The settings a power-flow run used: the request's where it gave one, the case's own (ANDES's default unless the case file sets one) where it did not.

Field Type Required Description
tolerance number yes Mismatch (max residual, in pu) below which the solver stopped.
max_iterations integer yes The iteration limit. ANDES stops once the count passes it, so a run that does not converge reports iterations one above this.
flat_start boolean yes true if the solver started from 1 pu at angle 0 on every bus that has no generator holding its voltage, false if it started from the voltages and angles in the case.
enforce_q_limits boolean yes true if a PV or slack generator whose reactive power went past qmin or qmax was held at that limit (PV to PQ switching).
method string or null no The solver the run used. For an ANDES session: NR (Newton-Raphson), dishonest (Newton-Raphson that reuses the Jacobian after the first n_factorize iterations) or NK (Newton-Krylov from SciPy, which stops by SciPy's own rule: it reads neither tolerance nor max_iterations and keeps no iteration count). For a Sienna session: NR for the AC power flow, dc or ptdf-dc for a DC power flow.
n_factorize integer or null no The number of initial iterations on which the dishonest method refactorized the Jacobian; meaningless for the other methods.
linesearch boolean or null no Whether the backtracking line search was on; read by NR and dishonest only.

PflowSummary

System totals of a converged power flow, in MW and MVAr.

Generation, load, bus shunts and lines balance: generation = load + shunt + loss, in P and in Q, to the solver's tolerance. Devices that are switched off count for nothing.

Field Type Required Description
generation_p number yes Active power the in-service generators produce, in MW.
generation_q number or null yes Reactive power the in-service generators produce, in MVAr. null for a DC power flow, which computes no reactive power.
load_p number yes Active power the loads draw, in MW.
load_q number or null yes Reactive power the loads draw, in MVAr. null for a DC power flow, which computes no reactive power.
shunt_p number yes Active power the bus shunts absorb, in MW (0 for a pure susceptance).
shunt_q number or null yes Reactive power the bus shunts absorb, in MVAr: negative for a capacitor, which supplies it. null for a DC power flow, which computes no reactive power.
loss_p number yes Active power the lines and transformers dissipate, in MW.
loss_q number or null yes Reactive power the lines and transformers absorb, in MVAr: their series losses less their charging, so negative when charging dominates. null for a DC power flow, which computes no reactive power.
slack_p number or null no Active power the in-service slack generators produce, in MW: what the case's schedules leave for the slack to make up. null when there is none.
slack_q number or null no Reactive power the in-service slack generators produce, in MVAr. null when there is none.

PflowTable

The power flow table of a results document. Rows are keyed by key.

Field Type Required Description
converged boolean yes Whether the power flow converged.
buses array of PflowBusRow no One row per keyed bus.
branches array of PflowBranchRow no One row per keyed branch.
generators array of PflowGeneratorRow no One row per keyed static generator.
loads array of PflowLoadRow no One row per keyed load.

ProblemDetails

RFC 7807 problem-details object. Used for all 4xx and 5xx responses.

Field Type Required Description
type string no URI reference identifying the problem type. about:blank means the title is the canonical reason for the status code. Default "about:blank".
title string yes Short, human-readable summary of the problem.
status integer yes HTTP status code for this response.
detail string or null no Human-readable explanation specific to this occurrence of the problem (e.g., 'session id is required to be server-generated; remove the session_id field from your request body').
instance string or null no URI reference that identifies the specific occurrence of the problem.
recovery RecoveryDescriptor or null no Optional recovery call-to-action describing how the client can resolve the problem (e.g., load a case, run power flow, retry). None means no recovery action is offered. Populated by the shared error mapper from the error's recovery kind.

Provenance

Field Type Required Description
kind string yes Where the case file is: andes is the user's own installed ANDES, bundled ships with TENSA, external is no file at all, only links. One of bundled, andes, external.
path string or null no The case file, relative to andes/cases of the installed ANDES (andes) or to the bundled cases folder of the package (bundled). null for external.
sha256 string or null no SHA-256 of the file as it was when the entry was written. TENSA warns when an installed ANDES holds a different file and refuses a bundled file that differs. Pattern ^[0-9a-f]{64}$.
release string or null no The release or tag the checksum was taken from, such as ANDES 2.0.0. Limits: max length 80.
source_url string or null no Where the file comes from, pinned to a release or a commit where the host allows it. Limits: max length 500. Pattern ^https?://\S+$.
retrieved string (date) or null no The day the file was retrieved from source_url (the day it was written, for a file that is built).
built boolean no true for a bundled file that TENSA writes itself, with the script in this repository that source_url names, and not one taken from a source. It is said so wherever the file's origin is, instead of a retrieval. Default false.

RecordSpec

One quantity to record (section 6.5's catalogue, with * wildcards).

Field Type Required Description
quantity string yes The quantity, a series quantity of the catalogue.
of string yes What it is of: a key, or <kind>:* for every element of a kind.

RecoveryDescriptor

Recovery call-to-action attached to an error response.

The kind is the stable, machine-readable discriminator the UI keys off to render the right action (e.g., a "Run power flow" button); the label is the human-facing copy. kind == "none" means the error was considered but has no canonical recovery action - the UI renders it without a CTA, same as an absent recovery.

Field Type Required Description
kind string yes Stable, machine-readable discriminator for the recovery action the client should offer (e.g., run-pflow, load-case, retry). none means no canonical recovery action applies. One of load-case, reload-case, run-pflow, retry, add-measurements, none, wait-for-job, wait-for-sweep.
label string yes Human-readable copy describing the recovery action, suitable for rendering on a call-to-action button or hint.

ReportResponse

Wire shape of GET /sessions/{id}/report.

Field Type Required Description
routine ReportRoutineEnum yes Echo of the requested routine.
plain_text string yes Report text - for pflow, the file ANDES would have written to <case>_out.txt; for tds, TDS.summary()'s log output augmented with run statistics. It is ANDES's own text, except that the server's paths are taken out of it: the case file in the header reads relative to the workspace.
structured ReportStructured yes Structured tabular blocks parsed out of plain_text.

ReportRoutineEnum

Routines that can be reported.

Type: string.

One of pflow, tds, eig.

ReportStructured

Structured-table envelope. Empty tables is valid - the frontend falls back to the plain-text view.

Field Type Required Description
tables array of ReportTableModel no Best-effort parse of the plain-text report into tabular blocks. Empty when the parser couldn't recognise any sections; the plain_text body remains the source of truth.

ReportTableModel

One tabular block of a routine's report.

Matches tensa.core.report.ReportTable 1:1. Each row's length always matches headers - the wrapper-side parser pads / truncates so the frontend's renderer doesn't have to think about ragged rows.

Field Type Required Description
title string yes Section title (e.g., BUS DATA).
headers array of string yes Column names, in order.
rows array of array of string yes Rows of stringified cell values. Numeric columns are pre-formatted by the wrapper so the frontend can render verbatim without locale issues.

ResponseMetricsRequest

Request body for POST /response-metrics.

Field Type Required Description
series array of MetricsSeries yes The signals to describe, each on its own timeline. Limits: min items 1, max items 64.
t_start number or null no Start of the window the metrics are read over, in seconds. A bound that falls between two samples is interpolated. Defaults to the first sample.
t_end number or null no End of the window, in seconds. Defaults to the last sample.
settling_band number no The settling band as a fraction of the signal's largest distance from its final value: 0.02 is 2 %. Limits: above 0, below 1. Default 0.02.
rocof_window number no Width in seconds the rate of change is measured over: the steepest slope of the line from y(s) to y(s + rocof_window). Cut to the window when the window is shorter. Limits: above 0. Default 0.5.

ResponseMetricsResponse

Response body for POST /response-metrics.

Field Type Required Description
results array of SeriesMetrics yes One entry per requested series, in the order sent.

RestoreSnapshotRequest

Request body for POST /sessions/{id}/snapshot/restore.

Field Type Required Description
name string yes Snapshot name to restore.
use_dill_optimization boolean no Default False restores by reloading the case, re-adding the recorded disturbances, and re-running setup and the power flow, which works on any ANDES version. When True, try the dill blob first (andes.utils.snapshot.load_ss) and skip all of that. Falls back to the replay path on ANDES version mismatch, a missing dill blob (the snapshot was saved without include_dill), or a load failure; the response's fallback_reason carries the explanation. Default false.

RestoreSnapshotResponse

Response body for POST /sessions/{id}/snapshot/restore.

Field Type Required Description
used_dill boolean yes True when the dill optimisation succeeded. False means the replay+PF path was taken (the default, or a fallback when use_dill_optimization was requested).
fallback_reason string or null no Human-readable explanation when used_dill=False despite use_dill_optimization=True. Surfaced inline in the load dialog so the user understands why a fallback fired.
disturbances_replayed integer yes Count of disturbance specs from the snapshot metadata that the restored System carries (re-applied on the replay path, already inside the dill blob on the dill path).
metadata SnapshotMetadataModel yes Sidecar metadata of the restored snapshot.
layout SidecarLayout or null no The diagram's layout the snapshot held, in the current schema version, or null when it held none. For a case loaded from a file the server has already written it beside that file, replacing the layout that was there; a system built from scratch has no file, so the layout is only returned here.
job_id string or null no Job-registry id mirroring the snapshot-restore routine (kind snapshot-restore). Recorded in the manager-wide global registry so it survives the session being replaced, yet still surfaces via GET /sessions/{id}/jobs/{job_id}. null on legacy responses.

ResultsDocument

The neutral results document, field by field the section 6.5 JSON.

Field Type Required Description
tensa_results 1 yes Document version. A reader refuses a newer major.
engine EngineBlock yes The engine that produced the result.
study object or null no The study as run, stored verbatim; null when there is none.
status string yes How the run ended. One of completed, aborted, failed.
series array of Series no The time series.
tables ResultsTables no The tables, under pflow and eig; either, both or neither.

ResultsTables

The tables of a results document: a power flow under pflow, the eigenvalues under eig; either, both or neither. Each name holds its own table only, and no other name is taken.

Field Type Required Description
pflow PflowTable or null no The power flow table.
eig EigenvalueTable or null no The eigenvalue table.
optimization OptimizationTable or null no The operations table of a dispatch, uc or sim run.

SaveCaseRequest

Request body for POST /sessions/{id}/save.

filename is workspace-relative; the substrate canonicalizes it through the workspace path validator (rejects traversal). format selects the writer: ANDES's own for xlsx and json, the substrate's PSS/E v33 writer for raw and its MATPOWER v2 writer for m (ANDES 2.0 has neither).

Field Type Required Description
filename string yes Workspace-relative output filename. Extension must match format (.xlsx for xlsx, .json for json, .raw for raw, .m for m). The file name must be portable to Windows: no :, trailing dot or space, or device names such as CON or nul.xlsx. Limits: min length 1.
format string yes Output format. xlsx is the ANDES-native Excel layout. json is the ANDES JSON serialization. raw is PSS/E v33 emitted by the substrate's hand-rolled writer; it covers the power-flow data: Bus, PQ loads, Shunt, PV and Slack generators, Line, and 2W transformers. 3W transformers and other PSS/E sections are emitted as empty terminators. A .raw holds no dynamic data, so the dynamic models of the case (machines, exciters, a ZIP load) are left out: save as xlsx or json to keep them. m is MATPOWER v2 emitted by the substrate's writer around ANDES's system2mpc; it covers the power-flow data (Bus, PQ, Shunt, PV and Slack generators, Line) and holds no dynamic data, so save as xlsx or json to keep machines and controllers; string bus idxes come back as integers on a round-trip; bus area and zone are written as zero; the loads and shunts of a bus are added up into one. What the file leaves out of the system is logged as a warning in GET /sessions/{id}/messages. One of xlsx, json, raw, m.
overwrite boolean no When true, overwrites an existing file at the same path. Default false returns 409 if the file exists. Default false.

SaveCaseResponse

Response body for POST /sessions/{id}/save (201).

Field Type Required Description
filename string yes Workspace-relative path of the file just written.
bytes_written integer yes Size in bytes of the file just written, as reported by os.stat. Limits: min 0.
dyr_filename string or null no Workspace-relative path of the PSS/E .dyr written beside the case file when format is raw and the system has dynamic models; null otherwise. Load the pair by passing it as the addfile of the .raw.
dyr_notes array of string no What the .dyr writer could not write or wrote as another model: the dynamic devices no PSS/E reader entry covers, and a model written under another name (TGOV1N as TGOV1). Empty when no .dyr was written or nothing was left out.
job_id string or null no Job-registry id mirroring the case-save routine (kind case-save). null on legacy responses.

SaveSnapshotRequest

Request body for POST /sessions/{id}/snapshot.

Field Type Required Description
name string yes Snapshot name. 1-64 chars of [A-Za-z0-9._-] starting with an alphanumeric, not ending in a dot, and not a Windows device name (CON, NUL, COM1, ...). Names are unique per case; collisions return 409 unless force=true.
force boolean no When True, overwrite any existing snapshot under the same name. Default False rejects collisions with 409 so the UI can prompt the user. Default false.
include_dill boolean no When True, also write the full System state as a dill blob (andes.utils.snapshot.save_ss) beside the metadata, so a later restore can opt in to use_dill_optimization. Costs a couple of seconds and 2-3 MB per save, and the blob only loads on the same ANDES major.minor. A snapshot saved after the power flow but before the TDS was initialised on a case with dynamic models cannot be loaded by ANDES 2.0; its restore falls back to replay. Default False writes the metadata only. Default false.
layout SidecarLayout or null no The diagram's layout as the client shows it. It is kept in the snapshot and put back beside the case when the snapshot is restored. null keeps the layout saved beside the case file, if there is one. One over the cap PUT /workspace/layout holds a layout to is refused (413).

SaveSnapshotResponse

Response body for POST /sessions/{id}/snapshot.

Field Type Required Description
name string yes Snapshot name as saved (unique per session workspace).
metadata SnapshotMetadataModel yes Sidecar metadata written alongside the snapshot.
dill_bytes integer yes Size of the dill blob on disk, in bytes. 0 when the snapshot was saved without one (include_dill=false).
metadata_bytes integer yes Size of the sidecar JSON on disk, in bytes.
job_id string or null no Job-registry id mirroring the snapshot-save routine (kind snapshot-save). null on legacy responses.

SeGenerateMeasurementsRequest

Request body for POST /sessions/{id}/se/measurements/generate.

Only optional knob is the noise seed - pinning the seed makes runs reproducible across browser refreshes (useful for the UI's "Generate measurements" button).

Field Type Required Description
noise_seed integer or null no Optional non-negative integer seed for the Gaussian-noise draw inside Measurements.generate_from_pflow. None (default) uses an unseeded np.random.default_rng; pinning the seed lets the UI re-generate the same measurement set across page refreshes. ge=0 because numpy's default_rng rejects negative seeds - a clean 422 here beats a misleading non-convergent error downstream. Limits: min 0.

SeMeasurementsGeneratedResponse

Wire shape of POST /sessions/{id}/se/measurements/generate.

Field Type Required Description
count integer yes Number of scalar measurements in the substrate's Measurements object. For IEEE 14: 14 bus voltage measurements + 28 bus injection (P+Q for each bus) = 42. Note: SE.init adds an angle-reference pseudo-measurement at the slack bus on the first run_se call, so the eventual SeResult.residuals length will be one greater per island. Limits: min 0.
job_id string or null no Job-registry id mirroring the SE measurement-generation routine (kind se-measurements). GET /sessions/{id}/jobs/{job_id} returns the matching record; null on legacy responses.

SeResultResponse

Wire shape of POST /sessions/{id}/se.

Field semantics mirror tensa.core.se_result.SeResult 1:1; see that class for prose.

Field Type Required Description
converged boolean yes True when ANDES's SE.run returned True (Gauss-Newton residual fell below config.tol within config.max_iter). False cases are surfaced as 422 errors rather than converged=false payloads - the UI always sees a converged result on a 200.
iterations integer yes Number of iterations to convergence (Gauss-Newton for WLS, reweighted steps for LAV). ANDES's result['n_iter'] is 1-indexed; echoed verbatim. Limits: min 0.
mismatch number yes Final objective J: for WLS sum(r^2 / sigma^2), which chi_squared tests against its distribution; for LAV sum(\|r\| / sigma). Smaller is better.
residuals array of number yes Per-measurement residuals z - h(x_est). Length equals measurement_count. The UI bins these into a histogram.
measurement_count integer yes Total measurements (including the angle-reference pseudo-measurement that SE.init injects). Equal to len(residuals). Surfaced as a separate field so the UI's histogram doesn't have to derive it from the array length. Limits: min 0.
flagged_indices array of integer yes Indices into residuals whose normalised residual \|r_i\| / sigma_i exceeds 3-sigma. These are candidate bad-data measurements; the UI highlights the corresponding histogram bars in red.
algorithm string or null no The estimator the run used ("wls" or "lav"); null only from a server that predates the choice, which always ran WLS. One of wls, lav.
settings SeRunSettings or null no The tol, max_iter and noise_seed the run used (the effective values, after any per-run override).
chi_squared ChiSquaredTest or null no The chi-squared bad-data test on the objective J at 95% confidence; null for LAV runs, where J does not follow a chi-squared distribution.
job_id string or null no Job-registry id mirroring the SE run routine (kind se). GET /sessions/{id}/jobs/{job_id} returns the matching record; null on legacy responses.

SeRunRequest

Request body for POST /sessions/{id}/se.

Every field is optional and applies to this run only; a body that names none behaves exactly as before (WLS with the case's SE.config defaults and the generate step's noise draw). Kept as a model with extra="forbid" so typos are rejected forward- compatibly.

Field Type Required Description
algorithm string or null no The estimator. "wls" (default) is weighted least squares (Gauss-Newton); "lav" is least absolute value via iteratively reweighted least squares, robust to gross measurement errors. LAV converges linearly and often needs more than the default 100 iterations when a measurement is bad, so raise max_iter with it (a run that runs out answers 422). The chi-squared test is only computed for WLS. One of wls, lav.
tol number or null no Convergence tolerance on the max absolute state correction for this run only. None keeps the case's SE.config.tol (ANDES default 1e-4). Limits: above 0.
max_iter integer or null no Maximum iterations for this run only. None keeps the case's SE.config.max_iter (ANDES default 100). Limits: min 1.
noise_seed integer or null no When set, this run's measurement values are drawn afresh from the power flow solution with this seed (the noise is drawn here, as the generate step draws it), over the cached set's measurements and sigmas; the cached values are left as the generate step made them. The same seed gives the same run. None runs on the cached values. Limits: min 0.

SeRunSettings

The settings a state-estimation run used: the request's where it gave one, the case's SE.config (ANDES's default unless the case file sets one) where it did not.

Field Type Required Description
tol number yes Convergence tolerance on the max absolute state correction.
max_iter integer yes Iteration limit.
noise_seed integer or null no The seed this run's measurement noise was drawn with; null when the run used the cached values from the generate step.

Series

One series of the document: a quantity of one element over time.

Field Type Required Description
quantity string yes The quantity, a name of the section 6.5 catalogue.
of string yes What the quantity is of: a key (bus:7, gen:1-1), or for a state series <key>#<state name>.
unit string yes The unit the values are in, the catalogue's for the quantity.
t array of number yes Sample times in seconds, not decreasing.
y array of number or null yes The value at each time. null is a gap (a diverged step).

SeriesDifferenceOut

The difference of one pair of series.

Field Type Required Description
quantity string yes The quantity compared.
key string yes The element key.
unit string yes The unit of the values.
samples integer yes Instants compared, gaps left out.
t_start number yes Start of the overlap used, in seconds.
t_end number yes End of the overlap used, in seconds.
max_diff number yes The largest absolute difference.
max_diff_t number yes The time it occurs at, in seconds.
rms_diff number yes The time-weighted RMS difference: sqrt(integral(d^2 dt) / span) over the overlap, gaps left out.
swing_ref number yes The reference series' max minus min over the compared stretch.
within_tolerance boolean or null yes Whether max_diff is within the tolerance; null when there is none.
tolerance number or null yes The tolerance applied; null when the quantity has none.

SeriesMetrics

What one signal's response metrics came to. Either error says why it could not be described, or the rest is filled in.

Field Type Required Description
name string yes The series' name, as sent.
error string or null no Why this signal has no metrics (too few samples, a window outside it, times that run backwards); null when it has them.
samples integer or null no Samples in the window, its two bounds included.
t_start number or null no Start of the window used, in seconds.
t_end number or null no End of the window used, in seconds.
initial number or null no Value at the start of the window.
final number or null no Time-weighted mean over the last 10 % of the window: what it settled to.
peak MetricExtremum or null no Largest value and when.
nadir MetricExtremum or null no Smallest value and when.
max_deviation MetricExtremum or null no Largest distance from initial: value is signed (y - initial).
rocof MetricExtremum or null no Steepest rate of change over rocof_window, in the signal's unit per second, sign kept; t is the start of that window.
settling_time number or null no Seconds from the start of the window after which the signal stays within the settling band; null when it had not settled by the end.
overshoot_pct number or null no How far the signal went past its final value, in percent of the step from initial to final; null when final is within the settling band of initial.
damping DampingEstimate or null no null for a signal that does not oscillate.

SeriesProfile

One load profile: factors over a horizon at a resolution, multiplying the load's p_mw (and q_mvar at the same factor). A factor of 1.0 is the case as loaded.

Field Type Required Description
applies_to string yes The load key (load:7-1) the profile multiplies, or "*" for every load of the case.
resolution_s number yes The time between two factors, in seconds. Limits: above 0.
factors array of number yes The multiplier at each step, from the horizon's start; each >= 0. Limits: min items 1.

SessionDescriptor

Response shape for session create / read.

Field Type Required Description
session_id string yes Server-generated UUID-shaped opaque identifier for the session. Use it in subsequent URL paths (e.g., /sessions/{session_id}/case).
state string yes live if the worker subprocess is alive and accepting commands; closed if the session has been reaped or explicitly closed. One of live, closed.
workspace_id string no An opaque name for the workspace folder this server serves: the same for every session of one folder, and another for another folder. It is a digest and holds no path. A client that keeps something by case file name (the web UI keeps the drafts of a diagram in the browser) keys it by this as well, so that a file of the same name in another workspace is another case. Default "".
engine string yes The engine the session runs (andes, sienna). A session is created for one engine and keeps it; the capabilities of the engine are listed by GET /engines, not repeated here.

SessionList

Response shape for GET /sessions.

Field Type Required Description
sessions array of SessionDescriptor yes Snapshot of currently-active sessions for this token.

SessionMessageSchema

One message in a session's log: something ANDES reported while the session's worker ran a command.

Field Type Required Description
seq integer yes Number of the message in the session, from 1, in the order the server received them. Numbers are never reused, not even after the log is cleared, so after=<seq> always reads what came next. A message that repeats the newest one is not added: its repeat grows and it takes the next number, so a reader that follows the log replaces the message it holds that says the same.
time number yes Unix time, in seconds, at which ANDES logged the message.
level string yes info for what ANDES reports about a run's progress, warning for something that may make a result wrong (a device whose initialisation failed, a limit that was not adjusted), error for what stopped the command. One of info, warning, error.
logger string yes Name of the logger that said it: an ANDES module (andes.routines.pflow), or tensa.notice for what the server worked out itself because ANDES does not log it (a generator switched from PV to PQ, a load turned into an impedance).
source string yes The command the worker was running: load_case, run_pflow, run_tds, run_eig, ... Empty for a message logged between commands.
text string yes The message. It can span several lines: ANDES logs tables. A message longer than 20000 characters is cut. Paths of the server are not in it: the workspace is written relative to itself, the home directory as ~ and any other absolute path as <path>.
repeat integer yes How many times in a row ANDES logged this exact message, which is kept once (a solver that warns on every step). The count can grow after the message was read: it is then numbered again. Limits: min 1.

SessionMessages

Response of GET /sessions/{id}/messages.

Field Type Required Description
messages array of SessionMessageSchema yes The messages asked for, oldest first.
first_seq integer yes The number of the oldest message the session still holds (of the next one to arrive, when it holds none). A reader that kept older messages should drop them: they were evicted or cleared.
last_seq integer yes The number of the newest message the session has had; 0 before any.
next_after integer yes What to pass as after to read on from here: the last message returned when the read stopped at limit, otherwise last_seq.
dropped integer yes How many messages were lost to the caps (the worker keeps 1000 between two replies, the session keeps the latest 2000), over the session's life. Clearing the log does not count.

ShuntRecord

One shunt.

Field Type Required Description
key string yes The shunt's TENSA key.
bus integer yes The number of the bus the shunt is on.
id string yes The shunt's id on its bus.
g_mw number or null no The active power it draws at 1.0 pu voltage, in MW.
b_mvar number or null no The reactive power it supplies at 1.0 pu voltage, in MVAr (positive for a capacitor).
in_service boolean no Whether the shunt is in service. Default true.

SidecarLayout

The layout of one case's diagram (one file per case).

Stored on disk as <case_path>.layout.json adjacent to the case file. Every section but coordinates is optional and reads as empty when absent, which is how a version 1 document (bus and device positions only) is still accepted; the server stores and answers with version 2.

Field Type Required Description
schema_version string yes Schema version of the document. The server writes and answers with "2"; a version 1 document ("1", "1.0") is accepted and upgraded. Limits: min length 1.
andes_version string yes ANDES version the layout was saved against (e.g., "2.0.0"). Recorded for diagnosis; not validated on read. Limits: min length 1.
coordinates object (names to BusCoord) yes Per-bus coordinates, keyed by bus idx (stringified). Buses missing from this dict fall back to the renderer's auto-layout.
non_bus_coordinates object (names to object (names to LayoutDeviceCoord)) no Per-non-bus-element coordinates, two-level dict keyed by ANDES model class (e.g., PV, GENROU, PQ, Shunt) OR by UI category (generator, load, shunt), then by element idx (stringified). The writer emits BOTH the model-class-keyed entry and the UI-category-keyed entry for every non-bus element so kind-edits (e.g., PV → GENROU) survive: the model-class entry becomes orphaned but the UI-category entry still resolves on read. Optional + additive - old sidecars without this field read as {} and the renderer falls back to kind-default offsets.
controller_coordinates object (names to object (names to BusCoord)) no Positions of controllers that were placed on their own, keyed by ANDES model class (EXST1, TGOV1), then by idx. A controller with no entry is drawn docked beside the device it acts on and moves with it.
units object (names to LayoutUnit) no Per generating unit (a generator with its machine and their controllers), keyed by the idx of the unit's generator symbol, the same idx its position has under generator in non_bus_coordinates.
busbars object (names to LayoutBusbar) no The bar of a bus where it differs from the default, keyed by bus idx.
branches object (names to object (names to LayoutBranchRoute)) no How branches are drawn, keyed by line or transformer, then by idx. A branch with no entry is routed automatically.
label_offsets object (names to object (names to LayoutLabelOffset)) no Labels that were moved, keyed like non_bus_coordinates with bus, line and transformer as further outer keys, then by idx.
connections object (names to object (names to LayoutConnection)) no Where the connector of a generator, load or shunt attaches and, where it was drawn by hand, the points it runs through, keyed like non_bus_coordinates. A device with no entry has its connector worked out from where it sits.
figure object (names to boolean or integer or number or string) no Display settings of this diagram and of a figure made from it (for example a monochrome style, a line width, which labels are shown), by name. The diagram reads connector_style: straight (the default) draws the connector of a generator, load or shunt to its bus as one line, elbow with one right angle. Values are booleans, finite numbers or short text; at most 64 settings.
last_modified string yes ISO 8601 timestamp recorded by the client at save time. The server does NOT regenerate this on write; it stores the value the client sent so collaborative-edit conflict detection (a future feature) has a single source of truth. Limits: min length 1.

SiennaExtSpec

The ext.sienna block of a TDS request.

Field Type Required Description
dynamic_branches array of DynamicBranchSpec no Branches simulated with their own dynamics (PSID's DynamicBranch) instead of as a static admittance, by branch key. Limits: max items 64.
inverters array of InverterSpec no Generators without a dynamic model that run as a PSID inverter, each with one of the parameter sets the capabilities list. Limits: max items 64.

SimGeneratorSeriesSchema

One generator's series in one stage.

Field Type Required Description
bus integer yes The number of the bus the generator is on.
id string yes The generator's id on its bus, from its key.
idx string yes The PowerSystems component name (the engine's handle).
values array of number yes The value at each step of the stage: MW for dispatch, 0 or 1 for commitment. Step i of the day-ahead stage is hour i of the day from 2026-01-01T00:00:00; step j of the real-time stage is 15 minutes times j.

SimRequest

The body of POST /sessions/{id}/sim.

Field Type Required Description
load_profile array of number yes The load profile of the day: 96 fractions of each load's max active power, one per 15-minute step (1.0 is the case's load). The day-ahead stage aggregates four consecutive steps into one hourly value. Limits: min items 96, max items 96.
network_model string no The network model of both stages: copper_plate (no network), dc or ptdf. One of copper_plate, dc, ptdf. Default "copper_plate".

SimResponse

The result of a two-stage simulation of a Sienna session.

Field Type Required Description
status string yes completed when the simulation solved.
engine string yes The engine that ran the simulation: sienna.
network_model string yes The network model both stages used.
base_mva number yes The system MVA base.
interval_minutes integer yes The interval between the two stages, in minutes: 60 (the day-ahead resolution).
stages array of SimStageSchema yes The two stages: DA (unit commitment, hourly) then RT (economic dispatch, 15 minutes).
slacks array of SimSlackSchema yes Every slack variable of either stage whose value is past 1e-6 MW; empty when all are zero.
keys object (names to object (names to string)) yes The keys lookup: under "generator", the PowerSystems component name of each generator of the answer mapped to its neutral key.
notes array of string yes What the Julia side logged at warning level and above while the simulation ran.
extra object or null no Reserved; absent.

SimSlackSchema

One slack variable whose value is not zero (past 1e-6 MW).

Field Type Required Description
variable string yes The slack variable's name, as PowerSimulations names it.
element string yes The element the slack is on, as PowerSimulations names it.
time string yes The step the slack is in, as an ISO timestamp.
value number yes The slack's value, in MW.

SimStageSchema

One stage of the simulation.

Field Type Required Description
name string yes The stage's name: DA (day-ahead) or RT (real-time).
kind string yes The stage's kind: uc for DA, dispatch for RT.
resolution_minutes integer yes The step length of the stage: 60 for DA, 15 for RT.
steps integer yes The number of steps: 24 for DA, 96 for RT.
horizon_hours number yes The horizon each step optimizes over, in hours: 24 for DA, 1 for RT.
objective number yes The stage's cost over the day, in $, recomputed from its dispatch and the case file's own gencost coefficients (the day-ahead stage's includes the start-up costs and the gencost constant term per committed hour).
commitment object (names to SimGeneratorSeriesSchema) yes Per-generator on/off by step (0 or 1), keyed by the neutral key (gen:<bus>-<id>); only the day-ahead uc stage has it.
dispatch object (names to SimGeneratorSeriesSchema) yes Per-generator active power by step, in MW, keyed by the neutral key.

SkippedSeries

One column of an engine result that is not in the document, and why.

Field Type Required Description
name string yes The column's name as the engine gave it.
reason string yes Why it is not part of the document.

SnapshotListEntry

One entry in the GET /sessions/{id}/snapshots response.

Field Type Required Description
name string yes Snapshot name.
saved_at string yes ISO-8601 UTC timestamp of the save.
has_pflow boolean yes Whether a converged power flow existed at save time.
has_tds boolean yes Whether a TDS run had completed at save time.
has_dill boolean yes Whether the optional dill blob is present on disk. False for a snapshot saved without include_dill or when only the sidecar JSON survives (e.g., manual half-delete); the snapshot is still restorable via the replay path.
andes_version string yes ANDES version that produced the snapshot.
engine string no Engine that saved the snapshot. andes for a snapshot saved before the stamp existed. The UI marks a foreign one before a restore is attempted. Default "andes".
disturbance_count integer yes Number of disturbance specs recorded in the snapshot metadata.

SnapshotMetadataModel

Sidecar JSON metadata shape echoed in save/restore/list responses.

Field Type Required Description
andes_version string yes ANDES version that produced the snapshot.
tensa_version string yes tensa version that produced the snapshot.
engine string no Engine that saved the snapshot. andes for a snapshot saved before the stamp existed. Default "andes".
case_filename string or null yes Workspace-relative case filename loaded when the snapshot was saved.
case_sha256 string or null yes SHA-256 of the case file at save time (drift detection on restore).
disturbance_log array of object no Disturbance specs active at save time; replayed on the fallback restore path.
saved_at string yes ISO-8601 UTC timestamp of the save.
has_pflow boolean yes Whether a converged power flow existed at save time.
has_tds boolean yes Whether a TDS run had completed at save time.
has_layout boolean no Whether the snapshot holds the diagram's layout. The layout itself is left out of this echo; a restore returns it. Default false.

StartSweepResponse

Response body for POST /sessions/{id}/sweep.

Field Type Required Description
sweep_id string yes Identifier the WS progress channel keys on. The UI uses this to subscribe via /api/ws/{session_id}/sweep/{sweep_id}.
total integer yes Number of iterations the sweep will run.
job_id string or null no Job-registry id mirroring this sweep. Additive and IDENTICAL to sweep_id - the two fields alias the same value, with sweep_id preserved for backward compatibility. GET /sessions/{id}/jobs/{job_id} returns the matching JobRecord (kind sweep).

StudyCaseRef

The case every engine's session is created from: the primary file and its addfiles, as POST /sessions/{id}/case takes them.

Field Type Required Description
primary_path string yes The case file, relative to the workspace.
addfiles array of string no Further files (a .dyr beside a .raw).

StudyDocument

The study document, field by field the section 6 JSON.

Field Type Required Description
tensa_study integer yes Document version. A reader refuses a newer major.
routine string yes The routine the study runs. One of pflow, tds, eig, matrices, dispatch.
options object no The neutral options of section 6.2.
load_model string or null no How loads behave in tds and eig. One of impedance, power, as-case.
disturbances array of Disturbance no What happens in a tds study.
record array of RecordSpec no What a tds study records.
ext object (names to object) no Engine-specific blocks, one per engine name.

StudyRequest

The body of POST /studies.

Field Type Required Description
case StudyCaseRef yes The case every engine's session is created from.
engines array of string yes The engines to run the study on, in the order to run them. Limits: min items 1, max items 2.
study StudyDocument yes The study document.
tolerances StudyTolerances no The tolerances of the comparison; defaults are in engines/compare.py.

StudyResponse

The answer of POST /studies.

Field Type Required Description
outcomes array of EngineStudyOutcome yes One per requested engine, in the request's order.
comparisons array of object no One entry per engine after the first that ran: its document compared against the first engine that ran, as POST /compare answers, with an added engine field naming the comparison side.

StudyTolerances

Tolerances of the comparison, with the defaults of tensa.engines.compare; section 10: "Tolerances are part of the request, with defaults".

Field Type Required Description
quantities object (names to number) no Absolute tolerance per quantity, in the quantity's unit.
frequency_hz number no Tolerance on the frequency of a matched mode, in hertz. Limits: above 0.
damping_ratio number no Tolerance on the damping ratio of a matched mode. Limits: above 0.
max_mode_distance number no The largest distance in 1/s at which two eigenvalues count as one mode. Limits: above 0.

SupportedModels

Every model ANDES ships, grouped as ANDES groups them.

Field Type Required Description
groups object (names to array of string) yes The ANDES model class names, keyed by the group ANDES puts each in (Bus under ACNode, GENROU under SynGen), groups and models in ANDES's own order. A name here is what model takes on GET /sessions/{id}/models/{model}/doc. It is not the list of what the element routes build: those take only the models GET /topology/schema lists.

SweepParameter

Discriminated sweep target.

target is the ANDES-side device identifier the parameter applies to (e.g., the disturbance idx returned by add_disturbance). The orchestrator looks up the matching spec in the snapshot's recorded disturbance_log and overrides its field.

For v2.0 the target is the disturbance's index in the snapshot's log (zero-based). Future revisions may extend this to (model, idx, field) tuples for topology parameters.

Field Type Required Description
kind string yes Discriminator: which spec field is being swept. Includes the disturbance kind so the spec lookup can validate the target type matches. One of disturbance.fault.tc, disturbance.fault.tf, disturbance.fault.xf, disturbance.fault.rf, disturbance.toggle.t, disturbance.alter.t, disturbance.alter.amount, disturbance.alter.value.
target integer yes Index into the snapshot's disturbance_log identifying which spec to mutate. v2.0 only supports per-disturbance sweeps; topology sweeps are deferred. Limits: min 0.
range SweepRange yes Inclusive linear sweep range over the parameter values.

SweepRange

Inclusive-endpoint linear sweep range.

steps is the iteration count (>= 2). The endpoints start and end always appear in the iteration set so the user gets exactly the boundary they asked for.

Field Type Required Description
start number yes First parameter value.
end number yes Last parameter value.
steps integer yes Iteration count (must be >= 2; capped at 200 to keep memory + runtime bounded for v2.0). Limits: min 2, max 200.

SweepRequest

Request body for POST /sessions/{id}/sweep.

Field Type Required Description
parameter SweepParameter yes Parameter target + range definition. Identifies the spec to mutate per iteration and the values to iterate over.
sim SweepSimParams yes Per-iteration TDS simulation parameters (tf, optional h, optional vars). Applied identically to every iteration.
snapshot_name string yes Name of a previously-saved snapshot. Each iteration restores this snapshot before applying the parameter override.

SweepSimParams

Per-iteration TDS parameters. Mirrors the run_tds call shape.

Field Type Required Description
tf number yes Final sim time per iteration. Limits: above 0.
h number or null no Fixed integration step (seconds) for every iteration, as for POST /tds. None keeps the ANDES default (1/30 s). Limits: above 0.
vars array of string or null no Variable groups to record per iteration (kept as metadata only - the sweep stores aggregate convergence + final_t, not the full per-step state, to keep memory bounded).

TableRowDifferenceOut

One power flow value compared.

Field Type Required Description
quantity string yes The quantity compared.
key string yes The element key.
unit string yes The unit of the values.
reference number yes The reference value.
value number yes The comparison value.
diff number yes value - reference.
within_tolerance boolean or null yes Whether \|diff\| is within the tolerance; null when there is none.
tolerance number or null yes The tolerance applied; null when the quantity has none.

TdsBatchResult

Result of a batch TDS run (post-completion delivery).

Streaming TDS uses a different code path (the WebSocket at /ws/{session_id}) that emits Arrow IPC frames per integration step. Batch mode blocks until completion and returns a summary; the per-step state values are NOT returned in batch mode unless the request names dae_vars, whose values come back in traces (use streaming mode for the five variable groups).

Field Type Required Description
run_id string yes Server-generated identifier for this TDS run.
converged boolean yes true if TDS completed without becoming busted. Numerical instability (e.g., a fault that doesn't clear) surfaces as converged: false with final_t < tf.
final_t number yes Last simulation time reached, in seconds.
callpert_count integer yes Number of times the per-step TDS.callpert hook fired during the run. Useful as a sanity check that streaming is wired.
integrator string or "ida" or null no The integrator the run used. An ANDES session answers the one the request named (the default trapezoidal when it named none); a Sienna session answers ida, Sundials' IDA on the residual model, which is the one it runs. null only on responses from before this field existed. One of trapezoidal, trap_adapt, backeuler, qndf.
job_id string or null no Job-registry id mirroring this TDS run. Additive and IDENTICAL to run_id - the two fields alias the same value, with run_id preserved for backward compatibility. GET /sessions/{id}/jobs/{job_id} returns the matching JobRecord (kind tds-batch). null only on legacy responses synthesised outside the job lifecycle.
traces TdsTraces or null no The recorded series, every step of the run. An ANDES session answers the values of the request's dae_vars (null when the request named none); a Sienna session answers its column plan under neutral names (voltage\|bus:7, rotor_speed\|gen:1-1, angle_rel\|bus:7).
post TdsTraces or null no Series read from the engine's own results after the run, on their own time base, which can hold an instant twice at a disturbance: a Sienna session answers each generating unit's electrical power (p\|gen:1-1 in MW, q\|gen:1-1 in MVAr). null for an ANDES session and when none could be read.
controllers array of TdsControllerResult or null no What each of the request's controllers did, in the order asked, with its samples. null when the request named none.

TdsControllerCatalogue

The controllers a TDS run takes, for the loaded case.

Field Type Required Description
types array of string yes The kinds of controller: the values type takes.
coi_available boolean yes true when the case has a synchronous machine, which the centre-of-inertia frequency (frequency: "coi") is read from. Without one a controller has to read its own bus.
freq_hz number or null no The system's nominal frequency, in Hz: what a coi reading deviates from. null with no case loaded.
base_mva number or null no The system MVA base. null with no case loaded.
targets array of TdsControllerTarget yes The devices a controller can command: those of ANDES's distributed generation models (ESD1, PVD1, EV1, EV2). Empty when the case has none, and with no case loaded.

TdsControllerResult

What one controller of a TDS run did.

Field Type Required Description
type string yes The kind of controller. One of droop, ffr.
model string yes ANDES model of the device it commanded.
idx integer or string yes The device's idx, as the case holds it.
samples integer yes How many times it read the frequency in this run. Limits: min 0.
first_action_t number or null no Simulation time, in seconds, of the first sample at which it commanded a power: for an ffr, when it triggered. null if it never did.
released_t number or null no Simulation time, in seconds, at which an ffr let go after its hold. null for a droop, and for an ffr that did not trigger or was still holding when the run ended.
peak_command number yes Its command of the largest magnitude, in MW, with its sign.
final_command number yes Its command when the run ended, in MW.
trace TdsControllerTrace or null no Its samples. Returned by a batch run; null in a stream's done frame, where the device's variables are streamed instead.

TdsControllerTarget

One device of the loaded case a controller can command.

Field Type Required Description
model string yes The device's ANDES model.
idx integer or string yes The device's idx.
name string yes The device's name in the case.
bus integer or string or null no Idx of the bus it is on.
in_service boolean yes false for a device that is switched off: commands do nothing to it.
p_limit number or null no The most active power the device delivers, in MW: the smaller of its power limit pmx and its current limit ialim (the power that current carries at rated voltage). A command beyond it is not delivered, and a droop that names no p_max is limited to it. null where the model has neither.
fn number or null no The device's nominal frequency, in Hz: what a bus reading deviates from.
variables TdsControllerVariables yes ANDES variables to record to see the controller at work.

TdsControllerTrace

What one controller read and commanded at each of its samples.

Field Type Required Description
t array of number yes Simulation time of each sample, in seconds: the solved instant the controller read, from which its command applies.
frequency array of number yes The frequency the controller read at each sample, in Hz.
command array of number yes The power the controller commanded from each sample on, in MW, positive discharging: what it adds to the device's own set-point.
output array of number or null yes The active power the device was delivering at each sample, in MW, its own set-point included. Where it stays below what the command asks for, the device is at one of its limits. null where the device has no such reading.
soc array of number or null yes The device's state of charge at each sample, 0 to 1. null for a device without one (a PVD1).
truncated boolean yes true when the run took more samples than a response holds (500000 values over all controllers) and the later ones were left out. Raise period.

TdsControllerVariables

The ANDES variables that show a controller at work on one device: names to put in a run's dae_vars.

Field Type Required Description
command string yes The external power signal as the device receives it (Pext), per unit of the system base: what the controllers on it command.
frequency string yes The frequency the device measures at its bus (fHz), in Hz.
active_current string yes The device's active current (Ipout_y), per unit of the system base; times the bus voltage it is the active power delivered.
soc string or null no The device's state of charge (pIG_y); null for a model without one.

TdsInitClamp

One variable clamped at a limit during TDS initialisation.

Field Type Required Description
model string yes ANDES model of the clamped variable.
idx string yes Idx of the device, as a string.
var string yes The clamped variable's name within the model.
limit_name string yes The name of the limit parameter.
limit_val number yes The limit's value.
unconstr number yes The unconstrained value ANDES computed for the variable.

TdsInitRequest

Request body for POST /sessions/{id}/tds/init.

Field Type Required Description
test_init boolean no Whether ANDES checks the initialisation residuals against TDS.config.tol, gives its verdict in test_ok and logs the clamped limits and mismatched equations to the session messages when the check fails. false initialises without the check: test_ok is then null, and clamped and residuals still list what the System shows. Applies to this call only; the case's own setting is put back. Default true.

TdsInitResidual

One equation with a non-zero residual after TDS initialisation.

Field Type Required Description
name string yes The variable's dae.xy_name name.
mismatch number or null yes The equation's residual; null when the residual is NaN.
equation string yes ANDES's equation string, empty where the model gives none.

TdsInitResult

Result of POST /sessions/{id}/tds/init.

Field Type Required Description
initialized boolean yes true means the System is ready for a time-domain run and a later POST /tds (or a streamed run) continues from this initialisation, with the integrator it names (QNDF included): its record starts at the first step rather than at 0 s, and it is reported as not converged when test_ok is false. With a fixed step it solves the steps a run from scratch does; the two variable-step integrators choose other steps before the first event, and the same steps after it.
test_ok boolean or null no null when the request's test_init was false and ANDES did not check (it does not mean the case initialised cleanly: read residuals); otherwise the verdict of ANDES's residual test. false means initialisation residuals reach TDS.config.tol or are NaN, and the two lists name the causes (clamped variables) and the effects (equations with nonzero residuals), the same tables ANDES logs.
test_init boolean yes The test_init setting the call used, as the pflow result's settings does.
n_states integer yes Number of state variables (dae.n).
n_algeb integer yes Number of algebraic variables (dae.m).
max_residual number yes The largest absolute initialisation residual that is a number, over the equations ANDES checks; 0 when there are none.
nan_residuals integer yes How many initialisation residuals are NaN.
clamped array of TdsInitClamp no Variables clamped at limits during initialisation, read from the limiters whether or not the test ran. A clamp can stand on a case that passes the test. Empty when nothing clamped.
residuals array of TdsInitResidual no Equations whose initialisation residual reaches TDS.config.tol or is NaN, by the rule of ANDES's test, listed whether or not the test ran. Empty when the case initialised to a steady state.
diagnostics_truncated boolean yes true when clamped or residuals was cut at 500 rows; when the test ran and failed, the full tables are in the session messages.

TdsRunRequest

Request body for POST /sessions/{id}/tds (batch mode).

Streaming runs use the WebSocket at /ws/{session_id} and are started by its start_tds frame; this schema is the batch-only surface.

Field Type Required Description
tf number yes Final simulation time, in seconds. Must be > 0. Limits: above 0.
h number or null no Integration step size, in seconds, applied as ANDES TDS.config.tstep. With the default trapezoidal integrator this is the fixed step, and so it is with backeuler; None keeps the ANDES default (1/30 s). The trap_adapt and qndf integrators pick their own steps and ignore it; bound their steps with tds_config_overrides.max_step and min_step instead. Limits: above 0.
load_model string or null no How loads behave in the run: impedance (the default), power or as-case. A Sienna session takes all three; an ANDES session takes it left out or impedance, which is what ANDES does, and refuses the other two with 422. One of impedance, power, as-case.
vars array of string or null no Optional selector for which variable groups appear as columns in each per-step Arrow record batch on the streaming path. bus_v covers bus voltage magnitudes and angles; gen_state adds generator rotor angle delta and per-unit speed omega for every member of the ANDES SynGen group (GENROU / GENCLS / PLBVFU1); gen_power adds their electrical Pe / Qe; line_flow adds active and reactive power at each line's bus1 terminal; load_pq adds each PQ load's consumption. Unknown values are rejected with 422; an empty list is rejected with 422. The batch path (POST /tds) ignores this field at runtime: it returns the values of dae_vars instead, and accepts this field for symmetry with the WebSocket start_tds config so generated clients can share one request shape. Defaults to ["bus_v", "gen_state"] when omitted on the streaming path. Limits: min items 1.
dae_vars array of string or null no ANDES variables to record, by the names dae.x_name and dae.y_name give them (omega GENROU 1, vf GENROU 2); GET /sessions/{id}/dae-variables lists them. A batch run returns their values in traces, at every step ANDES takes, with no scaling. A name that is not a variable of the loaded case is refused with 422 before anything runs. The streaming start_tds frame takes the same field and adds one column per name, named exactly so. Limits: max items 1000.
names string no How the series are named (spec section 6.5). engine (the default) is the names as the engine gives them, byte for byte what a request without the field answers. neutral names each series <quantity>\|<key> (voltage\|bus:7, rotor_speed\|gen:1-1, a dae_vars variable state\|<key>#<variable>), and a streamed run adds the relative quantities: angle_rel\|<bus key> for every bus against the reference bus when bus_v is streamed, and rotor_angle_rel\|<unit key> for every machine, against the inertia-weighted mean, when gen_state is. A series that has no neutral name is refused with 422 before anything runs. A Sienna session's names are already neutral; the field is accepted there and changes nothing. The streaming start_tds frame takes the same field. One of engine, neutral. Default "engine".
integrator string no DAE integrator. "trapezoidal" (default) is ANDES's fixed-step Implicit Trapezoidal Method (ss.TDS.config.method = "trapezoid"), stepping at h. "backeuler" is fixed-step backward Euler (method = "backeuler"), first order and so more damped, also stepping at h. "trap_adapt" is the trapezoidal method with a variable step (method = "trap_adapt") chosen from an estimate of the local error, one step against two half steps, held to rtol and atol. "qndf" is the variable-order, variable-step QNDF (NDF) method (method = "qndf"). The two variable-step integrators run with fixt = 0, ignore h and take rtol, atol, max_step and min_step from tds_config_overrides (the Auto preset is rtol=1e-3, atol=1e-6, max_step=0.05). Any integrator can follow any other on the same System except qndf, which keeps a history: after a run with another integrator it is refused with 422 until the case is reloaded. One of trapezoidal, trap_adapt, backeuler, qndf. Default "trapezoidal".
controllers array of DroopController or FfrController or null no Controllers that act while the run goes: each reads the frequency once a sample period and sets the power of a battery or another distributed generation device, on top of the device's own set-point. Two kinds, picked by type: droop (power in proportion to the frequency deviation beyond a dead band) and ffr (a fixed power, once, for a set time when the frequency leaves a threshold or moves too fast). Powers are in MW, positive discharging, and frequencies in Hz. GET /sessions/{id}/tds/controllers lists the devices that can be named. A controller that names a device the case does not have is refused with 422 before anything runs. What each did comes back in the result's controllers; when the run ends the devices' inputs are as they were. A later run that names the same controllers and goes on from where this one stopped (a larger tf) keeps their state, so an ffr that has fired does not fire again. After a reload or a restored snapshot they start afresh, and it can. The streaming start_tds frame takes the same field. Sweeps do not take controllers. Limits: max items 32.
ext_sienna SiennaExtSpec or null no Sienna-native dynamic components for this run (spec section 6.2): dynamic_branches marks branches to simulate dynamically (PSID's DynamicBranch) and inverters attaches a PSID inverter model from a published parameter set to a generator that has no dynamic record. An ANDES session refuses the field with 422, as does the streaming start_tds frame. GET /engines lists the parameter sets under the Sienna engine's tds routine options.
tds_config_overrides object (names to number) or null no Optional adaptive-integrator tolerance overrides. Supported keys are rtol (→ ss.TDS.config.reltol), atol (→ ss.TDS.config.abstol), max_step (→ ss.TDS.config.dtmax) and min_step (→ ss.TDS.config.dtmin_adapt, the smallest step a variable-step integrator may shrink to), or the name of any ss.TDS.config field. An unknown key is refused with 422. So is a value that ANDES would take and then misbehave on: tstep must be finite and greater than 0, max_step (dtmax) and min_step (dtmin_adapt) finite and not negative (0 lets ANDES choose), fixt 0 or 1, and every other value a finite number. The tolerances and the two bounds apply to trap_adapt and qndf only: the fixed-step integrators ignore reltol/abstol and use h for stepping.

TdsTraceSeries

One recorded ANDES variable of a batch run.

Field Type Required Description
name string yes The variable, named as in dae_vars.
values array of number or null yes Its value at each time in traces.t, as ANDES stores it. null for a value that is not a number (a diverged step).

TdsTraces

The ANDES variables a batch run was asked to record (dae_vars).

Field Type Required Description
t array of number yes Simulation time of each recorded step, in seconds.
variables array of TdsTraceSeries yes One series per requested variable, in the order asked.
truncated boolean yes true when the run took more steps than a response holds (500000 values in all) and the later steps were left out. Raise h or ask for fewer variables.

ToggleSpec

Status toggle on a device - used for line trips, generator trips, etc.

Maps to ss.add('Toggle', model=..., dev=..., t=...). Toggling sets the target device's status to its complement at time t (closed→open or open→closed).

Field Type Required Description
kind "toggle" no Discriminator: this spec creates an ANDES Toggle device. Default "toggle".
model string yes ANDES model class name whose device is being toggled. Examples: 'Line', 'GENROU', 'PV'.
dev_idx integer or string yes ANDES idx of the device within model to toggle.
t number yes Time the toggle fires, in seconds.

Tolerances

The tolerances a row is read against. A quantity absent from quantities takes the default of engines/compare.py; one with no default is reported without a verdict.

Field Type Required Description
quantities object (names to number) no Absolute tolerance per quantity, in the quantity's unit; it replaces the default for that quantity.
frequency_hz number no Tolerance on the frequency of a matched mode, in hertz. Limits: above 0.
damping_ratio number no Tolerance on the damping ratio of a matched mode. Limits: above 0.
max_mode_distance number no The largest distance in the complex plane, in 1/s, at which two eigenvalues still count as one mode. Limits: above 0.

TopologyEntry

One element in a topology summary.

Field Type Required Description
idx integer or string yes ANDES idx of the element (its public identifier in ANDES). Used as the stable handle in subsequent operations (e.g., Fault.bus references this idx).
name string yes Human-readable name of the element.
kind string yes ANDES model class name (e.g., Bus, Line, GENROU, PV, Slack, PQ).
params object (names to number or integer or string or boolean) no Flat dict of model-input parameters for this element (e.g., for a Bus: Vn rated voltage in kV, vmax/vmin voltage limits, area, zone; for a Line: r, x, b, g, tap, phi; for a generator: Sn rated MVA, Vn, bus, plus model-specific params). The Inspector Properties tab in the v0.1 UI consumes this dict; absent params (None or unavailable on a given model) are omitted.
key string or null no The element's key: a string that names it the same way in every engine that loads the case (bus:7, branch:7-8-1, gen:1-1, gen:1-1/exciter), built from the case by the rule of section 4 of design/multiengine/spec.md. idx stays the engine's own handle. null where the entry was built away from the key book.
job_id string or null no Job-registry id mirroring the mutation that produced this entry. Populated only when this TopologyEntry is the top-level response of an edit / PMU-add / profile-add routine; null for nested entries inside a TopologySummary.

TopologyParamMeta

One parameter row in a model's add/edit form schema.

Field Type Required Description
name string yes ANDES parameter name (e.g., Vn).
kind string yes Form-input kind. string and number map to text/number inputs; bus_idx renders as a dropdown of existing buses; gen_idx a dropdown of existing static generators; syn_idx a dropdown of existing synchronous machines (GENROU/GENCLS) for an exciter/governor's machine link; bool is a checkbox. One of string, number, bus_idx, gen_idx, syn_idx, bool.
required boolean no Whether the field is required when adding a new element. Optional fields collapse under the form's Show advanced disclosure. Default false.
unit string or null no Display unit suffix (kV, pu, MVA, MWs/MVA, rad). Rendered inline next to numerical inputs.

TopologySchema

Per-model parameter metadata, used by the web client's polymorphic form generator.

Returned from GET /api/topology/schema. Mirrors the wrapper-side _PARAMS_BY_MODEL table - adding a new model on the server automatically expands the form picker.

Field Type Required Description
models object (names to array of TopologyParamMeta) yes Mapping from ANDES model class name to ordered parameter metadata. Order is the rendering order in the form.

TopologySummary

Substrate's structural view of the loaded case.

state reflects whether ss.setup() has been committed. Some fields on individual elements are only populated after setup.

Field Type Required Description
state string yes pre-setup if disturbances can still be added; committed after PF or TDS has triggered ss.setup(). Once committed, callers must POST /sessions/{id}/reload to add more disturbances. One of pre-setup, committed.
buses array of TopologyEntry yes Bus elements.
lines array of TopologyEntry yes Line elements.
transformers array of TopologyEntry yes Transformer elements split out from the ANDES Line bucket: a branch with tap != 1.0 or phi != 0.0, one the case flags as a transformer (trans) and one whose two ends are rated at different voltages (Vn1 and Vn2). Pure transmission lines remain in lines.
generators array of TopologyEntry yes Generator elements (PV, Slack, GENROU, GENCLS, etc.).
loads array of TopologyEntry yes Load elements - both static (PQ) and dynamic (ZIP).
shunts array of TopologyEntry no Shunt elements (capacitors and reactors). Modeled as ANDES Shunt devices; rendered with the IEC 60617 shunt-cap or shunt-reactor icon depending on the sign of b.
controllers array of TopologyEntry no Dynamic controller devices: exciters (IEEEX1, ESDC2A, SEXS), governors (IEEEG1, TGOV1), the IEEEST PSS, and the REGCA1 renewable-converter model. Surfaces the seven Unit-8 whitelist additions so the disturbance editor can populate device pickers when the case includes them. An ESD1 battery is listed here as well: like REGCA1 it takes over a static generator (its gen) in a time-domain run. Empty for cases that carry no dynamics addfile (stock IEEE 14 .raw alone).
freq_hz number or null no System nominal frequency in Hz, as the case sets it: the header of a PSS/E RAW file, or the _config section of an xlsx or json file. A MATPOWER file, and any other case that sets none, keeps ANDES's default of 60. A per-unit rotor speed omega times this is the speed in Hz. null when the configuration has no usable value.
base_mva number or null no System MVA base, as the case sets it: the header of a PSS/E RAW file, baseMVA of a MATPOWER file, or the _config section of an xlsx or json file. Any other case, and a blank system, keeps ANDES's default of 100. A power in per unit on the system base times this is the power in MW or MVAr. A device with its own rating Sn gives some values per unit of that instead; an ESD1 battery reads alike on both only when its Sn equals this. null when the configuration has no usable value.
buses_without_vn array of integer or string no Idx of the buses whose rated voltage (Vn in the bus's params) the case file does not give: it is absent, blank or zero there, and ANDES fills in 110 kV. That 110 is not the bus's voltage base, so a client must not use it to turn a per-unit voltage into kV. Empty when every bus has a rated voltage. A bus whose Vn has been edited since the case was loaded is no longer listed.
events array of CaseEvent no Timed events the next time-domain run applies besides the disturbances a client commits through POST /sessions/{id}/disturbances: the Fault, Toggle and Alter devices the case's files define (the bundled kundur_full.xlsx trips Line_8 at 2 s), and the disturbances a bundle import or snapshot restore replayed. A client that says what a run will do must count these. A device that cannot act (switched off with u = 0, or a time below zero) is not listed. Empty when there are none.
undo EditStep or null no The edit POST /sessions/{id}/undo-last-edit would take back: the last element added, changed or deleted since the case was loaded. null when there is none. Edits are taken back while state is pre-setup.
redo EditStep or null no The edit POST /sessions/{id}/redo-edit would put back: the one taken back last. null when there is none, which is the case after any new edit.
has_dynamics boolean or null no Whether the case carries dynamic models (a synchronous machine, an exciter, a governor, ...), so a client need not infer it from the model names in generators and controllers. This server always sends true or false; null only means a server that does not report it.
job_id string or null no Job-registry id mirroring the routine that produced this topology snapshot: case load / reload, element delete / undo / redo, or blank-system create. null when the summary is a plain read (GET /topology).

TransformerRecord

One two-winding transformer. r_pu and x_pu are per unit on the bases the record states: rate_mva and the rated voltages vn_from_kv and vn_to_kv (the transformer's own rating where the engine holds it so, the system base and the bus voltages where it holds them on those). rate_a_mva is a flow limit, not a base.

Field Type Required Description
key string yes The transformer's TENSA key.
from integer yes The number of the bus of the first winding.
to integer yes The number of the bus of the second winding.
ckt string yes The circuit id that tells parallel branches apart.
r_pu number or null no The series resistance, per unit on rate_mva and vn_from_kv.
x_pu number or null no The series reactance, per unit on rate_mva and vn_from_kv.
rate_mva number or null no The MVA base the impedances are given on.
vn_from_kv number or null no The rated voltage of the first winding, in kV.
vn_to_kv number or null no The rated voltage of the second winding, in kV.
tap number or null no The off-nominal turns ratio, per unit.
shift_deg number or null no The phase shift, in degrees.
rate_a_mva number or null no The long-term flow limit, in MVA; 0 where the case gives none.
in_service boolean no Whether the transformer is in service. Default true.

UcCostSchema

The objective split over the horizon.

Field Type Required Description
energy number yes The energy cost over the horizon, in $.
startup number yes The start-up cost over the horizon, in $.
fixed number yes The fixed cost over the horizon, in $.
total number yes The total cost over the horizon, in $.

UcGeneratorSchema

One committed generator.

Field Type Required Description
bus integer yes The number of the bus the generator is on.
id string yes The generator's id on its bus, from its key.
idx string yes The PowerSystems component name (the engine's handle).
on array of boolean yes Committed (true) or not, per period.
p_mw array of number yes The dispatched active power per period, in MW.
energy number yes The generator's energy cost over the horizon, in $: the quadratic and linear gencost terms at the dispatched MW, times the period length in hours.
startup number yes The generator's start-up cost over the horizon, in $.
fixed number yes The generator's fixed cost over the horizon, in $: the gencost constant term c0 ($/h) per committed period, times the period length in hours.

UcOverrideSchema

What the request adds to one generator, beyond the case file.

Field Type Required Description
startup_cost number or null no Start-up cost in $, added to the gencost row's STARTUP (the row's second number, which the shipped cases carry as 0).
min_up_h number or null no Minimum up time in hours; MATPOWER has no column for it, so only the request can give one.
min_down_h number or null no Minimum down time in hours; MATPOWER has no column for it.
must_run boolean or null no Commit the generator in every period.

UcRequest

The body of POST /sessions/{id}/uc.

Field Type Required Description
network_model string yes The network model of the commitment: copper_plate (no network), dc or ptdf. One of copper_plate, dc, ptdf.
horizon_h integer yes The horizon in hours, 1 to 168.
resolution_min integer yes The period length in minutes. One of 15, 30, 60.
series array of number yes One load factor per period, applied to every load's max active power; one positive finite number per period, horizon_h * 60 / resolution_min of them.
overrides object (names to UcOverrideSchema) no Per-generator additions keyed by the generator's key (gen:<bus>-<id>): start-up cost, minimum up and down times, must-run.

UcResponse

The result of a unit commitment of a Sienna session.

Field Type Required Description
status string yes completed when the commitment solved.
engine string yes The engine that ran the commitment: sienna.
network_model string yes The network model the commitment used.
horizon_h integer yes The horizon, in hours.
resolution_min integer yes The period length, in minutes.
periods array of string yes The period start times, ISO strings, one per period.
base_mva number yes The system MVA base.
objective number yes The solver's objective over the horizon, in $. The gencost constant term is put on the model as c0 times the period length per committed period, so it equals objective_check, except that PowerSimulations leaves the constant term of a must-run generator out of its objective.
objective_check number yes The cost recomputed from the commitment and dispatch and the case file's own gencost coefficients, in $; equal to objective within solver tolerance.
cost UcCostSchema yes The objective split: energy, start-up, fixed, total, in $.
total_load_mw array of number yes The total load per period, in MW.
generators object (names to UcGeneratorSchema) yes The generators, keyed by the neutral key (gen:<bus>-<id>).
slacks array of UcSlackSchema yes Every slack variable whose value is past 1e-6 MW; empty when all are zero.
parameters array of string yes The parameter names of the optimization model, as PowerSimulations names them.
expressions array of string yes The expression names of the optimization model, as PowerSimulations names them.
keys object (names to object (names to string)) yes The keys lookup: under "generator", the PowerSystems component name of each generator of the answer mapped to its neutral key.
notes array of string yes What the Julia side logged at warning level and above while the commitment ran.
extra object or null no Reserved; absent.

UcSlackSchema

One slack variable whose value is not zero (past 1e-6 MW).

Field Type Required Description
variable string yes The slack variable's name, as PowerSimulations names it.
element string yes The element the slack is on, as PowerSimulations names it.
time string yes The period the slack is in, as an ISO timestamp.
value number yes The slack's value, in MW.

UnmatchedKeysOut

Keys present on one side only, sorted.

Field Type Required Description
missing_in_comparison array of string yes Keys the reference has and the comparison does not.
missing_in_reference array of string yes Keys the comparison has and the reference does not.

UploadProfileResponse

Wire shape of POST /sessions/{id}/profiles/upload.

Field Type Required Description
profile_path string yes Absolute path of the written xlsx on the substrate's workspace. Pass this verbatim as profile_path on the follow-up POST /profiles call.
bytes_written integer yes Size of the on-disk xlsx in bytes. Reported back so the UI can confirm the upload completed end-to-end. Limits: min 0.
job_id string or null no Job-registry id mirroring the profile-upload routine (kind profile-upload). null on legacy responses.

UploadedWorkspaceFile

Response shape for POST /workspace/files: the file as it now sits in the workspace, as the lister would report it.

Field Type Required Description
name string yes File name relative to the workspace root (no directory components; the lister does not recurse).
size_bytes integer yes File size in bytes as reported by os.stat. Limits: min 0.
modified_iso string yes Last-modified time in ISO 8601 format with timezone (UTC). Computed from stat.st_mtime at list time.
format string yes Detected file format from the extension. Matches one of the ANDES-supported formats; non-matching files are excluded by the lister. One of xlsx, raw, dyr, json, m.
replaced boolean yes true when the upload replaced a file of the same name (overwrite=true), false when it created a new one.

ValidationError

Field Type Required Description
loc array of string or integer yes
msg string yes
type string yes
input any no
ctx object no

Verification

Field Type Required Description
summary string yes What was verified and how, in a few sentences.
checks array of VerificationCheck no Each check, with its reference, tolerance and result.

VerificationCheck

Field Type Required Description
name string yes What was checked. Limits: max length 200.
kind string yes What the outputs were compared with: independent-solver, published, stored-solution, ring-down (a mode seen in a time-domain run) or regression-baseline (TENSA's own earlier output, so not a verification). One of independent-solver, published, stored-solution, ring-down, regression-baseline, cross-engine.
reference string yes The reference, named so it can be found.
tolerance string yes How close the outputs had to be.
result string yes What was found.
passed boolean yes Whether the result is inside the tolerance.

VersionInfo

Response shape for GET /version: the packages this server runs on.

Field Type Required Description
tensa string yes Installed tensa version (the one in the OpenAPI info.version).
andes string yes Installed ANDES version, or unknown when its package metadata is missing.

WorkspaceFile

One entry in the workspace file lister response.

Field Type Required Description
name string yes File name relative to the workspace root (no directory components; the lister does not recurse).
size_bytes integer yes File size in bytes as reported by os.stat. Limits: min 0.
modified_iso string yes Last-modified time in ISO 8601 format with timezone (UTC). Computed from stat.st_mtime at list time.
format string yes Detected file format from the extension. Matches one of the ANDES-supported formats; non-matching files are excluded by the lister. One of xlsx, raw, dyr, json, m.

WorkspaceFileList

Response shape for GET /workspace/files.

Field Type Required Description
files array of WorkspaceFile yes Workspace files matching the supported extensions, sorted alphabetically by name. Hidden files (dotfiles) and symlinks are excluded; subdirectories are not recursed.

YbusEntrySchema

One nonzero of the bus admittance matrix.

Field Type Required Description
row integer yes Row of the entry, from 0; bus_idx[row] is the bus of the row.
col integer yes Column of the entry, from 0; bus_idx[col] is the bus of the column.
re number yes Real part (conductance), in per unit on the system base (base_mva).
im number yes Imaginary part (susceptance), in per unit on the system base (base_mva).

YbusResponse

The bus admittance matrix of the loaded case, as sparse triplets.

Field Type Required Description
n_bus integer yes Number of buses; the matrix is n_bus by n_bus.
base_mva number or null yes The system MVA base the per-unit values are on: an admittance in siemens is the per-unit value times base_mva over the square of the bus's rated voltage in kV. Null when the case carries no usable base.
bus_idx array of string yes bus_idx[i] is the ANDES idx of the bus of row and column i.
bus_key array of string or null yes bus_key[i] is the key of the bus of row and column i, as GET /sessions/{id}/keys gives it; null for a bus that has none.
entries array of YbusEntrySchema yes The nonzero entries of the bus admittance matrix ANDES builds from its lines, transformers and shunts (the models it flags ybus), in per unit on the system base; an entry not listed is zero. Device status at the time of the call is reflected (a line switched off adds nothing); the models that contribute are those present at setup. Loads and generators are not in it.

ZipFractions

The constant impedance, current and power fractions of a load at 1.0 pu.

Field Type Required Description
p array of number yes The active power's constant impedance, current and power fractions, summing to 1. Limits: min items 3, max items 3.
q array of number yes The reactive power's constant impedance, current and power fractions, summing to 1. Limits: min items 3, max items 3.