Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 12:57
· 21 commits to main since this release

pvsyst-cli-mcp v0.5.0

C&I PV+BESS Economics & Sizing, Zero-Template Li-ion BTR & 3-Voltage OND Synthesis, One-Shot Feasibility Study, and CI/PyPI Readiness


Highlights

1. C&I PV+BESS Economics, TOU PowerShift Planner & Hybrid Sizing Optimizer

  • Two-part demand-charge tariffs (tariff.demand_charge): supports monthly maximum-demand billing (demand), transformer contract-capacity billing (capacity), and automatic side-by-side comparison (compare) with recommended billing mode, baseline vs. post-PV/BESS peak shaving, and annual demand-charge savings.
  • Mid-life battery replacement & sensitivity tornado: models mid-life BESS pack replacement (battery_replacement_year, battery_replacement_cost_ratio / battery_replacement_cost) and deterministic one-at-a-time sensitivity sweeps (tariff, capex, yield, degradation) sorted by NPV swing.
  • Interactive Plotly report upgrades (pvsyst_generate_report): adds monthly peak-demand shaving comparison, financial sensitivity tornado, and 2D BESS sizing NPV heatmap + Pareto frontier charts (in both Chinese and English).
  • TOU → PowerShift 48-slot planner (pvsyst_plan_tou_storage_schedule): converts arbitrary TOU tariff schedules into 1- or 2-cycle/day PVsyst PowerShift 48 half-hour slots with minimum arbitrage spread guard and usable-energy power capping, returning drop-in GridStorageUpdates.
  • Two-stage hybrid PV+BESS sizing optimizer (pvsyst_optimize_bess_sizing):
    • Stage 1: fast pure-Python grid sweep over bess_kwh × pcs_kw × strategy (self_consumption, tou_arbitrage, peak_shaving) producing ranked candidates, 2D NPV heatmap, and CAPEX-vs-NPV Pareto frontier.
    • Stage 2 (optional): reconciles the top-K candidates via real PVsystCLI 8760-hour simulations (verify_top_k, guarded by dry_run=True + confirm=True).

2. Zero-Template Li-ion .BTR, 3-Voltage .OND, and Optional .PAN Refit (Verified on PVsyst 8.1.7)

  • Zero-template Li-ion .BTR synthesis (pvsyst_build_sourced_component(component_type="BTR")): synthesizes LFP and NMC Li-ion battery definitions directly from datasheet parameters, enforcing PVsyst 8.1.7 per-cell voltage, internal resistance (≤ 40 mV/cell @ I10), AlphaSOC, and CapaCourant validation rules.
  • 3-voltage efficiency curve .OND synthesis & editing: supports Flags=$1560, VNomEff, EfficMaxV, EfficEuroV, and ProfilPIOV1..V3 in both zero-template synthesis and pvsyst_update_component curve updates (preserving full backward compatibility for single-voltage .OND files).
  • Optional .PAN single-diode auto-refit: passing refit_single_diode=True on pvsyst_update_component recomputes RShunt, Rp_0, Rp_Exp, RSerie, Gamma, and muGamma from updated STC specs (refit_single_diode=False default preserves 100% legacy behavior).

3. One-Shot Feasibility Study, Runtime Resilience & MCP Discovery

  • One-shot feasibility study orchestrator (pvsyst_run_feasibility_study): chains inline zero-template component synthesis, simulation or existing CSV reuse, loss diagnostics, TOU schedule generation, hybrid BESS sizing, two-part economics + sensitivity, and interactive Plotly HTML report generation in one guarded workflow (dry_run=True default, confirm=True required for execution).
  • PVsystCLI transient abort retry: automatically retries transient startup/mid-check aborts (PVSYST_CLI_TRANSIENT_RETRIES, default 1) while never retrying license, syntax, model, or timeout failures.
  • Dynamic MCP Resources & Prompts:
    • 3 new read-only workspace resources: pvsyst://workspace/projects, pvsyst://workspace/components, pvsyst://workspace/results (5 resources total).
    • 2 new workflow prompts: ci_bess_feasibility_study and optimize_bess_sizing (6 prompts total).

4. Upstream Hardening (PRs #194–#221) & CI / PyPI Readiness

  • Includes all reliability fixes from PRs #194–#221 (regular-cadence timestamp enforcement in economics/report, self-consumption yield alignment, primary scenario promotion, OND curve floor scaling, near-shading loss diagnostics, batch parameter wiring, asymmetric MPPT guards, and strict dry_run guidance).
  • Upgraded GitHub Actions CI to Node 24-native majors (actions/checkout@v7, actions/setup-python@v7, actions/upload-artifact@v7, actions/download-artifact@v8) and fixed tag release uploads to avoid duplicate drafts.
  • Added PyPI OIDC Trusted Publishing workflow (.github/workflows/publish-pypi.yml) and complete pyproject.toml package metadata.

Tool Surface & Verification

  • MCP surface: 46 default tools (43 → 46: +pvsyst_plan_tou_storage_schedule, +pvsyst_optimize_bess_sizing, +pvsyst_run_feasibility_study), 75 total tools (PVSYST_TOOL_GROUPS=all), 5 resources, 6 prompts.
  • Offline CI & unit tests: scripts/ci_checks.py 31/31 OK (0 skips) + scripts/run_tests.py --suite unit 447/447 OK (0 skips).
  • Live PVsystCLI 8.1.7 verification: 0 warnings across full 8760-hour runs covering refitted .PAN + edited 3-voltage .OND and zero-template LFP .BTR + TOU PowerShift 48-slot storage.