Commit 2bf4f011 authored by Tong Li's avatar Tong Li

倒排

parent fb4f76cb
...@@ -488,7 +488,7 @@ public class GeneticDecoder { ...@@ -488,7 +488,7 @@ public class GeneticDecoder {
public void serialDecode(Chromosome chromosome) { public void serialDecode(Chromosome chromosome) {
long decodeStart = System.nanoTime(); long decodeStart = System.nanoTime();
chromosome.setScenarioID(sceneId); chromosome.setScenarioID(sceneId);
boolean isJit=_globalParam.isJit(); boolean isJit=true;
if (rebuildStructureForCurrentDecode) { if (rebuildStructureForCurrentDecode) {
long t1 = System.nanoTime(); long t1 = System.nanoTime();
//创建半成品订单 //创建半成品订单
...@@ -1408,11 +1408,11 @@ public class GeneticDecoder { ...@@ -1408,11 +1408,11 @@ public class GeneticDecoder {
int bomtime = 0; int bomtime = 0;
if (needMaterialCheck&&islockMachineTime) { if (needMaterialCheck&&islockMachineTime) {
if(!isJit) {
bomtime = getOperationBOMTime(operation, chromosome, earliestStartTime, 2);
bomtime = getOperationBOMTime(operation, chromosome,earliestStartTime, 2);
earliestStartTime = Math.max(earliestStartTime, bomtime); earliestStartTime = Math.max(earliestStartTime, bomtime);
} }
}
// 正式落排前,再取一次当前机台最后一道工序,保证换型计算基于最新排程结果。 // 正式落排前,再取一次当前机台最后一道工序,保证换型计算基于最新排程结果。
...@@ -1524,7 +1524,16 @@ public class GeneticDecoder { ...@@ -1524,7 +1524,16 @@ public class GeneticDecoder {
// } // }
//扣库存 //扣库存
if (needMaterialCheck && islockMachineTime) { if (needMaterialCheck && islockMachineTime) {
if(!isJit) {
EditOperationBOMTime(operation, chromosome, startTime, machineTasksCache, entryIndexById, scheduleIndexById); EditOperationBOMTime(operation, chromosome, startTime, machineTasksCache, entryIndexById, scheduleIndexById);
}else {
int bomtime1 = getOperationBOMTime(operation, chromosome, startTime, 2);
if(bomtime1<=startTime)
{
EditOperationBOMTime(operation, chromosome, startTime, machineTasksCache, entryIndexById, scheduleIndexById);
}
}
} }
//换型时间是否占用设备加工时间 //换型时间是否占用设备加工时间
//10:00 开始上班 前面的任务:24:00 结束 开始换型 休息时间 10小时 //10:00 开始上班 前面的任务:24:00 结束 开始换型 休息时间 10小时
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment