增加预安装供料器功能、路径规划模型支持单点、整线优化支持批量处理
This commit is contained in:
@ -77,7 +77,7 @@ def pickup_cycle_schematic(optimizer_result):
|
||||
plt.show()
|
||||
|
||||
|
||||
def placement_route_schematic(pcb_data, optimizer_result, cycle=-1):
|
||||
def placement_route_schematic(pcb_data, component_data, optimizer_result, cycle=-1):
|
||||
|
||||
plt.figure('cycle {}'.format(cycle + 1))
|
||||
pos_x, pos_y = [], []
|
||||
@ -128,7 +128,7 @@ def placement_route_schematic(pcb_data, optimizer_result, cycle=-1):
|
||||
continue
|
||||
placement = optimizer_result.placement_assign[placement_cycle][head]
|
||||
slot = optimizer_result.feeder_slot_assign[cycle_][head]
|
||||
feeder_part[slot] = pcb_data.loc[placement]['part']
|
||||
feeder_part[slot] = pcb_data.loc[placement]['part'] + component_data.iloc[optimizer_result.component_assign[cycle_][head]].fdr
|
||||
if slot not in feeder_counter.keys():
|
||||
feeder_counter[slot] = 0
|
||||
|
||||
@ -140,9 +140,9 @@ def placement_route_schematic(pcb_data, optimizer_result, cycle=-1):
|
||||
part + ': ' + str(feeder_counter[slot]), ha='center', size=7, rotation=90)
|
||||
|
||||
plt.plot([slotf1_pos[0] - slot_interval / 2, slotf1_pos[0] + slot_interval * (max_slot_index // 2 - 1 + 0.5)],
|
||||
[slotf1_pos[1] + 10, slotf1_pos[1] + 10], color = 'black')
|
||||
[slotf1_pos[1] + 10, slotf1_pos[1] + 10], color='black')
|
||||
plt.plot([slotf1_pos[0] - slot_interval / 2, slotf1_pos[0] + slot_interval * (max_slot_index // 2 - 1 + 0.5)],
|
||||
[slotf1_pos[1] - 40, slotf1_pos[1] - 40], color = 'black')
|
||||
[slotf1_pos[1] - 40, slotf1_pos[1] - 40], color='black')
|
||||
|
||||
for counter in range(max_slot_index // 2 + 1):
|
||||
pos = slotf1_pos[0] + (counter - 0.5) * slot_interval
|
||||
@ -402,8 +402,8 @@ def optimization_assign_result(component_data, pcb_data, optimizer_result, nozzl
|
||||
if index == -1:
|
||||
component_assign.loc[cycle, 'H{}'.format(head + 1)] = ''
|
||||
else:
|
||||
component_assign.loc[cycle, 'H{}'.format(head + 1)] = component_data.loc[index]['part']
|
||||
# component_assign.loc[cycle, 'H{}'.format(head + 1)] = 'C' + str(index)
|
||||
# component_assign.loc[cycle, 'H{}'.format(head + 1)] = component_data.loc[index]['part']
|
||||
component_assign.loc[cycle, 'H{}'.format(head + 1)] = 'C' + str(index)
|
||||
|
||||
print(component_assign)
|
||||
print('')
|
||||
@ -432,7 +432,6 @@ def optimization_assign_result(component_data, pcb_data, optimizer_result, nozzl
|
||||
def placement_info_evaluation(component_data, pcb_data, optimizer_result, hinter=False):
|
||||
# === 优化结果参数 ===
|
||||
info = OptInfo()
|
||||
|
||||
# === 校验 ===
|
||||
info.total_points = 0
|
||||
for cycle, components in enumerate(optimizer_result.component_assign):
|
||||
|
Reference in New Issue
Block a user