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
00f08b23
Commit
00f08b23
authored
Jul 17, 2024
by
wzc-a
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix terminal id
parent
f8a6e220
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
60 行增加
和
31 行删除
+60
-31
data/dsntp/ieeeds/case13/dev/meas_def_ieee13.csv
+30
-30
mems/examples/ds-3phase-pf/src/nlp.rs
+30
-1
没有找到文件。
data/dsntp/ieeeds/case13/dev/meas_def_ieee13.csv
查看文件 @
00f08b23
Index,ID,Point ID,Dev ID,Terminal ID,Desc
Index,ID,Point ID,Dev ID,Terminal ID,Desc
1,1,1000001,1,650,TOTAL
1,1,1000001,1,1,TOTAL
2,2,1000002,5,634,A
2,2,1000002,15,26,A
3,3,1000003,5,634,A
3,3,1000003,15,26,A
4,4,1000004,5,634,B
4,4,1000004,15,26,B
5,5,1000005,5,634,B
5,5,1000005,15,26,B
6,6,1000006,5,634,C
6,6,1000006,15,26,C
7,7,1000007,5,634,C
7,7,1000007,15,26,C
8,8,1000008,3,645,B
8,8,1000008,16,27,B
9,9,1000009,3,645,B
9,9,1000009,16,27,B
10,10,1000010,6,646,B
10,10,1000010,17,28,B
11,11,1000011,6,646,B
11,11,1000011,17,28,B
12,12,1000012,8,652,A
12,12,1000012,18,29,A
13,13,1000013,8,652,A
13,13,1000013,18,29,A
14,14,1000014,9,671,A
14,14,1000014,19,30,A
15,15,1000015,9,671,A
15,15,1000015,19,30,A
16,16,1000016,9,671,B
16,16,1000016,19,30,B
17,17,1000017,9,671,B
17,17,1000017,19,30,B
18,18,1000018,9,671,C
18,18,1000018,19,30,C
19,19,1000019,9,671,C
19,19,1000019,19,30,C
20,20,1000020,14,675,A
20,20,1000020,20,31,A
21,21,1000021,14,675,A
21,21,1000021,20,31,A
22,22,1000022,14,675,B
22,22,1000022,20,31,B
23,23,1000023,14,675,B
23,23,1000023,20,31,B
24,24,1000024,14,675,C
24,24,1000024,20,31,C
25,25,1000025,14,675,C
25,25,1000025,20,31,C
26,26,1000026,12,692,C
26,26,1000026,21,32,C
27,27,1000027,12,692,C
27,27,1000027,21,32,C
28,28,1000028,13,611,C
28,28,1000028,22,33,C
29,29,1000029,13,611,C
29,29,1000029,22,33,C
\ No newline at end of file
\ No newline at end of file
mems/examples/ds-3phase-pf/src/nlp.rs
查看文件 @
00f08b23
...
@@ -113,9 +113,37 @@ fn get_pq_of_acline(r_x: Array<Complex64, Ix2>) -> Option<(String, String)> {
...
@@ -113,9 +113,37 @@ fn get_pq_of_acline(r_x: Array<Complex64, Ix2>) -> Option<(String, String)> {
r_x
[[
1
,
0
]],
r_x
[[
1
,
1
]],
r_x
[[
1
,
2
]],
r_x
[[
1
,
0
]],
r_x
[[
1
,
1
]],
r_x
[[
1
,
2
]],
r_x
[[
2
,
0
]],
r_x
[[
2
,
1
]],
r_x
[[
2
,
2
]]);
r_x
[[
2
,
0
]],
r_x
[[
2
,
1
]],
r_x
[[
2
,
2
]]);
let
gb
=
rx
.try_inverse
()
.unwrap
();
let
gb
=
rx
.try_inverse
()
.unwrap
();
format!
(
"{
}*x1-{}*x2-{}*x3"
,
gb
.m11
,
gb
.m12
,
gb
.m13
)
format!
(
"{
:.4}*x1-{:.4}*x2-{:.4}*x3"
,
gb
.m11.re
,
gb
.m12.re
,
gb
.m13.re
)
}
}
_
=>
{
return
None
;
}
_
=>
{
return
None
;
}
};
};
Some
((
result
.clone
(),
result
.clone
()))
Some
((
result
.clone
(),
result
.clone
()))
}
}
// test
#[cfg(test)]
mod
test
{
use
ndarray
::
array
;
use
super
::
*
;
#[test]
fn
test_get_pq_of_acline
()
{
// 原矩阵:
// 0.3465+1.0179j 0.1560+0.5017j 0.1580+0.4236j
// 0.1560+0.5017j 0.3375+1.0478j 0.1535+0.3849j
// 0.1580+0.4236j 0.1535+0.3849j 0.3414+1.0348j
// 求逆的结果:
// 0.4338 - 1.2502i -0.1840 + 0.4622i -0.1008 + 0.3455i
// -0.1840 + 0.4622i 0.3798 - 1.1847i -0.0478 + 0.2639i
// -0.1008 + 0.3455i -0.0478 + 0.2639i 0.3359 - 1.1176i
let
arr
=
array!
[
[
Complex64
::
new
(
0.3465
,
1.0179
),
Complex64
::
new
(
0.1560
,
0.5017
),
Complex64
::
new
(
0.1580
,
0.4236
)],
[
Complex64
::
new
(
0.1560
,
0.5017
),
Complex64
::
new
(
0.3375
,
1.0478
),
Complex64
::
new
(
0.1535
,
0.3849
)],
[
Complex64
::
new
(
0.1580
,
0.4236
),
Complex64
::
new
(
0.1535
,
0.3849
),
Complex64
::
new
(
0.3414
,
1.0348
)]];
let
(
p
,
q
)
=
get_pq_of_acline
(
arr
)
.unwrap
();
assert_eq!
(
p
,
"0.4338*x1--0.1840*x2--0.1008*x3"
);
let
arr
=
array!
[
[
Complex64
::
new
(
0.0
,
0.0
),
Complex64
::
new
(
0.0
,
0.0
),
Complex64
::
new
(
0.0
,
0.0
)],
[
Complex64
::
new
(
0.0
,
0.0
),
Complex64
::
new
(
0.0
,
0.0
),
Complex64
::
new
(
0.0
,
0.0
)],
[
Complex64
::
new
(
0.0
,
0.0
),
Complex64
::
new
(
0.0
,
0.0
),
Complex64
::
new
(
0.3414
,
1.0348
)]];
let
(
p
,
q
)
=
get_pq_of_acline
(
arr
)
.unwrap
();
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论