curl --request POST \
--url https://api.eddy.engineer/v1/multisim.xmile \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"agent_type": "<string>",
"document": {},
"xmile": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/multisim.xmile"
payload = {
"agent_type": "<string>",
"document": {},
"xmile": "<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({agent_type: '<string>', document: {}, xmile: '<string>'})
};
fetch('https://api.eddy.engineer/v1/multisim.xmile', 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.xmile",
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([
'agent_type' => '<string>',
'document' => [
],
'xmile' => '<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.xmile"
payload := strings.NewReader("{\n \"agent_type\": \"<string>\",\n \"document\": {},\n \"xmile\": \"<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.xmile")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_type\": \"<string>\",\n \"document\": {},\n \"xmile\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/multisim.xmile")
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 \"agent_type\": \"<string>\",\n \"document\": {},\n \"xmile\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_type": "<string>",
"document": {},
"document_key": "<string>",
"ok": true,
"problems": [
{}
],
"version": "<string>",
"xmile": "<string>",
"xmile_key": "<string>"
}{}The stock-flow diagram as XMILE, both ways (A4)
With document (and optionally agent_type): the XMILE 1.0 text of that agent type’s stocks, flows, auxiliaries, table functions (gf) and parameters - a pure function of the document; the equations translated token by token from the dialect (t -> TIME, ifthenelse -> IF THEN ELSE, smooth -> SMTH1, …), the solver method as XMILE’s Euler / RK4 or the engine’s own under the ss:method attribute. With xmile: the document parsed back (one agent type) with its Check. The emitter’s subset round-trips to the byte (emit(parse(emit(d))) == emit(d)); constructs outside it refuse typed. The stock-flow methods themselves: euler (order 1, the vendor default), rk4 (4), rk4_anylogic (the vendor’s first-order half-step RK4, compatibility only), bdf1 / bdf2 (L-stable; Newton on algebraic loops at the document’s step); a step past an explicit method’s stability limit refuses naming the stable step.
curl --request POST \
--url https://api.eddy.engineer/v1/multisim.xmile \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"agent_type": "<string>",
"document": {},
"xmile": "<string>"
}
'import requests
url = "https://api.eddy.engineer/v1/multisim.xmile"
payload = {
"agent_type": "<string>",
"document": {},
"xmile": "<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({agent_type: '<string>', document: {}, xmile: '<string>'})
};
fetch('https://api.eddy.engineer/v1/multisim.xmile', 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.xmile",
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([
'agent_type' => '<string>',
'document' => [
],
'xmile' => '<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.xmile"
payload := strings.NewReader("{\n \"agent_type\": \"<string>\",\n \"document\": {},\n \"xmile\": \"<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.xmile")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_type\": \"<string>\",\n \"document\": {},\n \"xmile\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/multisim.xmile")
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 \"agent_type\": \"<string>\",\n \"document\": {},\n \"xmile\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent_type": "<string>",
"document": {},
"document_key": "<string>",
"ok": true,
"problems": [
{}
],
"version": "<string>",
"xmile": "<string>",
"xmile_key": "<string>"
}{}