curl --request POST \
--url https://api.eddy.engineer/v1/power.adoption \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"study": {},
"async": true,
"case": "<string>",
"network": {},
"network_key": "<string>",
"on": "<string>",
"profiles": [
{}
],
"project": "<string>",
"settings": {},
"state": "<string>",
"tables": [
"<string>"
],
"variant": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/power.adoption"
payload = {
"study": {},
"async": True,
"case": "<string>",
"network": {},
"network_key": "<string>",
"on": "<string>",
"profiles": [{}],
"project": "<string>",
"settings": {},
"state": "<string>",
"tables": ["<string>"],
"variant": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
study: {},
async: true,
case: '<string>',
network: {},
network_key: '<string>',
on: '<string>',
profiles: [{}],
project: '<string>',
settings: {},
state: '<string>',
tables: ['<string>'],
variant: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/power.adoption', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/power.adoption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'study' => [
],
'async' => true,
'case' => '<string>',
'network' => [
],
'network_key' => '<string>',
'on' => '<string>',
'profiles' => [
[
]
],
'project' => '<string>',
'settings' => [
],
'state' => '<string>',
'tables' => [
'<string>'
],
'variant' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/power.adoption"
payload := strings.NewReader("{\n \"study\": {},\n \"async\": true,\n \"case\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"on\": \"<string>\",\n \"profiles\": [\n {}\n ],\n \"project\": \"<string>\",\n \"settings\": {},\n \"state\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/power.adoption")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"study\": {},\n \"async\": true,\n \"case\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"on\": \"<string>\",\n \"profiles\": [\n {}\n ],\n \"project\": \"<string>\",\n \"settings\": {},\n \"state\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.adoption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"study\": {},\n \"async\": true,\n \"case\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"on\": \"<string>\",\n \"profiles\": [\n {}\n ],\n \"project\": \"<string>\",\n \"settings\": {},\n \"state\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"events": "/v1/jobs/job-000001-…/events",
"job_id": "<string>",
"phase": "queued",
"poll": "/v1/jobs/job-000001-…"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Stochastic adoption of rooftop PV, home batteries and EV charging: which customers adopt at each level, drawn from a named seed, each sample a time-series run; percentiles per level (`ss.power.adoption/1`)
UD10: from the study’s named seed (the only source of randomness: PCG64, the generator numpy calls PCG64), draws which customers adopt rooftop PV, batteries and EV charging at each adoption level (nested: a lower level’s adopters adopt at every higher one) and at what size, draws each EV’s daily sessions into its charging profile (unmanaged, off-peak or capped), and runs each sample’s network through UD3’s time-series engine (a run of one step is a snapshot). Per level: the percentiles (P5, P50 and P95 unless stated; numpy’s linear rule) of voltage, loading, hours outside the study’s limits, device operations, curtailment and charging energy; the share of samples within the study’s allowances; the hosting level at the stated confidence; and whether the P50 and P95 settled between half the samples and all of them (ADOPTION_NOT_SETTLED names what moved: more samples before it is read). The same seed gives the same bytes, and the first N samples of a study of 2N are the study of N. No limit, allowance, size, arrival time or energy is built in: each is the study’s input. A sample whose run does not converge is named and left out of the percentiles, which say how many samples they are over. A year of steps is a job. Not drawn on the map yet (power_resultmap refuses it by name). Refused by name: POWER_REQUEST (400: the body, a member the study does not take, not exactly one network source, a study missing, a value table given inline), POWER_SETTINGS (400: settings or study does not read, with the field), POWER_DOCUMENT_INVALID (400), POWER_NETWORK_NOT_FOUND (404), POWER_PROFILE_NOT_FOUND (404: a profile the network binds is not stored), POWER_PROJECT_KIND (422), POWER_VALUE_TABLE (422: a named table missing, not adopted or not in force), POWER_CASE_NOT_FOUND, POWER_CASE_NOT_READ (422), POWER_BUSY (429: the heavy lane is full; retry after Retry-After, or send async: true), POWER_ADOPTION_INVALID (422: fewer than two samples, no level or technology, a share that falls between levels, a distribution that cannot be drawn from or is not bounded below, a profile binding the network does not have, a customer load not in the network, an allowance without its limit, …), POWER_ADOPTION_OVER_BUDGET (422: the runs times their steps times the conductors over the budget, before anything runs), POWER_ADOPTION_UNEVALUABLE (422: an inverter mode reads a value-table slot the study was not given, naming the table and key). A design aid: a person reviews it before it is relied on.
curl --request POST \
--url https://api.eddy.engineer/v1/power.adoption \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"study": {},
"async": true,
"case": "<string>",
"network": {},
"network_key": "<string>",
"on": "<string>",
"profiles": [
{}
],
"project": "<string>",
"settings": {},
"state": "<string>",
"tables": [
"<string>"
],
"variant": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/power.adoption"
payload = {
"study": {},
"async": True,
"case": "<string>",
"network": {},
"network_key": "<string>",
"on": "<string>",
"profiles": [{}],
"project": "<string>",
"settings": {},
"state": "<string>",
"tables": ["<string>"],
"variant": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
study: {},
async: true,
case: '<string>',
network: {},
network_key: '<string>',
on: '<string>',
profiles: [{}],
project: '<string>',
settings: {},
state: '<string>',
tables: ['<string>'],
variant: '<string>'
})
};
fetch('https://api.eddy.engineer/v1/power.adoption', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/power.adoption",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'study' => [
],
'async' => true,
'case' => '<string>',
'network' => [
],
'network_key' => '<string>',
'on' => '<string>',
'profiles' => [
[
]
],
'project' => '<string>',
'settings' => [
],
'state' => '<string>',
'tables' => [
'<string>'
],
'variant' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/power.adoption"
payload := strings.NewReader("{\n \"study\": {},\n \"async\": true,\n \"case\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"on\": \"<string>\",\n \"profiles\": [\n {}\n ],\n \"project\": \"<string>\",\n \"settings\": {},\n \"state\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/power.adoption")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"study\": {},\n \"async\": true,\n \"case\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"on\": \"<string>\",\n \"profiles\": [\n {}\n ],\n \"project\": \"<string>\",\n \"settings\": {},\n \"state\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/power.adoption")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"study\": {},\n \"async\": true,\n \"case\": \"<string>\",\n \"network\": {},\n \"network_key\": \"<string>\",\n \"on\": \"<string>\",\n \"profiles\": [\n {}\n ],\n \"project\": \"<string>\",\n \"settings\": {},\n \"state\": \"<string>\",\n \"tables\": [\n \"<string>\"\n ],\n \"variant\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{}{
"events": "/v1/jobs/job-000001-…/events",
"job_id": "<string>",
"phase": "queued",
"poll": "/v1/jobs/job-000001-…"
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
UD10's adoption study: seed (the named seed, required), samples (per level, at least two), levels [{pv_pct, battery_pct, ev_pct}] (each share not falling from one level to the next), run (UD3's time-series study: start, steps, step_s, scale, control, limits; one step is a snapshot), and optionally customers {loads, max_nominal_v} (every load in service where left out), pv and battery {model (UD2's pv or storage model at a reference size), profile (the binding that drives it), modes, size_w (a distribution, W), round_w}, ev {rated_w, round_w, arrival_h, energy_wh, charge_probability, rule ({kind: unmanaged} | {kind: off_peak, start_h, end_h} | {kind: cap, max_w}), reactive, voltage_model}, limits {v_min_pu, v_max_pu, loading_max_pct, reverse_flow_w}, allowances (UD9's: overvoltage_h, undervoltage_h, thermal_h, reverse_flow_h, curtailed_pct, added_tap_steps, added_capacitor_steps), percentiles ([5, 50, 95]), confidence_pct (95), convergence (the settling check's percentiles and bands). A distribution is {kind: fixed, value} | {kind: uniform, min, max} | {kind: triangular, min, mode, max} | {kind: normal, mean, sd, min, max} | {kind: log_normal, mu, sigma, min, max} | {kind: choice, values, weights}. Inverter settings come from tables, never inline
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), and it runs within the job's budget (SS_POWER_DIST_JOB_WORK, 2e9 conductor-solves) rather than the crate's inline one. false: always inline. Left out: sized by the estimated work (work in the answer): inline up to 1e7 conductor-solves (SS_POWER_DIST_SYNC_WORK), on the heavy lane above 2e6 (SS_POWER_DIST_LIGHT_WORK), a job above 1e7
A study case of the document, by id: its switch and source states and in_service are laid over the document. A case that states load levels (load_scale, loads) or solver settings is refused (POWER_CASE_NOT_READ): profiles and the study's DER cases set the loads, settings the solver's. Left out: the document as it stands
PW4's phase-domain load flow settings: tolerance_pu (1e-8), max_iterations, source (ideal | behind_impedance), earth_model (carson | full_carson | deri), earth_resistivity_ohm_m, transformer_no_load, antifloat_ppm, load_voltage_window ([low, high] per unit), switch_impedance_ohm ([R, X] Ω a conductor of every closed switch that states no resistance, in place of an ideal tie: OpenDSS gives a switch=yes line 0.001 + j0.001 Ω; none by default)
Response
study, schema, result_key (BLAKE3 of the result's canonical bytes, the crate's own; blob_uri reads it, report_uri is its certificate, which verify_result runs again), request_key, network {key, name, counts}, case, tables (each table read, by id, item, revision and content key; never its entries), upstream, parts, validation, summary, work (the estimate the lane was chosen by, and whether the job budget was used), result_inline, and result: seed, generator and percentile_rule (how the draws and percentiles are made, in words), customers, base (the run with nothing added), samples (each sample's draw key), levels (per level: the shares, adopters, each sample's row with its installed DER, metrics, pass and breaches, passed, not_converged, pass_share, percentiles per measure), hosting (where allowances are given: found, all or none, the level, the first failing level and the allowance most often broken there), settling (half against all, each row within its band or not; settled), runs, step_solves, findings
The response is of type object.