From 397ca8847e0e17ccf80dbea548addbea9eb3e6db Mon Sep 17 00:00:00 2001 From: dmy Date: Thu, 8 Jan 2026 10:06:46 +0800 Subject: [PATCH] Fix MIP fallback return values: ensure consistent unpacking --- mip.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mip.py b/mip.py index 7da12ac..603d87c 100644 --- a/mip.py +++ b/mip.py @@ -43,7 +43,8 @@ def design_with_mip( ) 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: max_mw = get_max_capacity_func(cable_specs, voltage, power_factor) @@ -103,7 +104,8 @@ def design_with_mip( # 返回默认方案,如 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