科研 Skill
PyPSA能源系统建模优化
pypsa
Runs PyPSA studies: building a network, running power flow or operational OPF, and capacity-expansion optimization. Use to optimize dispatch or size storage/investment.
SKILL.md
PyPSA workflow
Start by creating or loading a named network handle. Use network inspection before optimization, and use operational optimization before investment optimization.
Default tool ladder
load_network(file_path)orcreate_network(...)to create the active network handle.get_network_info(network_name)andget_component_details(...)to understand topology, assets, and time series.run_power_flow(network_name, linear=False)for feasibility checks.optimize_network(network_name, ...)for dispatch or operational studies.optimize_investment(network_name, ...)for expansion questions.import_from_csv_folder(...)orexport_to_csv_folder(...)once the network state is worth moving.
Example sequence
Using the case39.nc network shipped with this skill:
load_network("case39.nc") -> network "case39" active, 39 buses
get_network_info("case39") -> 10 generators, 46 branches, 19 loads
run_power_flow("case39", linear=False) -> converged, max branch loading 87%
optimize_network("case39", solver_name="highs") -> feasible dispatch, hourly cost reported
Feasibility first, then dispatch. Only move to optimize_investment once a dispatch
study cannot answer the question.
Working rules
- Do not jump straight into expansion optimization when a dispatch study can answer the question.
- Use AC or DC power flow to sanity-check a network before relying on optimization outputs.
- Treat PyPSA as a planning and scheduling engine, not the final authority on detailed reactive mitigation.
Escalation triggers
Quote the numbers that tripped each row (bus + v_mag_pu, element + loading, infeasibility cause) rather than saying "it failed".
| Observation | Escalate to |
|---|---|
Bus v_mag_pu < 0.95 or > 1.05 on an AC power flow | voltage-violation-mitigation |
Line or transformer loaded > 100% of s_nom | thermal-overload-mitigation |
run_contingency_analysis N-1 overload or post-outage islanding | contingency-mitigation |
optimize_network / optimize_investment infeasible, reserve-short, or heavily curtailed | operations-planning-mitigation |
run_power_flow fails to converge | convergence-failure-mitigation |
Local assets in this skill
case39.nc— a ready test network.scripts/network_analysis.py— inspection.scripts/optimization_analysis.py— OPF result review.scripts/expansion_analysis.py— capacity-expansion studies.scripts/contingency_analysis.py— local N-1 screening outside PowerMCP.
Deliver
- The network handle and study type.
- The main feasibility or cost result.
- Whether the next step is mitigation, AC validation, or a larger optimization.
示例提示词
帮我用PyPSA搭一个网络,优化一下储能的容量配置。
所属插件
安装该插件会一并获得同领域的 63 个 Skill / MCP。
同插件的其他科研 Skill
- ANDES电力系统动态仿真Runs ANDES power-system dynamic studies via PowerMCP: power flow, eigenvalue analysis, and time-domain simulation. Use for damping, stability, or oscillation-mode questions.
- 电池选型与电源预算Builds an evidence-tagged power budget and sizes a manufacturable battery with pouch outline, seals, and derating. Use when sizing runtime, mAh, charging, or supply rails.
- FPGA比特流生成与烧录Generates a Xilinx FPGA bitstream and programs it over JTAG, or burns an MCS image into flash for power-on boot. Use when flashing a board or diagnosing boot failures.
- 硬件项目发布包组装Assembles a hardware release package (fab files, BOM/CPL, carts, assembly guide, hashed manifest) and runs a ready-to-build gate. Use before ordering prototypes.
- 时钟域交叉风险审查Audits clock-domain-crossing risk on an FPGA design and applies the smallest safe synchronizer or constraint fix. Use to resolve CDC violations before sign-off.
- 硬件产品认证合规规划Plans certifications a hardware product needs per target market (FCC, CE/RED, UKCA, battery/radio rules), with cost and lead-time estimates. Use before PCB or enclosure tooling.
- Vivado XDC时序约束编写Authors a Vivado XDC timing constraint set from scratch: clocks, I/O delays, and timing exceptions. Use first, before timing closure, on a design with no or incomplete constraints.
- N-1/N-2应急违规处置Playbook for N-1/N-2 contingency violations: ranks contingencies and proposes preventive and corrective actions. Use after a study shows voltage or thermal problems.
- 潮流计算不收敛诊断Playbook for power-flow convergence failures in PSS/E, PSLF, PowerWorld, pandapower, PyPSA, surge, or OpenDSS. Use when a case diverges or fails to solve.
- 硬件成本核算与采购Prices a hardware product at multiple volumes with one-time vs per-unit cost, landed cost per country, and sourcing leads. Use to estimate unit cost before a pitch.
- RTL仿真覆盖率收敛Measures RTL simulation code coverage and iteratively closes it toward a target by adding testbench stimulus. Use for a sign-off-grade coverage report.
- 配电网DER接纳能力治理Playbook for distribution DER hosting-capacity limits: voltage rise, reverse flow, and thermal limits from PV and storage. Use to estimate how much DER a feeder can host.
- 电子电路设计与审查Designs, audits, or corrects an electronic circuit from a brief, schematic, or netlist, checking power domains, reset sequencing, and ratings. Use for circuit review.
- 硬件可制造性红队审查Red-team audit that fix-loops a hardware project to ready-to-build, re-deriving parts, rails, battery physics, and cost. Use for a reality check before committing to a design.
- 电力系统动态稳定处置Playbook for dynamic stability problems: poor damping, angle instability, or sustained oscillations from eigenvalue or time-domain studies. Use after an unstable study result.
- Egret电力市场调度优化Runs Egret market/operations optimization (DC-OPF, AC-OPF, unit commitment) via PowerMCP. Use for cheapest dispatch, unit commitment, or congestion checks.
- 电子元器件选型核查Researches electronic components against primary sources: part numbers, datasheet limits, lifecycle, stock, and price breaks, one dossier per part. Use to verify or source a BOM.
- EMC电磁兼容预测试Plans grounding, shielding, and filtering for EMC/EMI, and runs an emissions pre-scan with a root-cause fix sequence. Use before a lab test or after a failed EMI scan.
- 产品外壳参数化建模Designs a hardware enclosure as parametric CAD with STEP/STL/GLB output, a DFM check, and Blender assembly validation. Use when designing a case or checking fit.
- 电网频率响应问题处置Playbook for frequency problems: low inertia, high RoCoF, weak primary response, or UFLS risk after loss of the largest unit. Use when a study flags frequency issues.
- FPGA RTL到比特流全流程Drives a Xilinx FPGA design end to end through RTL, simulation, synthesis, implementation, and bitstream, gated at every stage. Use to run the complete build flow in one pass.
- 硬件产品全流程总协调Leads a physical electronic product from idea to a doable design, coordinating specs, parts, battery, PCB, enclosure, render, and cost sub-skills. Use starting a hardware product.
- 硬件原理图与BOM审查Reviews hardware projects: checks schematics against datasheets, pin connections, and firmware-to-hardware alignment across KiCad/Altium files. Use for a design alignment check.
- FPGA ILA在线逻辑调试Inserts an Integrated Logic Analyzer, programs the board, arms a trigger, and reads captured waveforms on real FPGA hardware. Use when sim passes but the board fails.
常见问题
PyPSA能源系统建模优化能做什么?
Runs PyPSA studies: building a network, running power flow or operational OPF, and capacity-expansion optimization. Use to optimize dispatch or size storage/investment。
如何安装PyPSA能源系统建模优化?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「PyPSA能源系统建模优化」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
PyPSA能源系统建模优化需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
PyPSA能源系统建模优化经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。