Support calculate distribution

This commit is contained in:
WQY\qiong
2023-05-08 20:59:54 +08:00
parent 132eb036fb
commit 32c47bb2f2
3 changed files with 44 additions and 0 deletions

View File

@@ -1032,6 +1032,13 @@ def delete_region(name: str, cs: ChangeSet) -> ChangeSet:
# water_distribution 34
############################################################
def calculate_demand_to_nodes(name: str, demand: float, nodes: list[str]) -> dict[str, float]:
return api.calculate_demand_to_nodes(name, demand, nodes)
def calculate_demand_to_region(name: str, demand: float, region: str) -> dict[str, float]:
return api.calculate_demand_to_region(name, demand, region)
def distribute_demand_to_nodes(name: str, demand: float, nodes: list[str], type: str = DISTRIBUTION_TYPE_ADD) -> ChangeSet:
return api.distribute_demand_to_nodes(name, demand, nodes, type)