Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
sparrowzz
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
sgool
sparrowzz
Commits
f0283597
Commit
f0283597
authored
Jul 18, 2025
by
wzc-a
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add sbus and runpf test
parent
c1ed90d0
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
16 行增加
和
4 行删除
+16
-4
rspower/examples/compare_results.m
+15
-3
rspower/examples/execute_and_parse.m
+1
-1
没有找到文件。
rspower/examples/compare_results.m
查看文件 @
f0283597
...
...
@@ -27,6 +27,8 @@ function compare_results(case_name)
% 比较 Sbus 矩阵
compare_sbus
(
parsed_results
,
case_name
);
%
fprintf
(
'\n所有比较完成!\n\n'
);
end
...
...
@@ -101,10 +103,10 @@ function compare_sbus(parsed_results, case_name)
end
% 这里可以添加 matpower 计算 Sbus 的代码
%
matpower_sbus = cal_makesbus(case_name); % 需要实现这个函数
matpower_sbus
=
cal_makesbus
(
case_name
);
% 需要实现这个函数
fprintf
(
'Sbus 解析结果大小: %dx%d\n'
,
size
(
tensor_sbus
,
1
),
size
(
tensor_sbus
,
2
));
fprintf
(
'暂时没有对应的 matpower Sbus 计算函数进行比较\n
'
);
% 比较矩阵
compare_matrices
(
tensor_sbus
,
matpower_sbus
,
'Sbus
'
);
end
...
...
@@ -120,6 +122,16 @@ function jac = cal_makejac(case_name)
jac
=
full
(
makeJac
(
mpc
,
1
));
end
function
sbus
=
cal_makesbus
(
case_name
)
mpc
=
loadcase
(
case_name
);
sbus
=
full
(
makeSbus
(
mpc
));
end
function
pf
=
cal_runpf
(
case_name
)
mpc
=
loadcase
(
case_name
);
pf
=
runpf
(
mpc
);
end
function
field_name
=
find_field_by_name
(
results
,
target_name
)
% 在结果结构体中查找包含特定名称的字段
...
...
rspower/examples/execute_and_parse.m
查看文件 @
f0283597
...
...
@@ -3,7 +3,7 @@ function results = execute_and_parse()
% 返回一个结构体,包含所有测试文件的解析结果
% 设置路径和文件
tensoreval_path
=
'
..\..\..\eig-rc\target\release\examples\
tensoreval.exe'
;
tensoreval_path
=
'tensoreval.exe'
;
test_files
=
{
'test_make_jac.txt'
'test_make_sbus.txt'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论