MEME is a dependency-free Go service (standard library only) that accepts one canonical JSON energy-system model and translates it into the native input formats of three optimization frameworks — PyPSA, Calliope (release 0.7, with 0.6 as a selectable version) and AdOpT-NET0 — then optionally runs the solve and returns a zipped result bundle. A request targets one framework, a subset, or all of them at once; the service is a stateless translator and orchestrator, the solvers are external Python processes.
Client ──POST /simulate?target=pypsa,calliope──▶ MEME ── validate (capability gates)
◀──202 {id}──────────────────────────── │ ── emit native model files
Client ──GET /jobs/{id}/status────────────────── ▼ ── run the solver (python / calliope CLI)
◀──state · log · per-run results──────── job ── bundle: results + inputs + config + log
Client ──GET /jobs/{id}───────────────────────▶ zip
Documentation: https://enerplanet.github.io/meme — quickstart, API reference, the canonical model, what each framework honors property by property, architecture and the decisions behind it.
POST /validate|/convert|/simulate?target=…receives the canonical payload.targetis one framework, a comma-separated list, orall(the default version of every framework). Validation is capability-gated: a property the selected target cannot honor is rejected with a pointed message or named in a warning — never silently dropped.- The target's emitter writes the framework's native model: a PyPSA CSV
folder, a Calliope
model.yamlwith data tables, an AdOpTinput_data/tree. Anything only one framework understands rides in that framework'snativeblock and is merged verbatim. /simulateschedules an asynchronous job: each run is solved by an external process (a generatedrun.py, or thecalliopeCLI), sweeps expand into independent runs, andGET /jobs/{id}returns one zip with solver results, emitted inputs, driver scripts, the log and the submitted config.
| Target | Framework | Version | In all |
|---|---|---|---|
pypsa |
PyPSA | 1.2.4 | ✓ |
calliope (alias calliope-0.7) |
Calliope 0.7 | 0.7.0 | ✓ |
calliope-0.6 |
Calliope 0.6 | 0.6.8 | by name |
adopt-net0 |
AdOpT-NET0 | 0.1.10 | ✓ |
GET /capabilities lists the targets, what all runs, the aliases, the
framework version each target drives, and the feature matrix. One run mode is
not an optimization: experiment.mode: power_flow has PyPSA solve the AC
network described in the payload (voltage levels, impedances, a fixed
dispatch, reactive power and voltage control) and report voltages, loading
and convergence, the natural second call after a plan on any target; the
other targets ignore those inputs with a warning. PyPSA also plans under the
voltage law (experiment.network.model: linear_power_flow, with line
expansion and security constraints), sizes storage as a Store, builds in
integer modules, retires capacity, prices unmet demand and plans over
investment periods.
Dry-run on the host (Go only — validates, translates and plans, no solve):
make run # build + serve on :8080
curl -s -X POST 'localhost:8080/validate?target=all' -d @examples/shared_full.json | jq .
curl -s -X POST 'localhost:8080/convert?target=calliope' -d @examples/calliope_full.json | jq .Without a checkout, go install github.com/enerplanet/meme/cmd/meme@latest
puts the same dry-run binary into your Go bin directory (meme -version
tells you which release).
Real solvers in Docker (PyPSA/HiGHS, Calliope 0.7 and 0.6/CBC, AdOpT/GLPK):
make -C environment build ENV=dev # one-time image build
make -C environment run ENV=dev # API on :8080, real execution
ID=$(curl -s -X POST 'localhost:8080/simulate?target=all' -d @examples/shared_full.json | jq -r .id)
curl -s "localhost:8080/jobs/$ID/status" | jq .state # queued -> running -> succeeded
curl -s -o result.zip "localhost:8080/jobs/$ID"Configuration (ports, work directory, API_KEY, CORS_ORIGINS) comes from
CLI flags or a .env file; see .env.example and the
configuration guide.
cmd/meme/ server main
internal/ api · cli · env · model · emit · scripts · target/{pypsa,calliope,adoptnet0} · scenarios · service
test/ test pyramid (host suites, goldens, real-solver E2E)
environment/ Docker image with the frameworks, their venvs and free solvers
examples/ ready-to-run payloads and the curl walkthrough
schemas/ the published JSON Schemas (payload contract)
docs/ the documentation site (MkDocs)
make test # vet + host suite: unit tests, golden files, validation matrix (no Python)
make schema-check # examples and the scenario corpus against the JSON Schema
make e2e # container: every scenario on real solvers, both Calliope releases
make docs # build the documentation site strictlySee CONTRIBUTING.md for the workflow, CHANGELOG.md for what changed, and the testing guide for the test pyramid.
MIT — see LICENSE. Third-party frameworks and solvers used by the environment image are listed in ATTRIBUTIONS.md. To cite MEME, use CITATION.cff.

