调整api结构;恢复丢失部分api,详见scripts文件夹;新增关阀分析算法,实现api

This commit is contained in:
2026-01-29 11:39:50 +08:00
parent 7c9667822f
commit 9d7a9fb2fd
17 changed files with 6866 additions and 45 deletions

View File

@@ -9,6 +9,7 @@ from app.services.scheme_management import (
upload_shp_to_pg,
submit_risk_probability_result,
)
from app.services.valve_isolation import analyze_valve_isolation
from app.services.simulation_ops import (
project_management,
scheduling_simulation,
@@ -29,4 +30,5 @@ __all__ = [
"project_management",
"scheduling_simulation",
"daily_scheduling_simulation",
"analyze_valve_isolation",
]

View File

@@ -0,0 +1,7 @@
from typing import Any
from app.algorithms.valve_isolation import valve_isolation_analysis
def analyze_valve_isolation(network: str, accident_element: str) -> dict[str, Any]:
return valve_isolation_analysis(network, accident_element)