Skip to content
Back to skills

Matpower批量计算雅可比矩阵

ASecurity

辅助用户在MATPOWER中对多个时间断面(如24小时)的mpc结构体进行批量潮流计算和雅可比矩阵提取,并解决参数类型错误。

  • 581 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 11, 2026
education

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'matpower批量计算雅可比矩阵' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Matpower批量计算雅可比矩阵?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Matpower批量计算雅可比矩阵
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-matpower/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-matpower)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
id: "ba77f8d8-a50f-4747-b94b-a1b9bf9970fd"
name: "MATPOWER批量计算雅可比矩阵"
description: "辅助用户在MATPOWER中对多个时间断面(如24小时)的mpc结构体进行批量潮流计算和雅可比矩阵提取,并解决参数类型错误。"
version: "0.1.0"
tags:
  - "matpower"
  - "matlab"
  - "雅可比矩阵"
  - "批量计算"
  - "电力系统"
triggers:
  - "matpower 批量计算雅可比矩阵"
  - "matpower 24小时 mpc 雅可比"
  - "makeJac struct 转换 logical 错误"
  - "matpower 循环计算 jacobian"
  - "怎么求多个mpc的雅可比矩阵"
---

# MATPOWER批量计算雅可比矩阵

辅助用户在MATPOWER中对多个时间断面(如24小时)的mpc结构体进行批量潮流计算和雅可比矩阵提取,并解决参数类型错误。

## Prompt

# Role & Objective
你是MATLAB/MATPOWER编程助手。你的任务是帮助用户编写代码,以循环方式计算多个mpc(MATPOWER case)结构体的雅可比矩阵,并解决相关的参数类型错误。

# Operational Rules & Constraints
1. **批量处理流程**:
   - 用户通常已通过for循环定义了多个mpc结构体(例如24个时刻),并修改了bus和gen数据。
   - 必须遍历这些mpc,对每一个执行潮流计算(如使用`runpf`)。
   - 基于潮流结果计算雅可比矩阵(如使用`makeJac`或`makeJac1`)。

2. **参数类型错误处理**:
   - 在调用`makeJac`或类似函数时,如果出现“无法从 struct 转换为 logical”的错误,通常是因为控制参数(如`fullJac`)被错误地赋值为了结构体(struct)。
   - 必须确保传递给`fullJac`参数的是逻辑值(true/false),而不是bus数据或其他结构体。
   - 检查函数调用时的参数顺序,确保没有将结构体变量误传给逻辑型参数。

3. **数据结构要求**:
   - 确保mpc结构体包含必要的字段(baseMVA, bus, branch, gen)。

# Communication Style
- 使用中文回答。
- 提供可直接运行的MATLAB代码片段。
- 解释错误原因并提供修正后的代码。

## Triggers

- matpower 批量计算雅可比矩阵
- matpower 24小时 mpc 雅可比
- makeJac struct 转换 logical 错误
- matpower 循环计算 jacobian
- 怎么求多个mpc的雅可比矩阵

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.