Install
$ agentstack add skill-nimabahrami-pypsa-skills-kit-pypsa-asset-economics ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
PyPSA Asset Economics
- PyPSA default answers "what minimizes SYSTEM cost", not "what does THIS asset earn".
- ! correct (or disclose) three biases in every revenue number.
Bias 1 - perfect foresight
- optimizer sees all prices/weather in advance.
- perfect-foresight storage arbitrage overstates revenue ~10-30% (daily cycling) | more for multi-day strategies.
- Fixes, increasing effort:
- report perfect-foresight numbers WITH label + haircut range.
- rolling horizon dispatch (24-48h windows, limited lookahead) -> native
optimize_with_rolling_horizon+ its 3 traps: pypsa-solve-and-debug/references/performance.md item 4. - dispatch vs FORECAST price series -> settle vs outturn. Multi-market sequence (DA -> ID -> imbalance) -> references/multi-market-dispatch.md.
Bias 2 - system vs merchant optimization
- system-cost run -> asset dispatched to help SYSTEM; merchant asset maximizes own profit vs prices.
- price-TAKING asset setup:
- SOLVE: system model WITHOUT asset (or asset marginal) -> price series.
- BUILD: single-asset network = one bus + ONE bidirectional market-interface Generator (
p_min_pu=-1,marginal_cost = +price(t)) + asset -> solve. Cost linearity: buy (p>0) pays price | sell (p iterate | accept system-run dispatch as equilibrium approximation. STATE: which.
Bias 3 - wholesale price != asset price
- merchant assets pay grid fees | levies | taxes ON TOP of wholesale — jurisdiction-specific. ! storage double-charging (fees on charge AND discharge) + exemptions w/ SUNSET dates can flip a BESS business case alone. STATE: which non-market cost components included; never quote model arbitrage as investable w/o them.
Revenue accounting (post-solve, any run)
- RUN:
scripts/revenue_report.py solved_network.nc. - per-asset decomposition: energy revenue = sumt p lambdabus(t) w(t) | energy cost (links' bus0 side) | VOM | annualized capex | net margin.
- USES: n.busest.marginalprice -> run must produce meaningful prices (which runs do: pypsa-market-design).
- figures from this output -> pypsa-reporting chart-catalog #7 (diverging net-margin bar).
Metrics
- LCOE/LCOH = (annualized capex + fixed O&M + sum variable costs) / annual output.
- LCOH: electricity at MARGINAL price vs PPA price shifts answer EUR/kg levels. STATE: power sourcing assumption. 1 kg H2 = 33.33 kWh LHV.
- capture price = market value = revenue-weighted mean price; capture RATE = capture price / time-weighted mean.
- VRE capture rates fall w/ penetration (cannibalization). ! never extrapolate today's capture rate -> high-RES scenario.
- IRR/NPV on model cashflows: STATE discount rate + lifetime consistent w/ annuity in capital_cost | else double-discount.
Technology references - READ matching one
- references/storage-revenue.md -> BESS + TES arbitrage | stacking | degradation cost.
- references/multi-market-dispatch.md -> DA + intraday + imbalance sequencing | 15-min granularity | co-optimization traps.
- references/hydrogen-economics.md -> electrolyzer utilization frontier | LCOH.
- references/heat-economics.md -> heat pump vs boiler dispatch economics.
- references/vre-ppa.md -> capture prices | cannibalization | PPA structures.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: nimabahrami
- Source: nimabahrami/pypsa-skills-kit
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.