表述修改
This commit is contained in:
parent
de836e77cf
commit
3092be96d3
|
|
@ -95,8 +95,8 @@ class Config:
|
|||
# 惩罚系数
|
||||
self.delta = 1.3 # 变更惩罚系数
|
||||
# 早停参数
|
||||
self.early_stop_patience = 30 # 连续多少代无改进则早停
|
||||
self.early_stop_threshold = 0.1 # 目标值变化阈值
|
||||
self.early_stop_patience = 50 # 连续多少代无改进则早停
|
||||
self.early_stop_threshold = 0.05 # 目标值变化阈值
|
||||
# 目标函数数量
|
||||
self.objective_num = 2 # 双目标(成本+延期)
|
||||
self.duplicate_threshold = 0.01 # 重复解保留数量比例
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class ResultVisualizer:
|
|||
q_segment = quantity_layer[start:end].astype(int) # 数量(整数)
|
||||
demand_q = self.utils.order.Q[i] # 需求数量(整数)
|
||||
allocated_q = np.sum(q_segment[e_segment == 1]) # 分配的总数量(整数)
|
||||
print(f"物料 {i} - 需求数量: {demand_q}, 分配总量: {allocated_q}")
|
||||
print(f"物料 {i+1} - 需求数量: {demand_q}, 分配总量: {allocated_q}")
|
||||
total_q_check.append(allocated_q == demand_q) # 整数相等检查
|
||||
print(f" 选择的企业及其分配:")
|
||||
for idx, ent in enumerate(ents):
|
||||
|
|
@ -104,7 +104,7 @@ class ResultVisualizer:
|
|||
print("-" * 80)
|
||||
# 验证数量约束是否满足
|
||||
if all(total_q_check):
|
||||
print("✅ 所有物料数量满足需求约束(整数匹配)")
|
||||
print("✅ 所有物料数量满足需求约束")
|
||||
else:
|
||||
print("❌ 部分物料数量未满足需求约束")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue