AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Pypsa Solve And Debug

skill-nimabahrami-pypsa-skills-kit-pypsa-solve-and-debug · by nimabahrami

Solve PyPSA optimization models + fix failures. Triggers: solver selection/options (HiGHS|Gurobi|CPLEX) | numerical issues | scaling | infeasibility | unboundedness | optimization fails | status infeasible/unbounded | runs too slowly | performance | temporal clustering | rolling horizon | spatial aggregation | interpret solved results | n.statistics | energy balances | shadow prices | suspicious…

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-nimabahrami-pypsa-skills-kit-pypsa-solve-and-debug

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No 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.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-nimabahrami-pypsa-skills-kit-pypsa-solve-and-debug)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
3mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

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 →
Are you the author of Pypsa Solve And Debug? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

PyPSA Solve & Debug

Solver selection

  • HiGHS = open-source default. LPs to ~1e7 nonzeros OK | MILP weaker.
  • Gurobi/CPLEX/COPT = licensed. USE: barrier (method=2) + crossover=0 for big planning LPs. ! barrier duals w/o crossover valid but less clean -> price analysis: enable crossover.
  • MILP (committable units | discrete expansion) -> orders-of-magnitude slowdown. SET: mip gap consciously. ! 1e-3 default gap hides real money in big objectives. ! MILP = no duals/prices -> fixed-commitment LP pricing run: pypsa-market-design.

Failure triage, in order

  1. PyPSA-Eur/Snakemake project -> READ logs/solvenetwork* + solver log first; solver config under solving:; re-run one rule w/ snakemake -call (pypsa-network-modeling/references/framework-workflows.md).
  2. RUN: n.consistency_check() + pypsa-physical-realism validator FIRST. Most "solver problems" = data problems.
  3. infeasible -> references/infeasibility.md + scripts/diagnose_infeasibility.py.
  4. unbounded -> free profitable machine: extendable w/ capital_cost1 loop. RUN: realism validator (catches all 3).
  5. numerical trouble (barrier stalls | "numerical difficulties") -> scale model. SET: cost coefficients within ~1e-2..1e6 of each other. ! avoid 1e9 "bigM" capacities -> use 'inf'-free explicit caps. Gurobi: NumericFocus=3, Aggregate=0.
  6. slow -> references/performance.md (clustering | rolling horizon | aggregation).

Native optimize() levers

! READ references/optimize-levers.md BEFORE hand-rolling any of: rolling horizon (3 traps) | two-stage via fixoptimalcapacities / pnomset | stochastic setscenarios + CVaR | IIS (Gurobi) | transmissionlosses | linearized UC (LP prices) | UC gotchas (snapshots-not-hours, uptimebefore=1) | MGA near-optimal | N-1 SCLOPF.

Result interpretation

READ: references/interpreting-results.md = n.statistics | energy balances | duals/shadow prices | curtailment | sanity battery. RUN: sanity battery on EVERY solved model before reporting numbers.

Reproducibility

  • SET: pin solver version + options in result metadata.
  • ! barrier deterministic-ish | concurrent methods not -> degenerate optima flip dispatch between runs w/ identical objectives.
  • USE: tie-breaking cost noise (1e-3 jitter) -> stabilizes plots.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.