Support dma calculation

This commit is contained in:
WQY\qiong
2023-04-30 23:58:22 +08:00
parent 2abf861584
commit 98b6354165
3 changed files with 95 additions and 0 deletions

View File

@@ -167,6 +167,10 @@ DISTRIBUTION_TYPE_ADD = api.DISTRIBUTION_TYPE_ADD
DISTRIBUTION_TYPE_OVERRIDE = api.DISTRIBUTION_TYPE_OVERRIDE
PARTITION_TYPE_RB = api.PARTITION_TYPE_RB
PARTITION_TYPE_KWAY = api.PARTITION_TYPE_KWAY
############################################################
# project
############################################################
@@ -998,6 +1002,9 @@ def distribute_demand_to_region(name: str, demand: float, region: str, type: str
# district_metering_area 35
############################################################
def calculate_district_metering_area(name: str, nodes: list[str], part_count: int = 1, part_type: int = PARTITION_TYPE_RB) -> list[list[str]]:
return api.calculate_district_metering_area(name, nodes, part_count, part_type)
############################################################
# service_area 36