运行环境适配

This commit is contained in:
2025-11-24 13:50:00 +08:00
parent 4fd5560650
commit 34c411caeb
5 changed files with 19 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
from functools import wraps
from collections import defaultdict
from tqdm import tqdm
from gurobipy import *
from sklearn.linear_model import LinearRegression
from sklearn.svm import SVR
@@ -23,6 +23,7 @@ import matplotlib.pyplot as plt
import matplotlib
import traceback
import openpyxl
import itertools
matplotlib.use('TkAgg')

View File

@@ -168,7 +168,7 @@ def feeder_allocate(component_data, pcb_data, feeder_data, nozzle_pattern, figur
assert len(nozzle_pattern) == max_head_index
while True:
best_assign, best_assign_points = [], []
best_assign_slot, best_assign_value = -1, -np.Inf
best_assign_slot, best_assign_value = -1, -np.inf
best_nozzle_component, best_nozzle_component_points = None, None
for slot in range(1, max_slot_index // 2 - (max_head_index - 1) * interval_ratio + 1):
feeder_assign, feeder_assign_points = [], []