修改数据格式和双面板优化
This commit is contained in:
18
opt/utils.py
18
opt/utils.py
@@ -160,15 +160,19 @@ def evaluation(config: MachineConfig, part_data, step_data, opt_res: OptResult,
|
||||
|
||||
# <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><D7B8><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>װ<EFBFBD><D7B0><EFBFBD><EFBFBD>Ϣ
|
||||
nozzle_assigned = ['Empty' for _ in range(config.head_num)]
|
||||
for head in range(config.head_num):
|
||||
for cycle in range(len(opt_res.part)):
|
||||
idx = opt_res.part[cycle][head]
|
||||
if idx == -1:
|
||||
continue
|
||||
else:
|
||||
nozzle_assigned[head] = part_data.loc[idx]['nz']
|
||||
|
||||
cur_layer = -1
|
||||
for cycle_set, _ in enumerate(opt_res.part):
|
||||
if opt_res.layer[cycle_set] != cur_layer:
|
||||
cur_layer = opt_res.layer[cycle_set]
|
||||
for head in range(config.head_num):
|
||||
for cycle in range(len(opt_res.part)):
|
||||
idx = opt_res.part[cycle][head]
|
||||
if idx == -1 or opt_res.layer[cycle] != cur_layer:
|
||||
break
|
||||
else:
|
||||
nozzle_assigned[head] = part_data.loc[idx]['nz']
|
||||
|
||||
floor_cycle, ceil_cycle = sum(opt_res.cycle[:cycle_set]), sum(opt_res.cycle[:(cycle_set + 1)])
|
||||
for cycle in range(floor_cycle, ceil_cycle):
|
||||
if sum(opt_res.part[cycle_set]) == -config.head_num:
|
||||
|
||||
Reference in New Issue
Block a user