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
a44fe942
Commit
a44fe942
authored
Feb 05, 2025
by
dongshufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加注释
parent
3616147b
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
52 行增加
和
3 行删除
+52
-3
mems/examples/ds-powerflow/README.md
+46
-3
mems/examples/ds-powerflow/ds-static-topo/src/lib.rs
+6
-0
没有找到文件。
mems/examples/ds-powerflow/README.md
查看文件 @
a44fe942
...
@@ -5,7 +5,50 @@
...
@@ -5,7 +5,50 @@
## 2. 拓扑分析
## 2. 拓扑分析
### 2.1 静态拓扑分析
### 2.1 静态拓扑分析
输入:
1.
电气岛
2.
属性定义
3.
资源定义
输出:
-
默认输出下面六列
<table>
<th>
source
</th>
<th>
target
</th>
<th>
id
</th>
<th>
type
</th>
<th>
open
</th>
<th>
name
</th>
</table>
-
terminal_cn_dev,如果输出的边是该名称,则输出下面四列
<table>
<th>
terminal
</th>
<th>
cn
</th>
<th>
dev
</th>
<th>
type
</th>
</table>
-
point_terminal_phase: 如果输出的边是该名称,则输出下面三列
<table>
<th>
point
</th>
<th>
terminal
</th>
<th>
phase
</th>
</table>
### 2.2 动态拓扑分析
### 2.2 动态拓扑分析
## 3. 潮流计算
输入:
### 3.1 潮流计算模型
1.
电气岛
\ No newline at end of file
2.
属性定义
3.
资源定义
## 3. 输入参数准备
### 3.1 设备电气参数计算
### 3.2 潮流已知量输入
## 4. 潮流计算
### 4.1 潮流计算模型
\ No newline at end of file
mems/examples/ds-powerflow/ds-static-topo/src/lib.rs
查看文件 @
a44fe942
...
@@ -26,13 +26,17 @@ pub unsafe fn run(ptr: i32, len: u32) -> u64 {
...
@@ -26,13 +26,17 @@ pub unsafe fn run(ptr: i32, len: u32) -> u64 {
input
input
};
};
let
mut
error
=
None
;
let
mut
error
=
None
;
// 获取island
let
r
=
get_island_from_plugin_input
(
&
input
);
let
r
=
get_island_from_plugin_input
(
&
input
);
if
let
Err
(
s
)
=
&
r
{
if
let
Err
(
s
)
=
&
r
{
error
=
Some
(
s
.clone
());
error
=
Some
(
s
.clone
());
}
}
let
output
=
if
error
.is_none
()
{
let
output
=
if
error
.is_none
()
{
// 获取电气岛、属性定义、资源定义
let
(
island
,
prop_defs
,
defines
)
=
r
.unwrap
();
let
(
island
,
prop_defs
,
defines
)
=
r
.unwrap
();
let
mut
outgoing
=
vec!
[];
let
mut
outgoing
=
vec!
[];
// 获取输出的
for
model_input
in
&
input
.model
{
for
model_input
in
&
input
.model
{
match
model_input
{
match
model_input
{
ModelType
::
Outgoing
(
edge_name
)
=>
{
ModelType
::
Outgoing
(
edge_name
)
=>
{
...
@@ -58,6 +62,7 @@ pub unsafe fn run(ptr: i32, len: u32) -> u64 {
...
@@ -58,6 +62,7 @@ pub unsafe fn run(ptr: i32, len: u32) -> u64 {
is_matched
=
true
;
is_matched
=
true
;
create_static_topo
(
&
island
,
&
prop_defs
,
&
defines
,
&
mut
csv_bytes
,
&
mut
schema
);
create_static_topo
(
&
island
,
&
prop_defs
,
&
defines
,
&
mut
csv_bytes
,
&
mut
schema
);
}
}
// 根据输出名称来确定形成不同的data frame
if
outgoing
.contains
(
&
TERMINAL_DF_NAME
.to_string
())
{
if
outgoing
.contains
(
&
TERMINAL_DF_NAME
.to_string
())
{
is_matched
=
true
;
is_matched
=
true
;
let
mut
terminal_csv_str
=
String
::
from
(
"terminal,cn,dev,type
\n
"
);
let
mut
terminal_csv_str
=
String
::
from
(
"terminal,cn,dev,type
\n
"
);
...
@@ -94,6 +99,7 @@ pub unsafe fn run(ptr: i32, len: u32) -> u64 {
...
@@ -94,6 +99,7 @@ pub unsafe fn run(ptr: i32, len: u32) -> u64 {
// } else {
// } else {
// let _ = file.sync_all();
// let _ = file.sync_all();
// }
// }
if
outgoing
.contains
(
&
POINT_DF_NAME
.to_string
())
{
if
outgoing
.contains
(
&
POINT_DF_NAME
.to_string
())
{
is_matched
=
true
;
is_matched
=
true
;
let
mut
point_csv_str
=
String
::
from
(
"point,terminal,phase
\n
"
);
let
mut
point_csv_str
=
String
::
from
(
"point,terminal,phase
\n
"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论