Refine
This commit is contained in:
6
main.py
6
main.py
@@ -1560,11 +1560,11 @@ async def fastapi_delete_region(network: str, req: Request) -> ChangeSet:
|
|||||||
# water_distribution 34
|
# water_distribution 34
|
||||||
############################################################
|
############################################################
|
||||||
@app.post('/distributedemandtonodes/')
|
@app.post('/distributedemandtonodes/')
|
||||||
async def fastapi_distribute_demand_to_nodes(network: str, demand: float, nodes: list[str], type: str = DISTRIBUTION_TYPE_ADD) -> ChangeSet:
|
async def fastapi_distribute_demand_to_nodes(network: str, demand: float, nodes: list[str], type: str) -> ChangeSet:
|
||||||
return distribute_demand_to_nodes(network, demand, nodes, type)
|
return distribute_demand_to_nodes(network, demand, nodes, type)
|
||||||
|
|
||||||
@app.post("/distributedemandtoregion/")
|
@app.post("/distributedemandtoregion/")
|
||||||
async def fastapi_distribute_demand_to_region(network: str, demand: float, region: str, type: str = DISTRIBUTION_TYPE_ADD) -> ChangeSet:
|
async def fastapi_distribute_demand_to_region(network: str, demand: float, region: str, type: str) -> ChangeSet:
|
||||||
return distribute_demand_to_region(network, demand, region, type)
|
return distribute_demand_to_region(network, demand, region, type)
|
||||||
|
|
||||||
|
|
||||||
@@ -1572,7 +1572,7 @@ async def fastapi_distribute_demand_to_region(network: str, demand: float, regio
|
|||||||
# district_metering_area 35
|
# district_metering_area 35
|
||||||
############################################################
|
############################################################
|
||||||
@app.post('/calculatedistrictmeteringarea/')
|
@app.post('/calculatedistrictmeteringarea/')
|
||||||
async def fastapi_calculate_district_metering_area(network: str, nodes: list[str], part_count: int = 1, part_type: int = PARTITION_TYPE_RB) -> list[list[str]]:
|
async def fastapi_calculate_district_metering_area(network: str, nodes: list[str], part_count: int = 1, part_type: int) -> list[list[str]]:
|
||||||
return calculate_district_metering_area(network, nodes, part_count, part_type)
|
return calculate_district_metering_area(network, nodes, part_count, part_type)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user