Я делаю программу планирования с использованием optaplanner 7.12, но обнаружил, что иногда объяснение оценки не совпадает с лучшим оценкой, ниже приведен пример, пожалуйста, помогите мне сказать, почему?Спасибо команде optaplanner!
Solving ended:
time spent (900000),
best score (0hard/-1764medium/0soft),
score calculation speed (381/sec),
phase total (1),
environment mode (REPRODUCIBLE).
Explanation of score (-1000hard/-1764medium/-200soft):
Constraint match totals:
-1000hard: constraint (task ETD not in holiday) has 1 matches:
-1000hard: justifications ([Task [Task_name=1-PKGK19VE0006414A-EGV-2019-08-31/2019-08-01/SEA-3-N, extract_ct=3, waitting_time=84, searchRange=85, searchRangeDown=54]])
-1319medium: constraint (Loading not over ots_ratio) has 10 matches:
-390medium: justifications ([染色 12 taskList: [] ots_ratio:-390 ttl_ots_ratio:0])
-190medium: justifications ([染色 19 taskList: [] ots_ratio:-190 ttl_ots_ratio:0])
...
-445medium: constraint (Gmt_Loading not over overcapacity_ratio) has 22 matches:
-57medium: justifications ([EAV 19-W22-(5&6) taskList: [] overcapacity_ratio:-58])
-51medium: justifications ([EAV 19-W30-7 taskList: [] overcapacity_ratio:-52])
...
-200soft: constraint (task ETD should equals old_delivery_date) has 1 matches:
-200soft: justifications ([Task [Task_name=1-PKGK19VE0006414A-EGV-2019-08-31/2019-08-01/SEA-3-N, extract_ct=3, waitting_time=84, searchRange=85, searchRangeDown=54]])
Indictments (top 5 of 33):
-1000hard/-200soft: justification (Task [Task_name=1-PKGK19VE0006414A-EGV-2019-08-31/2019-08-01/SEA-3-N, extract_ct=3, waitting_time=84, searchRange=85, searchRangeDown=54]) has 2 matches:
-1000hard: constraint (task ETD not in holiday)
-200soft: constraint (task ETD should equals old_delivery_date)
-390medium: justification (染色 12 taskList: [] ots_ratio:-390 ttl_ots_ratio:0) has 1 matches:
-390medium: constraint (Loading not over ots_ratio)
-190medium: justification (染色 19 taskList: [] ots_ratio:-190 ttl_ots_ratio:0) has 1 matches:
-190medium: constraint (Loading not over ots_ratio)
-164medium: justification (抓毛 12 taskList: [] ots_ratio:-164 ttl_ots_ratio:0) has 1 matches:
-164medium: constraint (Loading not over ots_ratio)
-127medium: justification (染色 5 taskList: [] ots_ratio:-127 ttl_ots_ratio:0) has 1 matches:
-127medium: constraint (Loading not over ots_ratio)
...
ниже приведен один из слюней Жесткое ограничение:
rule "task ETD not in holiday"
salience 300
when
$Task:Task(!plan_flag.equals("1.MPS计算-N"),$Task_name:Task_name,$ETD:JS_ETD_Calendar_ETD_drools(waitting_time,extract_ct,destination,Delivery_Method),$check_holiday:check_holiday(JS_ETD_Calendar_ETD_drools(waitting_time,extract_ct,destination,Delivery_Method)));
eval($check_holiday>0)//eval($check_holiday>0)
then
scoreHolder.addHardConstraintMatch(kcontext, -1000);
end
below in main class,I use solver.explainBestScore():
System.out.println(solver.explainBestScore());