Reorganize algorithm packages by business responsibility, move orchestration into services, and keep database access behind pooled repositories. Harden analysis API validation, remove unsafe legacy simulation endpoints, and add regression and architecture boundary coverage. BREAKING CHANGE: legacy algorithm module paths and obsolete simulation endpoints are removed.
14 lines
461 B
Python
14 lines
461 B
Python
from typing import Any
|
|
|
|
from app.algorithms.valve_isolation.topology_search import valve_isolation_analysis
|
|
from app.native.wndb.gis.network_views import get_network_link_nodes
|
|
|
|
|
|
def analyze_valve_isolation(
|
|
network: str,
|
|
accident_element: str | list[str],
|
|
disabled_valves: list[str] = None,
|
|
) -> dict[str, Any]:
|
|
link_entries = get_network_link_nodes(network)
|
|
return valve_isolation_analysis(link_entries, accident_element, disabled_valves)
|