Fix MIP fallback return values: ensure consistent unpacking
This commit is contained in:
6
mip.py
6
mip.py
@@ -43,7 +43,8 @@ def design_with_mip(
|
|||||||
)
|
)
|
||||||
from main import design_with_mst
|
from main import design_with_mst
|
||||||
|
|
||||||
return design_with_mst(turbines, substation)
|
connections = design_with_mst(turbines, substation)
|
||||||
|
return connections, turbines
|
||||||
|
|
||||||
if get_max_capacity_func:
|
if get_max_capacity_func:
|
||||||
max_mw = get_max_capacity_func(cable_specs, voltage, power_factor)
|
max_mw = get_max_capacity_func(cable_specs, voltage, power_factor)
|
||||||
@@ -103,7 +104,8 @@ def design_with_mip(
|
|||||||
# 返回默认方案,如 MST
|
# 返回默认方案,如 MST
|
||||||
from main import design_with_mst
|
from main import design_with_mst
|
||||||
|
|
||||||
return design_with_mst(turbines, substation)
|
connections = design_with_mst(turbines, substation)
|
||||||
|
return connections, turbines
|
||||||
|
|
||||||
# 提取结果
|
# 提取结果
|
||||||
cluster_assign = [-1] * n_turbines
|
cluster_assign = [-1] * n_turbines
|
||||||
|
|||||||
Reference in New Issue
Block a user