Skip to content

About

IEEE 33 / 39 / RTS-79 节点 CPPS 通信拓扑优化系统。基于 FastAPI 后端 + Astro 前端,支持多种优化模式下的拓扑图可视化与性能评估。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

CPPS Grid Optimizer

IEEE 33 / 39 / RTS-79 节点 CPPS(Cyber-Physical Power System)通信拓扑优化系统。基于 FastAPI 后端 + Astro 前端,支持多种优化模式下的拓扑图可视化与性能评估。

项目结构

├── main.py              # FastAPI 后端入口 & 优化逻辑
├── requirements.txt     # Python 依赖
├── tests/               # 后端接口测试
│   └── test_optimize_api.py
├── matlab/              # MATLAB 分析与绘图脚本
│   ├── TEEE33_CPPS.m
│   ├── dist_ALAL.m
│   ├── dist_ALBL_1.m
│   ├── dist_ALCL.m
│   └── dist_Rand.m
├── frontend/            # Astro 前端可视化工作台
│   ├── src/
│   │   ├── components/  # 拓扑图、仪表盘、工作台
│   │   ├── layouts/     # 页面布局
│   │   └── pages/       # 路由页面
│   ├── public/          # 静态资源
│   └── package.json
└── docs/
    └── 运行手册.md       # 详细运行手册

快速开始

环境要求

  • Python 3.10+
  • Node.js 22.12+

安装

# 后端
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\Activate.ps1
pip install -r requirements.txt

# 前端
cd frontend
npm install

启动

# 终端 A:启动后端 (http://localhost:8000)
python main.py

# 终端 B:启动前端 (http://localhost:4321)
cd frontend && npm run dev

测试

pytest -q

支持的系统

系统 节点数 max_links 上限
IEEE 33 33 30
IEEE 39 39 46
RTS-79 24 30

优化模式

  • Rand — 随机链路分配
  • AL-AL — 平均时延 + 平均欧氏距离
  • AL-CL — 平均时延 + 聚类系数
  • AL-BL — 平均时延 + 介数中心性

API

POST /api/optimize

{
  "system": "33",
  "mode": "ALAL",
  "max_links": 10,
  "add_edge_count": 5
}

License

MIT

About

IEEE 33 / 39 / RTS-79 节点 CPPS 通信拓扑优化系统。基于 FastAPI 后端 + Astro 前端,支持多种优化模式下的拓扑图可视化与性能评估。

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages