Run a document's experiment - replications with Student-t intervals (A2)
curl --request POST \
--url https://api.eddy.engineer/v1/multisim.experiment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"experiment": "<string>",
"document": {},
"document_key": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/multisim.experiment"
payload = {
"experiment": "<string>",
"document": {},
"document_key": "<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({experiment: '<string>', document: {}, document_key: '<string>'})
};
fetch('https://api.eddy.engineer/v1/multisim.experiment', 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/multisim.experiment",
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([
'experiment' => '<string>',
'document' => [
],
'document_key' => '<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/multisim.experiment"
payload := strings.NewReader("{\n \"experiment\": \"<string>\",\n \"document\": {},\n \"document_key\": \"<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/multisim.experiment")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"experiment\": \"<string>\",\n \"document\": {},\n \"document_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/multisim.experiment")
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 \"experiment\": \"<string>\",\n \"document\": {},\n \"document_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_type": "<string>",
"assertions": [
{}
],
"best": {},
"confidence": 123,
"distributions": {},
"document_key": "<string>",
"experiment_key": "<string>",
"frames_key": "<string>",
"kind": "<string>",
"little_max_error": 123,
"log": "<array>",
"log_key": "<string>",
"log_truncated": true,
"metrics": {},
"name": "<string>",
"outputs": [
{}
],
"passed": true,
"replications": 123,
"result_key": "<string>",
"row_count": 123,
"rows": [
{}
],
"run": {},
"run_key": "<string>",
"seed": 123,
"stop_time": 123,
"table_key": "<string>",
"tornado": [
{}
],
"version": "<string>",
"warm_up": 123
}{}ProcessSim
Run a document's experiment - replications with Student-t intervals (A2)
Runs the named experiment. `simulation` (one run) and `replications` (independent runs on replication indices 0..n, every named stream re-seeded per replication, reduced in canonical order so parallel equals serial bytes; each output carries n, mean, sd, min, max, the Student-t half-width at the experiment's confidence, the method and the per-replication values). The table kinds (A8) run many configurations and return `rows` (up to 500 inline; `row_count`, and the whole table at `table_key`), every row a run key with its parameter values, output means, half-widths and - for a refused evaluation - its typed refusal: `variation` (a full-factorial grid over `settings.parameters` [{name, values} | {name, min, max, step}], the first varying slowest), `monteCarlo` (parameters drawn from `settings.parameters` [{name, dist, ...}] on the stream <experiment>.monteCarlo, `settings.samples` rows, the outputs binned under `distributions`), `sensitivity` (one-at-a-time around the baseline over [{name, low, high} | {name, delta}]; `tornado` rows per output by swing), `optimisation` (Nelder-Mead from a pinned simplex over [{name, min, max, start, integer}] with `objective` an output name or `expression`, `direction`, `constraints`, `max_evaluations`, Latin-hypercube `starts` on the stream <experiment>.starts; `best`, `iterations`, `converged`), `calibration` (least squares of `targets` {output: value} and `series` {stock: [[t, v], ...]} through the same optimiser), `compare` (`settings.runs` [{name, parameters, seed}] side by side, `delta` against the first) and `test` (`settings.assertions` [{output, op, value, tolerance, lo, hi} | {expression}]; `passed` and the checked `assertions`). Replications per evaluation share replication indices across the table: common random numbers. Settings problems refuse typed before any run (also listed by multisim.check).
POST
/
v1
/
multisim.experiment
Run a document's experiment - replications with Student-t intervals (A2)
curl --request POST \
--url https://api.eddy.engineer/v1/multisim.experiment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"experiment": "<string>",
"document": {},
"document_key": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/multisim.experiment"
payload = {
"experiment": "<string>",
"document": {},
"document_key": "<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({experiment: '<string>', document: {}, document_key: '<string>'})
};
fetch('https://api.eddy.engineer/v1/multisim.experiment', 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/multisim.experiment",
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([
'experiment' => '<string>',
'document' => [
],
'document_key' => '<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/multisim.experiment"
payload := strings.NewReader("{\n \"experiment\": \"<string>\",\n \"document\": {},\n \"document_key\": \"<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/multisim.experiment")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"experiment\": \"<string>\",\n \"document\": {},\n \"document_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/multisim.experiment")
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 \"experiment\": \"<string>\",\n \"document\": {},\n \"document_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_type": "<string>",
"assertions": [
{}
],
"best": {},
"confidence": 123,
"distributions": {},
"document_key": "<string>",
"experiment_key": "<string>",
"frames_key": "<string>",
"kind": "<string>",
"little_max_error": 123,
"log": "<array>",
"log_key": "<string>",
"log_truncated": true,
"metrics": {},
"name": "<string>",
"outputs": [
{}
],
"passed": true,
"replications": 123,
"result_key": "<string>",
"row_count": 123,
"rows": [
{}
],
"run": {},
"run_key": "<string>",
"seed": 123,
"stop_time": 123,
"table_key": "<string>",
"tornado": [
{}
],
"version": "<string>",
"warm_up": 123
}{}Body
application/json
The model document (MultisimDoc): name, main, time_unit, agent_types[] (parameters, variables, functions, events, blocks[] {id, kind, params, actions, stream}, connectors[] {from, to}), experiments[] {name, kind: simulation | replications, stop_time, seed, warm_up, replications, confidence, frames_every, outputs[] {name, metric}, parameters}. Parsed tolerantly; its canonical bytes are the document key.
TL13: the model by its document key instead of document (give one of the two): the document_key multisim.import or a run answered, or an episode's final_key, so a model read from a file runs and is edited without travelling through the caller. An unknown key answers 404 MULTISIM_DOCUMENT_UNKNOWN.
Response
OK