All repositoriesNNE / Energy dispatch simulation

Microgrid Commons.

Run an hourly energy balance with bounded storage, charge and discharge efficiency, curtailment and unserved energy.

INSIDE THE REPOSITORY

A complete place to start.

  • State-of-charge dispatch
  • Charge and discharge power constraints
  • Energy conservation report
  • Exact token contract and pair inspection
  • Bounded ERC-20 transfer activity explorer
  • Local community funding scenario planner
  • Evidence export with SHA-256 verification
  • Nine automated checks and GitHub CI
  • MIT license, method, architecture and API docs
Node.js 22No runtime dependenciesVercel ready

Run locally

npm test
npm start

Open localhost:3000. The technology runs with no API key. Live chain and DNS reads use public providers.

Deploy in your account

Extract the archive and upload its contents to a GitHub repository you control. Import that repository into Vercel, or run npx vercel --prod in the extracted folder. The included configuration sets the output directory and tests.

Return to the Deploy studio to publish your project, token pair and repository on the public build board.

29 SOURCE FILES / V1.0.0

Inspect everything.

.env.example.github/workflows/check.yml.gitignoreLICENSEREADME.mdSECURITY.mdapi/activity.mjsapi/dns.mjsapi/health.mjsapi/token.mjsdev.mjsdocs/API.mddocs/ARCHITECTURE.mddocs/METHOD.mdexamples/inputs.jsonpackage.jsonpublic/app.mjspublic/config.mjspublic/core/engine.mjspublic/core/math.mjspublic/favicon.svgpublic/index.htmlpublic/styles.cssserver/api.mjsserver/handler.mjstests/api.test.mjstests/engine.test.mjstools/verify-evidence.mjsvercel.json

This download contains only this standalone project. It includes no account credentials.

METHOD

What it calculates.

Supply first serves demand. Surplus charges storage subject to power, capacity and charge efficiency; deficits draw energy subject to power and discharge efficiency.

LIMITS

What the evidence means.

Simplified hourly dispatch without degradation, forecasting, tariffs or grid control. No real facility is operated.

The funding planner does not transfer tokens or route rewards. Deploying this repository does not imply company endorsement or investment value.

Inputs you control.

InputTypeUnits
24 hourly demand values (kWh)Editable data
24 hourly supply values (kWh)Editable data
Storage capacityBounded numberkWh
Initial storageBounded numberkWh
Charge/discharge limitBounded numberkW
Each-way efficiencyBounded number