Skip to main content

The PH WESM dispatch engine behind Power Dispatch Studio: an observed-day LP replay with scenario overrides, as an importable module and CLI.

Project description

power-dispatch-studio

The PH WESM dispatch engine behind Power Dispatch Studio, as an importable, citable Python module and CLI.

The studio runs this same linear-program merit-order engine in the browser (wasm HiGHS). This package is the Python reference implementation of one observed-day replay: it builds per-grid supply stacks from a baked snapshot of public IEMOP data, applies scenario overrides, and clears a coupled three-grid LP with corridor limits, storage, reserves, and a hydro water budget. It is the same engine, same numbers, runnable in a notebook.

Install

pip install power-dispatch-studio

The only runtime dependency is highspy (the HiGHS solver). A dated snapshot of the public data archive ships in the wheel, so it runs with no network access.

CLI

power-dispatch days                              # observed days available
power-dispatch run --date 2026-06-15             # hourly CSV to stdout
power-dispatch run --date 2026-06-15 --offer-mode # replay the market's own bids
power-dispatch run --date 2026-06-15 --demand luzon=1500 -o out.csv
power-dispatch run --scenario scenario.json -o out.csv

Python

import power_dispatch as pd

pd.list_days()[:3]
# ['2026-05-01', '2026-05-02', '2026-05-03']

result = pd.run_scenario({
    "date": "2026-06-15",
    "opts": {"demand_delta": {"luzon": 1500}},  # +1.5 GW data-center load
})
result["summary"]["mean_price"]["luzon"]   # PhP/kWh

The scenario override map

A scenario is {"date": "YYYY-MM-DD", "opts": {...}}. The override keys the engine honors:

key type meaning
demand_delta {grid: MW} load added or removed
fuel_cost {fuel: PhP/kWh} marginal-cost override
fuel_avail_delta {grid: {fuel: MW}} availability edit
solar_delta_mw {grid: MW} installed solar edit
hydrology float water multiplier (1.0 = observed)
caps {leyte|mvip: MW or [24]} corridor limits
storage [{grid, power_mw, energy_mwh}] added BESS
reserve_deduction bool withhold scheduled reserve
offer_mode bool replay the observed offer book, not the cost proxy

grid is one of luzon, visayas, mindanao.

The data snapshot

The bundled data is a dated snapshot of the public archive at build time (see power_dispatch/data/meta.json). To run against a fresher bake, point the engine at a copy of the deployed web/data/:

power-dispatch run --date 2026-07-01 --data-dir /path/to/web/data
# or: export POWER_DISPATCH_DATA=/path/to/web/data

What this is and is not

This replays OBSERVED days with scenario what-ifs on a defensible engine. It is not a price forecast, and offer-mode is a replay of the market's own published bids, not a bid-strategy simulator. Every number traces to a primary IEMOP source; the studio's Backcast view and methodology publish the engine's error rather than tuning it. Full methodology: https://power-dispatch-studio.vercel.app/methodology.html.

MIT licensed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

power_dispatch_studio-0.1.0.tar.gz (730.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

power_dispatch_studio-0.1.0-py3-none-any.whl (468.2 kB view details)

Uploaded Python 3

File details

Details for the file power_dispatch_studio-0.1.0.tar.gz.

File metadata

  • Download URL: power_dispatch_studio-0.1.0.tar.gz
  • Upload date:
  • Size: 730.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for power_dispatch_studio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7af800e8a56f17de682f949b48ad69da3c3ae29b4f4b0ce0627975dad402bcaa
MD5 91fa7b33c96445186961c132b85c6d3a
BLAKE2b-256 7f310ca683c418b250442475371af76cf46406ae665a091184b3a192478562d1

See more details on using hashes here.

File details

Details for the file power_dispatch_studio-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for power_dispatch_studio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 939aa31f200fe63578021e292c73cf9a9e1c7e9bab6ef9433e5c50bf3ff76253
MD5 f7f70f90f58195737a8ffa2c44334b3f
BLAKE2b-256 4e80c9ee6da907f4a757cc79c6ea694d7a6b51cc46a2619c4fb01a2128642bd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page