Skip to main content
POST
DC optimal power flow, or with contingencies the security-constrained DC OPF: dispatch, flows, binding constraints, marginal prices (`ss.power.opf/1`)

Authorizations

x-api-key
string
header
required

Required when the deployment sets SS_REQUIRE_AUTH=1

Body

application/json
async
boolean

true: run as a job and answer 202 with job_id, poll and events; the finished job's result is this route's body without the inline result (read result_key's blob, or page it with power_contingency_page). false: always inline. Left out: inline up to an estimated work of 5e6 bus-solves (SS_POWER_PLANNING_SYNC_WORK; N-1 of a 2,000-bus case is about 7e6, an AC OPF of 13,659 buses 9e6), a job above. Above 2e5 (SS_POWER_PLANNING_LIGHT_WORK) a study takes a slot of PW12's heavy lane

case
string

A PW2 study case by id (its states and settings apply); left out, the document as it stands

contingencies
object

A contingency document (ss.power.contingencies/1, TP2): named contingencies (id, outages: branch, source or HVDC link ids) and rules (select: all_branches, all_generators, all_hvdc, by voltage, by area, each of a list), with an optional monitor (branches watched, pre and post duties, voltage band)

contingencies_key
string

A stored contingency document's key (power_contingencies_validate, power_contingencies_expand and power_common_mode answer one)

network
object

The network document (ss.power.network/1, PW2 with TP2's planning members: ratings by duty, costs, areas, interfaces, HVDC links), inline. Give exactly one of network, network_key, project. Every document is run in its canonical form

network_key
string

The key (b3:<hex>) of a stored network (what power_network, power_import (format matpower_planning keeps costs and ratings), power_raw, power_cgmes and an OPF's dispatched_network_key answer)

project
string

The id of a project whose document is a network (app: "power"): its live head where it has one, else its last save

settings
object

TP10's study: model, phase_shifters, angle_limits, participation, cuts, max_rounds, cut_tol_pu, binding_tol_pu, optim

variant
string

A variant of project, by slug

Response

study, schema, result_key (BLAKE3 of the result's canonical bytes, the crate's own content_hash; blob_uri reads it, report_uri is its certificate, which verify_result runs again), request_key, documents (each document the study read, by content key), network {key, name, counts}, case, summary, elapsed_ms, work (the estimate the lane and the job threshold read), result_inline, and result (the whole result document, up to 16 MiB), dispatched_network_key (the optimum written back; absent when the OPF did not reach one). result: status (optimal, almost_optimal, infeasible, unbounded, round_limit, stalled, not_solved), objective, dispatch, buses (LMPs), branches (flows, loading, shadow prices), binding, infeasibility, security {rounds, cuts, excluded, secure}, findings

The response is of type object.